/* Varde datasenterregister: tokens + map page. The details page adds detail.css. */
@import url(/nds/fonts.css);
/* Norsk Datasuverenitet palette (single dark theme, shared with /nds/nds.css). */
:root {
  --bg: #0a1733;
  --panel: #0f2147;
  --ink: #e9eff9;
  --ink-2: #c9d3e5;
  --muted: #8592ab;
  --line: #213560;
  --accent: #8cc0ff;
  --alert: #ff6b6f;
  --warn-bg: #3a2f17;
  --warn-ink: #f1d79d;
  --quote-bg: #06102a;
  --shadow: 0 10px 30px rgb(0 0 0 / .5);
  --s-proposed: #9aa3ab;
  --s-planning: #7d96b0;
  --s-applied: #6a87a8;
  --s-approved: #7fa3d6;
  --s-construction: #d69a3e;
  --s-operational: #4fae80;
  --s-rejected: #b07a6f;
  --s-cancelled: #b07a6f;
  --s-closed: #7d8388;
  --s-unknown: #5d6a85;
  /* Used by /nds/prikker.js for the dot logo. */
  --stein: #8592ab; --sno: #e9eff9; --is: #8cc0ff; --traad: #ff5a5f;
  --f-display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-ui); }
a { color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; color: var(--ink-2); margin: 8px 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* the one dot system: filled = reviewed, hollow = not yet, red = sources disagree */
.dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; vertical-align: 0; margin-right: 7px; }
.dot.full { background: var(--ink); }
.dot.hollow { border: 1.6px solid var(--ink-2); }
.dot.alert { background: var(--alert); }
.sd { display: inline-block; flex: none; width: 11px; height: 11px; border-radius: 50%; margin-right: 7px; }

/* ── map page ── */
body.mapbody { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 12px 8px 16px; padding-top: max(8px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--line); background: var(--panel); z-index: 1100;
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.mark { font-size: 18px; color: var(--accent); }
.top h1 { font: 800 16px/1.2 var(--f-display); margin: 0; letter-spacing: -.01em; white-space: nowrap; }
.brand { color: var(--ink); text-decoration: none; }
.brand canvas { width: 30px; height: 22px; flex: none; }
.dmain h1, .sh-head h2 { font-family: var(--f-display); }
.top .sub { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 4px; }
@media (max-width: 560px) { .top .sub { display: none; } }
.tools { display: flex; gap: 6px; }
.tool {
  font: inherit; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink-2); cursor: pointer;
}
.tool .i { font: italic 600 14px/1 Georgia, serif; width: 16px; height: 16px; display: inline-grid; place-items: center; border: 1.4px solid currentColor; border-radius: 50%; font-size: 11px; }
.tool.on, .tool[aria-expanded="true"] { background: var(--ink); color: var(--panel); border-color: var(--ink); }
@media (max-width: 520px) { .tl-t { display: none; } .tool { width: 38px; justify-content: center; padding: 0; } }

.mapwrap { position: relative; flex: 1; min-height: 0; }
#map { position: absolute; inset: 0; background: var(--bg); }
.leaflet-container { font: inherit; }
.leaflet-control-attribution { font-size: 11px; }
.maperr { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1000; margin: 0; background: var(--warn-bg); color: var(--warn-ink); padding: 8px 12px; border-radius: 8px; font-size: 14px; }

/* markers */
.marker { background: none; border: 0; }
.marker svg { overflow: visible; display: block; }
.ring { fill: var(--panel); stroke: var(--ink); stroke-width: 2.4; }
.ring.hollow { stroke: var(--ink-2); stroke-width: 1.8; stroke-dasharray: 3.2 2.4; }
.ring.alert { stroke: var(--alert); stroke-width: 3; }
.pillicon { background: none; border: 0; }
.pill {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; line-height: 1; padding: 5px 9px; border-radius: 999px; cursor: pointer;
  background: color-mix(in srgb, var(--panel) 88%, transparent); color: var(--ink-2); border: 1.5px dashed var(--ink-2);
}
.pill b { font-weight: 700; color: var(--ink); }
.pill.alert { border-color: var(--alert); }
.pill.demo { position: static; transform: none; cursor: default; }
.apx {
  position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px;
  font-size: 11.5px; font-weight: 700; line-height: 1; border-radius: 5px; cursor: pointer; color: var(--ink);
  background: color-mix(in srgb, var(--panel) 85%, transparent); border: 1.5px dashed var(--ink-2);
}
.apx.alert { border-color: var(--alert); }
.apx.demo { position: static; transform: none; cursor: default; display: inline-grid; }
.leaflet-marker-icon:focus-visible .apx { outline: 2px solid var(--accent); outline-offset: 3px; }
.leaflet-marker-icon:focus-visible .pill, .leaflet-marker-icon:focus-visible .mk { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 999px; }

/* list button (bottom left) */
.listbtn {
  position: absolute; left: 12px; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 1000;
  font: inherit; font-size: 14px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; max-width: calc(100% - 80px);
}
.listbtn[aria-expanded="true"] { background: var(--ink); color: var(--panel); }

/* sheet: bottom sheet on phones, floating card on wider screens */
.sheet {
  position: absolute; z-index: 1200; background: var(--panel); color: var(--ink); box-shadow: var(--shadow);
  left: 0; right: 0; bottom: 0; max-height: 72%; display: flex; flex-direction: column;
  border-radius: 16px 16px 0 0; border: 1px solid var(--line); border-bottom: 0;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet[hidden] { display: none; }
.sheet::before { content: ""; width: 38px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 0; flex: none; }
@media (min-width: 760px) {
  .sheet { left: 14px; right: auto; top: 14px; bottom: auto; width: 380px; max-height: calc(100% - 28px); border-radius: 14px; border-bottom: 1px solid var(--line); }
  .sheet::before { display: none; }
}
.sh-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px 16px 4px; flex: none; }
.sh-head h2 { font-size: 18px; line-height: 1.25; margin: 0; outline: none; }
.sh-x { font: 24px/1 system-ui, sans-serif; border: 0; background: none; color: var(--muted); cursor: pointer; width: 36px; height: 36px; margin: -6px -8px 0 0; border-radius: 50%; flex: none; }
.sh-x:hover { background: var(--quote-bg); }
.sh-body { overflow-y: auto; padding: 0 16px 16px; overscroll-behavior: contain; }
.sh-body h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 4px; }
.sh-body .n { font-weight: 400; }
.lede { color: var(--ink-2); margin: 4px 0 8px; }

/* site card */
.sc-st, .sc-fig, .sc-rv { margin: 6px 0; display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; }
.sc-st b { font-weight: 600; }
.sc-fig b { font-size: 22px; font-weight: 650; }
.sc-rv { font-size: 14px; color: var(--ink-2); }
.sc-note { font-size: 13.5px; color: var(--ink-2); background: var(--quote-bg); border-radius: 8px; padding: 6px 9px; margin: 8px 0; }
.sc-open { display: flex; justify-content: center; gap: 6px; margin-top: 14px; padding: 10px; border-radius: 10px; background: var(--ink); color: var(--panel); text-decoration: none; font-weight: 600; }

/* lists */
.sites { list-style: none; margin: 4px 0 0; padding: 0; }
.sites li a { display: grid; grid-template-columns: 17px 1fr; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.sites li:first-child a { border-top: 0; }
.sites .dot { transform: translateY(1px); }
.li-n { font-weight: 550; }
.li-m { grid-column: 2; font-size: 13px; color: var(--muted); }
.search input { width: 100%; font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); margin: 6px 0 2px; }

/* view options */
.opts { display: grid; gap: 8px; margin-top: 8px; }
.opt { font: inherit; text-align: left; display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; }
.opt span { font-size: 13.5px; color: var(--muted); }
.opt[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

/* key in the about sheet */
.key, .statuskey { list-style: none; padding: 0; margin: 4px 0; font-size: 14px; }
.key li { display: grid; grid-template-columns: 116px 1fr; align-items: center; gap: 8px; padding: 5px 0; }
.km { display: flex; justify-content: center; }
.mk-ring { width: 22px; height: 22px; border-radius: 50%; border: 2.4px solid var(--ink); display: inline-block; box-shadow: inset 0 0 0 4px var(--panel), inset 0 0 0 11px var(--s-construction); }
.mk-ring.hollow { border: 1.8px dashed var(--ink-2); }
.mk-ring.alert { border: 3px solid var(--alert); }
.statuskey { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
.statuskey li { display: flex; align-items: center; }
