/* void – tema: auto (følger systemet), lys, mørk, amber og hacker */
[hidden] { display: none !important; }

:root {
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #eef0f4; --text: #161a22; --muted: #5d6675;
  --line: #dde1e8; --line-strong: #c3c9d3; --accent: #2b55d6; --accent-ink: #ffffff; --accent-soft: #e6ecfc;
  --danger: #b42318; --danger-soft: #fdecea; --ok: #1e6b34; --ok-soft: #e4f3e8; --warn: #7a5a00; --warn-soft: #fff4d4;
  --radius: 10px; --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0f1218; --surface: #171b23; --surface-2: #1f2430; --text: #e6e9ef; --muted: #98a1b0;
    --line: #2a303c; --line-strong: #3a4250; --accent: #7c9cff; --accent-ink: #0b0e14; --accent-soft: #1d2640;
    --danger: #ff8a7a; --danger-soft: #3a1f1c; --ok: #8fdca5; --ok-soft: #17321f; --warn: #f0cf72; --warn-soft: #352b10;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1218; --surface: #171b23; --surface-2: #1f2430; --text: #e6e9ef; --muted: #98a1b0;
  --line: #2a303c; --line-strong: #3a4250; --accent: #7c9cff; --accent-ink: #0b0e14; --accent-soft: #1d2640;
  --danger: #ff8a7a; --danger-soft: #3a1f1c; --ok: #8fdca5; --ok-soft: #17321f; --warn: #f0cf72; --warn-soft: #352b10;
  --shadow: none;
}
/* Monokrome skjermer: én farge på svart, som en gammel fosforskjerm.
   Amber (#ffb000) og Hacker (#20c20e) deler alt unntatt fargene. Profilbilder vises i ekte farger. */
:root[data-theme="amber"] {
  --bg: #0b0700; --surface: #120c01; --surface-2: #1c1302; --text: #ffb000; --muted: #b57d00;
  --line: #4a3300; --line-strong: #7a5400; --accent: #ffb000; --accent-ink: #0b0700; --accent-soft: #2a1c03;
  --danger: #ffcc55; --danger-soft: #2a1c03; --ok: #ffb000; --ok-soft: #1c1302; --warn: #ffcc55; --warn-soft: #1c1302;
  --glow: rgba(255, 176, 0, .35); --placeholder: #8a5f00;
}
:root[data-theme="hacker"] {
  --bg: #020902; --surface: #041104; --surface-2: #071b07; --text: #20c20e; --muted: #168a0a;
  --line: #0f4a0a; --line-strong: #17730e; --accent: #20c20e; --accent-ink: #020902; --accent-soft: #0a250a;
  --danger: #7dff6e; --danger-soft: #0a250a; --ok: #20c20e; --ok-soft: #071b07; --warn: #7dff6e; --warn-soft: #071b07;
  --glow: rgba(32, 194, 14, .35); --placeholder: #127008;
}
:root:is([data-theme="amber"], [data-theme="hacker"]) { --font: var(--mono); --radius: 2px; --shadow: none; }
:root:is([data-theme="amber"], [data-theme="hacker"]) body { text-shadow: 0 0 6px var(--glow); }
:root:is([data-theme="amber"], [data-theme="hacker"]) body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,.18) 3px);
}
:root:is([data-theme="amber"], [data-theme="hacker"]) :is(.btn-primary, .tag, .badge) { text-shadow: none; }
:root:is([data-theme="amber"], [data-theme="hacker"]) h1::before { content: "> "; color: var(--muted); }
:root:is([data-theme="amber"], [data-theme="hacker"]) .badge { background: var(--accent); color: var(--accent-ink); }
:root:is([data-theme="amber"], [data-theme="hacker"]) .flash { border-color: var(--line-strong); }
:root:is([data-theme="amber"], [data-theme="hacker"]) input::file-selector-button {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); font: inherit; padding: 4px 10px; margin-right: 10px; }
:root:is([data-theme="amber"], [data-theme="hacker"]) option { background: var(--surface); color: var(--text); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
a { color: var(--accent); text-underline-offset: 2px; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 14px; letter-spacing: -.01em; }
h2, .h3 { font-size: 1.1rem; margin: 0 0 10px; }
.h4 { font-size: 1rem; margin: 0 0 6px; }
.inline { display: inline; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 24px; padding-bottom: 56px; min-height: 70vh; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .nowrap { white-space: nowrap; }
.lead { font-size: 1.1rem; margin: 0 0 6px; }
.eyebrow { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 4px; font-weight: 600; }
.opt { font-weight: 400; color: var(--muted); font-size: .85em; }
.warn-text { color: var(--warn); }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: absolute; top: 8px; left: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* topplinje */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand-mark { color: var(--accent); font-size: 1.2rem; }
.nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.nav a:not(.btn) { text-decoration: none; color: var(--text); }
.nav a:not(.btn):hover { color: var(--accent); }
.whoami { font-weight: 600; }
.navtoggle { display: none; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.badge { display: inline-block; min-width: 1.4em; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff;
         font-size: .75rem; font-weight: 700; text-align: center; line-height: 1.5; }
@media (max-width: 720px) {
  .navtoggle { display: inline-block; background: none; border: 1px solid var(--line-strong); color: var(--text);
               border-radius: var(--radius); padding: 6px 12px; font: inherit; cursor: pointer; }
  .nav { width: 100%; flex-direction: column; align-items: flex-start; gap: 12px; padding: 4px 0 14px; display: none; }
  .nav.open { display: flex; }
  html:not(.js) .nav { display: flex; }
  html:not(.js) .navtoggle { display: none; }
}

/* knapper */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: 1px solid var(--line-strong);
       border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; font-weight: 500;
       text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-small { padding: 6px 12px; font-size: .9rem; }
.btn-big { padding: 13px 24px; font-size: 1.05rem; }
.buttons { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

/* flater */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
        padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card.narrow { max-width: 680px; margin-left: auto; margin-right: auto; }
.card.login { max-width: 420px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.grid2 > .card { margin-bottom: 0; }
.grid2 + .card, .grid2 + p { margin-top: 18px; }
.flash { padding: 11px 14px; border-radius: var(--radius); margin-bottom: 14px; border: 1px solid transparent; }
.flash-success { background: var(--ok-soft); color: var(--ok); }
.flash-warning { background: var(--warn-soft); color: var(--warn); }
.flash-info { background: var(--accent-soft); color: var(--text); border-color: var(--accent); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.empty { text-align: center; padding: 40px 0; color: var(--muted); }
.footer { color: var(--muted); font-size: .8rem; padding-bottom: 24px; }
.note { background: var(--warn-soft); color: var(--warn); padding: 6px 10px; border-radius: var(--radius); display: inline-block; margin: 4px 0 0; }
.steps li { margin-bottom: 6px; }
.card > h2.h3:not(:first-child), .card > .h3:not(:first-child) { margin-top: 24px; }
.danger-zone { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }

/* skjema */
.form .field { margin-bottom: 16px; }
.form label, .label { display: block; font-weight: 600; margin-bottom: 5px; }
.form small { display: block; color: var(--muted); margin-top: 4px; font-size: .84rem; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong);
                          border-radius: var(--radius); padding: 9px 11px; max-width: 100%; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form input[type=password],
.form input[type=search], .form textarea, .form select { width: 100%; }
textarea { resize: vertical; line-height: 1.5; font-family: var(--mono); font-size: .92rem; }
::placeholder { color: var(--placeholder, var(--muted)); opacity: 1; }
input[readonly] { background: var(--surface-2); color: var(--muted); }
input[type=file] { padding: 7px; width: 100%; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.error { color: var(--danger); margin-top: 5px; font-size: .88rem; font-weight: 500; }
fieldset.group { border: 0; border-top: 1px solid var(--line); margin: 0 0 6px; padding: 18px 0 0; }
fieldset.group legend { font-weight: 700; font-size: 1.02rem; padding-right: 10px; }
fieldset.group-key { border: 1px solid var(--accent); border-radius: var(--radius); padding: 14px 16px 2px; margin-bottom: 18px; background: var(--accent-soft); }
fieldset.group-key legend { padding: 0 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.row-postal { grid-template-columns: 140px 1fr; }
@media (max-width: 560px) { .row2, .row-postal { grid-template-columns: 1fr; } }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { display: flex !important; align-items: flex-start; gap: 8px; font-weight: 400 !important; margin: 0 0 10px; cursor: pointer; }
.choices .choice { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 7px 12px; margin: 0; }
.choices .choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
input[type=radio], input[type=checkbox] { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; margin: 0; flex: none; }
.choice > input { margin-top: .22em; }
.choices .choice { align-items: center; }
.choices .choice > input { margin-top: 0; }
.photo-row { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: start; }
.photo-preview { width: 112px; height: 112px; border-radius: 50%; border: 1px dashed var(--line-strong); display: grid;
                 place-items: center; overflow: hidden; text-align: center; background: var(--surface-2); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 480px) { .photo-row { grid-template-columns: 1fr; } }
.inline-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input[type=search] { flex: 1 1 260px; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; border-top: 1px solid var(--line); }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 16px; }
.mode { display: flex !important; gap: 10px; align-items: flex-start; border: 1px solid var(--line-strong); border-radius: var(--radius);
        padding: 12px; cursor: pointer; font-weight: 400 !important; }
.mode input { margin-top: 4px; }
.mode:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.preview { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 12px 16px; margin: -6px 0 16px; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary .h3::after { content: " ▾"; color: var(--muted); }
details[open] > summary { margin-bottom: 14px; }
details.menu { position: relative; }
details.menu > summary { list-style: none; }
.menu-body { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: min(320px, 80vw); background: var(--surface);
             border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 12px; display: grid; gap: 8px;
             box-shadow: 0 8px 24px rgba(0,0,0,.15); }

/* tema-velger */
.theme-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.theme-opt { display: flex !important; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: var(--radius);
             padding: 8px 10px; font-weight: 400 !important; cursor: pointer; font-size: .92rem; }
.theme-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.swatch { width: 22px; height: 22px; border-radius: 4px; border: 1px solid var(--line-strong); flex: none; }
.theme-opt-auto .swatch { background: linear-gradient(135deg, #f4f5f7 50%, #0f1218 50%); }
.theme-opt-light .swatch { background: #f4f5f7; }
.theme-opt-dark .swatch { background: #0f1218; }
.theme-opt-amber .swatch { background: #0b0700; box-shadow: inset 0 0 0 5px #0b0700, inset 0 0 0 11px #ffb000; }
.theme-opt-hacker .swatch { background: #020902; box-shadow: inset 0 0 0 5px #020902, inset 0 0 0 11px #20c20e; }

/* tabeller */
table.list { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list th, .list td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list th { background: var(--surface-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.list tr:last-child td { border-bottom: 0; }
.list tr.is-off td { opacity: .55; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.rowlink { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; }
@media (max-width: 640px) { .hide-sm { display: none; } }

/* personer */
.avatar { border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.avatar-sm { width: 28px; height: 28px; } .avatar-md { width: 44px; height: 44px; }
.avatar-lg { width: 72px; height: 72px; } .avatar-xl { width: 128px; height: 128px; }
.avatar-empty { display: inline-grid; place-items: center; color: var(--muted); font-weight: 700; border: 1px solid var(--line); }
.avatar-sm.avatar-empty { font-size: .75rem; } .avatar-lg.avatar-empty { font-size: 1.6rem; } .avatar-xl.avatar-empty { font-size: 2.6rem; }
.welcome { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.welcome h1 { margin-bottom: 2px; } .welcome p { margin: 0; }
.welcome-sm { margin-bottom: 12px; }
.people { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.people a { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line);
            border-radius: var(--radius); text-decoration: none; color: var(--text); }
.people a:hover { border-color: var(--accent); }
.people-text { display: flex; flex-direction: column; min-width: 0; }
.people-text .tag { align-self: flex-start; margin-top: 4px; }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-2);
       color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.tag-admin { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tag-corecrew, .tag-teamleader { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.tag-hold { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tag-hidden { border-style: dashed; }
.profile-head { display: flex; gap: 22px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.profile-head h1 { margin-bottom: 2px; } .profile-head p { margin: 0 0 4px; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 18px; }
dl.facts dt { color: var(--muted); font-size: .9rem; } dl.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (min-width: 720px) { dl.facts-cols { grid-template-columns: max-content 1fr max-content 1fr; } }
.applicant.is-hold { border-left: 4px solid var(--warn); }
.applicant-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.applicant-head p { margin: 0; }
.applicant-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); padding-top: 14px; }

/* fliser */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { display: flex; flex-direction: column; justify-content: flex-end; min-height: 96px; padding: 16px; background: var(--surface);
        border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); text-decoration: none; color: var(--text); }
a.tile:hover { border-color: var(--accent); }
.tile-num { font-size: 2rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.tile-label { color: var(--muted); font-weight: 500; }
a.tile .tile-label { color: var(--text); }
.tile-accent { border-color: var(--accent); background: var(--accent-soft); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar h1 { margin: 0; }
.search { display: flex; gap: 8px; flex: 1 1 320px; max-width: 440px; }
.search input { flex: 1; min-width: 0; }
.subnav { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 20px; border-bottom: 1px solid var(--line); }
.subnav a { padding: 8px 12px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a:hover { color: var(--text); }
.subnav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

/* forside og tekst */
.hero { max-width: 720px; margin: 24px auto 0; padding: 36px 32px; background: var(--surface); border: 1px solid var(--line);
        border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow); }
.hero .buttons { margin-top: 22px; }
@media (max-width: 560px) { .hero { padding: 24px 18px; } .card { padding: 18px 16px; } }
.prose h2 { font-size: 1.7rem; margin: 0 0 12px; } .prose h3 { font-size: 1.2rem; margin: 18px 0 8px; } .prose h4 { margin: 14px 0 6px; }
.prose p { margin: 0 0 12px; } .prose ul, .prose ol { margin: 0 0 12px; padding-left: 1.3em; }
.prose blockquote { margin: 0 0 12px; padding: 4px 14px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.prose > :last-child { margin-bottom: 0; }

/* ---- team (0.2) */
.crumbs { margin: 0 0 10px; font-size: .9rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.section-title { font-size: 1.15rem; margin: 28px 0 8px; }
.cat { margin-bottom: 26px; }
.cat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cat-head h2 { margin: 0; font-size: 1.25rem; }
.cat-head h2 a { color: var(--text); text-decoration: none; }
.cat-head h2 a:hover { color: var(--accent); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.team-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line);
             border-radius: var(--radius); text-decoration: none; color: var(--text); border-left: 3px solid var(--accent); }
.team-card:hover { border-color: var(--accent); }
.team-card .tag { align-self: flex-start; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.people .person { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.teamlist { display: flex; flex-direction: column; margin-top: 6px; font-size: .9rem; }
.teamlist .primary, .teamlist-v .primary { font-weight: 700; }
.teamlist .primary::before { content: "★ "; color: var(--accent); }
.teamlist-v { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.teamlist-v li:not(.primary) { padding-left: 14px; }
.motivation { margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--surface-2);
              border-radius: 0 var(--radius) var(--radius) 0; white-space: pre-wrap; }
.motivation-box .eyebrow { margin-bottom: 6px; }
.approve-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 0 0; border-top: 1px solid var(--line); margin-bottom: 10px; }
.approve-row + .applicant-actions { border-top: 0; padding-top: 0; }
.presets { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.is-done { opacity: .6; cursor: default; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.row-actions form { margin: 0; }
.btn-icon { padding: 5px 10px; line-height: 1; }
.list-compact td { padding: 7px 10px; }
.cat-admin-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cat-admin-head h2 { margin: 0; }
.add-row { margin-top: 12px; }
.add-row input[type=text] { flex: 1 1 220px; }
.add-row .choice { margin: 0; }
.cat-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.cat-stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.cat-stat-head { display: flex; justify-content: space-between; font-weight: 700; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.cat-stat ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cat-stat li { display: flex; justify-content: space-between; font-size: .92rem; }
.team-pick { margin-bottom: 12px; }
.team-pick-cat { font-weight: 700; margin: 0 0 6px; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.team-opt { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 6px; }
.team-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.team-opt .choice { margin: 0; }
.team-about { margin-top: 4px; }
.team-about > summary { font-size: .85rem; color: var(--accent); }
.team-about[open] > summary { margin-bottom: 6px; }
.team-about .prose { padding: 4px 0 2px 26px; }
td.row-actions { display: table-cell; text-align: right; white-space: nowrap; }
td.row-actions > * { display: inline-block; vertical-align: middle; margin-left: 4px; }
@media (max-width: 640px) { td.row-actions { white-space: normal; } td.row-actions > * { margin: 2px 0 2px 4px; } }
.team-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; align-items: start; }
.team-pick-cat { grid-column: 1 / -1; margin-top: 4px; }
.team-pick .team-opt { margin: 0; }
.team-opt .team-about[open] { grid-column: 1 / -1; }

.approve-row .choice { margin: 0; }
.approve-buttons { display: flex; gap: 8px; flex-wrap: wrap; flex-basis: 100%; }
.view-prefs { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: -4px 0 18px; }
.view-prefs .choice { margin: 0; }
html.js .js-hide { display: none; }
.team-card { gap: 6px; }
.team-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
.team-card-head:hover strong { color: var(--accent); }
.card-names { list-style: none; margin: 2px 0 0; padding: 0; font-size: .92rem; display: grid; gap: 2px; }
.card-names li { display: grid; grid-template-columns: 1.1em 1fr; overflow-wrap: anywhere; }
.card-names .mark { color: var(--muted); }
.card-names li.is-lead { font-weight: 700; }
.card-names li.is-lead .mark { color: var(--accent); }

/* ---- 0.2.3: trinnvis søknad */
.wizard { list-style: none; display: flex; gap: 18px; padding: 0; margin: 0 0 16px; font-size: .9rem; color: var(--muted); flex-wrap: wrap; }
.wizard li { display: flex; align-items: center; gap: 8px; }
.wizard li span { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%;
                  border: 1px solid var(--line-strong); font-weight: 700; font-size: .85rem; }
.wizard li.is-current { color: var(--text); font-weight: 600; }
.wizard li.is-current span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wizard li.is-done span { border-color: var(--accent); color: var(--accent); }
.team-opt.is-locked { opacity: .55; background: var(--surface-2); }
.team-opt.is-locked .choice { cursor: not-allowed; }
.team-opt.is-locked p { margin: 2px 0 0 26px; }

/* ---- 0.2.4: jail */
.tag-jail { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.btn-jail-on { border-color: var(--danger); color: var(--danger); }
.jail-note { border-left: 4px solid var(--warn); }
.h4.spaced { margin-top: 18px; }

/* ---- 0.2.5: profilhistorikk */
.versions { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 0; }
.versions li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.version-changes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chg { font-size: .78rem; padding: 1px 8px; border-radius: 999px; border: 1px solid; }
.chg-person { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.chg-access { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.old-version { border: 3px solid var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.old-banner { background: var(--danger); color: #fff; margin: -22px -22px 18px; padding: 12px 22px; font-weight: 700;
              border-radius: calc(var(--radius) + 1px) calc(var(--radius) + 1px) 0 0; display: grid; gap: 2px; }
.old-banner .small { font-weight: 400; opacity: .9; }
:root:is([data-theme="amber"], [data-theme="hacker"]) .old-banner { color: var(--bg); background: var(--danger); text-shadow: none; }
.old-version .changed { background: var(--danger-soft); outline: 2px solid var(--danger); outline-offset: 2px; border-radius: 3px; }
.old-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 14px; }

/* ---- 0.3: tokens */
.mono, input.mono { font-family: var(--mono); letter-spacing: .04em; }
input.mono { text-transform: uppercase; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { font: inherit; font-size: .82rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-strong);
        background: var(--surface-2); color: var(--text); cursor: pointer; }
.chip:hover { border-color: var(--accent); }
input.short { width: 90px; }
.token-actions { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: space-between; }
.token-actions .buttons { margin: 0; }
.print-box > summary { list-style: none; }
.print-body { margin-top: 12px; max-width: 560px; }
.batch-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.batch-head h2 { margin-bottom: 2px; }
.batch-head p { margin: 0; }
.batch-text { white-space: pre-wrap; color: var(--muted); margin-top: 4px !important; }
.counts { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.st { font-size: .78rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-strong); white-space: nowrap; }
.st-ledig { color: var(--text); }
.st-utdelt { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.st-brukt { color: var(--ok); border-color: var(--ok); background: var(--ok-soft); }
.st-utlopt, .st-venter { color: var(--muted); border-style: dashed; }
.tokens-table td:first-child, .tokens-table th:first-child { width: 36px; }
tr.st-row-brukt td, tr.st-row-utlopt td { color: var(--muted); }
.print-body textarea { width: 100%; }
.token-actions .print-box { flex: 1 1 100%; }
.token-actions .print-box[open] { padding-top: 4px; border-top: 1px solid var(--line); }

/* ---- dokumenter og samtykke fra foresatte (0.3.1) */
.tag-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.table-wrap { overflow-x: auto; }
.docs-table td { vertical-align: top; }
.sha { font-family: var(--mono); font-size: .7rem; overflow-wrap: anywhere; max-width: 34ch; }
.upload-box { margin-top: 16px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); }
.upload-box h3 { margin-top: 0; }
.review-box { margin: 14px 0; padding: 14px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft); }
.review-box p { margin: 0 0 8px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.inline-form input { width: auto; }
details.menu-right .menu-body { left: auto; right: 0; }
details.archive { margin-top: 18px; }
details.archive > summary { cursor: pointer; font-weight: 600; }
ol.consent-steps, .consent ol.steps { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.consent ol.steps li { padding: 8px 12px 8px 36px; border: 1px solid var(--line); border-radius: var(--radius); position: relative; }
.consent ol.steps li::before { content: "○"; position: absolute; left: 12px; top: 8px; color: var(--muted); }
.consent ol.steps li.done::before { content: "✓"; color: var(--ok); font-weight: 700; }
.consent ol.steps li form { margin-left: 8px; }
.consent-godkjent { border-left: 4px solid var(--ok); }
.consent-mangler, .consent-venter_svar, .consent-til_godkjenning { border-left: 4px solid var(--warn); }
.st-mangler { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.st-venter_svar { color: var(--warn); border-color: var(--warn); background: var(--warn-soft); }
.st-til_godkjenning { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.st-godkjent { color: var(--ok); border-color: var(--ok); background: var(--ok-soft); }
.consent-table .who { display: flex; gap: 10px; align-items: center; }
code.unknown { color: var(--danger); text-decoration: line-through dotted; }
.review-box, .upload-box { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  table.docs-table, table.docs-table tbody, table.docs-table tr, table.docs-table td { display: block; width: 100%; }
  table.docs-table thead { display: none; }
  table.docs-table tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.docs-table td { padding: 2px 0; border: 0; }
  table.docs-table td.row-actions { text-align: left; padding-top: 6px; }
  .sha { max-width: none; }
}

/* ---- Root (0.3.2) */
.tag-root { background: var(--text); color: var(--bg); border-color: var(--text); }
.tag-root, .tag-admin { font-weight: 700; }
abbr.role { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.tag abbr.role { text-decoration-color: currentColor; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }

/* ---- Helse, Kosthold, Hjelp (0.3.3) */
.call-113 { font-size: 1.15rem; font-weight: 700; padding: 10px 14px; border: 2px solid var(--danger);
  border-radius: var(--radius); background: var(--danger-soft); color: var(--danger); }
.call-113 a { color: inherit; }
details.health-item { padding: 0; margin: 0 0 10px; }
details.health-item > summary { cursor: pointer; padding: 14px 16px; font-weight: 700; font-size: 1.05rem; list-style: none; }
details.health-item > summary::-webkit-details-marker { display: none; }
details.health-item > summary::before { content: "▸"; display: inline-block; width: 1.2em; color: var(--accent); transition: transform .15s; }
details.health-item[open] > summary::before { transform: rotate(90deg); }
.hi-body { padding: 0 16px 14px 36px; }
ul.contacts { padding-left: 1.1em; margin: 4px 0 10px; }
ul.contacts li { margin: 3px 0; }
a.phone { font-weight: 600; white-space: nowrap; }
.pick-box { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; }
fieldset.contacts-pick, fieldset.flags { border: 0; padding: 0; margin: 12px 0; min-width: 0; }
fieldset.contacts-pick legend, fieldset.flags legend { font-weight: 600; margin-bottom: 6px; }
.diet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 14px; margin-bottom: 10px; }
dl.glossary { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: 10px 18px; }
dl.glossary dt { font-weight: 700; }
dl.glossary dd { margin: 0; }
dl.glossary dd .buttons { margin-top: 4px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { dl.glossary { grid-template-columns: 1fr; gap: 2px; } dl.glossary dd { margin-bottom: 10px; } }
dl.glossary dd > p:first-child, .hi-body .prose > :first-child { margin-top: 0; }
dl.glossary dd > p:last-child { margin-bottom: 4px; }

/* ---- Rollesymboler (0.3.4) */
.rsym { font-family: "LANCrew Symbols", "Segoe UI Symbol", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-style: normal; font-weight: normal; margin-right: .3em; line-height: 1; }
.rsym-img { width: 1.15em; height: 1.15em; vertical-align: -0.2em; margin-right: .3em; object-fit: contain; }
.role-wrap { white-space: nowrap; }
.sym-input { width: 6em; font-size: 1.2rem; text-align: center; font-family: "LANCrew Symbols", system-ui, sans-serif; }
.sym-preview { font-size: 1.05rem; }
.sym-table td { vertical-align: middle; }

/* ---- Godkjenninger, søk og sortering (0.3.5) */
ul.todo { list-style: none; padding: 0; margin: 0; }
ul.todo > li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
ul.todo > li:last-child { border-bottom: 0; }
ul.todo .who { display: flex; gap: 10px; align-items: center; }
ul.todo .row-actions { display: flex; gap: 6px; align-items: center; }
li.is-later { opacity: .75; }
.snooze { min-width: 230px; }
.snooze label { display: block; margin-top: 8px; font-size: .85rem; }
.filter-groups { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; align-items: center; }
.filter-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
a.chip { text-decoration: none; }
a.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
#oversikt .who { display: flex; gap: 10px; align-items: center; }
th.sym-col, td.sym-col { width: 2em; text-align: center; padding-right: 0; }
td.sym-col .rsym, td.sym-col .rsym-img { margin-right: 0; font-size: 1.15rem; }
a.sortlink { color: inherit; text-decoration: none; }
a.sortlink:hover { text-decoration: underline; }

/* ---- Header (VOID) på forside, innlogging og søknad (0.3.10) */
.brand-hero { position: relative; overflow: hidden; border-radius: var(--radius); margin: 0 0 22px;
  padding: clamp(36px, 8vw, 88px) 20px; text-align: center; background: var(--surface-2); border: 1px solid var(--line); }
.brand-hero.is-small { padding: clamp(18px, 4vw, 36px) 16px; }
.brand-hero.has-image { border-color: transparent; background: #05070a; }
.brand-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.brand-hero.has-image::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.55)); }
.brand-text { position: relative; z-index: 1; }
.brand-name { margin: 0; font-weight: 800; font-size: clamp(2.4rem, 9vw, 5.2rem); line-height: 1;
  letter-spacing: .45em; padding-left: .45em; color: var(--text); }
.brand-hero.is-small .brand-name { font-size: clamp(1.6rem, 6vw, 2.6rem); }
.brand-sub { margin: .7em 0 0; font-size: clamp(.8rem, 2.4vw, 1.05rem); letter-spacing: .38em; padding-left: .38em;
  text-transform: uppercase; color: var(--text); font-weight: 600; }
.brand-tagline { margin: 1.1em 0 0; font-style: italic; color: var(--muted); font-size: clamp(.9rem, 2.4vw, 1.1rem); }
.brand-hero.has-image .brand-name { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.brand-hero.has-image .brand-sub { color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.6); }
.brand-hero.has-image .brand-tagline { color: rgba(255,255,255,.85); }
[data-theme="amber"] .brand-hero.has-image .brand-name, [data-theme="hacker"] .brand-hero.has-image .brand-name,
[data-theme="amber"] .brand-hero.has-image .brand-sub, [data-theme="hacker"] .brand-hero.has-image .brand-sub { color: var(--accent); }
.header-thumb { display: block; max-width: 320px; width: 100%; border-radius: 6px; margin: 6px 0; }

/* ---- Events (0.4.0) */
ul.event-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.event-card { padding: 0; }
a.event-link { display: flex; gap: 14px; align-items: center; padding: 14px 16px; color: inherit; text-decoration: none; flex-wrap: wrap; }
a.event-link:hover strong { text-decoration: underline; }
.event-symbol { font-size: 1.8rem; width: 1.6em; text-align: center; margin: 0; }
.event-main { display: flex; flex-direction: column; flex: 1 1 220px; }
.event-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.phase-ferdig { opacity: .75; }
.event-head h1 .rsym { margin-right: .2em; }
.event-team { padding: 10px 0; border-bottom: 1px solid var(--line); }
.event-team:last-of-type { border-bottom: 0; }
.event-team h3 { margin: 0 0 6px; display: flex; gap: 8px; align-items: center; }
ul.people-row { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
ul.people-row > li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
ul.people-row > li > span { flex: 1 1 200px; }
.place-form select { width: auto; font-size: .85rem; padding: 4px 6px; }
section.invitation.is-open { border-left: 4px solid var(--accent); }
ul.pick-list { list-style: none; padding: 0; margin: 8px 0; max-height: 60vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); }
ul.pick-list > li { padding: 6px 10px; border-bottom: 1px solid var(--line); }
ul.pick-list > li:last-child { border-bottom: 0; }
ul.pick-list .choice > span { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
ul.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
ul.plain-list form { margin-left: 8px; }
.danger-zone { margin-top: 24px; }

/* ---- Filer på events og steder (0.4.1) */
ul.file-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.file-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius); flex-wrap: wrap; }
.file-row.is-pending { border-style: dashed; border-color: var(--warn); }
.file-ext { flex: none; min-width: 3.2em; text-align: center; font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  padding: 6px 4px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.file-main { flex: 1 1 14rem; min-width: 0; }
.file-name { font-weight: 600; overflow-wrap: anywhere; }
.file-main .tag { margin-right: 2px; }
.tag-vis-ledelse { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.tag-vis-crew { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.file-row .row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
details.file-edit { position: relative; }
details.file-edit > summary { list-style: none; cursor: pointer; }
details.file-edit > summary::-webkit-details-marker { display: none; }
details.file-edit[open] { flex-basis: 100%; order: 10; }
details.file-edit[open] > form { margin-top: 6px; padding: 12px; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius); }
@media (min-width: 700px) {
  details.file-edit[open] { flex-basis: auto; order: 0; }
  details.file-edit[open] > form { position: absolute; right: 0; z-index: 5; min-width: 15rem; margin-top: 4px;
    box-shadow: 0 6px 24px rgba(0,0,0,.18); }
}
.old-files p { margin: 0 0 8px; }
