/* Self-hosted Nordic typography shared with the live map */
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2");
}

/* RundtNorge text & editorial overview pages (om, personvern, fjelloverganger, strompriser, nordlys, sokkel, byer).
   Calm Nordic typography, thin hairlines, generous whitespace - no boxed SaaS cards or pill clouds. */
:root {
  --bg: #0f1a24;
  --fg: #e6edf3;
  --muted: #93a6b8;
  --line: rgba(255, 255, 255, 0.11);
  --hover: rgba(255, 255, 255, 0.04);
  --link: #6cc9ff;
  --ink: #061824;
  --note: rgba(108, 201, 255, 0.07);
  --good: #45d08a;
  --warn: #f0b840;
  --bad: #f26363;
  --font: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8fafc;
    --fg: #13202c;
    --muted: #536475;
    --line: rgba(19, 32, 44, 0.12);
    --hover: rgba(19, 32, 44, 0.035);
    --link: #0b69a8;
    --ink: #ffffff;
    --note: rgba(11, 105, 168, 0.06);
    --good: #1b874b;
    --warn: #a66c0a;
    --bad: #c43131;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15.5px/1.64 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- header ---------- */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
header a { color: var(--fg); text-decoration: none; }
.home { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; flex: none; }
.home img { width: 28px; height: 28px; border-radius: 7px; }
.topnav { display: flex; align-items: center; gap: 18px; font-size: 14.5px; }
.topnav a { color: var(--muted); white-space: nowrap; }
.topnav a:hover, .topnav a.cur { color: var(--fg); }
.topnav a.cur { font-weight: 600; }
.back { color: var(--link); font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.back:hover { text-decoration: underline; }

/* ---------- main typography ---------- */
main { max-width: 860px; margin: 0 auto; padding: 12px 20px 64px; }
h1 { font-size: 32px; line-height: 1.18; letter-spacing: -0.02em; margin: 28px 0 12px; font-weight: 700; }
h2 { font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; margin: 40px 0 12px; font-weight: 650; }
p { margin: 0 0 14px; max-width: 68ch; }
.lead { font-size: 18px; line-height: 1.55; color: var(--fg); opacity: 0.92; max-width: 64ch; }
.small { font-size: 14px; color: var(--muted); }
a { color: var(--link); text-underline-offset: 3px; }
.note { background: var(--note); border-left: 3px solid var(--link); padding: 12px 16px; margin: 20px 0; max-width: 68ch; }

/* ---------- breadcrumbs & understated map action ---------- */
.crumb { font-size: 13.5px; color: var(--muted); margin: 18px 0 -16px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--fg); text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 20px 0 28px; }
.btn-map {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 7px;
  background: var(--link); color: var(--ink);
  font-weight: 650; font-size: 14.5px; text-decoration: none;
}
.btn-map:hover { filter: brightness(1.07); }
.act-link { color: var(--muted); font-size: 14.5px; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.act-link:hover { color: var(--fg); border-color: var(--fg); }

/* ---------- editorial summary strip (no boxes, just clean hairlines) ---------- */
.strip {
  display: flex; flex-wrap: wrap; gap: 20px 36px;
  padding: 18px 0;
  margin: 22px 0 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { min-width: 110px; }
.stat .v { font-family: var(--mono); font-size: 24px; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 13px; color: var(--muted); margin-top: 4px; }
.stat .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; opacity: 0.85; }

/* ---------- status dot (clean alternative to pill bubbles) ---------- */
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 550; white-space: nowrap; }
.st i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--muted); }
.st.good { color: var(--good); }
.st.good i { background: var(--good); }
.st.warn { color: var(--warn); }
.st.warn i { background: var(--warn); }
.st.bad { color: var(--bad); }
.st.bad i { background: var(--bad); }
.st.dim { color: var(--muted); }

/* ---------- scannable hairline list rows ---------- */
.dlist { border-top: 1px solid var(--line); margin: 8px 0 24px; }
.drow {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto;
  align-items: baseline;
  gap: 8px 20px;
  padding: 12px 6px;
  border-bottom: 1px solid var(--line);
  color: var(--fg);
  text-decoration: none;
  transition: background 0.12s;
}
a.drow:hover { background: var(--hover); }
.drow .name { font-weight: 600; font-size: 15.5px; }
.drow .sub { color: var(--muted); font-size: 13.5px; font-weight: 400; margin-left: 8px; }
.drow .num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; font-size: 14px; }
.drow .num b { font-weight: 600; }
.drow .num small { color: var(--muted); font-family: var(--font); font-size: 13px; margin-left: 10px; }

/* ---------- clean editorial tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 8px 0 20px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; vertical-align: baseline; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-family: var(--mono); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; }
td:last-child, th:last-child { text-align: right; padding-right: 0; }
td:last-child { color: var(--muted); white-space: nowrap; }
tr.now td { color: var(--fg); font-weight: 650; }
tr.now td:last-child { color: var(--link); }

/* ---------- road messages (clean left border, no card box) ---------- */
.msgs { margin: 8px 0 24px; }
.msg { padding: 10px 0 10px 14px; margin: 12px 0; border-left: 2.5px solid var(--warn); max-width: 68ch; }
.msg.bad { border-left-color: var(--bad); }
.msg b { display: block; margin-bottom: 3px; font-size: 15px; }

/* ---------- road camera photos (clean borderless look) ---------- */
.cam-fig { margin: 22px 0 28px; }
.cam-fig img {
  display: block; width: 100%; max-height: 460px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--line); background: #08121a;
}
.cam-fig figcaption {
  margin-top: 8px; font-size: 13.5px; color: var(--muted);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px;
}
.cam-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 16px; margin: 14px 0 28px; }
.cam-item { display: block; text-decoration: none; color: var(--fg); }
.cam-item img {
  display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover;
  border-radius: 5px; border: 1px solid var(--line); background: #08121a;
  transition: opacity 0.15s;
}
.cam-item:hover img { opacity: 0.88; }
.cam-item .cap { margin-top: 6px; font-size: 14px; font-weight: 550; line-height: 1.3; }
.cam-item .cap span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; margin-top: 2px; }

/* ---------- clean inline links row ---------- */
.inline-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 22px; font-size: 14.5px; }
.inline-links a { color: var(--muted); text-decoration: none; }
.inline-links a:hover { color: var(--link); text-decoration: underline; }

/* ---------- editorial 3-column directory footer ---------- */
.sdir {
  margin-top: 52px; padding-top: 28px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 28px;
}
.sdir h3 { margin: 0 0 10px; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.sdir ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sdir a { color: var(--fg); opacity: 0.86; font-size: 14.5px; text-decoration: none; }
.sdir a:hover { opacity: 1; color: var(--link); text-decoration: underline; }
.sfoot {
  margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--muted);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px;
}
.sfoot a { color: var(--muted); text-decoration: none; }
.sfoot a:hover { color: var(--link); text-decoration: underline; }

@media (max-width: 680px) {
  header { flex-wrap: wrap; gap: 10px; }
  .topnav { order: 3; width: 100%; overflow-x: auto; gap: 14px; padding-top: 4px; }
  .cam-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sdir { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  h1 { font-size: 26px; }
  .strip { gap: 16px 24px; }
  .stat .v { font-size: 22px; }
  .drow { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .drow .sub { display: block; margin-left: 0; margin-top: 2px; }
  .drow .num { grid-column: 1 / -1; text-align: left; font-size: 14px; color: var(--muted); }
  .cam-grid { grid-template-columns: 1fr; }
  .sdir { grid-template-columns: 1fr; gap: 20px; }
  table, tbody, tr, td { display: block; text-align: left !important; }
  tr:first-child { display: none; }
  tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  td { border: 0; padding: 1px 0; }
  td:first-child { font-weight: 600; }
  td:last-child { white-space: normal; }
}
