@font-face { font-family: "Schibsted Grotesk"; src: url("/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
:root {
  color-scheme: light;
  --paper: #eef3f8; --paper-2: #e3eaf2; --surface: #fff; --ink: #0a284b; --ink-2: #3f526b; --ink-3: #66788f; --line: #d2dce7;
  --band: #0a284b; --on-band: #fff; --on-band-2: #b9c8db; --cell: #5ad6a0;
  --ok: #137a50; --ok-bg: #dcf2e6; --bad: #b3392a; --bad-bg: #fbe4e0; --info: #1f5fbf; --info-bg: #e2ecfb;
  --focus: #2f6feb; --radius: 14px; --shadow: 0 1px 0 rgba(10,40,75,.04), 0 10px 28px -16px rgba(10,40,75,.28);
  --font: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #071a30; --paper-2: #0b2240; --surface: #0f2a4a; --ink: #e8eef6; --ink-2: #b2c2d6; --ink-3: #8699b0; --line: #21406a;
    --band: #0c2f59; --ok: #5ad6a0; --ok-bg: rgba(90,214,160,.14); --bad: #ff8e7a; --bad-bg: rgba(255,142,122,.13);
    --info: #8fb6ff; --info-bg: rgba(143,182,255,.14); --focus: #7fa9ff; --shadow: 0 10px 28px -16px rgba(0,0,0,.7);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h2 { font-size: 1.15rem; }
p, ul, ol { margin: 0; }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: clamp(16px, 3vw, 32px); }
.muted { color: var(--ink-3); }
.block { display: block; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }

/* Header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; line-height: 0; }
.logo svg { height: 32px; width: auto; }
.logo-tag { line-height: 1; font-weight: 800; font-size: .8rem; color: var(--ink); background: var(--cell); color: #0a284b; border-radius: 4px; padding: .3em .5em; }
.me { display: flex; align-items: center; gap: 14px; }
.me-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: .95rem; }
.me form { margin: 0; }
.link-btn { font: inherit; font-size: .92rem; font-weight: 600; color: var(--ink-2); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.link-btn:hover { color: var(--ink); }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-inline: -8px; }
.nav::-webkit-scrollbar { display: none; }
.nav a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px 12px; text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--ink-2); border-bottom: 3px solid transparent; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.nav-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: .74rem; font-weight: 800; }
@media (max-width: 560px) { .me-name { display: none; } }

.main { padding-block: 28px 64px; display: grid; gap: 20px; }
.foot { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-block: 24px 40px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .86rem; }
.foot a { color: var(--ink-2); }

/* Public / auth */
.public { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth { width: 100%; max-width: 440px; display: grid; gap: 18px; }
.auth-logo { justify-self: center; }
.auth-logo svg { height: 40px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(22px, 5vw, 34px); box-shadow: var(--shadow); display: grid; gap: 14px; }
.auth-card h1 { font-size: 1.6rem; }
.auth-help { text-align: center; font-size: .92rem; }
.auth-foot { text-align: center; font-size: .86rem; color: var(--ink-3); }
.prose { max-width: 70ch; display: grid; gap: 12px; }
.prose h2 { margin-top: 12px; }
.prose p { color: var(--ink-2); }

/* Messages */
.flash { padding: 12px 16px; border-radius: 12px; font-weight: 600; }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-error { background: var(--bad-bg); color: var(--bad); }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; font: inherit; font-weight: 700; font-size: .95rem; padding: .7em 1.15em; border-radius: 10px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.12); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-3); filter: none; }
.btn-sm { padding: .45em .8em; font-size: .88rem; }
.btn-block { width: 100%; }
.stack { display: grid; gap: 14px; }
.stack-sm { display: grid; gap: 8px; }
.stack-lg { display: grid; gap: 20px; align-content: start; }
.row-gap { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; text-decoration: none; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; }
.field small { font-weight: 400; color: var(--ink-3); font-size: .82rem; }
input, select, textarea { width: 100%; font: inherit; font-weight: 400; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; padding: .65em .8em; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input[readonly], input[disabled] { color: var(--ink-3); }
textarea { resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--ink); }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; font-weight: 400; font-size: .93rem; color: var(--ink-2); }
.check a { color: var(--ink); font-weight: 600; }
.choice { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.choice legend { font-weight: 700; font-size: .92rem; margin-bottom: 8px; }
.inline-form { display: flex; gap: 6px; margin: 0; }
.inline-form input { padding: .4em .6em; font-size: .88rem; }
.search { display: flex; gap: 8px; max-width: 560px; }

/* Layout pieces */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.grid-2-wide { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-2-wide { grid-template-columns: 1fr; } }
.narrow { max-width: 780px; width: 100%; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 2.5vw, 24px); box-shadow: var(--shadow); display: grid; gap: 14px; align-content: start; min-width: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-head a { font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.card-accent { border: 2px solid var(--ok); }
.count { display: inline-block; margin-left: 4px; font-size: .85rem; color: var(--ink-3); font-weight: 700; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head .sub { margin-top: 6px; color: var(--ink-2); max-width: 70ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-actions form { margin: 0; }
.sub { color: var(--ink-2); }
.crumbs { font-size: .88rem; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); }
.empty { padding: 18px; border: 1.5px dashed var(--line); border-radius: 12px; color: var(--ink-2); display: grid; gap: 12px; justify-items: start; }
.note { padding: 12px 14px; border-radius: 10px; background: var(--paper); color: var(--ink-2); }

/* Avatars & tags */
.avatar { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--band); color: #fff; font-weight: 800; font-size: .9rem; letter-spacing: .02em; }
.avatar-sm { width: 30px; height: 30px; font-size: .72rem; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.4rem; }
.tag { display: inline-block; padding: .2em .6em; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.tag-muted { background: var(--paper-2); color: var(--ink-3); }
.tag-info { background: var(--info-bg); color: var(--info); }
.tag-warn { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.tag-bad { background: var(--bad-bg); color: var(--bad); }
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.tag-team { background: var(--cell); color: #0a284b; }

/* Lists */
.list { list-style: none; padding: 0; display: grid; }
.list li { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; padding-top: 0; }
.list .row-between { display: flex; }
.list a { text-decoration: none; }
.list a:hover strong { text-decoration: underline; }

/* Progress */
.card-hero { background: var(--band); color: var(--on-band); border-color: var(--band); }
.card-hero .muted { color: var(--on-band-2); }
.eyebrow-line { font-weight: 700; color: var(--on-band-2); font-size: .9rem; }
.progress-row { display: flex; align-items: baseline; gap: 10px; }
.big { font-size: 3rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.big span { font-size: 1.4rem; color: var(--on-band-2); }
progress.bar { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border: 0; border-radius: 999px; background: rgba(255,255,255,.18); overflow: hidden; }
progress.bar::-webkit-progress-bar { background: rgba(255,255,255,.18); border-radius: 999px; }
progress.bar::-webkit-progress-value { background: var(--cell); border-radius: 999px; }
progress.bar::-moz-progress-bar { background: var(--cell); border-radius: 999px; }
progress.bar-sm { width: 90px; height: 8px; background: var(--paper-2); vertical-align: middle; }
progress.bar-sm::-webkit-progress-bar { background: var(--paper-2); }
progress.bar-sm::-webkit-progress-value { background: var(--ok); }
progress.bar-sm::-moz-progress-bar { background: var(--ok); }
.current { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.18); }
.current h2 { font-size: 1.3rem; }
.card-hero .btn { background: var(--cell); color: #0a284b; border-color: var(--cell); }

/* Course */
.month-title { font-size: 1rem; color: var(--ink-2); }
.topic-list { list-style: none; padding: 0; display: grid; }
.topic-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.topic-row:first-child { border-top: 0; }
.topic-num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--ink); font-weight: 800; font-size: .88rem; }
.topic-main { display: grid; gap: 2px; min-width: 0; }
.topic-main a { text-decoration: none; }
.topic-main a:hover strong { text-decoration: underline; }
.topic-main .muted { font-size: .88rem; }
.is-locked { opacity: .6; }
.is-locked .topic-num { border-color: var(--ink-3); color: var(--ink-3); }
.video-card { padding-bottom: clamp(18px, 2.5vw, 24px); }
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.checks-list { padding-left: 1.2em; display: grid; gap: 6px; color: var(--ink-2); }
.files { list-style: none; padding: 0; display: grid; gap: 8px; }
.files li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.files li form { margin-left: auto; }
.file-kind { font-size: .75rem; font-weight: 800; text-transform: capitalize; background: var(--cell); color: #0a284b; border-radius: 4px; padding: .15em .5em; }
.files a { font-weight: 700; }
.timeline { list-style: none; padding: 0; display: grid; gap: 14px; }
.timeline li { display: grid; gap: 8px; padding-left: 14px; border-left: 3px solid var(--line); }
.timeline p + p { margin-top: 6px; }
.quote { padding: 10px 12px; background: var(--paper); border-radius: 10px; color: var(--ink-2); display: grid; gap: 6px; }
.feedback { padding: 12px 14px; background: var(--ok-bg); border-radius: 10px; display: grid; gap: 6px; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-size: .8rem; color: var(--ink-3); font-weight: 700; padding: 0 10px 8px 0; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td form { margin: 0; }
.t-right { text-align: right; }
.table td a { font-weight: 600; }
tr.is-off { opacity: .55; }
@media (max-width: 700px) {
  .table thead { display: none; }
  .table tr { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table td { border: 0; padding: 0; }
  .t-right { text-align: left; }
}

/* Forums */
.cat-list, .thread-list, .people, .convs, .events { list-style: none; padding: 0; display: grid; }
.cat-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.cat-list li:first-child { border-top: 0; padding-top: 0; }
.cat-list a { display: grid; gap: 2px; text-decoration: none; }
.cat-list a:hover strong { text-decoration: underline; }
.cat-meta { display: grid; justify-items: end; font-size: .88rem; white-space: nowrap; }
.thread-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.thread-list li:first-child { border-top: 0; padding-top: 0; }
.thread-main { display: grid; gap: 2px; min-width: 0; }
.thread-main a { text-decoration: none; }
.thread-main a:hover strong { text-decoration: underline; }
.thread-meta { display: grid; justify-items: end; font-size: .86rem; white-space: nowrap; }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 12px; }
.post-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .93rem; }
.post-head a { text-decoration: none; }
.post-body { display: grid; gap: 10px; color: var(--ink); overflow-wrap: anywhere; }
.post-actions { display: flex; gap: 16px; align-items: flex-start; font-size: .88rem; }
.post-actions form { margin: 0; }
.report summary { cursor: pointer; color: var(--ink-3); font-size: .86rem; list-style: none; }
.report summary::-webkit-details-marker { display: none; }
.report[open] { width: 100%; max-width: 360px; }
.report form { margin-top: 8px; }

/* People & profiles */
.people { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.people a { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; height: 100%; }
.people a:hover { border-color: var(--ink-3); }
.profile-head { display: flex; gap: 16px; align-items: center; }
.profile-head h1 { margin-bottom: 4px; }
.links { list-style: none; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; }
.links a { font-weight: 700; }

/* Messages */
.convs li a { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; }
.convs li:first-child a { border-top: 0; padding-top: 0; }
.convs .is-unread strong { color: var(--ink); }
.convs .is-unread .muted { color: var(--ink-2); font-weight: 600; }
.conv-main { min-width: 0; }
.conv-main .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-meta { display: grid; justify-items: end; gap: 4px; font-size: .84rem; }
.bubbles { list-style: none; padding: 0; display: grid; gap: 10px; max-height: 60vh; overflow-y: auto; }
.bubbles li { display: grid; gap: 4px; max-width: 80%; font-size: .82rem; }
.bubbles .mine { justify-self: end; justify-items: end; }
.bubble { padding: 10px 14px; border-radius: 14px; font-size: .97rem; display: grid; gap: 6px; overflow-wrap: anywhere; }
.theirs .bubble { background: var(--paper); border-bottom-left-radius: 4px; }
.mine .bubble { background: var(--band); color: #fff; border-bottom-right-radius: 4px; }
.mine .bubble a { color: #fff; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 520px) { .chat-form { grid-template-columns: 1fr; } .bubbles li { max-width: 92%; } }

/* Agenda */
.event { display: grid; gap: 6px; justify-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.event:first-child { border-top: 0; padding-top: 0; }

/* Admin tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a { padding: .5em .9em; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--ink-2); border: 1px solid var(--line); background: var(--surface); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
