/* Nordisk og nøkternt: papir, blekk, hårstreker og én signalfarge. */
:root {
  --paper: #f7f6f3;
  --surface: #ffffff;
  --ink: #1f2a3d;
  --soft: #4a566b;
  --muted: #707b8e;
  --line: #e9e7e2;
  --stone: #f0eee9;
  --deep: #27496d;
  --accent: #e4633f;
  --fjord: #2f7fa8;
  --moss: #4a9a74;
  --ochre: #d0912b;
  --clay: #c96a58;
  --plum: #8468ad;
  --sky: #eef5f9;
  --r: 18px;
  --r-s: 11px;
  --shadow: 0 1px 2px rgb(31 42 61 / .05), 0 8px 24px -12px rgb(31 42 61 / .14);
  --sans: "Neue Haas Grotesk Text Pro", "Helvetica Neue", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --display: "Neue Haas Grotesk Display Pro", "Helvetica Neue", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --code: "Bahnschrift", "DIN Alternate", "Roboto Condensed", var(--sans);
  --gutter: clamp(20px, 4.5vw, 72px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.55 var(--sans); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(34px, 4.6vw, 60px); font-weight: 300; letter-spacing: -.028em; }
h2 { font-size: 22px; font-weight: 400; letter-spacing: -.01em; margin-bottom: 14px; }
h3 { font-size: 15px; font-weight: 600; }
h4 { font-size: 14px; font-weight: 600; margin: 18px 0 6px; }
p { margin: 0 0 12px; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
small { font-size: 13px; color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
main { padding: 0 var(--gutter) 96px; max-width: 1560px; margin: 0 auto; }
main:focus { outline: none; }

.eyebrow { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.eyebrow:first-letter { text-transform: uppercase; }
.lead { font-size: 19px; font-weight: 300; color: var(--soft); max-width: 62ch; margin: 14px 0 0; }
.muted { color: var(--muted); }
.fine { font-size: 12.5px; color: var(--muted); }
.nothing { color: var(--muted); max-width: 60ch; }
.spacer { flex: 1; }
.sr { font-size: 0; }
.sr textarea { font-size: 15px; }
.error { color: var(--accent); margin: 0; min-height: 0; }
.error:not(:empty) { margin-bottom: 12px; }

/* ---------- Knapper og skjema ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 20px; border: 1px solid var(--ink); background: var(--ink); color: var(--surface); font: 500 14px var(--sans); cursor: pointer; text-decoration: none; border-radius: 1px; white-space: nowrap; }
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: #aaa69a; }
.btn.ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.block { width: 100%; }
.link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: var(--accent); }
.link.quiet { color: var(--muted); font-size: 13px; }
.link.danger { color: var(--accent); }
label { display: block; font-size: 13px; color: var(--soft); margin-bottom: 14px; min-width: 0; }
input, select, textarea { font: 400 15px var(--sans); color: var(--ink); background: var(--surface); border: 1px solid #bdb9ad; border-radius: 1px; padding: 9px 11px; max-width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); }
label > input:not([type=checkbox]):not([type=radio]), label > select, label > textarea { display: block; width: 100%; margin-top: 5px; }
textarea { resize: vertical; line-height: 1.5; }
input[type=checkbox], input[type=radio] { accent-color: var(--ink); width: 17px; height: 17px; margin: 0; flex: none; }
.row { display: flex; gap: 14px; }
.row > * { flex: 1; }
.row > .narrow { flex: 0 0 110px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink); }
.check input { margin-top: 2px; }
.inline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0; white-space: nowrap; }
.inline select { width: auto; margin: 0; }

.picker { border: 0; padding: 0; margin: 0 0 18px; }
.picker legend { font-size: 13px; color: var(--soft); padding: 0; margin-bottom: 8px; }
.chips, .choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choices { margin-bottom: 18px; }
.chip { margin: 0; position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.chip span { display: block; padding: 6px 12px; border: 1px solid #bdb9ad; font-size: 13.5px; color: var(--ink); background: var(--surface); }
.chip.group span { border-style: dashed; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.months .chip span { min-width: 46px; text-align: center; padding: 6px 4px; }

/* ---------- Topp ---------- */
.top { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "brand search me" "nav nav nav"; align-items: center; column-gap: 32px; padding: 18px var(--gutter) 0; border-bottom: 1px solid var(--ink); background: var(--paper); }
.brand { grid-area: brand; text-decoration: none; line-height: 1.2; }
.brand strong { display: block; font: 600 20px var(--display); letter-spacing: -.02em; }
.brand span { font-size: 12px; color: var(--muted); }
.plan-switch { grid-area: plan; display: flex; align-items: center; gap: 8px; margin: 0; padding-left: 32px; border-left: 1px solid var(--line); }
.plan-switch span { color: var(--muted); }
.plan-switch select { border: 0; background: transparent; font-weight: 600; padding: 6px 2px; cursor: pointer; width: auto; margin: 0; }
.search { grid-area: search; justify-self: end; position: relative; width: min(340px, 100%); }
.search input { width: 100%; background: transparent; border: 0; border-bottom: 1px solid #bdb9ad; padding: 7px 0; font-size: 14px; }
#results { position: absolute; z-index: 30; right: 0; top: calc(100% + 6px); width: min(480px, 90vw); max-height: 60vh; overflow: auto; background: var(--surface); border: 1px solid var(--ink); }
#results a { display: flex; gap: 14px; padding: 10px 14px; text-decoration: none; border-bottom: 1px solid var(--line); }
#results a:hover { background: var(--stone); }
#results b { font-family: var(--code); min-width: 40px; }
#results small { display: block; }
#results p { padding: 12px 14px; margin: 0; }
.me { grid-area: me; text-decoration: none; font-weight: 500; }
.top nav { grid-area: nav; display: flex; gap: 28px; margin-top: 18px; overflow-x: auto; scrollbar-width: none; }
.top nav a { padding: 0 0 11px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.top nav a:hover { color: var(--ink); }
.top nav a[aria-current] { color: var(--ink); border-color: var(--accent); }

.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: clamp(36px, 6vw, 76px) 0 32px; }
.hero .lead { margin-bottom: 0; }
.hero > .check { margin: 0; }
.empty { padding: 80px 0; }
.empty h1 { margin-bottom: 14px; }

/* ---------- Innlogging ---------- */
.auth { display: grid; grid-template-columns: 1.35fr 1fr; min-height: 100vh; max-width: none; padding: 0; }
.auth-art { position: relative; overflow: hidden; background: var(--ink); color: var(--paper); padding: clamp(32px, 6vw, 88px); }
.auth-art h1 { font-size: clamp(48px, 7vw, 108px); position: relative; z-index: 1; margin-top: 8vh; }
.auth-art .eyebrow, .auth-art .lead { color: #bdbab0; position: relative; z-index: 1; }
.contour { position: absolute; left: 0; bottom: 0; width: 100%; height: 62%; fill: none; stroke: #f3f1eb; stroke-width: 1; opacity: .3; }
.contour path:nth-child(9) { stroke: var(--accent); stroke-width: 2; opacity: 3; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px var(--gutter); }
.auth-form form { width: min(360px, 100%); }
.auth-form h2 { font-size: 30px; font-weight: 300; margin-bottom: 22px; }
.auth-form .btn { margin: 6px 0 18px; }

/* ---------- Statuser ---------- */
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; color: var(--soft); }
.status::before { content: ""; width: 9px; height: 9px; border: 1.5px solid #8d897d; }
.s-planlegges::before { background: linear-gradient(135deg, var(--fjord) 50%, transparent 50%); border-color: var(--fjord); }
.s-pagar::before { background: var(--fjord); border-color: var(--fjord); }
.s-ferdig::before { background: var(--moss); border-color: var(--moss); }
.s-risiko, .s-forsinket { color: var(--accent); font-weight: 600; }
.s-risiko::before { background: var(--ochre); border-color: var(--ochre); }
.s-forsinket::before { background: var(--accent); border-color: var(--accent); }
.s-utgar { text-decoration: line-through; color: var(--muted); }
.tag { font-size: 12.5px; padding: 3px 10px; background: var(--ink); color: var(--surface); }

/* ---------- Oppgavelister ---------- */
ul.items, ul.lines, ul.plain, ul.log, ul.checklist, ul.contacts, ul.areas, ul.mapping { list-style: none; margin: 0; padding: 0; }
.items li { border-top: 1px solid var(--line); }
.items li:last-child { border-bottom: 1px solid var(--line); }
.item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto minmax(0, auto); gap: 6px 16px; align-items: baseline; padding: 13px 6px; text-decoration: none; }
.item:hover { background: var(--surface); }
.item:hover .title { color: var(--accent); }
.code { font-family: var(--code); font-weight: 600; letter-spacing: .01em; }
.what .title { display: block; font-size: 15.5px; }
.what small { display: block; }
.when { font-size: 13px; color: var(--soft); text-align: right; max-width: 170px; }
.when.late { color: var(--accent); font-weight: 600; }
.items.table .item { grid-template-columns: 62px minmax(0, 1fr) 170px 150px; align-items: center; }
.items .cancelled { opacity: .5; }

.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 88px); align-items: start; margin-top: 40px; }
.column > header { display: grid; grid-template-columns: 1fr auto; align-items: end; border-bottom: 2px solid var(--ink); padding-bottom: 10px; }
.column > header h2 { font-size: 28px; font-weight: 300; margin: 0; }
.column > header .count { font: 300 44px/1 var(--display); }
.column > header p { grid-column: 1 / -1; margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.column h3 { margin: 28px 0 8px; font-weight: 500; color: var(--soft); }
.column h3.alert { color: var(--accent); }
.column details { margin-top: 24px; }
.column details summary { cursor: pointer; margin-bottom: 8px; color: var(--muted); }
.column .nothing { margin-top: 20px; }

/* Månedsstripen */
.strip { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.strip button { background: none; border: 0; border-left: 1px solid var(--line); padding: 10px 4px 8px; font: 13px var(--sans); cursor: pointer; color: var(--soft); }
.strip button:first-child { border-left: 0; }
.strip button:hover { background: var(--surface); }
.strip button[aria-pressed=true] { background: var(--ink); color: var(--surface); }
.strip button.now > span:last-child { font-weight: 700; color: var(--accent); }
.bars { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 54px; margin-bottom: 6px; }
.bars i { width: min(14px, 32%); display: block; }
.bars .own { background: var(--ink); }
.bars .join { background: repeating-linear-gradient(135deg, #8d897d 0 1.5px, transparent 1.5px 4px); box-shadow: inset 0 0 0 1px #8d897d; }
.strip button[aria-pressed=true] .own { background: var(--surface); }

.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 12.5px; color: var(--soft); margin: 10px 0 0; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 10px; display: inline-block; }
.legend i.own { background: var(--ink); }
.legend i.join { background: repeating-linear-gradient(135deg, #8d897d 0 1.5px, transparent 1.5px 4px); box-shadow: inset 0 0 0 1px #8d897d; }
.legend i.accent { background: var(--accent); }
.legend i.s-ferdig { background: var(--moss); }
.legend i.s-pagar { background: var(--fjord); }
.legend i.s-planlegges { background: #8ea6b6; }
.legend i.s-risiko { background: var(--ochre); }

/* ---------- Tiltak ---------- */
.filters { display: flex; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--ink); padding-top: 18px; }
.filters input { flex: 1 1 260px; max-width: 420px; }
.group { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 16px 40px; padding: 36px 0 8px; }
.group > header .letter { display: block; font: 300 76px/.95 var(--display); letter-spacing: -.04em; margin-bottom: 8px; }
.group > header h2 { font-size: 18px; margin-bottom: 6px; }
.group > header { align-self: start; position: sticky; top: 16px; font-size: 13px; }

/* ---------- Oppgaveside ---------- */
.task-head { padding: clamp(28px, 4vw, 56px) 0 0; border-bottom: 1px solid var(--ink); }
.task-head h1 { max-width: 26ch; }
.task-head h1 .code { font-family: var(--code); font-weight: 300; color: var(--accent); margin-right: .2em; }
.task-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 22px 0 18px; }
.task-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: clamp(32px, 5vw, 88px); }
.task-main > section { padding: 30px 0; border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section-head label { margin: 0; font-size: 15px; color: var(--ink); cursor: pointer; }
.prose { max-width: 72ch; overflow-wrap: anywhere; }
aside { padding-top: 30px; font-size: 14px; }
.block { border-top: 2px solid var(--ink); padding: 14px 0 28px; }
.block h3 { font-size: 12.5px; font-weight: 500; color: var(--muted); margin: 14px 0 3px; }
.block h3:first-child { margin-top: 0; }
.block > h3:first-child { font-size: 15px; color: var(--ink); font-weight: 600; margin-bottom: 10px; }
.facts > h3:first-child { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-bottom: 3px; }
.block p { margin-bottom: 6px; }
.ref { font-size: 12.5px; color: var(--muted); }
.excerpt { margin: 0 0 12px; background: var(--surface); border-left: 3px solid var(--accent); padding: 12px 14px; }
.excerpt dt { font-size: 11.5px; color: var(--muted); }
.excerpt dd { margin: 0 0 8px; overflow-wrap: anywhere; }
blockquote { margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--surface); }
.monthline { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; margin-top: 10px; }
.monthline span { text-align: center; font-size: 11px; padding: 5px 0; background: var(--stone); color: var(--muted); }
.monthline .exec { background: var(--ink); color: var(--surface); }
.monthline .plan { background: repeating-linear-gradient(135deg, #b4b0a4 0 1.5px, transparent 1.5px 4px); color: var(--ink); box-shadow: inset 0 0 0 1px #8d897d; }
.legend.small { font-size: 11.5px; }

.past { background: var(--surface); padding: 26px 24px !important; margin: 24px 0 0; border: 1px solid var(--ink) !important; }
.past details { border-top: 1px solid var(--line); }
.past summary { display: flex; gap: 14px; flex-wrap: wrap; padding: 12px 0; cursor: pointer; align-items: baseline; }
.past summary span:nth-child(2) { flex: 1; }
.past-body { padding-bottom: 16px; }

.checklist li { display: flex; gap: 12px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); }
.checklist label { display: flex; gap: 12px; align-items: flex-start; flex: 1; margin: 0; font-size: 15px; color: var(--ink); cursor: pointer; }
.checklist input { margin-top: 3px; }
.checklist .done span { color: var(--muted); text-decoration: line-through; }
.checklist .quiet, .lines .quiet { visibility: hidden; }
.checklist li:hover .quiet, .lines li:hover .quiet, .checklist li:focus-within .quiet, .lines li:focus-within .quiet { visibility: visible; }
.add { display: flex; gap: 10px; margin: 12px 0 18px; align-items: flex-start; }
.add textarea { flex: 1; min-width: 0; }
.lines li { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); }
.lines li > a { flex: 1; min-width: 200px; overflow-wrap: anywhere; }
.contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.contacts li { border-top: 2px solid var(--ink); padding-top: 10px; display: flex; flex-direction: column; align-items: flex-start; overflow-wrap: anywhere; }
.log li { padding: 14px 0; border-top: 1px solid var(--line); }
.log header { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.log p { margin: 4px 0 0; overflow-wrap: anywhere; }
.plain li { margin-bottom: 8px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; align-items: center; }
.hits { max-height: 240px; overflow: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0 0; margin-bottom: 16px; }

/* ---------- Årshjul ---------- */
.gantt-wrap { overflow-x: auto; margin-top: 18px; }
table.gantt { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 880px; }
.gantt thead th { font-weight: 500; font-size: 13px; text-align: left; padding: 8px 6px; border-bottom: 2px solid var(--ink); border-left: 1px solid var(--line); vertical-align: bottom; }
.gantt thead th:first-child { width: 31%; border-left: 0; padding-left: 0; }
.gantt thead small { display: block; font-size: 10.5px; font-weight: 400; }
.gantt thead th.now { color: var(--accent); }
.gantt tbody th { text-align: left; font-weight: 400; font-size: 13.5px; padding: 0 10px 0 0; border-bottom: 1px solid var(--line); height: 32px; }
.gantt tbody th a { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.gantt tbody th a:hover { color: var(--accent); }
.gantt tbody th b { font-family: var(--code); display: inline-block; min-width: 42px; }
.gantt td { border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; }
.gantt td.now { background: #eadfd4; }
.gantt .group-row th { font-weight: 600; padding-top: 20px; height: auto; padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
.bar { display: block; height: 14px; }
.bar.exec { background: var(--ink); }
.bar.plan { background: repeating-linear-gradient(135deg, #8d897d 0 1.5px, transparent 1.5px 4px); box-shadow: inset 0 0 0 1px #8d897d; }
.gantt tr.mine th b { color: var(--accent); }
.gantt tr.mine .bar.exec { background: var(--accent); }
.gantt tr.mine .bar.plan { background: repeating-linear-gradient(135deg, var(--accent) 0 1.5px, transparent 1.5px 4px); box-shadow: inset 0 0 0 1px var(--accent); }
.rest { margin-top: 44px; }
.inline-list { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-list a { text-decoration: none; padding: 6px 12px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; }
.inline-list a.mine { border-color: var(--accent); }
.inline-list b { font-family: var(--code); margin-right: 4px; }
.months-text { margin-top: 56px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.months-text > h2 { grid-column: 1 / -1; margin: 0; }
.months-text article { border-top: 2px solid var(--ink); padding-top: 12px; font-size: 14px; }
.months-text h3 { font-size: 20px; font-weight: 300; margin-bottom: 8px; }

/* ---------- Oversikt og tabeller ---------- */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0 0 48px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.figures > div { padding: 14px 16px 12px; border-left: 1px solid var(--line); display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.figures > div:first-child { border-left: 0; padding-left: 0; }
.figures dd { margin: 0; font: 200 56px/1.05 var(--display); letter-spacing: -.03em; }
.figures dt { font-size: 13px; color: var(--muted); }
.figures .alert dd { color: var(--accent); }
main section + section, .columns + section { margin-top: 44px; }
.columns > section { margin: 0 !important; }
.areas li { display: grid; grid-template-columns: 40px minmax(0, 300px) minmax(80px, 1fr) 52px; gap: 14px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.areas b { font-family: var(--code); }
.areas small { text-align: right; }
.progress { display: flex; height: 12px; background: var(--stone); }
.progress i { display: block; }
.progress .s-ferdig { background: var(--moss); }
.progress .s-pagar { background: var(--fjord); }
.progress .s-planlegges { background: #8ea6b6; }
.progress .s-risiko { background: var(--ochre); }
.scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
.data th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--ink); padding: 8px 12px 8px 0; vertical-align: bottom; }
.data td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.data .num { text-align: right; white-space: nowrap; }
.data.compact { font-size: 13px; }
.data tr.cancelled { opacity: .5; }
.data code { font-family: var(--code); font-size: 15px; letter-spacing: .08em; }

/* ---------- Dokumentleser ---------- */
.reader { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); border-top: 1px solid var(--ink); padding-top: 24px; }
.toc { position: sticky; top: 16px; align-self: start; max-height: calc(100vh - 32px); overflow: auto; }
.toc button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 4px 0; font: 13px var(--sans); color: var(--soft); cursor: pointer; }
.toc button:hover { color: var(--accent); }
.toc .l1 { font-weight: 600; color: var(--ink); margin-top: 12px; }
.toc .l2 { padding-left: 12px; }
.doc { min-width: 0; max-width: 1080px; }
.doc h2 { font-size: 30px; font-weight: 300; margin: 48px 0 16px; }
.doc > h2:first-child { margin-top: 0; }
.doc h3 { font-size: 18px; margin: 28px 0 10px; }
.doc p, .doc ul { max-width: 76ch; }
.doc .scroll { margin: 14px 0 24px; }
.doc [id] { scroll-margin-top: 24px; }
.doc .highlight, .review-source .highlight { background: #f6dfc9; outline: 2px solid var(--accent); }
.doc td.margin, .doc th.margin { width: 108px; text-align: right; }
.reftag { display: inline-block; font: 600 12px var(--code); background: var(--ink); color: var(--surface); padding: 2px 7px; text-decoration: none; margin: 0 0 3px 3px; }
a.reftag:hover { background: var(--accent); }
.make { font: 12px var(--sans); background: var(--surface); border: 1px dashed #8d897d; padding: 2px 8px; cursor: pointer; opacity: 0; margin-left: 4px; }
.doc p:hover .make, .doc li:hover .make, .doc tr:hover .make, .make:focus-visible { opacity: 1; }
.import-doc .make { opacity: .75; }
@media (hover: none) { .make { opacity: 1; } .checklist .quiet, .lines .quiet { visibility: visible; } }

/* ---------- Planverk ---------- */
.drop { display: block; border: 1px dashed #77736a; padding: 34px; cursor: pointer; background: var(--surface); }
.drop strong { display: block; font: 300 28px var(--display); color: var(--ink); margin-bottom: 6px; }
.drop span { display: block; font-size: 15px; max-width: 70ch; }
.drop em { display: block; font-style: normal; color: var(--muted); margin-top: 10px; }
.drop:hover, .drop.over { border-color: var(--accent); border-style: solid; }
.level { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 12px 40px; border-top: 1px solid var(--ink); padding-top: 18px; }
.level header p { font-size: 13px; color: var(--muted); }
.level ul { list-style: none; margin: 0; padding: 0; grid-column: 2; }
.level li { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto auto; gap: 20px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.level .years { font: 200 38px/1 var(--display); letter-spacing: -.02em; white-space: nowrap; }
.level .open { background: none; border: 0; text-align: left; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.level .open small { display: block; }
.level .open:hover strong { color: var(--accent); }
.level > .nothing { grid-column: 2; }
.picklist { max-height: 300px; overflow: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-top: 12px; }
.picklist b { font-family: var(--code); margin-right: 4px; }

/* ---------- Veiviser ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 0; margin: 0 0 32px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 4px solid var(--line); }
.steps li.current { border-color: var(--accent); }
.steps li.past-step { border-color: var(--ink); }
.steps button { background: none; border: 0; padding: 8px 0; font: 13px var(--sans); cursor: pointer; text-align: left; color: var(--soft); }
.steps button::before { content: counter(step) "  "; font-family: var(--code); font-weight: 600; white-space: pre; }
.steps .current button { color: var(--ink); font-weight: 600; }
.sheet { max-width: 680px; }
.sheet.wide { max-width: 940px; }
.sheet .lead { margin: 0 0 24px; }
.notice { background: var(--surface); border-left: 3px solid var(--fjord); padding: 10px 14px; max-width: 80ch; }
.notice.warn { border-color: var(--accent); }
.mapping li { border-top: 1px solid var(--line); }
.mapping summary { display: grid; grid-template-columns: minmax(140px, 260px) minmax(0, 1fr) auto; gap: 16px; padding: 11px 0; cursor: pointer; list-style: none; }
.mapping summary em { font-style: normal; text-decoration: underline; color: var(--muted); font-size: 13px; }
.unmapped { color: var(--accent); }
.tabs { display: flex; gap: 4px; margin-bottom: 20px; flex-wrap: wrap; }
.tabs button { font: 14px var(--sans); background: transparent; border: 1px solid #aaa69a; padding: 8px 16px; cursor: pointer; }
.tabs button[aria-pressed=true] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.review { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.review-list { list-style: none; margin: 0; padding: 0; max-height: 78vh; overflow: auto; border-top: 1px solid var(--ink); }
.review-list button { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 8px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 8px 4px; font: 13px var(--sans); cursor: pointer; }
.review-list b { font-family: var(--code); }
.review-list span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-list em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.review-list .current { background: var(--ink); color: var(--surface); }
.review-list .excluded span { text-decoration: line-through; opacity: .6; }
.review-form details { border-top: 1px solid var(--line); padding: 9px 0; margin-bottom: 8px; }
.review-form summary { cursor: pointer; font-size: 14px; margin-bottom: 6px; }
.actions.sticky { position: sticky; bottom: 0; background: var(--paper); padding: 12px 0; margin: 0; border-top: 1px solid var(--ink); }
.review-source { padding: 14px 0 0; border-top: 2px solid var(--accent); position: sticky; top: 12px; max-height: 90vh; overflow: auto; }
.review-source h3 { margin-bottom: 8px; }
.context { font-size: 13px; color: var(--muted); }

/* ---------- Dialog og varsel ---------- */
dialog { border: 1px solid var(--ink); border-radius: 0; padding: 0; background: var(--paper); color: var(--ink); width: min(540px, calc(100vw - 24px)); max-height: calc(100vh - 32px); }
dialog.wide { width: min(780px, calc(100vw - 24px)); }
dialog::backdrop { background: rgb(22 23 21 / .55); }
dialog form { padding: 24px 28px; }
dialog header { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 20px; }
dialog header h2 { margin: 0; font-weight: 300; font-size: 26px; }
dialog footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
dialog h3 { margin: 22px 0 10px; }
dialog textarea[readonly] { width: 100%; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--surface); padding: 11px 20px; opacity: 0; pointer-events: none; transition: .18s; z-index: 50; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--accent); }

/* ---------- Datoer, delfrister og nytt ---------- */
.agenda { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px 48px; margin: 0 0 44px; }
.agenda section { border-top: 2px solid var(--ink); padding-top: 12px; min-width: 0; margin: 0 !important; }
.agenda h2 { font-size: 18px; margin-bottom: 8px; }
.agenda .lines li { flex-wrap: nowrap; align-items: center; }
.agenda .lines li > a { min-width: 0; text-decoration: none; }
.agenda a small { display: block; }
.agenda a.late, small.late, .fine.late { color: var(--accent); }
.agenda input[type=checkbox] { cursor: pointer; }
.date { flex: 0 0 46px; text-align: center; font-size: 11.5px; color: var(--muted); line-height: 1.1; }
.date b { display: block; font: 300 26px/1.05 var(--display); color: var(--ink); }
.answer { display: inline-flex; flex: none; }
.answer button { font: 12px var(--sans); background: transparent; border: 1px solid #aaa69a; padding: 4px 9px; cursor: pointer; }
.answer button + button { border-left: 0; }
.answer button[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--surface); }

.event { border-top: 1px solid var(--line); padding: 14px 0; }
.event header { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; margin-bottom: 8px; }
.event h3::first-letter { text-transform: uppercase; }
.event header span { flex: 1; color: var(--soft); }
.past-event { opacity: .65; }
.answer-ja { color: var(--moss); }
.answer-nei { color: var(--accent); font-weight: 600; }
.answer-none { color: var(--muted); }
.roster > div { display: grid; grid-template-columns: minmax(130px, 210px) minmax(0, 1fr); gap: 10px; align-items: center; margin-bottom: 6px; }
.roster label { margin: 0; }
.roster input:not([type=checkbox]) { padding: 5px 8px; font-size: 14px; }
.actions.tight { margin: 0 0 10px; font-size: 13px; }
#filer.over { outline: 2px dashed var(--accent); outline-offset: -2px; background: var(--surface); }
.log li.change { padding: 8px 0; color: var(--muted); font-size: 13px; }
.log li.change p { margin: 0; }
.lines select { font-size: 13px; padding: 4px 6px; }
.lines a small { display: block; }
.change-item { border-top: 1px solid var(--line); padding: 8px 0; font-size: 14px; }
.change-item summary { cursor: pointer; }
.change-item p { margin: 8px 0 0 18px; overflow-wrap: anywhere; }
del { color: var(--muted); }
ins { text-decoration: none; background: #e3ecdf; }
#results h4 { margin: 0; padding: 10px 14px 4px; font-size: 12px; color: var(--muted); }

/* ---------- Rapport ---------- */
.report { max-width: 900px; min-width: 0; }
.report > section { margin-top: 36px; }
.report textarea { width: 100%; min-height: 150px; }
.print-only { display: none; white-space: pre-wrap; }
.contact-table td { overflow-wrap: anywhere; }

/* ---------- Smalere skjermer ---------- */
@media (max-width: 1150px) {
  .review { grid-template-columns: minmax(160px, 220px) minmax(0, 1fr); }
  .review-source { grid-column: 2; position: static; }
}
@media (max-width: 900px) {
  .top { grid-template-columns: 1fr auto; grid-template-areas: "brand me" "plan plan" "search search" "nav nav"; row-gap: 8px; }
  .plan-switch { border: 0; padding: 0; }
  .search { justify-self: stretch; width: 100%; }
  .top nav { gap: 20px; margin-top: 8px; }
  .columns, .task-grid, .auth, .group, .level, .reader, .review { grid-template-columns: minmax(0, 1fr); }
  .level ul, .level > .nothing, .review-source { grid-column: 1; }
  .group > header, .toc { position: static; }
  .toc { max-height: 220px; border-bottom: 1px solid var(--line); }
  .group > header .letter { font-size: 48px; }
  .auth-art { min-height: 300px; }
  .auth-art h1 { margin-top: 0; }
  .review-list { max-height: 190px; }
  aside { padding-top: 0; }
}
@media (max-width: 620px) {
  .agenda { grid-template-columns: minmax(0, 1fr); }
  .agenda .lines li { flex-wrap: wrap; }
  .meeting-item { grid-template-columns: 48px minmax(0, 1fr); }
  .meeting-item .actions, .meeting-entry { grid-column: 2; justify-content: flex-start; }
  .roster > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .item, .items.table .item { grid-template-columns: 42px minmax(0, 1fr); }
  .item > :nth-child(3), .item > :nth-child(4) { grid-column: 2; text-align: left; }
  .row { flex-direction: column; gap: 0; }
  .row > .narrow { flex: 1; }
  .strip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .level li { grid-template-columns: minmax(0, 1fr) auto; }
  .level .years { grid-column: 1 / -1; }
  .areas li { grid-template-columns: 30px minmax(0, 1fr) 46px; }
  .areas .progress { grid-column: 2; grid-row: 2; }
  .steps button { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  body { background: #fff; }
  .top, .no-print, #toast { display: none !important; }
  main { padding: 0; }
  .columns { grid-template-columns: 1fr; }
  .print-only { display: block; }
  .report textarea { display: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ==========================================================================
   Farger og flater
   ========================================================================== */
main { padding-top: 0; }
#view { padding-bottom: 8px; }

/* Lys toppmeny med avrundede valg */
.top { background: rgb(255 255 255 / .92); border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.brand strong { color: var(--ink); }
.brand strong::before { content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 9px; border-radius: 6px; background: linear-gradient(135deg, #f08a4b, #d8473a); vertical-align: -2px; }
.brand span { color: var(--muted); }
.top nav { gap: 4px; margin-top: 12px; }
.top nav a { padding: 7px 15px; border: 0; border-radius: 99px; color: var(--soft); font-size: 14.5px; }
.top nav a:hover { background: var(--stone); color: var(--ink); }
.top nav a[aria-current] { background: var(--ink); color: #fff; }
.search input { background: var(--stone); border: 1px solid transparent; border-radius: 99px; padding: 9px 18px; color: var(--ink); }
.search input:focus { background: #fff; border-color: var(--fjord); outline: none; }
#results { border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.me { color: var(--ink); background: var(--stone); border-radius: 99px; padding: 8px 16px; }

/* Toppfeltet på hver side: et avrundet felt med fargeovergang */
.hero, .task-head { color: #fff; border-radius: 26px; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%20820%20260%27%20fill%3D%27none%27%20stroke%3D%27white%27%20stroke-width%3D%271.2%27%20stroke-opacity%3D%27.16%27%20preserveAspectRatio%3D%27xMaxYMax%20slice%27%3E%3Cpath%20d%3D%27M-20%20250%20C%20170%20225%2C%20260%20100%2C%20430%20135%20S%20650%2030%2C%20860%20115%27/%3E%3Cpath%20d%3D%27M-20%20226%20C%20170%20201%2C%20260%2082%2C%20430%20115%20S%20650%2018%2C%20860%2094%27/%3E%3Cpath%20d%3D%27M-20%20202%20C%20170%20177%2C%20260%2064%2C%20430%2095%20S%20650%206%2C%20860%2073%27/%3E%3Cpath%20d%3D%27M-20%20178%20C%20170%20153%2C%20260%2046%2C%20430%2075%20S%20650%20-6%2C%20860%2052%27/%3E%3Cpath%20d%3D%27M-20%20154%20C%20170%20129%2C%20260%2028%2C%20430%2055%20S%20650%20-18%2C%20860%2031%27/%3E%3Cpath%20d%3D%27M-20%20130%20C%20170%20105%2C%20260%2010%2C%20430%2035%20S%20650%20-30%2C%20860%2010%27/%3E%3Cpath%20d%3D%27M-20%20106%20C%20170%2081%2C%20260%20-8%2C%20430%2015%20S%20650%20-42%2C%20860%20-11%27/%3E%3Cpath%20d%3D%27M-20%2082%20C%20170%2057%2C%20260%20-26%2C%20430%20-5%20S%20650%20-54%2C%20860%20-32%27/%3E%3C/svg%3E") right bottom / auto 100% no-repeat, radial-gradient(120% 160% at 96% 0%, rgb(240 138 75 / .55), transparent 52%), linear-gradient(118deg, #243b63 0%, #2c6485 55%, #3b8f93 100%); box-shadow: var(--shadow); }
.hero { padding: 34px clamp(20px, 3vw, 40px) 30px; margin: 22px 0 24px; }
.hero .eyebrow, .task-head .eyebrow, .hero .lead { color: #d7e6f0; }
.hero h1 { font-size: clamp(32px, 4vw, 50px); font-weight: 350; }
.hero .btn, .task-head .btn { background: #fff; border-color: #fff; color: var(--ink); }
.hero .btn:hover, .task-head .btn:hover { background: #ffe9df; border-color: #ffe9df; color: var(--ink); }
.hero .btn.ghost, .task-head .btn.ghost { background: rgb(255 255 255 / .12); border-color: rgb(255 255 255 / .4); color: #fff; }
.hero .btn.ghost:hover, .task-head .btn.ghost:hover { background: rgb(255 255 255 / .24); border-color: #fff; color: #fff; }
.hero .link, .hero .inline, .hero .check { color: #fff; }
.hero select { background: #fff; color: var(--ink); border-color: transparent; }
.task-head { border-bottom: 0; padding: 26px clamp(20px, 3vw, 40px) 4px; margin: 22px 0 6px; }
.task-head .eyebrow a { color: #fff; }
.task-head h1 .code { display: inline-block; color: #fff; background: rgb(255 255 255 / .18); border-radius: 14px; padding: 0 14px; margin-right: 10px; }
.task-head .status { color: #fff; }
.task-head .tag { background: var(--accent); border-radius: 99px; }

/* Knapper og felt */
.btn { border-radius: 99px; background: var(--deep); border-color: var(--deep); padding: 0 22px; }
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost { background: var(--surface); border-color: #d9d6ce; }
.btn.block { border-radius: 99px; }
input, select, textarea { border-radius: var(--r-s); border-color: #dcd9d2; }
input:focus, select:focus, textarea:focus { border-color: var(--fjord); }
input[type=checkbox] { accent-color: var(--deep); border-radius: 5px; }
.chip span { border-radius: 99px; border-color: #dcd9d2; }
.chip input:checked + span, .tabs button[aria-pressed=true] { background: var(--deep); border-color: var(--deep); }
.tabs button { border-radius: 99px; }
dialog { border: 0; border-radius: 22px; box-shadow: 0 30px 80px -20px rgb(31 42 61 / .45); }
dialog::backdrop { background: rgb(31 42 61 / .45); }
#toast { border-radius: 99px; }
.drop, .notice, .excerpt, blockquote, .card-note { border-radius: var(--r-s); }

/* Planer: hver type har sin farge */
.k-arsplan { --plan: var(--fjord); }
.k-flerarsplan { --plan: var(--moss); }
.k-analyse { --plan: var(--ochre); }
.ptag { display: inline-block; font: 600 11px/1.6 var(--sans); padding: 0 7px; border-radius: 2px; background: var(--plan); color: #fff; vertical-align: 1px; }
.planfilter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.planfilter button { font: 13.5px var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-bottom: 3px solid var(--plan, var(--deep)); border-radius: 3px; padding: 7px 14px; cursor: pointer; }
.planfilter button[aria-pressed=true] { background: var(--plan, var(--deep)); border-color: var(--plan, var(--deep)); color: #fff; }
.plan-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-bottom: 4px solid var(--plan); padding-bottom: 10px; margin-top: 34px; }
.plan-title h2 { margin: 0; font-size: 26px; font-weight: 300; }
.plan-sub { margin: 22px 0 6px; }
.filters { border-top: 0; padding-top: 0; margin-bottom: 6px; }

/* Tiltak: områdene får hver sin farge */
.group { --g: var(--fjord); padding: 22px 0 4px; }
.group.c1 { --g: var(--clay); } .group.c2 { --g: var(--moss); } .group.c3 { --g: var(--ochre); } .group.c4 { --g: var(--plum); } .group.c5 { --g: var(--deep); }
.group > header h3 { font-size: 17px; margin-bottom: 6px; }
.group > header .letter { display: inline-flex; align-items: flex-end; justify-content: flex-start; width: 76px; height: 76px; padding: 8px 10px; background: var(--g); color: #fff; font-size: 40px; line-height: 1; }
.group .items { background: var(--surface); border-top: 4px solid var(--g); box-shadow: 0 1px 3px rgb(19 44 51 / .08); }
.group .code { color: var(--g); }
.items .item { padding-left: 16px; padding-right: 16px; }
.items li:first-child { border-top: 0; }
.items li:last-child { border-bottom: 0; }
.item:hover { background: var(--sky); }

/* Statusmerker */
.status { padding: 2px 9px; border-radius: 99px; background: #eef0f0; }
.s-planlegges { background: #e4eef6; } .s-pagar { background: #d9ecf2; } .s-ferdig { background: #e0f0e5; }
.s-risiko { background: #fbefd3; color: #7a5200; } .s-forsinket { background: #fde4db; color: #a8300c; }
.task-head .status { background: rgb(255 255 255 / .14); }
.items.table .item > .status, .item > .status { justify-self: start; }

/* Min side */
.agenda section, .column { background: var(--surface); border-top: 4px solid var(--fjord); box-shadow: 0 1px 3px rgb(19 44 51 / .08); padding: 16px 18px 12px; }
.agenda section:nth-child(1) { border-color: var(--accent); }
.agenda section:nth-child(2) { border-color: var(--ochre); }
.agenda section:nth-child(3) { border-color: var(--moss); }
.agenda { gap: 20px; }
.columns { gap: 24px; margin-top: 28px; }
.column:first-child { border-color: var(--accent); }
.column > header { border-bottom: 1px solid var(--line); }
.column:first-child > header .count { color: var(--accent); }
.column:nth-child(2) > header .count { color: var(--fjord); }
.strip { border: 0; background: var(--surface); box-shadow: 0 1px 3px rgb(19 44 51 / .08); }
.strip button[aria-pressed=true] { background: var(--deep); }
.bars .own, .legend i.own { background: var(--accent); }
.strip button[aria-pressed=true] .own { background: #ff9a77; }
.bars .join, .legend i.join { background: repeating-linear-gradient(135deg, var(--fjord) 0 2px, #cfe4ea 2px 4px); box-shadow: none; }

/* Årshjul */
.gantt-wrap { background: var(--surface); padding: 0 14px 14px; box-shadow: 0 1px 3px rgb(19 44 51 / .08); }
.bar.exec { background: var(--fjord); }
.bar.plan { background: repeating-linear-gradient(135deg, var(--fjord) 0 2px, #cfe4ea 2px 4px); box-shadow: none; }
.gantt tr.mine .bar.exec { background: var(--accent); }
.gantt tr.mine .bar.plan { background: repeating-linear-gradient(135deg, var(--accent) 0 2px, #fbe0d7 2px 4px); box-shadow: none; }
.gantt .group-row th { color: var(--fjord); border-color: var(--fjord); }
.gantt td.now { background: #fdeee7; }
.rest h3 { margin: 18px 0 8px; }
.wheel-text { margin-top: 16px; }
.wheel-text summary { cursor: pointer; color: var(--fjord); }
.wheel-text .months-text { margin-top: 18px; }
.months-text article { background: var(--surface); border-color: var(--fjord); padding: 12px 14px; }

/* Oversikt */
.figures { border: 0; gap: 14px; }
.figures > div, .figures > div:first-child { background: var(--surface); border-left: 0; border-top: 4px solid var(--fjord); padding: 14px 16px; box-shadow: 0 1px 3px rgb(19 44 51 / .08); }
.figures > div:nth-child(2) { border-color: var(--moss); } .figures > div:nth-child(3) { border-color: var(--ochre); }
.figures > div:nth-child(4) { border-color: var(--accent); } .figures > div:nth-child(5) { border-color: var(--plum); }
.areas b { color: var(--fjord); }
.progress { border-radius: 99px; overflow: hidden; }
.block { border-color: var(--fjord); }
.past { border-color: var(--ochre) !important; border-top-width: 4px !important; }
.excerpt, blockquote { border-color: var(--accent); }

/* Dokumentvalg */
.doc-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.doc-tabs button { text-align: left; font: 15px var(--sans); background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--plan); border-radius: 3px; padding: 10px 18px 11px; cursor: pointer; color: var(--ink); min-width: 240px; }
.doc-tabs small { display: block; }
.doc-tabs button[aria-selected=true] { background: var(--plan); border-color: var(--plan); color: #fff; }
.doc-tabs button[aria-selected=true] small { color: #fff; opacity: .85; }
.reader { border-top: 0; background: var(--surface); padding: 24px; box-shadow: 0 1px 3px rgb(19 44 51 / .08); }
.drop { border-color: #bcae96; }

/* ==========================================================================
   Møtebok
   ========================================================================== */
.mbook { display: grid; grid-template-columns: 260px minmax(0, 1fr); grid-template-areas: "bar bar" "nav main"; gap: 0 28px; padding-top: 16px; align-items: start; }
.mbook.closed { grid-template-columns: minmax(0, 1fr); grid-template-areas: "bar" "main"; }
.mbook.closed .mbook-nav { display: none; }
.mbook-bar { grid-area: bar; display: flex; justify-content: space-between; align-items: center; gap: 8px 20px; flex-wrap: wrap; margin-bottom: 14px; font-size: 13px; }
.sync { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; color: var(--soft); }
.sync .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--moss); margin-right: -8px; }
.sync .dot.warn { background: var(--ochre); } .sync .dot.bad { background: var(--accent); }
.mbook-nav { grid-area: nav; background: var(--surface); padding: 14px; box-shadow: 0 1px 3px rgb(19 44 51 / .08); position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.mbook-nav h2 { font-size: 12.5px; color: var(--muted); margin: 18px 0 4px; font-weight: 600; }
.mbook-nav ul { list-style: none; margin: 0; padding: 0; }
.mbook-nav ul a { display: block; padding: 7px 10px; text-decoration: none; border-left: 3px solid transparent; font-size: 14px; }
.mbook-nav ul a:hover { background: var(--sky); }
.mbook-nav ul a[aria-current] { background: var(--sky); border-color: var(--fjord); font-weight: 600; }
.mbook-nav small { display: block; font-weight: 400; font-size: 12px; }
.template-link { border-top: 1px solid var(--line); padding-top: 12px; margin: 16px 0 0; font-size: 14px; }
.mbook-main { grid-area: main; min-width: 0; max-width: 1080px; }
.mbook-main h1 { font-size: 34px; margin-bottom: 6px; }
.meet-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 8px; }
.meet-head p { color: var(--muted); margin: 0; }
.meet-head .actions { margin: 0; }
.save-line { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--muted); margin: 10px 0 8px; }
.card { background: var(--surface); box-shadow: 0 1px 3px rgb(19 44 51 / .09); padding: 18px 20px; margin-bottom: 16px; }
.card-note { background: var(--surface); padding: 18px 20px; color: var(--muted); }
.card.form { max-width: 720px; }
.field-label { font-size: 13px; font-weight: 600; margin: 0 8px 6px 0; }
.actions.end { justify-content: flex-end; }
.participants { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px 20px; }
.chip-editor { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.mchip { display: inline-flex; align-items: center; gap: 6px; background: var(--sky); border-radius: 99px; padding: 2px 6px 2px 11px; font-size: 13px; color: var(--ink); }
.mchip button { border: 0; background: none; cursor: pointer; font-size: 15px; line-height: 1; color: var(--muted); padding: 0 3px; }
.mchip button:hover { color: var(--accent); }
.psearch { position: relative; display: inline-block; width: 250px; max-width: 100%; }
.psearch input { width: 100%; font-size: 13px; padding: 5px 9px; }
.psearch ul { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 3px); list-style: none; margin: 0; padding: 4px; background: var(--surface); border: 1px solid var(--deep); max-height: 220px; overflow: auto; }
.psearch li button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 6px 8px; font: 14px var(--sans); cursor: pointer; }
.psearch li button.on, .psearch li button:hover { background: var(--sky); }

.meet-section h2 { display: flex; gap: 12px; align-items: baseline; font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.meet-section h2 span { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: var(--deep); color: #fff; font: 600 14px var(--code); }
.hint { font-style: italic; font-size: 13.5px; color: var(--muted); margin: 0 0 8px; }
.line-row { display: flex; align-items: center; gap: 8px; }
.line .mark { width: 18px; flex: none; text-align: center; color: var(--muted); display: inline-flex; justify-content: center; }
.line-text { flex: 1; min-width: 0; width: 100%; background: transparent; border: 1px solid transparent; padding: 4px 8px; font-size: 15.5px; }
.line-text:hover { background: #faf7f1; }
.line-text:focus { background: #fff; border-color: var(--fjord); outline: none; }
.line.done .line-text, .follow.done > label span { text-decoration: line-through; color: var(--muted); }
.line-tools { display: inline-flex; gap: 4px; align-items: center; }
.line-tools button { border: 0; background: none; font: 12px var(--sans); color: var(--muted); cursor: pointer; padding: 3px 6px; opacity: 0; }
.line:hover .line-tools button, .line:focus-within .line-tools button { opacity: 1; }
.line-tools button:hover { background: var(--sky); color: var(--ink); }
.line-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 8px 26px; }
.line-meta > input[type=date] { font-size: 13px; padding: 4px 8px; }
.line-meta input.late { color: var(--accent); border-color: var(--accent); }
.follow { border: 1px solid var(--line); border-left: 3px solid var(--ochre); padding: 8px 12px; margin-bottom: 8px; }
.follow > label { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 15px; color: var(--ink); }
.follow > label span:not(.mark) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.follow > small { display: block; margin: 2px 0 4px 27px; }
.follow .line-meta { margin-bottom: 0; }

/* Tiltak fra planverket i møtet */
.plan-card { border-top: 4px solid var(--accent); }
.plan-card > header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.plan-card > header h2 { font-size: 20px; font-weight: 600; margin: 0; }
.plan-card > header span { color: var(--accent); font-weight: 600; font-size: 13px; }
.plan-card h3 { font-size: 13px; margin: 18px 0 4px; padding: 4px 10px; background: var(--sky); display: flex; justify-content: space-between; }
.plan-card h3.g-henger { background: #fde4db; color: #a8300c; }
.plan-card h3.g-frist { background: #fbefd3; color: #7a5200; }
.ptask { border-bottom: 1px solid var(--line); }
.ptask-row { display: grid; grid-template-columns: 20px 42px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 4px; }
.ptask .expand { display: block; border: 0; background: none; padding: 0; font: 15px var(--sans); color: var(--ink); cursor: pointer; text-align: left; }
.ptask .expand:hover { color: var(--accent); }
.ptask .what small { display: block; }
.ptask.done .expand { text-decoration: line-through; color: var(--muted); }
.ptask-body { padding: 0 4px 10px 72px; }
.ptask-body .follow { border-left-color: var(--fjord); }
.add-note { border: 1px dashed #cabfae; font-size: 14px; }
.ptask-links { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0 0; font-size: 13px; }

.template { list-style: none; padding: 0; margin: 0 0 12px; }
.template .card { margin-bottom: 10px; padding: 14px 16px; }
.template-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.template-head b { width: 22px; text-align: center; color: var(--muted); }
.template-head input { flex: 1; min-width: 0; font-weight: 600; }
.template-head button { border: 0; background: none; cursor: pointer; padding: 6px 9px; font-size: 15px; }
.template-head button:disabled { opacity: .3; cursor: default; }
.template input[data-f=hint] { width: 100%; font-style: italic; font-size: 14px; margin-bottom: 8px; }
.template .check { margin-bottom: 4px; }

@media (hover: none) { .line-tools button { opacity: 1; } }
@media (max-width: 900px) {
  .top { grid-template-areas: "brand me" "search search" "nav nav"; }
  .mbook { grid-template-columns: minmax(0, 1fr); grid-template-areas: "bar" "nav" "main"; }
  .mbook-nav { position: static; max-height: 260px; margin-bottom: 16px; }
  .group > header .letter { width: 56px; height: 56px; font-size: 28px; }
  .hero, .task-head { background-image: none; }
}
@media (max-width: 620px) {
  .ptask-row { grid-template-columns: 20px 36px minmax(0, 1fr); }
  .ptask-row > .when, .ptask-row > .status { grid-column: 3; justify-self: start; text-align: left; }
  .ptask-body { padding-left: 8px; }
  .card { padding: 14px 12px; }
  .doc-tabs button { min-width: 0; flex: 1 1 100%; }
  .reader { padding: 12px; }
}
@media print {
  .hero, .task-head { background: none; color: #000; box-shadow: none; clip-path: none; }
  .hero .eyebrow, .hero .lead { color: #333; }
  .mbook { display: block; }
  .mbook-nav, .mbook-bar, .psearch, .add-note, .line-tools { display: none !important; }
  .card { box-shadow: none; padding: 8px 0; }
  .ptask-body[hidden] { display: none; }
}

/* ==========================================================================
   Myke former
   ========================================================================== */
.agenda section, .column, .card, .mbook-nav, .strip, .gantt-wrap, .reader, .months-text article,
.figures > div, .figures > div:first-child, .group .items, .when-card { border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.agenda section, .column, .figures > div, .figures > div:first-child { background: var(--surface); }

/* Farge som en liten strek ved overskriften i stedet for tykke kanter */
.column > header h2::before, .agenda h2::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 10px; background: var(--dot, var(--fjord)); vertical-align: middle; }
.column > header h2::before { width: 12px; height: 12px; vertical-align: 2px; }
.column:first-child, .agenda section:nth-child(1) { --dot: var(--accent); }
.agenda section:nth-child(2) { --dot: var(--ochre); }
.agenda section:nth-child(3) { --dot: var(--moss); }
.agenda section:nth-child(4) { --dot: var(--plum); }
.column { padding: 20px 20px 14px; }
.column .items li:last-child { border-bottom: 0; }
.strip { overflow: hidden; }
.strip button[aria-pressed=true] { background: var(--deep); }
.bars i { border-radius: 4px 4px 0 0; }
.legend i { border-radius: 3px; }
.item { border-radius: var(--r-s); }
.status::before { border-radius: 50%; }
.ptag { border-radius: 99px; padding: 0 9px; }

.planfilter button { border: 1px solid var(--line); border-radius: 99px; padding: 8px 17px; display: inline-flex; align-items: center; gap: 8px; }
.planfilter button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--plan, var(--deep)); }
.planfilter button[aria-pressed=true]::before { background: #fff; }
.plan-title { border-bottom: 0; padding-bottom: 0; }
.plan-title h2 { font-weight: 400; }

/* Tiltak */
.group .items { overflow: hidden; padding: 6px; }
.group .items li { border-top-color: var(--line); }
.group > header .letter { align-items: center; justify-content: center; padding: 0; width: 62px; height: 62px; border-radius: 20px; font-size: 28px; font-weight: 500; background: color-mix(in srgb, var(--g) 15%, #fff); color: var(--g); }

.figures { gap: 14px; }
.figures dd { color: var(--deep); }
.figures > div:nth-child(2) dd { color: var(--moss); }
.figures > div:nth-child(3) dd { color: var(--ochre); }
.figures > div:nth-child(4) dd { color: var(--accent); }
.figures > div:nth-child(5) dd { color: var(--plum); }
.gantt-wrap { padding: 6px 18px 18px; }
.bar { border-radius: 99px; margin: 0 2px; height: 12px; }
.inline-list a { border-radius: 99px; }
.doc-tabs button { border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.doc-tabs button strong::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; background: var(--plan); vertical-align: 1px; }
.doc-tabs button[aria-selected=true] strong::before { background: #fff; }
.drop { border: 2px dashed #d3cfc5; border-radius: var(--r); }
.steps li { border-top: 0; position: relative; padding-top: 6px; }
.steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; border-radius: 99px; background: var(--line); }
.steps li.current::before { background: var(--accent); }
.steps li.past-step::before { background: var(--deep); }
.block { border-top: 1px solid var(--line); }
.past { border: 1px solid #f0ddb8 !important; background: #fffaf0; border-radius: var(--r); }
.contacts li { border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 14px; background: var(--surface); }
.picklist, .hits { border-radius: var(--r-s); }
.monthline span { border-radius: 6px; }
.excerpt, blockquote { border-left: 0; background: var(--sky); padding: 14px 16px; }
.notice { border-left: 0; background: var(--sky); }
.notice.warn { background: #fdf3e3; }

/* Gjennomføring på oppgaven */
.when-card { display: flex; justify-content: space-between; align-items: center; gap: 14px 24px; flex-wrap: wrap; background: var(--surface); padding: 18px 22px; margin: 24px 0 4px; }
.when-card h2 { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 4px; }
.when-card p { margin: 0; font: 350 24px/1.25 var(--display); color: var(--muted); }
.when-card.set { background: linear-gradient(120deg, #eef6f8, #fdf3ec); border-color: transparent; }
.when-card.set p { color: var(--ink); }
.when-fields .row { margin-top: -4px; }

/* Møtebok */
.card, .mbook-nav { border-radius: var(--r); }
.plan-card { border: 1px solid var(--line); }
.plan-card h3 { border-radius: 99px; padding: 5px 14px; }
.mbook-nav ul a { border-left: 0; border-radius: var(--r-s); }
.meet-section h2 span { border-radius: 10px; background: color-mix(in srgb, var(--deep) 13%, #fff); color: var(--deep); }
.line-text { border-radius: var(--r-s); }
.follow { border: 1px solid var(--line); border-radius: var(--r-s); background: #fdfcfa; }
.psearch ul { border: 1px solid var(--line); border-radius: var(--r-s); box-shadow: var(--shadow); }
.psearch li button { border-radius: 8px; }
.add-note { border-radius: var(--r-s); }

/* Innlogging */
.auth-art { background: radial-gradient(110% 90% at 90% 8%, rgb(240 138 75 / .6), transparent 55%), linear-gradient(150deg, #243b63 0%, #2c6485 55%, #3b8f93 100%); }
.contour path:nth-child(9) { stroke: #ffc9a8; }
.auth-form .btn { min-height: 46px; }

@media (max-width: 900px) {
  .hero, .task-head { background-image: linear-gradient(118deg, #243b63, #2c6485 60%, #3b8f93); border-radius: 20px; }
  .group > header .letter { width: 52px; height: 52px; font-size: 24px; border-radius: 16px; }
  .top nav a { padding: 6px 12px; }
}
@media print {
  .hero, .task-head, .when-card.set { background: none; color: #000; box-shadow: none; }
  .agenda section, .column, .card, .figures > div, .group .items, .when-card, .gantt-wrap, .reader { box-shadow: none; }
}

/* Fargen ligger i prikken ved overskriften, ikke i rammen */
.column, .column:first-child, .agenda section, .agenda section:nth-child(n), .figures > div, .figures > div:nth-child(n) { border-color: var(--line); }
.legend i.exec { background: var(--fjord); }

/* År for år i analysen og flerårsplaner */
.strip.years { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.strip.years .bars i { width: 26px; }
