/* =========================================================================
   Prisdata – prisbog
   Tegnestue-look: blæk-grøn ramme, hvide "tegneark", mono til koder og tal.
   ========================================================================= */

:root {
  --ink: #0f2623;          /* topbar, mørke flader */
  --ink-2: #183733;
  --bg: #f2f4f3;
  --surface: #ffffff;
  --line: #dbe1df;
  --line-strong: #c3ccc9;
  --text: #15201e;
  --muted: #56645f;        /* 5.9:1 på hvid */
  --accent: #0a7360;       /* 5.6:1 på hvid */
  --accent-strong: #075747;
  --accent-weak: #e3f1ed;
  --lock-bg: #fbf4e4;
  --lock-text: #7a4f00;

  --c-labor: #1f5f8b;      /* Løn: blå */
  --c-material: #d9822b;   /* Materialer: orange */
  --c-equipment: #6f7f7b;  /* Materiel: grå */
  --c-sub: #b7c3c0;        /* UE: lys grå */

  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --r: 6px;
  --r-lg: 10px;
  --shadow: 0 1px 2px rgba(15, 38, 35, .06), 0 2px 8px rgba(15, 38, 35, .04);
  --sidebar: 288px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--text); background: var(--bg); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); }
a:hover { color: var(--accent-strong); }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
svg { width: 18px; height: 18px; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.mono, .code { font-family: var(--mono); font-feature-settings: "tnum"; }
.num { font-family: var(--mono); font-feature-settings: "tnum"; text-align: right; white-space: nowrap; }

/* ---------- Knapper og små elementer ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--r);
  border: 1px solid var(--line-strong); background: var(--surface);
  font-weight: 500; text-decoration: none; cursor: pointer; color: var(--text);
}
.btn:hover { border-color: var(--text); color: var(--text); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.btn--ghost { background: transparent; }
.btn--block { width: 100%; }
.btn--sm { min-height: 32px; padding: 0 12px; font-size: 14px; }
.linkbtn { background: none; border: 0; padding: 4px 0; color: var(--accent); font-weight: 500; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; border-radius: var(--r); cursor: pointer; }
.iconbtn:hover { background: var(--bg); }

.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600;
}
.tier {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  background: rgba(255,255,255,.12); color: #e7f3ef;
}
.tag {
  display: inline-flex; align-items: baseline; gap: 4px; padding: 2px 8px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--surface);
  font-size: 12px; color: var(--muted); white-space: nowrap;
}
.tag b { color: var(--text); font-weight: 500; font-family: var(--mono); }

/* ---------- Topbar ---------- */
.topbar { background: var(--ink); color: #e7f3ef; position: sticky; top: 0; z-index: 30; }
.topbar__inner {
  max-width: 1480px; margin: 0 auto; padding: 0 24px; min-height: 60px;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand__mark { width: 26px; height: 26px; color: #6fd1b8; }
.brand__name { font-weight: 700; font-size: 17px; letter-spacing: .02em; }
.brand--dark { color: var(--ink); }
.brand--dark .brand__mark { color: var(--accent); }
.mainnav { display: flex; gap: 4px; }
.mainnav a { color: #c5d6d1; text-decoration: none; padding: 8px 12px; border-radius: var(--r); font-weight: 500; }
.mainnav a:hover { color: #fff; background: var(--ink-2); }
.mainnav a[aria-current="page"] { color: #fff; background: var(--ink-2); box-shadow: inset 0 -2px 0 #6fd1b8; }
.topsearch {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  background: var(--ink-2); border: 1px solid #2a4a45; border-radius: var(--r); padding: 0 10px; height: 38px; width: 280px;
}
.topsearch svg { color: #9cb6b0; }
.topsearch input { background: none; border: 0; outline: none; color: #fff; width: 100%; }
.topsearch input::placeholder { color: #9cb6b0; }
.page-catalog .topsearch { visibility: hidden; }
.usermenu { position: relative; }
.usermenu__btn {
  display: inline-flex; align-items: center; gap: 10px; background: none; border: 1px solid transparent;
  color: #fff; padding: 6px 10px; border-radius: var(--r); cursor: pointer; min-height: 40px;
}
.usermenu__btn:hover { border-color: #2a4a45; }
.usermenu__panel {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 12px; display: grid; gap: 10px;
}
.usermenu__panel button { text-align: left; background: none; border: 0; padding: 8px; border-radius: var(--r); cursor: pointer; }
.usermenu__panel button:hover { background: var(--bg); }
[hidden] { display: none !important; }
.usermenu__email { font-size: 13px; color: var(--muted); padding: 0 8px; }

main { max-width: 1480px; margin: 0 auto; padding: 28px 24px 64px; }

/* ---------- Katalog ---------- */
.catalog__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.catalog__head .muted { margin-top: 4px; }
.bigsearch {
  display: flex; align-items: center; gap: 10px; flex: 0 1 520px; min-width: 260px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 0 14px; height: 46px;
}
.bigsearch:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.bigsearch svg { color: var(--muted); }
.bigsearch input { border: 0; outline: none; background: none; width: 100%; font-size: 16px; }

.cattabs {
  /* Linjen under fanerne er en skygge i stedet for en kant, så den aktive fanes streg ikke giver lodret scroll */
  display: flex; gap: 0; overflow-x: auto; overflow-y: hidden; box-shadow: inset 0 -1px 0 var(--line); margin-bottom: 24px;
  scrollbar-width: thin;
}
.cattab {
  flex: none; display: inline-flex; align-items: baseline; gap: 8px; padding: 12px 16px; min-height: 44px;
  background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: 0;
  color: var(--muted); font-weight: 500; cursor: pointer; white-space: nowrap;
}
.cattab:hover { color: var(--text); }
.cattab[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--accent); }
.cattab__code { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.cattab__count { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.cattab[data-empty="true"] { opacity: .55; }

.catalog__body { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }

/* Sidebar */
.filters {
  flex: 1 1 var(--sidebar); max-width: var(--sidebar);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  position: sticky; top: 84px; max-height: calc(100vh - 104px); display: flex; flex-direction: column;
}
.filters__head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.filters__head h2 { flex: 1; font-size: 16px; }
.filters__close, .filters__foot, .filters__backdrop { display: none; }
.filters__scroll { overflow-y: auto; padding: 4px 0 8px; }
.fgroup { border-bottom: 1px solid var(--line); }
.fgroup:last-child { border-bottom: 0; }
.fgroup > summary {
  list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 18px; min-height: 44px;
  cursor: pointer; font-weight: 600; font-size: 14px;
}
.fgroup > summary::-webkit-details-marker { display: none; }
.fgroup > summary::after {
  content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
  transform: rotate(45deg) translateY(-2px); transition: transform .15s;
}
.fgroup[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.fgroup__unit { color: var(--muted); font-weight: 400; font-family: var(--mono); font-size: 12px; }
.fgroup .badge { height: 18px; min-width: 18px; font-size: 11px; }
.fgroup__body { padding: 0 18px 14px; display: grid; gap: 2px; }

.check {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px; margin: 0 -8px; border-radius: var(--r);
  cursor: pointer; font-size: 14px; min-height: 36px;
}
.check:hover { background: var(--bg); }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.check__label { flex: 1; font-family: var(--mono); font-size: 13px; }
.check__count { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.check[data-zero="true"] { color: var(--muted); }

.tree { display: grid; gap: 2px; }
.tree__btn {
  display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left; background: none; border: 0;
  padding: 7px 8px; margin: 0 -8px; width: calc(100% + 16px); border-radius: var(--r); cursor: pointer; font-size: 14px; min-height: 36px;
}
.tree__btn:hover { background: var(--bg); }
.tree__btn[aria-pressed="true"] { background: var(--accent-weak); color: var(--accent-strong); font-weight: 600; }
.tree__code { font-family: var(--mono); font-size: 12px; color: var(--muted); min-width: 28px; }
.tree__name { flex: 1; }
.tree__count { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.tree__children { padding-left: 18px; display: grid; gap: 2px; }

.range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.range input {
  width: 100%; height: 38px; border: 1px solid var(--line-strong); border-radius: var(--r); padding: 0 10px;
  font-family: var(--mono); font-size: 13px; background: var(--surface);
}
.range span { color: var(--muted); }
.range__hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Resultater */
.results { flex: 999 1 560px; min-width: 0; }
.results__bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; min-height: 40px; }
.results__filterbtn { display: none; }
.results__tools { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.select select {
  height: 40px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface);
  padding: 0 34px 0 12px; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px; background-size: 5px 5px; background-repeat: no-repeat;
}
.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.segmented button { width: 40px; height: 38px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.segmented button + button { border-left: 1px solid var(--line-strong); }
.segmented button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px 0 12px; border-radius: 999px;
  background: var(--accent-weak); color: var(--accent-strong); border: 0; cursor: pointer; font-size: 13px; font-weight: 500;
}
.chip svg { width: 14px; height: 14px; }
.chip:hover { background: #cfe7e0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: border-color .12s, box-shadow .12s;
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.card__img { aspect-ratio: 4 / 3; background: var(--surface); border-bottom: 1px solid var(--line); display: grid; place-items: center; padding: 14px; }
.card__img img { max-height: 100%; object-fit: contain; }
.card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__code { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.card__title { font-size: 15px; font-weight: 600; line-height: 1.35; }
.card__title a { color: var(--text); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__note { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.card__price { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; align-items: baseline; gap: 6px; }
.price { font-family: var(--mono); font-feature-settings: "tnum"; font-weight: 500; font-size: 20px; letter-spacing: -.02em; }
.price__unit { color: var(--muted); font-size: 13px; }
.card__hours { margin-left: auto; font-size: 12px; color: var(--muted); font-family: var(--mono); }

/* Placeholder når der ikke er en tegning */
.drawing-ph {
  width: 100%; height: 100%; min-height: 120px; border-radius: 4px;
  background:
    repeating-linear-gradient(-45deg, transparent 0 7px, rgba(15,38,35,.07) 7px 8px),
    linear-gradient(var(--surface), var(--surface));
  border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); font-size: 12px;
}
.drawing-ph span { background: var(--surface); padding: 2px 8px; border-radius: 4px; font-family: var(--mono); }

/* Listevisning */
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfb; white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfb; }
.table .num { text-align: right; }
.table th.num { text-align: right; }
.table a { color: var(--text); font-weight: 500; text-decoration: none; }
.table a:hover { color: var(--accent); text-decoration: underline; }
.table tfoot td { font-weight: 600; border-top: 1px solid var(--line-strong); border-bottom: 0; background: #fafbfb; }

.pager { display: flex; justify-content: center; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.pager button {
  min-width: 40px; height: 40px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r);
  cursor: pointer; font-family: var(--mono);
}
.pager button[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager button:disabled { opacity: .4; cursor: default; }

.empty { text-align: center; padding: 64px 24px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); display: grid; gap: 10px; justify-items: center; }
.empty--page { margin-top: 48px; }
.skeleton { background: linear-gradient(90deg, #eceff0 25%, #f5f7f7 50%, #eceff0 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r-lg); min-height: 330px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Detaljeside ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs span[aria-hidden] { color: var(--line-strong); }

.hero { display: flex; flex-wrap: wrap; gap: 28px; align-items: stretch; margin-bottom: 28px; }
.hero__media {
  flex: 1 1 340px; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px; display: grid; place-items: center; min-height: 300px;
}
.hero__main { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.hero__codes { display: flex; gap: 8px; flex-wrap: wrap; }
.hero h1 { font-size: 30px; max-width: 26ch; }
.hero__desc { white-space: pre-line; color: #2e3b38; max-width: 70ch; }

.keyfig {
  margin-top: auto; display: flex; flex-wrap: wrap; align-items: stretch; gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
}
.keyfig__item { padding: 16px 20px; border-right: 1px solid var(--line); display: grid; gap: 2px; }
.keyfig__item:last-of-type { border-right: 0; }
.keyfig__label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.keyfig__value { font-family: var(--mono); font-size: 28px; font-weight: 500; letter-spacing: -.02em; }
.keyfig__value small { font-size: 14px; color: var(--muted); font-family: var(--font); letter-spacing: 0; margin-left: 4px; }
.keyfig__value--sm { font-size: 18px; padding-top: 8px; }
.keyfig__actions { margin-left: auto; display: flex; gap: 8px; align-items: center; padding: 16px 20px; flex-wrap: wrap; }

.panels { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.col-main { flex: 999 1 560px; min-width: 0; display: grid; gap: 20px; }
.col-side { flex: 1 1 300px; display: grid; gap: 20px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel__head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel__head h2 { font-size: 16px; }
.panel__head .muted { font-size: 13px; }
.panel__head .tierreq { margin-left: auto; }
.panel__body { padding: 16px 20px 20px; }
.panel__body--flush { padding: 0; }
.panel .table > tbody > tr:not(.subrow) > td { vertical-align: middle; }
.noprice { font-size: 13px; color: var(--lock-text); background: var(--lock-bg); padding: 2px 8px; border-radius: 4px; }
.panel .table th:first-child, .panel .table td:first-child { padding-left: 20px; }
.panel .table th:last-child, .panel .table td:last-child { padding-right: 20px; }
.panel .tablewrap { border: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); }

.tierreq {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  background: var(--accent-weak); color: var(--accent-strong);
}
.tierreq--locked { background: var(--lock-bg); color: var(--lock-text); }
.tierreq svg { width: 12px; height: 12px; }

.specs { display: grid; grid-template-columns: auto 1fr; gap: 0; margin: 0; }
.specs dt, .specs dd { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.specs dt { color: var(--muted); padding-right: 16px; }
.specs dd { font-family: var(--mono); text-align: right; }
.specs dt:last-of-type, .specs dd:last-of-type { border-bottom: 0; }

.split { display: grid; gap: 14px; }
.split__bar { display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: var(--bg); }
.split__bar span { display: block; height: 100%; }
.split__legend { display: grid; gap: 8px; margin: 0; }
.split__row { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 10px; align-items: center; font-size: 14px; }
.split__row i { width: 12px; height: 12px; border-radius: 2px; }
.split__row .pct { color: var(--muted); font-family: var(--mono); font-size: 12px; min-width: 42px; text-align: right; }

.row-toggle {
  display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font-weight: 500;
  color: var(--text); min-height: 32px;
}
.row-toggle:hover { color: var(--accent); }
.row-toggle svg { width: 14px; height: 14px; transition: transform .15s; color: var(--muted); }
.row-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.subrow > td { background: #f7f9f8; padding: 0 !important; }
.subrow__inner { padding: 14px 20px 18px 44px; display: grid; gap: 12px; }
.subrow__inner .table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font-size: 13px; }
.subrow__inner .table th, .subrow__inner .table td { padding: 8px 12px; }
.subrow__note { font-size: 13px; color: var(--muted); white-space: pre-line; max-width: 80ch; }
.subrow__meta { font-size: 13px; color: var(--muted); }
.typepill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.typepill i { width: 8px; height: 8px; border-radius: 2px; }
.minibar { display: flex; height: 6px; width: 80px; border-radius: 2px; overflow: hidden; background: var(--bg); margin-left: auto; }
.minibar span { height: 100%; }

.locked { position: relative; overflow: hidden; }
.locked__ghost { padding: 16px 20px; display: grid; gap: 10px; filter: blur(1.5px); opacity: .55; }
.locked__ghost div { height: 12px; border-radius: 3px; background: var(--line); }
.locked__ghost div:nth-child(2n) { width: 82%; }
.locked__ghost div:nth-child(3n) { width: 64%; }
.locked__msg {
  position: absolute; inset: 57px 0 0; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; padding: 20px;
  background: linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.92));
}
.locked__msg svg { width: 22px; height: 22px; color: var(--lock-text); }
.locked__msg p { max-width: 40ch; color: var(--muted); font-size: 14px; }

.exec { display: grid; gap: 16px; }
.exec h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }
.exec p { white-space: pre-line; font-size: 14px; }

.basis { display: grid; gap: 12px; font-size: 14px; }
.basis dl { display: grid; grid-template-columns: 1fr auto; margin: 0; }
.basis dt, .basis dd { margin: 0; padding: 6px 0; border-bottom: 1px solid var(--line); }
.basis dd { font-family: var(--mono); }
.basis p { color: var(--muted); }
.formula { font-family: var(--mono); font-size: 12px; background: var(--bg); border-radius: var(--r); padding: 10px 12px; line-height: 1.7; color: #2e3b38; }

.related { display: grid; gap: 0; }
.related a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 20px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); }
.related a:last-child { border-bottom: 0; }
.related a:hover { background: #fafbfb; }
.related__name { font-weight: 500; font-size: 14px; }
.related__price { font-family: var(--mono); font-size: 14px; text-align: right; }
.related__meta { font-size: 12px; color: var(--muted); }
/* I hovedkolonnen: kort i to kolonner så alt kan ses uden at scrolle langt */
.related--wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-bottom: -1px; overflow: hidden; }
.related--wide a, .related--wide a:last-child { border-bottom: 1px solid var(--line); }
.diff { font-family: var(--mono); font-size: 12px; text-align: right; }
.diff--up { color: #a23b1e; }
.diff--down { color: var(--accent); }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: var(--r); font-size: 14px; z-index: 60; box-shadow: var(--shadow);
}

/* ---------- Login ---------- */
.page-login main { max-width: none; padding: 0; }
.login { display: flex; flex-wrap: wrap; min-height: 100vh; }
.login__panel { flex: 1 1 420px; max-width: 560px; padding: 56px 56px 40px; display: flex; flex-direction: column; gap: 16px; justify-content: center; background: var(--surface); }
.login__panel h1 { margin-top: 28px; }
.login__aside {
  flex: 999 1 400px; background: var(--ink); position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 48px;
}
.login__drawing {
  position: absolute; inset: 0; opacity: .5;
  background:
    linear-gradient(#2a4a45 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, #2a4a45 1px, transparent 1px) 0 0 / 32px 32px;
}
.login__figure { position: relative; margin: 0; color: #e7f3ef; border-left: 2px solid #6fd1b8; padding-left: 16px; }
.login__figure dt { font-family: var(--mono); font-size: 14px; }
.login__figure dd { margin: 4px 0 0; color: #9cb6b0; font-size: 14px; }
.form { display: grid; gap: 16px; margin-top: 12px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 500; font-size: 14px; }
.field input { height: 46px; border: 1px solid var(--line-strong); border-radius: var(--r); padding: 0 12px; font-size: 16px; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.form__error { color: #a23b1e; font-size: 14px; }

/* ---------- Mobil / tablet: sidebar bliver skuffe ---------- */
@media (max-width: 960px) {
  main { padding: 20px 16px 48px; }
  .topbar__inner { padding: 8px 16px; gap: 12px; }
  .topsearch { order: 5; width: 100%; margin-left: 0; }
  .page-catalog .topsearch { display: none; }
  .usermenu { margin-left: auto; }
  .usermenu__name { display: none; }
  .mainnav { order: 4; width: 100%; overflow-x: auto; }

  .filters {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; max-width: 380px; width: 92vw; max-height: none;
    border-radius: 0; transform: translateX(100%); transition: transform .2s ease; visibility: hidden;
  }
  .filters.is-open { transform: none; visibility: visible; box-shadow: -8px 0 32px rgba(0,0,0,.15); }
  .filters__close { display: inline-grid; }
  .filters__foot { display: block; padding: 12px 16px; border-top: 1px solid var(--line); }
  .filters__backdrop:not([hidden]) { display: block; position: fixed; inset: 0; background: rgba(15,38,35,.4); z-index: 45; }
  .results__filterbtn { display: inline-flex; }
  .results__tools { margin-left: 0; width: 100%; }
  .results__tools .select { flex: 1; }
  .results__tools select { width: 100%; }
  .hero h1 { font-size: 24px; }
  .keyfig__item { flex: 1 1 140px; }
  .keyfig__actions { margin-left: 0; width: 100%; border-top: 1px solid var(--line); }
  .login__panel { padding: 40px 24px; }
  .login__aside { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* =========================================================================
   Projekter, kalkulation og bygningstyper
   ========================================================================= */
.small { font-size: 13px; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 20px; }
.pagehead .muted { margin-top: 4px; }
.pagehead__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.keyfig--page { margin: 0 0 24px; }
.keyfig__value--md { font-size: 22px; padding-top: 4px; }
.diff--up { color: #a23b1e; }
.diff--down { color: var(--accent); }

/* Kalkulationstabel */
.calctable { font-size: 14px; }
.calctable thead th { position: sticky; top: 0; z-index: 1; }
.grp__head th {
  background: #eef2f1; color: var(--text); text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600;
  border-top: 1px solid var(--line-strong); padding-top: 10px; padding-bottom: 10px;
}
.grp:first-of-type .grp__head th { border-top: 0; }
.grp__code { font-family: var(--mono); font-weight: 500; color: var(--accent-strong); margin-right: 10px; }
.grp__count { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 10px; }
.grp__m2 { font-weight: 500 !important; color: var(--muted) !important; }
.grp__m2 small, .calc__m2 small { font-family: var(--font); }
.calctable td { vertical-align: middle; }
.calctable td.code a { color: var(--muted); font-weight: 400; }
.calc__name { display: block; }
.calc__notetext { display: block; font-size: 12px; color: var(--muted); }
.calc__note {
  display: block; width: 100%; max-width: 280px; margin-top: 4px; border: 1px solid transparent; background: transparent;
  border-radius: 4px; padding: 2px 6px; margin-left: -6px; font-size: 12px; color: var(--muted);
}
.calc__note:hover { border-color: var(--line); }
.calc__note:focus { outline: none; border-color: var(--accent); background: var(--surface); color: var(--text); }
.qty {
  width: 92px; height: 34px; text-align: right; border: 1px solid var(--line-strong); border-radius: var(--r);
  padding: 0 8px; font-family: var(--mono); font-size: 14px; background: var(--surface);
}
.qty:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.qty:disabled { opacity: .5; }
.calc__act { width: 48px; padding: 4px 8px !important; }
.calc__act .iconbtn { color: var(--muted); }
.calc__act .iconbtn:hover { color: #a23b1e; background: #fbeeea; }
tr.is-removing { opacity: .35; }
.calctable tfoot td { font-size: 15px; }
.calc__m2 td { font-weight: 500 !important; color: var(--muted); background: var(--surface) !important; }

.calcempty { display: flex; flex-wrap: wrap; gap: 0; }
.calcempty > div { flex: 1 1 280px; padding: 28px; display: grid; gap: 10px; align-content: start; }
.calcempty > div + div { border-left: 1px dashed var(--line-strong); }
.calcempty select { height: 40px; border: 1px solid var(--line-strong); border-radius: var(--r); padding: 0 10px; background: var(--surface); flex: 1; min-width: 0; }

/* Sammenligning */
.bench { display: grid; gap: 16px; }
.select-inline { width: 100%; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--r); padding: 0 10px; background: var(--surface); }
.bench__total { display: grid; gap: 0; background: var(--bg); border-radius: var(--r); padding: 4px 12px; }
.bench__total > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; }
.bench__total > div + div { border-top: 1px solid var(--line); }
.bench__total .num { font-size: 16px; font-weight: 500; }
.bench__label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bench__legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.bench__legend span { display: inline-flex; align-items: center; gap: 6px; }
.bench__legend i { width: 12px; height: 8px; border-radius: 2px; }
.bench__rows { margin: 0; display: grid; gap: 12px; }
.bench__row dt { font-size: 13px; margin-bottom: 4px; }
.bench__row dt .code { color: var(--muted); font-size: 12px; margin-right: 4px; }
.bench__row dd { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; align-items: center; }
.bench__row dd .num { font-size: 12px; min-width: 48px; }
.bench__bar { height: 10px; border-radius: 2px; display: block; min-width: 2px; }
.is-proj { background: var(--ink); }
.is-ref { background: #9fc9bd; }

/* Bygningstyper */
.grid--types { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card__img--short { aspect-ratio: 16 / 7; }
.typebar { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.typebar span { display: block; height: 100%; background: var(--accent); }
.hero__media--sm { max-width: 320px; min-height: 220px; }
.noprice { font-size: 13px; color: var(--lock-text); background: var(--lock-bg); padding: 2px 8px; border-radius: 4px; }

/* Dialoger */
.dialog {
  border: 0; border-radius: var(--r-lg); padding: 0; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  box-shadow: 0 24px 64px rgba(15, 38, 35, .25); color: var(--text);
}
.dialog--wide { width: min(720px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(15, 38, 35, .45); }
.dialog__inner { padding: 24px; display: grid; gap: 16px; }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog__foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.fieldrow { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.fieldrow > .field { flex: 1 1 160px; }
.field select, .field textarea {
  min-height: 46px; border: 1px solid var(--line-strong); border-radius: var(--r); padding: 8px 12px; font-size: 15px; background: var(--surface);
}
.field textarea { resize: vertical; font: inherit; }
.withunit { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); }
.withunit:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.withunit input { border: 0 !important; box-shadow: none !important; flex: 1; min-width: 0; height: 44px; padding: 0 12px; font-family: var(--mono); outline: none; }
.withunit span { padding: 0 12px; color: var(--muted); font-size: 14px; }
.check--plain { margin: 0; padding: 4px 0; align-items: flex-start; }
.check--plain:hover { background: none; }
.check--plain span { font-size: 14px; }

.pick { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); max-height: 300px; overflow-y: auto; }
.pick li + li { border-top: 1px solid var(--line); }
.pick__item {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left;
  background: none; border: 0; padding: 10px 14px; cursor: pointer; min-height: 44px; font-size: 14px;
}
.pick__item:hover { background: var(--bg); }
.pick__item[aria-selected="true"] { background: var(--accent-weak); }
.pick__item .code { color: var(--muted); font-size: 12px; }
.pick__item .num { font-size: 13px; }
.pick__empty { padding: 16px; color: var(--muted); text-align: center; }
.pick__form { display: grid; gap: 12px; background: var(--bg); padding: 14px; border-radius: var(--r); }
.pick__chosen { font-weight: 600; }

@media (max-width: 960px) {
  .calcempty > div + div { border-left: 0; border-top: 1px dashed var(--line-strong); }
  .bench__total { grid-template-columns: 1fr; }
}

/* Grid-kolonner må aldrig blive bredere end skærmen – tabeller scroller inde i deres boks */
.col-main, .col-side { grid-template-columns: minmax(0, 1fr); }
.col-main > *, .col-side > * { min-width: 0; }

/* Vis efter-vælger i kalkulationen */
.viewpick { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.viewpick label { font-size: 13px; color: var(--muted); }
.viewpick select { height: 34px; border: 1px solid var(--line-strong); border-radius: var(--r); padding: 0 10px; background: var(--surface); font-size: 14px; }
.calc__hint { padding: 12px 20px; font-size: 13px; color: var(--muted); background: var(--accent-weak); border-bottom: 1px solid var(--line); }

/* ---------- Footer ---------- */
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; width: 100%; }
.footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 24px; }
.footer__inner {
  max-width: 1480px; margin: 0 auto; padding: 16px 24px; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 6px 24px; font-size: 13px; color: var(--muted);
}
.footer__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }
.login__foot { margin-top: auto; padding-top: 32px; font-size: 13px; color: var(--muted); }
.login__foot a { color: var(--muted); }
@media (max-width: 960px) { .footer__inner { padding: 14px 16px; } }

/* Relaterede bygningsdele / alternativer som tabel */
.partlink { color: var(--text); text-decoration: none; font-weight: 500; }
.partlink:hover { color: var(--accent); text-decoration: underline; }
.partlink__meta { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Underaktiviteter */
.listbar { display: flex; justify-content: flex-end; margin: -8px 0 12px; font-size: 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.subhero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; margin-bottom: 20px; display: grid; gap: 12px; }
.subhero h1 { margin: 0; }
.table td.code a { font-family: var(--mono); font-weight: 400; }
/* Forholdstal fra enhedstider (akkordtider) */
.ratio { white-space: nowrap; }
.ratio .muted { font-size: 12px; }
.norm { font-family: var(--mono); font-size: 13px; white-space: nowrap; cursor: help; }
.norm small { display: block; font-family: var(--sans, inherit); font-size: 11px; color: var(--muted); white-space: normal; max-width: 200px; }
.table--res td, .table--res th { padding-left: 10px; padding-right: 10px; }
.small { font-size: 11px; }

/* ---- CO2 (EPD) ---------------------------------------------------------------------------- */
:root { --co2-prod: #2f6b4f; --co2-trans: #6aa585; --co2-build: #a9cdb8; --co2-eol: #8a7a5c; }
.co2 { display: grid; gap: 12px; }
.co2__total { margin: 0; font-size: 15px; display: grid; grid-template-columns: auto 1fr; column-gap: 6px; align-items: baseline; }
.co2__total .small { grid-column: 1 / -1; }
.co2__total strong { font-family: var(--mono); font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
.co2--prod { background: var(--co2-prod); }
.co2--trans { background: var(--co2-trans); }
.co2--build { background: var(--co2-build); }
.co2--eol { background: var(--co2-eol); }
.co2 .split__row dt { min-width: 0; }
.co2__d { display: flex; justify-content: space-between; gap: 12px; margin: 4px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.co2__d + p { margin-top: -8px; }
.co2__cov { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.co2__cov p { margin: 0; }
.co2__covhead { display: flex; justify-content: space-between; }
.co2__covhead strong { font-family: var(--mono); font-weight: 500; }
.co2__covbar { height: 6px; border-radius: 3px; background: var(--bg); overflow: hidden; }
.co2__covbar span { display: block; height: 100%; background: var(--accent); }
.co2star { color: var(--lock-text); font-weight: 600; margin-left: 1px; }
.co2__src { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.co2__src h3 { font-size: 13px; margin: 0; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.co2__src ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.co2__src li { display: grid; gap: 1px; }
.co2__srcname { font-weight: 600; font-size: 14px; }
.co2__expired { color: #a3261b; font-weight: 600; }
.co2__src > p { margin: 0; }
.co2cell { color: var(--co2-prod); }
.co2 .split__row dt .small { white-space: nowrap; }

/* ---- Pris ved mængde (migration 007) ---- */
.calc__cat { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; }
.grp--adjust .grp__head th { background: var(--lock-bg); }
.grp--adjust tr.is-off td { color: var(--muted); }
.grp--adjust tr.is-off .calc__name { text-decoration: line-through; }
.adj__pill { display: inline-block; font: 600 11px/1 var(--font); padding: 3px 6px; border-radius: 999px; white-space: nowrap;
  background: var(--lock-bg); color: var(--lock-text); }
.adj__pill--step { background: var(--accent-weak); color: var(--accent-strong); }
.adj__why { display: block; font-size: 12px; color: var(--muted); }
.adj__parts { display: block; font: 11px/1.4 var(--mono); color: var(--muted); }
.adj__toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; margin-top: 4px; cursor: pointer; }
.atqty { display: grid; gap: 12px; }
.atqty__input { display: grid; gap: 4px; }
.atqty__input label { font-size: 13px; font-weight: 600; }
.atqty__table { width: 100%; font-size: 14px; }
.atqty__table td, .atqty__table th { padding: 6px 8px; }
.atqty__table tr.is-own td { font-weight: 600; background: var(--accent-weak); }
.atqty__why ul { margin: 4px 0 0; padding-left: 18px; }
.atqty__why li { margin: 2px 0; }
.atqty > * { min-width: 0; }
.atqty .withunit { width: 100%; box-sizing: border-box; }
.atqty__table { table-layout: fixed; font-size: 13px; }
.atqty__table td, .atqty__table th { padding: 5px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atqty__table th:first-child, .atqty__table td:first-child { width: 27%; }
.atqty__table th:nth-child(2), .atqty__table td:nth-child(2) { width: 34%; }
.adj__pill--project, .adj__pill--volume { background: var(--accent-weak); color: var(--accent-strong); }

/* =========================================================================
   Landingsside og offentlige sider (prøveperiode)
   ========================================================================= */
.page-landing main, .page-message main { max-width: none; padding: 0; }
html:has(.page-landing) { scroll-behavior: smooth; scroll-padding-top: 76px; }
.btn--lg { min-height: 48px; padding: 0 22px; font-size: 16px; }
.btn--onink { background: transparent; border-color: #3d5c57; color: #e7f3ef; }
.btn--onink:hover { border-color: #e7f3ef; color: #fff; }
.tier--trial { margin-left: 6px; background: #6fd1b8; color: var(--ink); }

.pubbar { background: var(--ink); color: #e7f3ef; position: sticky; top: 0; z-index: 30; }
.pubbar__inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; min-height: 64px; display: flex; align-items: center; gap: 28px; }
.pubnav { display: flex; gap: 4px; margin-right: auto; }
.pubnav a { color: #c5d6d1; text-decoration: none; padding: 8px 12px; border-radius: var(--r); font-weight: 500; }
.pubnav a:hover { color: #fff; background: var(--ink-2); }
.pubbar__actions { display: flex; gap: 8px; }

.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #6fd1b8; }
.lhero { background: var(--ink); color: #e7f3ef; position: relative; overflow: hidden; }
.lhero::before {
  content: ""; position: absolute; inset: 0; opacity: .35; pointer-events: none;
  background:
    linear-gradient(#2a4a45 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, #2a4a45 1px, transparent 1px) 0 0 / 32px 32px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
}
.lhero__inner { position: relative; max-width: 1200px; margin: 0 auto; padding: 72px 24px 88px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.lhero h1 { font-size: 46px; line-height: 1.08; letter-spacing: -.02em; color: #fff; margin: 14px 0 18px; max-width: 14ch; }
.lhero__lead { font-size: 18px; line-height: 1.55; color: #c5d6d1; max-width: 52ch; }
.lhero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.lhero .btn--ghost { color: #e7f3ef; border-color: #3d5c57; }
.lhero .btn--ghost:hover { color: #fff; border-color: #e7f3ef; }
.lhero__note { margin-top: 14px; font-size: 14px; color: #9cb6b0; }

.sample { margin: 0; background: var(--surface); color: var(--text); border-radius: var(--r-lg); padding: 22px 22px 16px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.sample__head { display: flex; justify-content: space-between; align-items: center; }
.sample__code { font-family: var(--mono); font-size: 13px; border: 1px solid var(--line); border-radius: 4px; padding: 2px 8px; }
.sample__tag { font-size: 12px; color: var(--muted); }
.sample__name { font-weight: 600; font-size: 17px; margin-top: 10px; }
.sample__price { display: flex; align-items: baseline; gap: 6px; margin-top: 10px; }
.sample__big { font-family: var(--mono); font-size: 34px; font-weight: 500; letter-spacing: -.02em; }
.sample__unit { color: var(--muted); }
.sample__time { margin-left: auto; font-family: var(--mono); color: var(--muted); font-size: 14px; }
.sample__bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; margin-top: 14px; }
.sample__bar span { display: block; height: 100%; }
.c-labor { background: var(--c-labor); }
.c-material { background: var(--c-material); }
.sample__legend { display: flex; gap: 18px; list-style: none; padding: 0; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.sample__legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.sample__legend b { font-family: var(--mono); font-weight: 500; color: var(--text); margin-left: 4px; }
.sample__rows { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14px; }
.sample__rows td { padding: 7px 0; border-top: 1px solid var(--line); }
.sample__rows td.mono { color: var(--muted); font-size: 13px; width: 70px; }
.sample figcaption { margin-top: 10px; font-size: 12px; color: var(--muted); }

.band { padding: 80px 24px; }
.band--white { background: var(--surface); }
.band--ink { background: var(--ink); color: #e7f3ef; }
.band__inner { max-width: 1200px; margin: 0 auto; }
.section-title { font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.section-lead { margin-top: 12px; font-size: 17px; color: var(--muted); max-width: 70ch; }

.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; position: relative; display: flex; flex-direction: column; gap: 10px; }
.step:not(:last-child)::after {
  content: ""; position: absolute; right: -16px; top: 38px; width: 12px; height: 12px;
  border-top: 2px solid var(--line-strong); border-right: 2px solid var(--line-strong); transform: rotate(45deg);
}
.step__no { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-weak); color: var(--accent-strong); font-family: var(--mono); font-weight: 500; }
.step h3 { font-size: 18px; }
.step p { color: var(--muted); }
.step .step__eg { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line-strong); font-family: var(--mono); font-size: 13px; color: var(--text); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 36px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.feature { background: var(--surface); padding: 26px 24px; }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature h3::before { content: ""; display: block; width: 24px; height: 3px; background: var(--accent); margin-bottom: 14px; }
.feature p { color: var(--muted); }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; align-items: start; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 24px; }
.plan--featured { border: 2px solid var(--accent); box-shadow: var(--shadow); position: relative; }
.plan--featured::before {
  content: "I prøveperioden"; position: absolute; top: -12px; left: 24px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
}
.plan__name { font-size: 20px; }
.plan__price { margin-top: 12px; display: flex; align-items: baseline; gap: 6px; }
.plan__from, .plan__per { color: var(--muted); font-size: 14px; }
.plan__amount { font-family: var(--mono); font-size: 34px; font-weight: 500; letter-spacing: -.02em; }
.plan__amount--text { font-family: var(--font); font-size: 20px; font-weight: 600; }
.plan__lead { margin-top: 10px; font-weight: 600; }
.plan__list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.plan__list li { padding-left: 26px; position: relative; color: var(--text); }
.plan__list li::before {
  content: ""; position: absolute; left: 2px; top: 5px; width: 12px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
.plan__note { margin-top: 14px; font-size: 14px; color: var(--muted); }
.plans__foot { margin-top: 20px; color: var(--muted); font-size: 14px; }

.trial { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.trial__text h2 { font-size: 32px; letter-spacing: -.02em; color: #fff; }
.trial__text p { margin-top: 14px; font-size: 17px; color: #c5d6d1; max-width: 46ch; }
.trial__list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.trial__list li { padding-left: 26px; position: relative; color: #e7f3ef; }
.trial__list li::before {
  content: ""; position: absolute; left: 2px; top: 5px; width: 12px; height: 7px;
  border-left: 2px solid #6fd1b8; border-bottom: 2px solid #6fd1b8; transform: rotate(-45deg);
}
.trial__card { background: var(--surface); color: var(--text); border-radius: var(--r-lg); padding: 28px; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.trial__card .form { margin-top: 0; }
.trial__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field__error { color: #a23b1e; font-size: 13px; min-height: 0; }
.field__error:empty { display: none; }
.field input[aria-invalid="true"] { border-color: #a23b1e; }
.field--hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.trial__card .check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
.trial__card .check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.trial__done h3 { font-size: 22px; }
.trial__done p { margin-top: 10px; }
.trial__done:focus { outline: none; }

.faq details, .faq .section-title { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { margin-top: 24px; border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 32px 18px 0; font-weight: 600; font-size: 16px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 22px; font-weight: 400; color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 18px; color: var(--muted); max-width: 70ch; }

.pubfoot { background: #0b1d1a; color: #9cb6b0; padding: 56px 24px 28px; font-size: 14px; }
.pubfoot__inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.pubfoot__inner > div { display: flex; flex-direction: column; gap: 8px; }
.pubfoot__inner p { max-width: 42ch; }
.pubfoot a { color: #c5d6d1; text-decoration: none; }
.pubfoot a:hover { color: #fff; text-decoration: underline; }
.pubfoot__brand { font-weight: 700; color: #fff; font-size: 17px; }
.pubfoot__head { color: #fff; font-weight: 600; }
.pubfoot__meta { max-width: 1200px; margin: 40px auto 0; padding-top: 20px; border-top: 1px solid #1f3a35; }

.msgpage { min-height: calc(100vh - 64px - 220px); display: grid; place-items: center; padding: 64px 24px; }
.msgpage__card { max-width: 560px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 36px; box-shadow: var(--shadow); }
.msgpage__card h1 { font-size: 26px; }
.msgpage__card p { margin-top: 12px; color: var(--muted); font-size: 16px; }
.msgpage__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 24px; }

.welcome { margin-bottom: 20px; }
.welcome__inner { display: flex; gap: 12px; align-items: center; justify-content: space-between; background: var(--accent-weak); border: 1px solid #b9ddd3; border-radius: var(--r-lg); padding: 12px 8px 12px 18px; }

@media (max-width: 960px) {
  .lhero__inner, .trial { grid-template-columns: 1fr; gap: 40px; }
  .lhero h1 { font-size: 36px; }
  .steps, .features, .plans { grid-template-columns: 1fr; }
  .step:not(:last-child)::after { display: none; }
  .pubnav { display: none; }
  .pubbar__actions { margin-left: auto; }
  .pubfoot__inner { grid-template-columns: 1fr; }
  .band { padding: 56px 20px; }
}
@media (max-width: 520px) {
  .trial__row { grid-template-columns: 1fr; }
  .lhero__inner { padding: 48px 20px 56px; }
}

/* =========================================================================
   Administration af brugere + adgangskodesider
   ========================================================================= */
.login__links { font-size: 14px; color: var(--muted); }
.msgpage__card--form { width: min(460px, 100%); }
.msgpage__card .form { margin-top: 20px; }
.msgpage__back { margin-top: 16px; font-size: 14px; }

.adminstats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat {
  display: grid; gap: 2px; text-align: left; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 14px 16px; cursor: pointer; font: inherit; color: inherit;
}
.stat:hover { border-color: var(--line-strong); }
.stat.is-active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.stat__label { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat__value { font-family: var(--mono); font-size: 28px; font-weight: 500; line-height: 1.2; }
.stat__sub { font-size: 12px; color: var(--muted); }

.admintools { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.segtabs { display: flex; flex-wrap: wrap; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 3px; }
.segtabs button {
  border: 0; background: none; padding: 6px 10px; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--muted);
  display: inline-flex; gap: 6px; align-items: center;
}
.segtabs button:hover { color: var(--text); background: var(--bg); }
.segtabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.segtabs__n { font-family: var(--mono); font-size: 12px; opacity: .75; }
.adminsearch { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 0 12px; min-width: 280px; }
.adminsearch:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.adminsearch svg { color: var(--muted); }
.adminsearch input { border: 0; outline: none; height: 40px; flex: 1; min-width: 0; background: none; }

.table--users tbody tr { cursor: pointer; }
.table--users tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.table--users td { vertical-align: middle; }
.uname { display: block; font-weight: 600; }
.umail { display: block; font-size: 13px; color: var(--muted); }
.unote { display: block; font-size: 12px; color: var(--lock-text); max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.utier { font-size: 13px; font-weight: 500; }
.nowrap { white-space: nowrap; }
.ustatus { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ustatus--ok { background: var(--accent-weak); color: var(--accent-strong); }
.ustatus--trial { background: #e4eef8; color: #1f4f7a; }
.ustatus--warn { background: var(--lock-bg); color: var(--lock-text); }
.ustatus--muted { background: var(--bg); color: var(--muted); }
.ustatus--admin { background: var(--ink); color: #e7f3ef; }
.adminpage__count { margin-top: 10px; }

.field__hint { font-size: 12px; color: var(--muted); }
.uflags { display: grid; gap: 4px; }
.uactions { background: var(--bg); border-radius: var(--r); padding: 12px 14px; }
.uactions__title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.uactions__row { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 1100px) { .adminstats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .adminstats { grid-template-columns: 1fr 1fr; } .adminsearch { min-width: 0; width: 100%; } }
.stat--static { cursor: default; }
.stat--static:hover { border-color: var(--line); }
.fieldrow--top { align-items: flex-start; }

/* ---------- Grænse for aktive projekter og arkivering (#52) ---------- */
.quotapill {
  display: inline-block; vertical-align: middle; margin-left: 10px; padding: 3px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 500; background: var(--accent-weak); color: var(--accent-strong);
}
.quotapill--full { background: var(--lock-bg); color: var(--lock-text); }
.listtools { display: flex; justify-content: space-between; align-items: center; margin: 0 0 14px; }
.notice { padding: 12px 16px; border-radius: var(--r); margin: 0 0 14px; font-size: 14px; border: 1px solid var(--line); background: var(--surface); }
.notice--warn { background: var(--lock-bg); border-color: #ecd9ad; color: var(--text); }
.notice--warn strong { color: var(--lock-text); }
.table tr.is-archived td { color: var(--muted); }
.archbanner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px 16px; margin: 0 0 16px; border-radius: var(--r); background: var(--lock-bg); border: 1px solid #ecd9ad;
}
.archbanner strong { display: block; color: var(--lock-text); }
.archbanner span { font-size: 14px; color: var(--muted); }
.calcempty--ro { padding: 24px; }
.limitbox { text-align: center; }
.limitbox__icon { width: 44px; height: 44px; margin: 4px auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--lock-bg); color: var(--lock-text); }
.limitbox__icon svg { width: 22px; height: 22px; }
.limitbox h2 { font-size: 19px; margin-bottom: 8px; }
.limitbox p { color: var(--muted); max-width: 46ch; margin: 0 auto; }
.limitbox .dialog__foot { justify-content: center; flex-wrap: wrap; }
.uover { color: var(--lock-text); font-weight: 600; }
.plan__projects { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
