/* FK Select design-tokens (aflæst fra fkselect.dk, se design-tokens-fkselect.md) */
:root {
  --ink: #272725;
  --accent: #997361;
  --accent-dark: #8f654d;
  --brand-red: #d0262e;
  --muted: #6f7173;
  --line: #d8d6d3;
  --bg: #f0f0f0;
  --surface: #ffffff;
  --soft: #f1e9e4;
  --ok: #3f7d5a;
  --ok-soft: #e4efe8;
  --warn: #b7791f;
  --warn-soft: #fbf1dc;
  --err: #b42318;
  --err-soft: #fde8e6;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 "Open Sans", "Segoe UI", system-ui, sans-serif; }
h1, h2, h3 { font-family: "Playfair Display", Georgia, serif; font-weight: 600; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: 28px; } h2 { font-size: 22px; } h3 { font-size: 17px; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); font-size: 14px; }

/* ---- layout (admin) ---- */
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #fff; padding: 18px 16px; display: flex; flex-direction: column; gap: 6px; }
.side .brand { display: flex; align-items: center; gap: 8px; font-size: 17px; margin-bottom: 18px; color: #fff; text-decoration: none; }
.tri { display: inline-flex; gap: 2px; }
.tri i { width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid #fff; }
.tri i.r { border-left-color: var(--brand-red); }
.side a.nav { color: #d9d7d3; text-decoration: none; padding: 8px 10px; border-radius: 6px; display: block; }
.side a.nav:hover, .side a.nav.active { background: rgba(255,255,255,.1); color: #fff; }
.side .spacer { flex: 1; }
.side .user { font-size: 13px; color: #b5b3ae; }
.main { padding: 26px 32px 60px; max-width: 1200px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
@media (max-width: 800px) { .shell { grid-template-columns: 1fr; } .side { flex-direction: row; flex-wrap: wrap; } .main { padding: 16px; } }

/* ---- components ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.tile b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; }
.tile span { font-size: 13px; color: var(--muted); }
table.tbl { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
table.tbl th { text-align: left; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafaf9; }
table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.btn { display: inline-block; border: 1.5px solid var(--accent); background: transparent; color: var(--accent); padding: 8px 14px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { background: var(--accent); color: #fff; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.danger { border-color: var(--err); color: var(--err); } .btn.danger:hover { background: var(--err); color: #fff; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--brand-red); outline-offset: 2px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea { font: inherit; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
.field textarea { min-height: 110px; resize: vertical; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.err { background: var(--err-soft); color: var(--err); }
.pill.grey { background: #e9e7e1; color: var(--muted); }
.pill.accent { background: var(--soft); color: var(--accent-dark); }
.notice { border-left: 4px solid var(--accent); background: var(--soft); padding: 10px 14px; border-radius: 0 8px 8px 0; margin-bottom: 14px; font-size: 14px; }
.notice.err { border-color: var(--err); background: var(--err-soft); }
.notice.ok { border-color: var(--ok); background: var(--ok-soft); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 600; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--brand-red); }
.bar { display: grid; grid-template-columns: 140px 1fr 44px; gap: 8px; align-items: center; font-size: 13px; margin: 3px 0; }
.bar .track { height: 10px; background: #e3e0d8; border-radius: 5px; overflow: hidden; }
.bar .track i { display: block; height: 100%; background: var(--ink); }
.bar .track i.self { background: var(--brand-red); }
.bar .track i.acc { background: var(--accent); }
.bar output { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.progress { height: 8px; background: #e3e0d8; border-radius: 4px; overflow: hidden; min-width: 80px; }
.progress i { display: block; height: 100%; background: var(--ok); }

/* ---- portal (chef / rater) ---- */
.portal { max-width: 520px; margin: 0 auto; padding: 18px 16px 60px; }
.portal .brand { display: flex; align-items: center; gap: 8px; font-size: 17px; margin-bottom: 18px; color: var(--ink); }
.portal .tri i { border-left-color: var(--ink); } .portal .tri i.r { border-left-color: var(--brand-red); }
.portal .btn { width: 100%; text-align: center; padding: 14px; font-size: 16px; border-radius: 12px; }
.task { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; text-decoration: none; color: var(--ink); }
.task .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--accent); flex: none; }
.task .ico.done { background: var(--ok); } .task .ico.locked { background: #b8bcc6; }
.task .t b { display: block; } .task .t span { font-size: 13px; color: var(--muted); }
.task .chev { margin-left: auto; color: #9aa0ad; font-size: 20px; }
.q { font-family: "Playfair Display", Georgia, serif; font-size: 21px; line-height: 1.3; margin: 10px 0 16px; }
.factor { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.scale button { min-width: 0; height: 66px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-weight: 700; font-size: 20px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink); }
.scale button small { font-size: 8px; font-weight: 600; color: var(--muted); line-height: 1.1; text-align: center; padding: 0 2px; }
.scale button.sel { background: var(--accent); color: #fff; border-color: var(--accent); }
.scale button.sel small { color: var(--soft); }
.nr { width: 100%; border-radius: 12px; border: 1.5px dashed #c4c1b8; background: transparent; padding: 12px; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink); }
.nr.sel { background: #e3e0d8; border-style: solid; }
.center { text-align: center; }
.lang { display: inline-flex; gap: 6px; align-items: center; }
.lang a { display: inline-flex; border-radius: 3px; opacity: .45; line-height: 0; border: 2px solid transparent; }
.lang a.on { opacity: 1; border-color: var(--brand-red); }
.lang a:hover { opacity: 1; }
.big { font-size: 44px; }

/* ---- rapport: gap-visning (dig selv vs. alle raters) ---- */
.summary { border-left: 4px solid var(--brand-red); }
.gap { display: grid; grid-template-columns: 140px 1fr 44px; gap: 8px; align-items: center; font-size: 13px; margin: 8px 0; }
.gap .line { position: relative; height: 18px; border-bottom: 2px solid #e3e0d8; margin: 0 7px; }
.gap .line i.span { position: absolute; top: 7px; height: 4px; background: #d9d4cc; border-radius: 2px; }
.gap .line i.dot { position: absolute; top: 2px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--ink); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.gap .line i.dot.self { background: var(--brand-red); }
.gap output { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); }
.gap output.up { color: var(--ok); } .gap output.down { color: var(--err); }
.gap-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.gap-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); margin-right: 5px; }
.gap-legend i.self { background: var(--brand-red); }
.gap-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin: 2px 44px 0 148px; }
@media (max-width: 520px) { .gap { grid-template-columns: 100px 1fr 40px; } .gap-axis { margin-left: 108px; } }
