@font-face { font-family: "Inter"; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --ink: #0E1726;
  --ink-2: #2B3546;
  --brand: #14365C;
  --brand-2: #1F4F82;
  --accent: #0F7B7F;
  --l1: #14365C; --l1-bg: #E8EFF7;
  --l2: #4F78A8; --l2-bg: #F3F6FA;
  --l3: #8C8270; --l3-bg: #F4F1EA;
  --line: #D9DFE7;
  --bg: #FFFFFF;
  --bg-soft: #F6F8FB;
  --ok: #17663A; --ok-bg: #E6F4EC;
  --bad: #A3231B; --bad-bg: #FBEAE8;
  --warn: #7A4B00; --warn-bg: #FFF4DC;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(14,23,38,.06), 0 4px 16px rgba(14,23,38,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Inter", system-ui, sans-serif; color: var(--ink); background: var(--bg-soft); font-size: 16.5px; line-height: 1.55; }
a { color: var(--brand-2); text-underline-offset: 2px; }
a:hover { color: var(--brand); }
:focus-visible { outline: 3px solid #F2B630; outline-offset: 2px; border-radius: 4px; }
button { font: inherit; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(26px, 4.5vw, 34px); font-weight: 800; }
h2 { font-size: 21px; font-weight: 700; margin-top: 30px; margin-bottom: 10px; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Topbar */
.top { position: sticky; top: 0; z-index: 20; background: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.top-in { max-width: 1040px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 16px; min-height: 44px; }
.brand img { width: 34px; height: 34px; border-radius: 7px; background: #fff; }
.brand span small { display: block; font-weight: 500; font-size: 12.5px; opacity: .9; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; text-decoration: none; font-weight: 600; font-size: 14.5px; cursor: pointer; }
.iconbtn:hover { background: rgba(255,255,255,.12); color: #fff; }
.iconbtn svg { width: 20px; height: 20px; }
.pct-pill { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; min-height: 44px; border-radius: 8px; background: rgba(255,255,255,.12); color: #fff; text-decoration: none; font-weight: 700; font-size: 14.5px; }
.pct-pill .mini { width: 46px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
.pct-pill .mini i { display: block; height: 100%; background: #F2B630; }
@media (max-width: 560px) { .brand span small { display: none; } .iconbtn .lbl { display: none; } .pct-pill .mini { display: none; } }

main { max-width: 1040px; margin: 0 auto; padding: 18px 16px 48px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.crumbs { font-size: 14px; margin-bottom: 12px; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); }

/* Hero / home */
.hero { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 26px 22px 22px; box-shadow: var(--shadow); }
.hero h1 { margin-bottom: 6px; }
.hero .lead { color: var(--ink-2); font-size: 17px; margin-bottom: 18px; max-width: 680px; }
.search { position: relative; }
.search input { width: 100%; font: inherit; font-size: 18px; padding: 14px 16px 14px 48px; border: 2px solid var(--brand); border-radius: 12px; background: #fff; color: var(--ink); min-height: 54px; }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: var(--brand); }
.results { margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; box-shadow: var(--shadow); }
.results a { display: block; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.results a:first-child { border-top: 0; }
.results a:hover, .results a:focus { background: var(--bg-soft); }
.results .rt { font-weight: 700; }
.results .rk { font-size: 12.5px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.results .rs { font-size: 14.5px; color: var(--ink-2); }
mark { background: #FFE58A; color: inherit; padding: 0 1px; border-radius: 2px; }

.progress-wrap { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 16px; background: var(--bg-soft); border-radius: 12px; }
.progress-wrap .big { font-size: 28px; font-weight: 800; color: var(--brand); min-width: 74px; }
.bar { flex: 1; height: 10px; border-radius: 5px; background: #DDE4ED; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 5px; transition: width .3s; }
.progress-wrap .txt { font-size: 14px; color: var(--ink-2); }

.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
@media (max-width: 560px) { .quick { grid-template-columns: 1fr 1fr; gap: 10px; } .qbtn { min-height: 92px; padding: 13px; } .qbtn b { font-size: 15px; } .qbtn small { font-size: 12.5px; } .pager a { font-size: 14.5px; } }
.qbtn { display: flex; flex-direction: column; gap: 4px; padding: 16px; min-height: 96px; border-radius: 12px; background: var(--brand); color: #fff; text-decoration: none; box-shadow: var(--shadow); }
.qbtn:hover { background: var(--brand-2); color: #fff; }
.qbtn b { font-size: 16.5px; }
.qbtn small { font-size: 13.5px; opacity: .92; }
.qbtn.alt { background: var(--accent); }
.qbtn.alt:hover { background: #0B6A6E; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; margin: 8px 0 12px; color: var(--ink-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; letter-spacing: .02em; white-space: nowrap; }
.chip.l1 { background: var(--l1); color: #fff; }
.chip.l2 { background: #DCE6F2; color: #1C3A60; }
.chip.l3 { background: #E9E3D7; color: #4F4636; }
.chip.soon { background: var(--warn-bg); color: var(--warn); }

/* TOC */
.toc details { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; overflow: hidden; }
.toc summary { list-style: none; cursor: pointer; padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-weight: 700; min-height: 48px; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary .chev { margin-left: auto; transition: transform .2s; }
.toc details[open] summary .chev { transform: rotate(90deg); }
.toc .rows { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 12px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); min-height: 46px; border-left: 5px solid transparent; }
.row:first-child { border-top: 0; }
.row .nr { font-weight: 700; min-width: 62px; }
.row.l1 { background: var(--l1-bg); border-left-color: var(--l1); }
.row.l1 .t { font-weight: 600; }
.row.l2 { background: var(--l2-bg); border-left-color: var(--l2); }
.row.l3 { background: var(--l3-bg); border-left-color: #CFC6B4; color: #3E3A33; }
.row:hover { filter: brightness(.97); }
.row .chip { margin-left: auto; }
.mod-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.mod { display: block; padding: 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--l1); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.mod:hover { border-color: var(--brand-2); }
.mod .num { font-size: 12.5px; font-weight: 700; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.mod h3 { margin: 4px 0 4px; }
.mod p { font-size: 14.5px; color: var(--ink-2); margin: 0 0 10px; }
.mod .mbar { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; }
.mod .mbar .bar { height: 7px; }

/* Content pages */
.page-head { margin-bottom: 14px; }
.page-head .sub { color: var(--ink-2); font-size: 17px; margin-top: 6px; }
.lawbox { background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--brand); border-radius: 10px; padding: 16px 18px; margin: 12px 0; }
.lawbox .src { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.lawbox .note { font-size: 13px; color: #3E4757; font-style: italic; margin-top: 6px; }
.lawbox p { font-family: Georgia, "Times New Roman", serif; font-size: 16.5px; }
.lawbox h3 { margin-bottom: 8px; }
.explain { background: var(--l1-bg); border-radius: 10px; padding: 14px 16px; margin: 12px 0; }
.explain b { color: var(--brand); }
.soonbox { background: var(--warn-bg); border: 1px solid #EBC77A; border-radius: 10px; padding: 12px 14px; margin: 12px 0; color: #4A2F00; }
ul.plain { padding-left: 20px; margin: 0 0 12px; }
ul.plain li { margin-bottom: 8px; }
.ex { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 10px 0; background: #fff; }
.ex h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.v { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.v.inn { background: var(--ok-bg); color: var(--ok); }
.v.ikke { background: var(--bad-bg); color: var(--bad); }
.v.grense { background: var(--warn-bg); color: var(--warn); }
.refs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.refs a { font-size: 13.5px; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--bg-soft); border: 1px solid var(--line); text-decoration: none; color: var(--brand); }
.myth { display: grid; grid-template-columns: 1fr; gap: 4px; border-top: 1px solid var(--line); padding: 10px 0; }
.myth .m { font-weight: 600; }
.myth .m::before { content: "Myte: "; color: var(--bad); }
.myth .f::before { content: "Faktisk: "; color: var(--ok); font-weight: 700; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 10px; background: var(--brand); color: #fff; border: 0; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--brand-2); color: #fff; }
.btn.ghost { background: #fff; color: var(--brand); border: 2px solid var(--brand); }
.btn.ghost:hover { background: var(--bg-soft); color: var(--brand); }
.btn.teal { background: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.pager { display: flex; gap: 10px; margin-top: 30px; }
.pager a { flex: 1; display: flex; flex-direction: column; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); min-height: 64px; }
.pager a small { font-size: 12.5px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.pager a.next { text-align: right; }
.pager a:hover { border-color: var(--brand-2); }
.pager .home { flex: 0 0 64px; align-items: center; justify-content: center; color: var(--brand); }
.pager .home svg { width: 24px; height: 24px; }

/* Tasks */
.task { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin: 14px 0; box-shadow: var(--shadow); }
.task .meta { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.task .q { font-weight: 600; font-size: 17px; margin-bottom: 12px; }
.opt { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; margin: 8px 0; border-radius: 10px; border: 2px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; min-height: 48px; }
.opt:hover:not(:disabled) { border-color: var(--brand-2); }
.opt .k { font-weight: 800; color: var(--brand); min-width: 20px; }
.opt.right { border-color: var(--ok); background: var(--ok-bg); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt:disabled { cursor: default; }
.fb { border-radius: 10px; padding: 12px 14px; margin-top: 10px; }
.fb.ok { background: var(--ok-bg); }
.fb.no { background: var(--bad-bg); }
.fb.neutral { background: var(--bg-soft); }
.fb b.h { display: block; margin-bottom: 4px; }
textarea { width: 100%; min-height: 120px; font: inherit; padding: 12px; border-radius: 10px; border: 2px solid var(--line); color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: 0 0 auto; }
.sortrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.sortrow .st { flex: 1 1 280px; }
.seg { display: inline-flex; border: 2px solid var(--brand); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: #fff; color: var(--brand); padding: 8px 12px; min-height: 44px; cursor: pointer; font-weight: 600; font-size: 14.5px; }
.seg button + button { border-left: 2px solid var(--brand); }
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.sortrow.right .st::after { content: " ✓"; color: var(--ok); font-weight: 800; }
.sortrow.wrong .st::after { content: " ✗"; color: var(--bad); font-weight: 800; }
.orderlist { list-style: none; padding: 0; margin: 0; }
.orderlist li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; margin: 8px 0; background: #fff; }
.orderlist li .n { font-weight: 800; color: var(--brand); min-width: 22px; }
.orderlist li .tx { flex: 1; }
.orderlist li button { min-width: 44px; min-height: 44px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-soft); cursor: pointer; font-size: 18px; }
.orderlist li.right { border-color: var(--ok); background: var(--ok-bg); }
.orderlist li.wrong { border-color: var(--bad); background: var(--bad-bg); }
.done-badge { font-size: 12.5px; font-weight: 700; color: var(--ok); }
.status { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); }
.status.full { background: var(--ok-bg); color: var(--ok); }
.status.part { background: var(--warn-bg); color: var(--warn); }

.foot { max-width: 1040px; margin: 0 auto; padding: 18px 16px 40px; font-size: 13.5px; color: var(--ink-2); }
.foot p { margin-bottom: 6px; }

form.reg { display: grid; gap: 12px; max-width: 460px; }
form.reg label { font-weight: 600; font-size: 14.5px; display: grid; gap: 4px; }
form.reg input, form.reg select { font: inherit; padding: 11px 12px; border-radius: 10px; border: 2px solid var(--line); min-height: 46px; color: var(--ink); background: #fff; }
.err { color: var(--bad); font-weight: 600; }
table.adm { width: 100%; border-collapse: collapse; background: #fff; font-size: 14.5px; }
table.adm th, table.adm td { white-space: nowrap; padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; }
table.adm th { background: var(--bg-soft); position: sticky; top: 0; cursor: pointer; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }

.lawlist { display: grid; gap: 8px; margin-bottom: 8px; }
.lawdet { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.lawdet summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 11px 14px; min-height: 48px; }
.lawdet summary::-webkit-details-marker { display: none; }
.lawdet summary .chev { margin-left: auto; flex: 0 0 auto; transition: transform .2s; }
.lawdet[open] summary .chev { transform: rotate(90deg); }
.lawdet[open] summary { border-bottom: 1px solid var(--line); }
