:root {
  --bg: #f6f5f1; --surface: #ffffff; --surface-2: #f1efe9; --ink: #191917; --ink-2: #47463f; --muted: #7b796f;
  --line: #e5e2d9; --line-2: #d6d2c6; --accent: #0f5c4d; --accent-ink: #ffffff; --accent-soft: #e2eeea;
  --warn: #a63f1e; --warn-soft: #f8e9e2; --shadow: 0 1px 2px rgb(20 20 15 / .04), 0 8px 24px -12px rgb(20 20 15 / .12);
  --sans: Geist, ui-sans-serif, system-ui, sans-serif; --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --serif: "Source Serif 4", Georgia, serif; --r: 14px; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111210; --surface: #191a18; --surface-2: #20211f; --ink: #ecebe5; --ink-2: #c0beb5; --muted: #8e8c83;
    --line: #2a2b28; --line-2: #383935; --accent: #6cc4ae; --accent-ink: #0d1412; --accent-soft: #1a2a26;
    --warn: #ee9877; --warn-soft: #2e1c15; --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111210; --surface: #191a18; --surface-2: #20211f; --ink: #ecebe5; --ink-2: #c0beb5; --muted: #8e8c83;
  --line: #2a2b28; --line-2: #383935; --accent: #6cc4ae; --accent-ink: #0d1412; --accent-soft: #1a2a26;
  --warn: #ee9877; --warn-soft: #2e1c15; --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .5); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { display: block; }

/* Topplinje */
.topbar { display: flex; align-items: center; gap: 16px; padding: 10px 20px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.mark { width: 22px; height: 22px; fill: var(--accent); }
.status { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; justify-content: flex-end; }
.pill { font-size: 12px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.pill .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; }
.pill.warn .dot { background: var(--warn); }
.actions { display: flex; gap: 6px; }
.icon-btn, .ghost-btn { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; height: 32px; }
.icon-btn { width: 32px; display: grid; place-items: center; }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: var(--ink-2); stroke-width: 1.8; }
.ghost-btn { padding: 0 12px; font-size: 13px; color: var(--ink-2); }
.icon-btn:hover, .ghost-btn:hover { border-color: var(--line-2); color: var(--ink); }

main { flex: 1; min-height: 0; overflow-y: auto; }
.wrap { max-width: 820px; margin: 0 auto; padding: 32px 16px 48px; }

/* Startside */
.empty { padding: 7vh 0 0; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; }
.empty h1 { font: 600 clamp(28px, 5vw, 40px)/1.12 var(--serif); letter-spacing: -.015em; margin: 0 0 14px; max-width: 16em; }
.lead { color: var(--ink-2); font-size: 16px; max-width: 38em; margin: 0 0 28px; }
.examples { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.examples button { display: flex; flex-direction: column; justify-content: flex-start; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; cursor: pointer;
  font-size: 14px; line-height: 1.4; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.examples button:hover { border-color: var(--accent); transform: translateY(-1px); }
.ex-tag { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); margin-bottom: 6px; font-weight: 500; }

/* Samtale */
.q-user { margin: 0 0 18px auto; width: fit-content; max-width: 85%; background: var(--surface-2); border: 1px solid var(--line); padding: 10px 14px; border-radius: 14px 14px 4px 14px; white-space: pre-wrap; }
.turn { margin: 0 0 40px; }

/* Prosesspanel */
.proc { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 18px; overflow: hidden; }
.proc > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 9px 14px; font-size: 13px; color: var(--ink-2); }
.proc > summary::-webkit-details-marker { display: none; }
.proc > summary .chev { margin-left: 4px; width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 2; transition: transform .15s; }
.proc[open] > summary .chev { transform: rotate(90deg); }
.proc .stats { margin-left: auto; font: 12px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
.proc.done .spinner { animation: none; border-color: var(--accent); background: var(--accent);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='black' stroke-width='3'/%3E%3C/svg%3E") center/100% no-repeat; border: 0; }
.proc.failed .spinner { animation: none; border-color: var(--warn); }
@keyframes spin { to { transform: rotate(360deg); } }
.steps { list-style: none; margin: 0; padding: 4px 14px 12px 38px; border-top: 1px solid var(--line); }
.steps li { position: relative; font-size: 13px; color: var(--ink-2); padding: 5px 0; }
.steps li::before { content: ""; position: absolute; left: -20px; top: 11px; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.steps li.ok::before { background: var(--accent); border-color: var(--accent); }
.steps li.err::before { background: var(--warn); border-color: var(--warn); }
.steps li.run::before { border-color: var(--accent); animation: pulse 1s ease-in-out infinite; }
.steps li .arg { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-left: 6px; }
.steps li .feil { display: block; color: var(--warn); font-size: 12px; }
@keyframes pulse { 50% { opacity: .3; } }

/* Datakort */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); margin: 0 0 22px; overflow: hidden; }
.card-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.card-head .eyebrow { margin-bottom: 4px; }
.card-head .eyebrow b { color: var(--warn); font-weight: 500; }
.card-head h2 { font: 600 21px/1.25 var(--serif); margin: 0; letter-spacing: -.01em; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.meta .mono { font-family: var(--mono); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-bottom: 1px solid var(--line); }
.kpi { padding: 14px 20px; border-right: 1px solid var(--line); }
.kpi:last-child { border-right: 0; }
.kpi .k { font-size: 12px; color: var(--muted); }
.kpi .v { font: 500 22px/1.2 var(--mono); letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.kpi.hl .v { color: var(--accent); }
.section { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; }
.section h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 500; margin: 0 0 12px; }
.notes { margin: 0; padding: 12px 20px; font-size: 13px; color: var(--ink-2); background: var(--surface-2); border-bottom: 1px solid var(--line); list-style: none; }
.notes li + li { margin-top: 4px; }
.notes li::before { content: "→ "; color: var(--muted); }

/* Eiertre */
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: 14px; padding-left: 18px; }
.tree li { position: relative; padding: 3px 0; }
.tree ul > li::before { content: ""; position: absolute; left: -18px; top: 0; bottom: 0; border-left: 1px solid var(--line-2); }
.tree ul > li:last-child::before { bottom: auto; height: 21px; }
.tree ul > li::after { content: ""; position: absolute; left: -18px; top: 21px; width: 14px; border-top: 1px solid var(--line-2); }
.node { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.node.root { background: var(--accent-soft); border-color: transparent; }
.node .nm { font-weight: 500; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node .nm small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.tag { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.tag.person { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.share { display: flex; align-items: center; gap: 8px; font: 12.5px var(--mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bar { width: 64px; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w, 0); background: var(--accent); border-radius: 3px; }

/* Tabeller */
.tbl { width: 100%; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 0 0 8px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; padding-left: 16px; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
td.n { font-size: 13px; }
td .sub { display: block; font-size: 12px; color: var(--muted); }
.dash { color: var(--muted); }

/* Saken */
.story { font: 17px/1.68 var(--serif); color: var(--ink); }
.story > :first-child { margin-top: 0; }
.story h1, .story h2, .story h3 { line-height: 1.25; letter-spacing: -.01em; margin: 1.4em 0 .4em; font-weight: 600; }
.story h1 { font-size: 1.55em; } .story h2 { font-size: 1.22em; } .story h3 { font-size: 1.05em; }
.story p { margin: .65em 0; }
.story > p:first-child strong:only-child { font-size: 1.5em; line-height: 1.2; display: block; letter-spacing: -.01em; }
.story a { color: var(--accent); text-underline-offset: 2px; }
.story ul, .story ol { padding-left: 1.3em; }
.story table { font: 13.5px/1.4 var(--sans); margin: 1em 0; display: block; overflow-x: auto; }
.story td { font-variant-numeric: tabular-nums; }
.story code { font: .85em var(--mono); background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.story pre { background: var(--surface-2); padding: 12px 14px; border-radius: 10px; overflow-x: auto; font-size: 13px; line-height: 1.45; }
.story pre code { background: none; padding: 0; }
.story blockquote { margin: 1em 0; padding: .2em 0 .2em 1em; border-left: 3px solid var(--line-2); color: var(--ink-2); }
.story hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.cursor::after { content: ""; display: inline-block; width: .5em; height: 1em; background: var(--accent); vertical-align: -2px; margin-left: 2px; animation: pulse 1s infinite; }
.story-actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.story-actions button { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 6px 12px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.story-actions button:hover { border-color: var(--line-2); color: var(--ink); }
.story-actions svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.err-box { margin-top: 14px; padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 14px; }

/* Skrivefelt */
.composer-wrap { padding: 10px 16px 14px; background: linear-gradient(to top, var(--bg) 70%, transparent); }
.composer { max-width: 820px; margin: 0 auto; display: flex; align-items: flex-end; gap: 8px; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 16px; padding: 8px 8px 8px 14px; box-shadow: var(--shadow); transition: border-color .15s; }
.composer:focus-within { border-color: var(--accent); }
textarea { flex: 1; border: 0; resize: none; background: transparent; color: var(--ink); font: 15px/1.5 var(--sans); padding: 7px 0; max-height: 180px; outline: none; }
textarea:focus-visible { outline: none; }
textarea::placeholder { color: var(--muted); }
.send { width: 38px; height: 38px; flex: none; border: 0; border-radius: 11px; background: var(--accent); cursor: pointer; display: grid; place-items: center; }
.send svg { width: 18px; height: 18px; fill: none; stroke: var(--accent-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.send .i-stop { display: none; fill: var(--accent-ink); stroke: none; }
.send.stop { background: var(--warn); }
.send.stop .i-send { display: none; } .send.stop .i-stop { display: block; }
.fineprint { max-width: 820px; margin: 8px auto 0; text-align: center; font-size: 11.5px; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: 13px; padding: 7px 14px; border-radius: 999px; z-index: 10; animation: fade 1.8s forwards; }
@keyframes fade { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }

@media (max-width: 640px) {
  .topbar { padding: 10px 16px; flex-wrap: wrap; }
  .status { order: 3; width: 100%; justify-content: flex-start; margin-left: 0; }
  .actions { margin-left: auto; }
  .kpi { border-right: 0; border-bottom: 1px solid var(--line); }
  .kpi:last-child { border-bottom: 0; }
  .bar { display: none; }
  .tree ul { margin-left: 8px; padding-left: 12px; }
  .tree ul > li::before, .tree ul > li::after { left: -12px; }
  .tree ul > li::after { width: 9px; }
  .node .nm small { display: none; }
  .card-head, .section, .kpi { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Faner */
.tabs { display: flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.tab { border: 0; background: none; padding: 4px 12px; border-radius: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.tab.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
[hidden] { display: none !important; }

/* Modellvalg i skrivefeltet */
.composer { flex-direction: column; align-items: stretch; padding: 10px 10px 8px 14px; }
.composer-bar { display: flex; align-items: center; gap: 10px; }
.seg { display: inline-flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 2px; }
.seg button { border: 0; background: none; padding: 3px 10px; border-radius: 7px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
.modellinfo { font-size: 11.5px; color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtag { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }

/* Benchmark */
.bench-intro h1 { font: 600 clamp(26px, 4vw, 34px)/1.15 var(--serif); margin: 0 0 10px; letter-spacing: -.015em; }
.bench-intro { margin-bottom: 20px; }
.bench-form { padding: 16px 20px; }
.bf-row { display: flex; flex-direction: column; gap: 8px; }
.bf-row + .bf-row { margin-top: 14px; }
.bf-inline { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 14px; }
.bf-label { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.bf-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; color: var(--ink-2); text-align: left; }
.chip b { font-weight: 500; color: var(--accent); margin-right: 4px; }
.chip.on { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.bf-input { width: 100%; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); border-radius: 10px; padding: 9px 12px; font: 14px var(--sans); outline: none; }
.bf-input:focus { border-color: var(--accent); }
.bf-models { display: flex; gap: 14px; flex-wrap: wrap; }
.bf-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; }
.bf-check input { accent-color: var(--accent); }
.primary-btn { margin-left: auto; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 8px 16px; font-weight: 500; cursor: pointer; }
.lanes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-bottom: 1px solid var(--line); }
.lane { padding: 14px 20px; border-right: 1px solid var(--line); min-width: 0; }
.lane:last-child { border-right: 0; }
.lane-head { display: flex; align-items: center; gap: 8px; }
.lane-head .timer { margin-left: auto; font-size: 20px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.lane .spinner { width: 12px; height: 12px; }
.lane.done .spinner { animation: none; border-color: var(--accent); background: var(--accent); }
.lane.failed .spinner { animation: none; border-color: var(--warn); background: var(--warn); }
.lane-step { font-size: 13px; color: var(--ink-2); margin-top: 8px; min-height: 1.4em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.mono { font-family: var(--mono); }
table.cmp td:first-child { color: var(--ink-2); white-space: nowrap; padding-right: 16px; }
table.cmp td.best { color: var(--accent); font-weight: 600; }
table.cmp td.ok { color: var(--accent); }
table.cmp td.nei { color: var(--warn); }
table.cmp td.begr { font-size: 12.5px; color: var(--ink-2); min-width: 180px; vertical-align: top; padding-left: 16px; }
.saker-grid { display: grid; gap: 10px; }
.sak-kort { border: 1px solid var(--line); border-radius: 12px; }
.sak-kort > summary { cursor: pointer; padding: 10px 14px; display: flex; gap: 10px; align-items: center; font-size: 14px; }
.sak-kort > summary .mono { margin-left: auto; font-size: 12px; color: var(--muted); }
.sak-kort .story { padding: 4px 16px 16px; font-size: 15.5px; border-top: 1px solid var(--line); }
#benchLive:not(:empty) { margin-top: 22px; }
@media (max-width: 640px) {
  .modellinfo { display: none; }
  .tabs { order: 2; }
  .lane { border-right: 0; border-bottom: 1px solid var(--line); }
  .primary-btn { margin-left: 0; width: 100%; }
}

/* ================= Nettstedet ================= */
a { color: inherit; }
.brand { text-decoration: none; color: var(--ink); }
.topsok { flex: 1; max-width: 420px; margin-left: 12px; }
.toplenker { display: flex; gap: 14px; margin-left: auto; font-size: 13.5px; }
.toplenker a { color: var(--ink-2); text-decoration: none; }
.toplenker a:hover { color: var(--ink); }
.bunn { max-width: 820px; margin: 0 auto; padding: 24px 16px 40px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }
.bunn p { margin: 0 0 4px; }
.bunn a { color: var(--ink-2); }
.tom { padding: 10vh 0; text-align: center; }
.tom h1 { font: 600 28px/1.2 var(--serif); margin: 0 0 8px; }
.laster-tekst { color: var(--muted); font-size: 14px; margin: 0; }

/* Søk */
.sok { position: relative; }
.sok-felt { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 0 12px; height: 38px; transition: border-color .15s, box-shadow .15s; }
.sok-felt:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.sok-felt svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.sok-felt input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--ink); font: 14.5px var(--sans); }
.sok-felt input::-webkit-search-cancel-button { display: none; }
.sok.stor .sok-felt { height: 58px; border-radius: 16px; padding: 0 18px; box-shadow: var(--shadow); }
.sok.stor .sok-felt input { font-size: 17px; }
.sok.stor .sok-felt svg { width: 20px; height: 20px; }
.sok-liste { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px -12px rgb(0 0 0 / .25); max-height: 60vh; overflow-y: auto; }
.sok-liste li { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; border-radius: 9px; cursor: pointer; }
.sok-liste li[aria-selected="true"] { background: var(--accent-soft); }
.sok-navn { font-weight: 500; font-size: 14.5px; }
.sok-meta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; }
.sok-meta .mono { margin-left: auto; }
.sok-ingen { color: var(--muted); cursor: default !important; font-size: 14px; }

/* Forside */
.hero { padding: 8vh 0 28px; }
.hero h1 { font: 600 clamp(32px, 6vw, 52px)/1.06 var(--serif); letter-spacing: -.02em; margin: 0 0 16px; max-width: 13em; }
.hero .lead { font-size: 17px; margin-bottom: 26px; }
.eksempler { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.eksempel { display: inline-flex; align-items: baseline; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13.5px; text-decoration: none; transition: border-color .15s; }
.eksempel:hover { border-color: var(--accent); }
.eksempel .ex-tag { margin: 0; font-size: 10.5px; }
.blokk { margin-top: 40px; }
.blokk-hode { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.blokk-hode h2 { font: 600 20px/1.2 var(--serif); margin: 0; letter-spacing: -.01em; }
.filtre { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.strom { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.strom-kort { flex: none; width: 200px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; transition: border-color .15s, transform .15s; }
.strom-kort:hover { border-color: var(--accent); transform: translateY(-1px); }
.strom-kort b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strom-kort span { font: 13px var(--mono); color: var(--accent); }
.strom-kort small { font-size: 11.5px; color: var(--muted); }
.rangering { list-style: none; margin: 0; padding: 4px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.rangering li { display: grid; grid-template-columns: 32px 1fr auto 56px; gap: 10px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.rangering li:last-child { border-bottom: 0; }
.rangering a { text-decoration: none; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rangering a:hover { color: var(--accent); }
.rangering .plass { color: var(--muted); font-size: 13px; }
.rangering .tall { font-size: 12.5px; color: var(--ink-2); }
.rangering .antall { text-align: right; font-size: 12.5px; color: var(--muted); }
.rangering .tom-rad { display: block; color: var(--muted); }
.liste-kort { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.liste-lenke { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.liste-lenke:hover { border-color: var(--accent); transform: translateY(-1px); }
.liste-lenke b { font: 600 17px/1.25 var(--serif); }
.liste-lenke p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.liste-lenke .forhand { font-size: 12px; color: var(--muted); margin-top: 6px; }
.liste-side h1, .tekstside h1 { font: 600 clamp(28px, 5vw, 38px)/1.12 var(--serif); letter-spacing: -.015em; margin: 0 0 12px; }
.liste-side td a { text-decoration: none; font-weight: 500; }
.liste-side td a:hover { color: var(--accent); }
.liste-side .card { padding: 6px 20px 10px; }
.tekstside { max-width: 680px; font: 16.5px/1.65 var(--serif); }
.tekstside h2 { font: 600 19px/1.3 var(--serif); margin: 1.6em 0 .4em; }
.tekstside p { margin: .6em 0; color: var(--ink-2); }

/* Selskapsside */
.selskap .card-head h1 { font: 600 clamp(24px, 4vw, 30px)/1.15 var(--serif); margin: 0; letter-spacing: -.015em; }
.selskap .kpis { grid-template-columns: repeat(2, 1fr); }
.selskap .kpi { border-right: 0; border-bottom: 1px solid var(--line); }
.selskap .kpi:nth-child(odd) { border-right: 1px solid var(--line); }
.selskap .kpi:nth-last-child(-n + 2) { border-bottom: 0; }
.selskap .kpi .v { font-size: clamp(20px, 3vw, 26px); white-space: nowrap; }
.selskap .kpi { padding-left: 18px; padding-right: 12px; }
.selskap a[data-lenke] { text-decoration: none; }
.selskap a[data-lenke]:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.signal-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.signal-liste li { display: grid; grid-template-columns: auto auto 1fr auto; gap: 4px 10px; align-items: baseline; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; background: var(--surface-2); }
.signal-liste p { grid-column: 1 / -1; margin: 0; font-size: 14px; color: var(--ink-2); }
.signal-type { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); font-weight: 500; }
.signal-aar { font-size: 12px; color: var(--muted); }
.signal-belop { grid-column: 4; grid-row: 1; font-size: 14px; font-weight: 500; }
.fotnote { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.analyse-hode { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.analyse-hode h3 { margin-bottom: 4px; }
.analyse-ingress { margin: 0; font-size: 13.5px; color: var(--ink-2); max-width: 34em; }
.analyse .primary-btn { margin-left: 0; display: inline-flex; align-items: center; gap: 8px; }
.analyse .primary-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.primary-btn:disabled { opacity: .45; cursor: default; }
.primary-btn.arbeider { position: relative; color: transparent; }
.primary-btn.arbeider::after { content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--accent-ink) 40%, transparent); border-top-color: var(--accent-ink); animation: spin .8s linear infinite; }
.analyse .story { margin-top: 18px; }
#turnstile:not(:empty) { margin-top: 14px; }
.tones-inn { animation: tonInn .6s ease both; }
@keyframes tonInn { from { opacity: 0; transform: translateY(6px); } }

/* Skjelett mens selskapet hentes */
.skel { display: inline-block; height: .8em; border-radius: 5px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: glimt 1.2s linear infinite; }
.skel.w40 { width: 40%; } .skel.w60 { width: 60%; } .skel.w80 { width: 80%; } .skel.h { height: 1.2em; }
@keyframes glimt { to { background-position: -200% 0; } }

/* Tall fra serveren før skriptet tar over (søkemotorer og forhåndsvisning) */
.ssr { padding: 24px 0; }
.ssr h1 { font: 600 30px/1.15 var(--serif); margin: 0 0 6px; }
.ssr dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 15px; }
.ssr dt { color: var(--muted); }
.ssr dd { margin: 0; font-family: var(--mono); }

/* Inngangsanimasjonen. Elementene starter skjult og glir inn med hver sin forsinkelse (--d). */
.animer .steg, .animer .tree li, .animer tbody tr, .animer .signal-liste li { opacity: 0; transform: translateY(8px); }
.animer.inn .steg, .animer.inn .tree li, .animer.inn tbody tr, .animer.inn .signal-liste li {
  opacity: 1; transform: none; transition: opacity .5s cubic-bezier(.2, .7, .2, 1), transform .5s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms);
}
.animer .card-head.steg { --d: 0ms; }
/* Innenfor en seksjon starter radene når seksjonen kommer inn: seksjonens forsinkelse + radens egen. */
.animer .section.steg { --s: var(--d); }
.animer.inn .section .tree li, .animer.inn .section tbody tr, .animer.inn .section .signal-liste li { transition-delay: calc(var(--s, 0ms) + var(--d, 0ms)); }
.animer .bar i { width: 0; }
.animer.inn .bar i { width: var(--w); transition: width .8s cubic-bezier(.2, .7, .2, 1) calc(var(--s, 0ms) + var(--d, 0ms) + 150ms); }
.animer .kpi.hl .v { transition: color .4s; }

/* Lab inne i hovedflaten */
#lab { display: flex; flex-direction: column; min-height: 100%; }
.lab-tabs { max-width: 820px; width: calc(100% - 32px); margin: 16px auto 0; align-items: center; }
.lab-tabs .status { margin-left: auto; }
#lab .composer-wrap { position: sticky; bottom: 0; margin-top: auto; }

@media (max-width: 640px) {
  .selskap .kpis { grid-template-columns: 1fr; }
  .selskap .kpi:nth-child(odd) { border-right: 0; }
  .selskap .kpi:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .topsok { order: 3; flex-basis: 100%; max-width: none; margin: 4px 0 0; }
  .toplenker { gap: 10px; }
  .hero { padding-top: 5vh; }
  .rangering li { grid-template-columns: 26px 1fr 48px; }
  .rangering .tall { display: none; }
  .signal-liste li { grid-template-columns: auto 1fr auto; }
  .signal-belop { grid-column: 3; }
  .strom-kort { width: 170px; }
}
@media (prefers-reduced-motion: reduce) { .animer .steg, .animer .tree li, .animer tbody tr, .animer .signal-liste li { opacity: 1; transform: none; } .animer .bar i { width: var(--w); } }

/* ---------- Faktasjekk ---------- */
.fakta { max-width: 720px; margin: 0 auto; padding: 28px 0 40px; }
.fakta h1 { font: 600 clamp(26px, 5vw, 34px)/1.15 var(--serif); margin: 6px 0 16px; }
.fakta .lead { font-size: 18px; color: var(--ink-2, var(--ink)); }
.fakta-tekst { font-size: 16.5px; line-height: 1.65; }
.fakta-tekst h2 { font: 600 20px/1.3 var(--serif); margin: 26px 0 8px; }
.fakta .forbehold { font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 28px; }
.dom { display: inline-flex; flex-direction: column; gap: 2px; padding: 10px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); margin-bottom: 16px; }
.dom span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dom b { font-size: 18px; }
.dom-merke { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); margin-bottom: 4px; }
.dom-feil b, .dom-merke.dom-feil, .dom-overdrevet b, .dom-merke.dom-overdrevet { color: var(--warn); }
.dom-merke.dom-feil, .dom-merke.dom-overdrevet { background: var(--warn-soft); }
.pastand { margin: 18px 0 22px; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); }
.pastand p { font: italic 18px/1.5 var(--serif); margin: 0 0 6px; }
.pastand footer { font-size: 13.5px; color: var(--muted); }
.pastand a { color: inherit; }
.fakta-liste { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.fakta-liste a { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: inherit; text-decoration: none; }
.fakta-liste a:hover { border-color: var(--accent); }
.fakta-liste a > span:last-child:not(.dom-merke) { font-size: 14px; color: var(--muted); }
.skjema { display: grid; gap: 14px; margin: 20px 0; }
.skjema label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.skjema input, .skjema textarea { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); width: 100%; box-sizing: border-box; }
.skjema textarea { resize: vertical; }
.knapp, .knapp-lenke { display: inline-block; justify-self: start; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 10px 18px; font-weight: 600; cursor: pointer; text-decoration: none; }
.knapp:disabled { opacity: .6; cursor: default; }
.likviditet p { margin: 6px 0; }
.lk-merke { display: inline-block; margin-left: 8px; font: 600 12px/1 var(--sans); padding: 4px 9px; border-radius: 999px; background: var(--accent-soft); vertical-align: middle; }
.lk-lite_likvide .lk-merke { background: var(--warn-soft); color: var(--warn); }

/* ---------- Simulator ---------- */
.sim { padding: 24px 0 40px; }
.sim h1 { font: 600 clamp(26px, 5vw, 34px)/1.15 var(--serif); margin: 6px 0 10px; }
.sim-grid { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 20px; align-items: start; margin: 18px 0 28px; }
.sim-regler { padding: 16px 18px; display: grid; gap: 14px; margin: 0; position: sticky; top: 76px; }
.sim-regler h2 { font: 600 17px/1.2 var(--sans); margin: 0; }
.sim-regler label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.sim-regler label output { font: 600 15px var(--mono); color: var(--ink); }
.sim-regler input[type=range] { width: 100%; accent-color: var(--accent); }
.sim-regler input[type=number] { font: 15px var(--mono); padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); width: 100%; box-sizing: border-box; }
.sim-par { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sim-regler .sjekk { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; color: var(--ink); }
.sim-kpis { margin-bottom: 16px; }
.sim-tabell { padding: 14px 16px; }
.sim-tabell h3 { margin: 0 0 6px; font-size: 15px; }
.sim-tabell tr.sum td { border-top: 1px solid var(--line); color: var(--ink-2); }
.sim-kort { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.sim-scenario { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: inherit; text-decoration: none; }
.sim-scenario:hover { border-color: var(--accent); }
.sim-scenario.ikke { opacity: .7; }
.sim-scenario .mono { font-size: 14px; }
.sim-metode { margin-top: 28px; }
@media (max-width: 760px) { .sim-grid { grid-template-columns: 1fr; } .sim-regler { position: static; } }
.sim-tabell .seg { margin: 6px 0 4px; display: inline-flex; flex-wrap: wrap; }
