/* Boora — "mørk, moderne og enkel" (masterdokument §12).
   Dark background, warm orange accent (the lit windows in the hero), clean sans-serif, rounded cards.
   The plan suggested lime; orange was chosen to tie the accent to the hero scene. */

:root {
  --bg: #0a0c0b;
  --surface: #121513;
  --surface-2: #181c19;
  --surface-3: #20251f;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f1f4ef;
  --text-2: #b9c1ba;
  --muted: #858e87;
  --accent: #d64600;          /* burnt orange: fills, lines, buttons, charts */
  --accent-hover: #ea5a14;
  --accent-ink: #ffffff;      /* text on accent fills (white reads better than dark on #d64600) */
  --accent-text: #f2763a;     /* accent-coloured small text on the dark background (≈7:1) */
  --accent-soft: rgba(214, 70, 0, 0.14);
  --accent-line: rgba(214, 70, 0, 0.5);
  --amber: #f2b45c;
  --green: #9be27a;
  --violet: #b9a4f0;
  --red: #f0806b;
  --blue: #8fb8f2;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --font: 'Outfit', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, svg { display: block; }
.icon { flex: none; }
h1, h2, h3 { font-weight: 400; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-2);
}
.eyebrow-rule { display: flex; align-items: center; gap: 16px; }
.eyebrow-rule::before { content: ''; width: 40px; height: 2px; background: var(--accent); }
.muted { color: var(--muted); }
.accent { color: var(--accent-text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { border-color: var(--text-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { border-color: transparent; color: var(--text-2); padding-inline: 8px; }
.btn-ghost:hover { color: var(--text); border-color: transparent; }
.btn-sm { min-height: 34px; padding: 0 12px; border-radius: 9px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ---------- Site header ---------- */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { font-size: 24px; letter-spacing: 0.22em; font-weight: 400; text-decoration: none; }
.logo span { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.site-nav a { text-decoration: none; color: var(--text-2); }
.site-nav a:hover { color: var(--text); }
.site-nav .btn { color: var(--text); min-height: 40px; border-radius: 999px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero-scene { position: absolute; inset: 0; z-index: -1; }
.hero-scene svg { width: 100%; height: 100%; }
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 12, 11, 0.92) 0%, rgba(10, 12, 11, 0.55) 45%, rgba(10, 12, 11, 0) 75%),
    linear-gradient(0deg, var(--bg) 0%, rgba(10, 12, 11, 0) 35%);
}
.hero-inner { padding: 140px 0 72px; }
.hero h1 { font-size: clamp(40px, 6.2vw, 76px); max-width: 15ch; margin: 22px 0 22px; }
.hero .lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--text-2); max-width: 46ch; }

.situation-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 880px;
  margin-top: 40px;
}
.situation-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 210px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.2s, transform 0.2s;
}
.situation-card .art { position: absolute; inset: 0; z-index: -1; opacity: 0.9; }
.situation-card .art svg { width: 100%; height: 100%; }
.situation-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 12, 11, 0) 20%, rgba(10, 12, 11, 0.92) 78%);
}
.situation-card:hover, .situation-card:focus-visible { border-color: var(--accent); transform: translateY(-3px); }
.situation-card .row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.situation-card strong { font-weight: 400; font-size: 20px; line-height: 1.2; }
.situation-card .go {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  transition: background 0.2s, color 0.2s;
}
.situation-card:hover .go { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.situation-card .card-icon { margin-bottom: 12px; color: var(--text); }

/* ---------- Benefits ---------- */
.benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}
.benefit .icon { color: var(--text); margin-bottom: 12px; }
.benefit strong { display: block; font-weight: 500; margin-bottom: 4px; }
.benefit p { color: var(--muted); font-size: 15px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(32px, 4vw, 48px); margin: 18px 0 16px; }
.section-head p { color: var(--text-2); font-size: 18px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.step-num { font-size: 14px; color: var(--accent-text); letter-spacing: 0.1em; }
.step h3 { font-size: 24px; margin: 40px 0 10px; }
.step p { color: var(--muted); }

.promise {
  margin-top: 64px;
  padding: 48px;
  border-radius: 24px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(214, 70, 0, 0.16), transparent 55%), var(--surface);
  border: 1px solid var(--line);
}
.promise blockquote { margin: 0; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.2; letter-spacing: -0.02em; max-width: 24ch; }
.promise p { margin-top: 20px; color: var(--muted); }

/* Services grouped: one row per group, label left and chips right. */
.svc-groups { border-top: 1px solid var(--line); }
.svc-group { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.svc-group h3 { font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--text); }
.svc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.svc-checks { display: grid; gap: 14px; }
.svc-checks fieldset { margin: 0; padding: 0; border: none; min-width: 0; }
.svc-checks legend { padding: 0; margin-bottom: 8px; font-size: 13px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
/* Request flow, step 2. */
.svc-label { margin: 22px 0 10px; font-size: 12px; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; }
#service-tiles > .svc-label:first-child { margin-top: 0; }
.svc-tile-group[hidden], .svc-label[hidden] { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font-size: 14px;
}
.chip .icon { color: var(--text); }

.cta-band {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 40px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.cta-band h2 { font-size: clamp(26px, 3vw, 36px); }

.site-footer { padding: 48px 0 64px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer a { color: var(--text-2); text-decoration: none; margin-left: 20px; }

/* ---------- Customer flow (wizard) ---------- */
.flow-page { min-height: 100svh; display: flex; flex-direction: column; }
.flow-top { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.flow-top a.cancel { color: var(--muted); text-decoration: none; font-size: 14px; }
.flow {
  flex: 1;
  width: min(640px, 100% - 32px);
  margin: 0 auto;
  padding: 16px 0 48px;
  display: flex;
  flex-direction: column;
}
.progress { display: flex; align-items: center; gap: 8px; margin-bottom: 48px; }
.progress .bar { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.progress .bar.done { background: var(--accent); }
.progress .count { margin-left: 12px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.flow-step { display: none; flex: 1; flex-direction: column; }
.flow-step.active { display: flex; }
.no-js .flow-step { display: flex; margin-bottom: 56px; }
.flow-step h1 { font-size: clamp(30px, 5vw, 42px); }
.flow-step h1::before { content: ''; display: block; width: 28px; height: 2px; background: var(--line-strong); margin-bottom: 24px; }
.flow-step .sub { color: var(--text-2); margin: 12px 0 32px; }

.option-list { display: grid; gap: 12px; }
.option {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.option:hover { border-color: var(--line-strong); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option .text { flex: 1; }
.option strong { display: block; font-weight: 500; }
.option small { color: var(--muted); font-size: 14px; }
.option:has(input:checked) { border-color: var(--accent); background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)), var(--surface); }
.option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-height: 112px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-size: 14px;
}
.tile:hover { border-color: var(--line-strong); }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile .tick {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: none;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
}
.tile:has(input:checked) { border-color: var(--accent); background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)), var(--surface); }
.tile:has(input:checked) .tick { display: grid; }
.tile:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.tile[hidden] { display: none; }
.more-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.more-toggle:hover { border-color: var(--accent); color: var(--text); }
.more-toggle[hidden] { display: none; }
.more-toggle .icon { transform: rotate(90deg); transition: transform 0.2s; }
.more-toggle[aria-expanded='true'] .icon { transform: rotate(-90deg); }

.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label, .field .label { font-size: 14px; color: var(--text-2); }
.field .hint { font-size: 13px; color: var(--muted); }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-2); pointer-events: none; }
/* [type] lifts specificity above the generic input rule below, which would reset the padding. */
.input-icon input[type] { padding-left: 46px; }
input[type='text'], input[type='email'], input[type='tel'], input[type='date'], input[type='number'], input[type='search'], select, textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
textarea { min-height: 110px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
input[type='date']::-webkit-calendar-picker-indicator { filter: invert(0.85); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.flow-nav { margin-top: auto; padding-top: 40px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.flow-nav .btn-primary { min-width: 220px; }
.flow-nav.single .btn-primary { width: 100%; }
.form-error { color: var(--red); font-size: 14px; min-height: 22px; margin-top: 12px; }

.summary { display: grid; gap: 10px; padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 24px; font-size: 14px; }
.summary div { display: flex; justify-content: space-between; gap: 16px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; }

/* ---------- Thank-you ---------- */
.done-mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); margin-bottom: 28px; }
.timeline { list-style: none; padding: 0; margin: 32px 0; display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 28px 36px; }
.timeline li::before { content: ''; position: absolute; left: 7px; top: 22px; bottom: 0; width: 2px; background: var(--line-strong); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ''; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--accent); background: var(--bg); }
.timeline li.now::after { background: var(--accent); }
.timeline strong { display: block; font-weight: 500; }
.timeline p { color: var(--muted); font-size: 15px; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ---------- Company page ---------- */
.page-hero { padding: 160px 0 80px; background: radial-gradient(80% 120% at 85% 0%, rgba(214, 70, 0, 0.10), transparent 60%); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(40px, 6vw, 72px); max-width: 14ch; margin: 22px 0; }
.page-hero .lead { font-size: 20px; color: var(--text-2); max-width: 50ch; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.card { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.card h3 { font-size: 22px; margin-bottom: 8px; }
.notice { padding: 14px 18px; border-radius: 12px; background: rgba(155, 226, 122, 0.1); border: 1px solid rgba(155, 226, 122, 0.35); color: var(--text); font-size: 15px; margin-bottom: 20px; }
.notice.warn { background: rgba(242, 180, 92, 0.1); border-color: rgba(242, 180, 92, 0.35); }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.prose { max-width: 680px; }
.prose h2 { font-size: 28px; margin: 40px 0 12px; }
.prose p { color: var(--text-2); margin-bottom: 14px; }

@media (max-width: 860px) {
  .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps, .split { grid-template-columns: 1fr; }
  .site-nav a:not(.btn) { display: none; }
}
@media (max-width: 600px) {
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-row, .check-grid { grid-template-columns: 1fr; }
  .flow-nav .btn-primary { min-width: 0; flex: 1; }

  /* Header stays reachable while scrolling, so "Kom i gang" is always one tap away. */
  .site-header {
    position: fixed;
    background: rgba(10, 12, 11, 0.72);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
  .site-header .wrap { height: 60px; }
  .logo { font-size: 20px; }
  .site-nav .btn { min-height: 36px; padding: 0 16px; font-size: 14px; }
  [id] { scroll-margin-top: 72px; }

  /* Hero: the scene becomes a picture band on top, anchored right so the lit house stays
     in frame, fading into the page. Text and the three choices sit below it. */
  .hero { --scene-h: 360px; min-height: 0; display: block; }
  .hero-scene {
    bottom: auto;
    height: var(--scene-h);
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent);
    mask-image: linear-gradient(180deg, #000 72%, transparent);
  }
  .hero-scene svg { position: absolute; top: 0; right: 0; width: calc(var(--scene-h) * 16 / 9); height: var(--scene-h); }
  .hero::after { background: linear-gradient(180deg, rgba(10, 12, 11, 0.55) 0, rgba(10, 12, 11, 0) 110px); }
  .hero-inner { padding: calc(var(--scene-h) - 74px) 0 28px; }
  .hero .eyebrow { font-size: 11px; letter-spacing: 0.18em; }
  .hero h1 { font-size: 34px; letter-spacing: -0.025em; margin: 12px 0 14px; }
  .hero .lead { font-size: 16px; }

  /* Three choices side by side, as in the design, so all of them are visible at once. */
  .situation-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 24px; }
  .situation-card { min-height: 118px; padding: 12px; border-radius: 14px; }
  /* The illustrations carry the meaning on small cards; the icon would cover them. */
  .situation-card .card-icon { display: none; }
  .situation-card .row { display: block; }
  .situation-card strong { display: block; font-size: 15px; line-height: 1.25; }
  .situation-card .go {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    background: rgba(10, 12, 11, 0.55);
  }
  .situation-card .go .icon { width: 14px; height: 14px; }

  .benefits { gap: 22px 16px; padding: 28px 0 32px; }
  .benefit .icon { width: 22px; height: 22px; margin-bottom: 8px; }
  .benefit strong { font-size: 15px; }
  .benefit p { font-size: 14px; line-height: 1.45; }

  .section { padding: 56px 0; }
  .section-head { margin-bottom: 28px; }
  .section-head .eyebrow { font-size: 11px; letter-spacing: 0.2em; }
  .eyebrow-rule { gap: 12px; }
  .eyebrow-rule::before { width: 28px; }
  .section-head h2 { font-size: 30px; margin: 14px 0 12px; text-wrap: balance; }
  .section-head p { font-size: 16px; }

  .steps { gap: 10px; }
  .step { padding: 20px 22px; }
  .step h3 { font-size: 21px; margin: 10px 0 6px; }
  .step p { font-size: 15px; }

  .promise { margin-top: 32px; padding: 26px; border-radius: 20px; }
  .promise blockquote { font-size: 24px; text-wrap: balance; }
  .promise p { font-size: 15px; margin-top: 14px; }

  /* Service groups: label above, chips in one swipeable row per group. */
  .svc-group { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 16px 0; }
  .svc-group h3 { font-size: 15px; }
  .svc-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 -16px;
    padding: 0 16px 2px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 40px), transparent);
  }
  .svc-chips::-webkit-scrollbar { display: none; }
  .svc-chips .chip { flex: none; font-size: 13px; padding: 7px 12px; }

  .cta-band { padding: 26px; gap: 20px; border-radius: 20px; }
  .cta-band .btn { width: 100%; }

  .site-footer { padding: 32px 0 40px; }
  .site-footer .wrap { flex-direction: column; gap: 10px; }
  .site-footer a { margin: 0 20px 0 0; }
}
/* Short phones (iPhone SE): a lower picture band keeps the three choices above the fold. */
@media (max-width: 600px) and (max-height: 700px) {
  .hero { --scene-h: 290px; }
}

/* =====================================================================
   Admin ("Boora drift") — same tokens, denser layout.
   ===================================================================== */
.admin { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.admin-side {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-side .logo { font-size: 20px; padding: 0 10px 4px; }
.admin-side .tag { padding: 0 10px 24px; font-size: 12px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.admin-side a.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 15px;
}
.admin-side a.nav:hover { background: var(--surface-2); color: var(--text); }
.admin-side a.nav.active { background: var(--surface-3); color: var(--text); }
.admin-side a.nav.active .icon { color: var(--accent); }
.admin-side .badge { margin-left: auto; }
.admin-side .foot { margin-top: auto; padding: 12px; font-size: 13px; color: var(--muted); }
.admin-side .foot a { color: var(--text-2); }
.admin-side .who { margin: 0 0 10px; display: grid; gap: 2px; }
.admin-side .who strong { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-top .logout { margin-left: 14px; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-side .short, .admin-top, .m-only, .cols-narrow { display: none; }
.admin-main { padding: 32px 40px 80px; min-width: 0; }
.admin-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.admin-head h1 { font-size: 32px; }
.admin-head p { color: var(--muted); margin-top: 6px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--text-2); text-decoration: none; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  vertical-align: middle;
  background: var(--surface-3);
  color: var(--text-2);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.s-ny { color: var(--accent-text); background: var(--accent-soft); }
.badge.s-vurdering, .badge.s-foreslatt, .badge.s-kandidat { color: var(--blue); background: rgba(143, 184, 242, 0.12); }
.badge.s-kontaktet, .badge.s-tilbud { color: var(--violet); background: rgba(185, 164, 240, 0.12); }
.badge.s-avtale, .badge.s-aktiv, .badge.s-opprettet { color: var(--green); background: rgba(155, 226, 122, 0.12); }
.badge.s-avsluttet, .badge.s-tapt, .badge.s-pause, .badge.s-avvist { color: var(--muted); }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tabs a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); text-decoration: none; font-size: 14px; }
.tabs a.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.tabs a .n { color: var(--muted); margin-left: 6px; }
.tabs a.active .n { color: var(--bg); opacity: 0.6; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.3; }
table.t th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: none; }
table.t tbody tr:hover { background: var(--surface-2); }
table.t .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t a.row-link { color: var(--text); text-decoration: none; font-weight: 500; }
table.t a.row-link:hover { color: var(--accent-text); }
a.row-link { color: var(--text); text-decoration: none; font-weight: 500; }
a.row-link:hover { color: var(--accent-text); }
table.t td.nowrap { white-space: nowrap; }
.empty { padding: 48px; text-align: center; color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.grid-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 22px; margin-bottom: 20px; min-width: 0; }
.panel > h2 { font-size: 18px; font-weight: 500; letter-spacing: 0; margin-bottom: 4px; }
.panel > .panel-sub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { font-size: 18px; font-weight: 500; letter-spacing: 0; }

dl.facts { display: grid; grid-template-columns: minmax(80px, max-content) 1fr; gap: 10px 20px; margin: 0; font-size: 14px; }
dl.facts dt { color: var(--muted); max-width: 170px; }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

.admin .field { margin-bottom: 14px; }
.admin input[type='text'], .admin input[type='email'], .admin input[type='tel'], .admin input[type='date'], .admin input[type='number'], .admin select, .admin textarea {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 14px;
  background: var(--surface-2);
}
.admin textarea { min-height: 80px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form > * { flex: 1 1 120px; }
.inline-form .btn { flex: 0 0 auto; }

/* Stat tiles: the five MVP numbers */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.stat .n { font-size: 12px; color: var(--muted); letter-spacing: 0.08em; }
.stat .label { font-size: 14px; color: var(--text-2); margin: 2px 0 14px; }
.stat .value { font-size: 32px; font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.stat .detail { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* Funnel: horizontal bars, single series */
.funnel { display: grid; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 90px; gap: 14px; align-items: center; font-size: 14px; }
.funnel-row .name { color: var(--text-2); }
.funnel-track { height: 20px; }
.funnel-bar { height: 100%; min-width: 2px; background: var(--accent); border-radius: 0 4px 4px 0; }
.funnel-row .val { text-align: right; font-variant-numeric: tabular-nums; }
.funnel-row .val small { color: var(--muted); margin-left: 6px; }

/* Weekly columns, single series with hover tooltip */
.cols { position: relative; }
.cols svg { width: 100%; height: auto; overflow: visible; }
.cols .grid line { stroke: var(--line); stroke-width: 1; }
.cols .axis text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.cols .col { fill: var(--accent); }
.cols .hit { fill: transparent; cursor: default; }
.cols .hit:hover + .col, .cols .hit:focus + .col { fill: var(--accent-hover); }
.cols .val-label { fill: var(--text-2); font-size: 11px; font-family: var(--font); }
.tooltip {
  position: absolute;
  pointer-events: none;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  font-size: 13px;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 10px));
  opacity: 0;
  transition: opacity 0.1s;
}
.tooltip.show { opacity: 1; }
.tooltip b { font-size: 15px; font-weight: 600; }
.tooltip .k { color: var(--muted); }
details.table-view { margin-top: 12px; font-size: 13px; color: var(--muted); }
details.table-view summary { cursor: pointer; }
details.table-view table { margin-top: 10px; }

/* Follow-up plan (lead timeline) */
.waves { display: grid; gap: 12px; }
.wave { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface-2); }
.wave.nå { border-color: var(--accent-line); }
.wave.ferdig { opacity: 0.6; }
.wave-head { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 10px; }
.wave-head strong { font-weight: 500; }
.wave-head span { color: var(--muted); white-space: nowrap; }
.wave .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wave .chip { padding: 4px 10px; font-size: 13px; background: var(--surface); }
.wave .chip.asked { border-color: var(--accent-line); color: var(--text); }
.wave .chip.has-match { background: var(--accent-soft); color: var(--text); }

/* Matching */
.match-cat { border-top: 1px solid var(--line); padding: 16px 0; }
.match-cat:first-of-type { border-top: none; padding-top: 4px; }
.match-cat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 500; }
.match { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); margin-bottom: 8px; }
.match .who { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.match .who strong { font-weight: 500; }
.match .meta { font-size: 13px; color: var(--muted); }
.match form.upd { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr auto; gap: 8px; align-items: end; }
.match form.upd label { font-size: 12px; color: var(--muted); display: grid; gap: 4px; }
.match .actions { display: flex; gap: 6px; align-items: center; }
.match .actions > form { display: flex; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.suggestions form:not(.inline-form) { display: inline; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--text-2); cursor: pointer; text-decoration: none; }
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }

.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 14px; }
.events li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; }
.events time { color: var(--muted); font-size: 13px; }
.events .min { color: var(--accent-text); font-size: 13px; margin-left: 6px; }
.events .actor { display: block; color: var(--muted); font-size: 12px; }

.flash { padding: 12px 16px; border-radius: 12px; background: rgba(155, 226, 122, 0.1); border: 1px solid rgba(155, 226, 122, 0.35); margin-bottom: 20px; font-size: 14px; }

@media (max-width: 1200px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* minmax(0, …) so a wide table scrolls inside its card instead of widening the page. */
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}

/* Tablet and phone: top bar with the logo, navigation as a tab bar along the bottom. */
@media (max-width: 860px) {
  .admin { grid-template-columns: minmax(0, 1fr); }
  .admin-top {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 56px;
    padding: 0 16px;
    background: rgba(10, 12, 11, 0.82);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .admin-top .logo { font-size: 18px; }
  .admin-top .tag { padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
  .admin-top .site-link { margin-left: auto; font-size: 13px; color: var(--text-2); text-decoration: none; }
  .admin-top .site-link.logout { margin-left: 14px; }
  .admin-side {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 20;
    height: auto;
    flex-direction: row;
    padding: 6px 6px max(6px, env(safe-area-inset-bottom));
    border-right: none;
    border-top: 1px solid var(--line);
    background: rgba(18, 21, 19, 0.94);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
  .admin-side > .logo, .admin-side > .tag, .admin-side .foot { display: none; }
  .admin-nav { flex-direction: row; width: 100%; gap: 2px; }
  .admin-side a.nav {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 7px 2px 5px;
    font-size: 11px;
  }
  .admin-side a.nav .long { display: none; }
  .admin-side a.nav .short { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-side a.nav:hover, .admin-side a.nav.active { background: none; }
  .admin-side .badge {
    position: absolute;
    top: 2px;
    left: calc(50% + 5px);
    min-width: 17px;
    margin: 0;
    padding: 0 5px;
    justify-content: center;
    font-size: 10px;
    line-height: 17px;
    background: var(--accent);
    color: var(--accent-ink);
  }
  .admin-main { padding: 20px 16px calc(84px + env(safe-area-inset-bottom)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats .stat:first-child { grid-column: 1 / -1; }
  .match form.upd { grid-template-columns: 1fr 1fr; }
  .funnel-row { grid-template-columns: 110px minmax(0, 1fr) 70px; }
}

/* Phone: compact panels, tables as cards, one swipeable row of filters. */
@media (max-width: 700px) {
  /* 16px keeps iOS Safari from zooming in when a field gets focus. */
  .admin input[type='text'], .admin input[type='email'], .admin input[type='tel'], .admin input[type='date'], .admin input[type='number'], .admin select, .admin textarea { font-size: 16px; }

  .admin-head { margin-bottom: 18px; }
  .admin-head h1 { font-size: 26px; }
  .admin-head p { font-size: 14px; }
  .panel { padding: 16px; border-radius: 14px; margin-bottom: 14px; }
  .panel > .panel-sub { margin-bottom: 14px; }
  .panel-head { flex-wrap: wrap; }

  .stats { gap: 8px; margin-bottom: 14px; }
  .stat { padding: 14px; }
  .stat .label { font-size: 13px; margin-bottom: 10px; }
  .stat .value { font-size: 26px; }

  .tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { flex: none; white-space: nowrap; }

  .funnel-row { grid-template-columns: 96px minmax(0, 1fr) 76px; gap: 10px; font-size: 13px; }
  .cols-wide { display: none; }
  .cols-narrow { display: block; }
  .hide-sm { display: none; }
  dl.facts.stack-sm { grid-template-columns: 1fr; gap: 2px; }
  dl.facts.stack-sm dt { max-width: none; }
  dl.facts.stack-sm dd { margin-bottom: 10px; }
  .events li { grid-template-columns: 78px 1fr; }

  /* Tables marked .cards-sm become one card per row: title + status, body, then a meta line. */
  .table-wrap:has(> table.cards-sm) { overflow: visible; border: none; background: none; }
  table.cards-sm, table.cards-sm tbody { display: block; }
  table.cards-sm thead { display: none; }
  table.cards-sm tr {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 4px;
    margin-bottom: 8px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
  }
  table.cards-sm tbody tr:hover { background: var(--surface-2); }
  table.cards-sm td { display: block; padding: 0; border: none; max-width: none !important; text-align: left; }
  table.cards-sm td.is-empty, table.cards-sm td.hide-sm { display: none; }
  table.cards-sm .m-only { display: inline; }
  table.cards-sm a.row-link { font-size: 15px; }
  table.cards-sm a.row-link::after { content: ''; position: absolute; inset: 0; border-radius: 14px; }
  table.cards-sm .c-title { order: 1; flex: 1 1 0; min-width: 0; padding-right: 10px; }
  table.cards-sm .c-status { order: 2; flex: none; align-self: flex-start; }
  table.cards-sm .c-body { order: 3; flex-basis: 100%; margin: 6px 0 4px; font-size: 14px; color: var(--text-2); }
  table.cards-sm .c-meta { order: 4; font-size: 13px; color: var(--muted); white-space: nowrap; }
  table.cards-sm .c-meta::before { content: '·'; margin: 0 6px; }
  table.cards-sm .c-meta:is(.c-place, .c-area)::before { content: none; }
  table.cards-sm .d-only { display: none; }

  /* Tables inside panels (categories, projection): edge to edge, tighter cells, names may wrap. */
  .panel .table-wrap { margin: 0 -16px; border-left: none; border-right: none; border-radius: 0; }
  .panel table.t th, .panel table.t td { padding: 10px 6px; }
  .panel table.t th:first-child, .panel table.t td:first-child { padding-left: 16px; }
  .panel table.t th:last-child, .panel table.t td:last-child { padding-right: 16px; }
  .panel table.t th { font-size: 12px; letter-spacing: 0; text-transform: none; }
  .panel table.t td:first-child .icon { display: none; }
  table.t td.nowrap { white-space: normal; }

  .match { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .match .actions { order: 1; }
  .match form.upd { order: 2; }
  .match form.upd label:first-child { grid-column: 1 / -1; }
}
