/* Innhold fra style.css er lagt inn her slik at siden er samlet i én fil. */
:root {
  --bg-top: #1e2a36;
  --bg-bottom: #141c26;
  --accent: #ff5a00; /*ADR1 oransje*/
  --panel: rgba(48, 68, 92, 0.92);
  --panel-soft: rgba(58, 80, 108, 0.78);
  --panel-deep: rgba(36, 52, 72, 0.92);

  --line: rgba(180, 205, 225, 0.14);
  --line-soft: rgba(180, 205, 225, 0.08);

  --text: #f3f7fc;
  --text-soft: #d9e3ec;
  --muted: #bcc8d3;
  --muted-strong: #d2dbe4;

  --blue: #a7bfd3;
  --blue-bright: #8fd8ff;
  --blue-light: #d9f4ff;
  --blue-teknTrans-ui: #4faedc;
  
  --shadow: 0 18px 38px rgba(0, 0, 0, 0.22);

  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; 
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
  background:
    radial-gradient(circle at 50% 10%, rgba(80, 140, 200, 0.08), transparent 28%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a { color: var(--text); }

.container {
  width: calc(100% - 40px);
  max-width: none;
  margin: 0 auto;
}

/* Header */

.site-header {
  background: rgba(18, 26, 36, 0.75);
  backdrop-filter: blur(6px);
}

.site-header .container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 14px 0 12px;
}

.header-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.header-top img {
  width: 80px;
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.1em;
}

.brand-text span {
  margin-top: 0;
  font-size: 16px;
  line-height: 1.2;
  color: var(--text-soft);
  letter-spacing: 0.15cm;
}

.hpv-intro-header {
  max-width: 860px;
  margin: 6px auto 0;
  padding: 0;
  font-size: 13.5px;
  line-height: 1.45;
  font-style: italic;
  text-align: center;
  color: #cfe0f2;
  opacity: 0.9;
  letter-spacing: 0.02em;
  border-top: 0;
}

.hpv-intro-header strong {
  color: #ffffff;
  font-style: italic;
}

.mini-nav {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(140, 170, 210, 0.25);
}

.mini-nav-inline {
  border-bottom: none;
  padding-bottom: 0;
  margin: 8px 0 14px;
}

.mini-nav a,
.mini-nav a:link,
.mini-nav a:visited,
.mini-nav a:hover,
.mini-nav a:active,
.mini-nav a:focus,
.mini-nav a:focus-visible {
  text-decoration: none !important;
  color: rgba(255,255,255,0.85);
  font-size: 13.5px;
  line-height: 1;
  padding: 0 0 2px 0;              /* 🔥 litt plass til linjen */
  border: 0;
  background: transparent;
  border-radius: 0;
  white-space: nowrap;
  outline: none;
  box-shadow: none;

  border-bottom: 1px solid rgba(79,174,220,0.4);  /* 🔥 underline */
}

/* Normal tilstand */
.mini-nav a {
  opacity: 0.7;
  transition: all 0.15s ease;
}

/* Desktop hover */
.mini-nav a:hover {
  opacity: 1;
  border-bottom-color: rgba(79,174,220,0.9);   /* 🔥 tydeligere linje */
}

/* Main */

main {
  padding: 24px 0 38px;
}

.page-block {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel) 0%, rgba(39, 50, 61, 0.96) 100%);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 28px 30px 26px;
}

.kicker {
  display: inline-block;
  margin: 2px 0 6px;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-strong);
  opacity: 0.9;
}

.tt-inline {
  display: inline-block;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.2px;
  vertical-align: middle;
}

.tt-inline .tt-teknologi {
  color: var(--blue-bright);
  font-weight: 600;
  text-transform: uppercase;
}

.tt-inline .tt-transport {
  color: var(--blue-light);
  font-weight: 600;
  text-transform: uppercase;
}


/* Teknologi Transport wordmark */

.tt-heading {
  display: flex;                 /* 🔥 velg flex (best her) */
  align-items: center;
  gap: 10px;

  margin: 0;
  font-size: 36px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
}

.tt-title {
  margin: 0;
  font-size: 38px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
}

.tt-logo {
  display: block;
  height: 52px;
  width: auto;
}

.hero-copy .lead {
  max-width: none;
  margin: 8px 0 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-soft);
}

/* Card grids */

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  /*transform: translateY(0px);*/
}

.content-card,
.facts-card {
  padding: 16px 16px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--panel-soft), var(--panel-deep));
}

.content-card h2,
.facts-card h2 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 600;
  color: #ffffff;
}

.content-card p,
.content-card li,
.facts-card p,
.facts-card li {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.content-card ul,
.facts-card ul {
  margin: 0;
  padding-left: 18px;
}

.content-card li,
.facts-card li {
  margin-bottom: 7px;
}

.content-card li:last-child,
.facts-card li:last-child {
  margin-bottom: 0;
}

.quote-line {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-soft);
}

.quote-line strong {
  color: #ffffff;
  font-weight: 600;
}

.quote-line p {
  margin: 0 0 10px;
}

.quote-line p:last-child {
  margin-bottom: 0;
}

/* Facts section */

.facts-section {
  margin-top: 22px;
}

.facts-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.fact-table {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 10px 14px;
}

.fact-label {
  margin-bottom: 2px;
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-strong);
}

.fact-value {
  font-size: 13px;
  line-height: 1.45;
  color: #e6f2ff;
}

/* HPVisTech block */

.hpvistech-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  align-items: start;
}

.hpvistech-main .intro {
  margin: 0 0 16px;
  max-width: 70ch;
  font-size: 15px;
  line-height: 1.6;
  color: #ffffff;
}

.hpvistech-main .body {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.hpvistech-main .highlight {
  margin: 16px 0;
  padding: 10px 0 10px 14px;
  /*border-left: 3px solid rgba(142, 218, 255, 0.55);*/
  border-left: 4px solid var(--blue-teknTrans-ui);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-soft);
}

.hpvistech-main ul {
  margin: 12px 0 16px;
  padding-left: 18px;
}

.hpvistech-main li {
  margin-bottom: 6px;
  color: var(--text-soft);
}

.hpvistech-main li:last-child {
  margin-bottom: 0;
}

.hpvistech-side {
  display: flex;
}

.hpvistech-facts {
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(190, 220, 240, 0.18);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(96, 116, 136, 0.78), rgba(58, 71, 83, 0.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 24px rgba(0,0,0,0.18);
  font-size: 13px;
}

.fact-row {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.fact-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.hpvistech-facts .fact-label {
  margin-bottom: 4px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e7eef6;
}

.hpvistech-facts .fact-value {
  font-size: 13px;
  line-height: 1.45;
  color: #f2f7fc;
}

footer {
  padding: 18px 0 30px;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

/* FoU program box */

.fou-program-box {
  margin-top: 16px;
  padding: 0;                    /* 👈 fjern padding */
  border: none;                  /* 👈 fjern ramme */
  background: transparent;       /* 👈 fjern bakgrunn */
  box-shadow: none;              /* 👈 fjern “kort-effekt” */
}

.fou-program-label {
  display: inline-block;
  margin-bottom: 10px;

  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b8d6ea;

  /* 🔥 nytt */
  position: relative;
  padding-top: 8px;
}

/* 🔥 linje over */
.fou-program-label::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 1px;
  background: rgba(180, 205, 225, 0.25);
}


.fou-program-box h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.2;
  color: #ffffff;
}

.fou-program-box .body {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #d8e6f2;
}

.fou-program-box ul {
  margin: 10px 0 14px;
  padding-left: 18px;
}

.fou-program-box li {
  margin-bottom: 6px;
  color: #e2edf7;
}

.fou-program-box li:last-child {
  margin-bottom: 0;
}

.fou-program-box a {
  color: #9fd6ff;
  text-decoration: none;
}

.fou-program-box a:hover {
  text-decoration: underline;
}

/* Profile layout inside fou-program-box */

.fou-program-content {
  display: block;
}

.fou-program-box .profile {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  margin-top: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  /*border-left: 4px solid rgba(135, 200, 235, 0.55);*/
  border-left: 4px solid var(--blue-teknTrans-ui);
}

.fou-program-box .profile img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.fou-program-box .profile-text,
.fou-program-box .profile > div:last-child {
  flex: 1;
  min-width: 0;
}

.fou-program-box .profile h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.2;
  color: #ffffff;
}

.fou-program-box .profile p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.6;
  color: #d8e6f2;
}

.fou-program-box .profile p:last-child {
  margin-bottom: 0;
}

.fou-program-box .profile i {
  color: #cfe0f2;
}

.fou-program-box .profile + .profile {
  margin-top: 20px;
}

/* Pågående FoU-program section */

#teknologi-transport.page-block {
  position: relative;
  margin-bottom: 36px;
  background: linear-gradient(180deg, rgba(58, 76, 96, 0.70), rgba(32, 44, 58, 0.98));
  border: 1px solid rgba(140, 170, 210, 0.18);
}

#teknologi-transport .content-card {
  border: 1px solid rgba(140, 165, 210, 0.22);
  background: linear-gradient(180deg, rgba(58, 72, 98, 0.45), rgba(34, 46, 62, 0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

#teknologi-transport .content-card p,
#teknologi-transport .content-card li {
  color: #e1ecf7;
}

#teknologi-transport .content-card h2 {
  color: #f0f6ff;
}

#teknologi-transport .content-card li {
  color: #d6e2ee;
  padding: 6px 0;
  border-bottom: 1px solid rgba(140, 165, 210, 0.10);
}

#teknologi-transport .content-card li:last-child {
  border-bottom: none;
}

#teknologi-transport .quote-line {
  border-top: none;
}

#teknologi-transport.page-block::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0),
    rgba(160, 190, 230, 0.35),
    rgba(0,0,0,0)
  );
}

.tt-logo-footer {
  margin: 60px 0 20px;
  display: flex;
  justify-content: center;
}

.tt-logo-footer img {
  width: 280px;
  max-width: 100%;
  height: auto;
}

.tt-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  margin-bottom: 0;
}

.tt-hero-text {
  min-width: 0;
  max-width: none;
}

.tt-hero-text .lead {
  max-width: none;
}



.tt-hero-logos {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-self: end;
  gap: 10px;
  margin-left: 0;
}

.tt-hero-logos a {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}

.tt-hero-logos a img {
  display: block;
}
.tt-hero-logos a:hover img {
  opacity: 0.85;
}

.tt-logo-large {
  width: 150px;
  height: auto;
}

.nice-logo-small {
  width: 260px;
  height: auto;
  opacity: 0.78;
  display: block;
  object-fit: contain;
  object-position: center;
  transform: none;
  margin-top: -30px;
 /*transform: translateY(-30px);   /* 🔥 løfter den opp */
}

.brand-inline {
    font-size: 1.1em;   /* 🔥 litt større enn vanlig tekst */
    font-weight: inherit;    /* Ikke bryt typografi */
    white-space: nowrap;     /* Hindrer linjebrudd mellom ADR1 og kurs */
}

.brand-inline .adr {
    color: var(--accent);    /* din oransje */
    font-weight: 600;        /* litt tyngde, men ikke overdrevet */
}

.brand-inline .kurs {
    color: #ffffff;          /* følger tekstfargen */
}

.profile-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
}
.profile-header .inline-button {
    transform: translateY(-2px);
}
.inline-button {
    display: inline-block;
    margin-top: 6px;

    padding: 10px 16px;
    border-radius: 6px;

    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);

    font-size: 13px;
    font-weight: 600;
    text-decoration: none;

    box-shadow:
        0 3px 6px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255,255,255,0.12);

    transition: all 0.18s ease;
}

.inline-button.small {
    padding: 6px 14px;
    font-size: 12px;
}

/* hover */
.inline-button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 16px rgba(0,0,0,0.35),
        inset 0 1px 0 rgba(255,255,255,0.15);
}

/* active (klikk) */
.inline-button:active {
    transform: translateY(1px);
    box-shadow:
        0 2px 4px rgba(0,0,0,0.25),
        inset 0 2px 4px rgba(0,0,0,0.25);
}

/* fokus */
.inline-button:focus-visible {
    outline: none;
}

.fou-program-box a.inline-button {
    color: #fff;
    text-decoration: none;
}

/* Responsive */



/* 🔥 LEGG DENNE UNDER */


.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 700px;
  gap: 16px;
  align-items: start;
}

    .map-panel,
    .map-status-card,
    .map-info-card {
      border: 1px solid rgba(140, 165, 210, 0.22);
      border-radius: 12px;
      background: linear-gradient(180deg, rgba(58, 72, 98, 0.45), rgba(34, 46, 62, 0.96));
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    }

	.map-panel {
	  max-width: 900px;   /* juster etter smak */
	  width: 100%;
      overflow: hidden;

	  justify-self: start;   /* ← viktig */
	}

    .map-panel-header {
      padding: 16px 18px 12px;
      border-bottom: 1px solid rgba(180, 205, 225, 0.10);
    }

    .map-panel-header h2 {
      position: relative;
      display: grid;
      grid-template-columns: 1fr auto auto;
      gap: 12px;
      align-items: center;
    
      margin: 0 0 10px;
      color: #ffffff;
      font-size: 18px;
      line-height: 1.2;
    }
    
    .header-title {
      grid-column: 1;
      justify-self: start;
      text-align: left;
    }
	
	.live-speed.live-speed-dual {
      grid-column: 2;
      justify-self: start;
    
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 2px;
    
      font-size: 26px;
      font-weight: 700;
      line-height: 1.1;
    
      margin: 0;
      padding: 0;
      white-space: nowrap;
    }
    
    .header-alert {
      grid-column: 3;
      justify-self: end;
    
      width: 300px;
      min-height: 70px;
      padding: 10px 12px;
    
      font-size: 14px;
      line-height: 1.25;
    }
	
    .map-status-card h3,
    .map-info-card h3 {
      font-size: 18px;
      margin: 0 0 10px;
      line-height: 1.2;
      color: #ffffff;
    }

    .map-panel-header p,
    .map-info-card p {
      margin: 0 0 10px;
      font-size: 14px;
      line-height: 1.55;
      color: #d9e3ec;
    }

    .map-panel-header p:last-child,
    .map-info-card p:last-child {
      margin-bottom: 0;
    }
    
    .map-side-two-col {
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.map-side-col {
  display: grid;
  gap: 16px;
}



.map-frame {
  aspect-ratio: 4 / 3;
  width: min(100%, calc((100vh - 180px) * 4 / 3));
  height: auto;
}

#map {
  width: 100%;
  height: 100%;
}

    .map-side {
      display: grid;
      gap: 16px;
    }

    .map-side-wrap {
      display: flex;
      gap: 12px;
      align-items: flex-start;
    }
    
    .map-side-wrap > .map-side {
      flex: 0 0 auto;
    }
    
    
    
    .map-status-card,
    .map-info-card {
      padding: 16px 16px 14px;
    }

    .track-list {
      display: grid;
      gap: 10px;
      margin-top: 10px;
    }

    .track-row {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 14px;
      color: #e1ecf7;
    }

    .track-row strong {
      color: #ffffff;
      font-weight: 600;
    }

    .track-dot {
      width: 12px;
      height: 12px;
      border-radius: 999px;
      display: inline-block;
      flex: 0 0 auto;
    }

    .map-meta {
      margin-top: 10px;
      font-size: 13px;
      line-height: 1.55;
      color: #cfe0f2;
    }

    .map-meta code {
      color: #ffffff;
      font-family: Consolas, Monaco, monospace;
      font-size: 12px;
    }


    .distance-box {
      margin-top: 12px;
      padding: 10px;
      border: 1px solid rgba(180, 205, 225, 0.14);
      border-radius: 10px;
      background: rgba(12, 20, 32, 0.28);
      color: #e1ecf7;
      font-size: 13px;
      line-height: 1.45;
    }

    .distance-box strong {
      color: #ffffff;
    }

    .distance-value {
      display: block;
      margin-top: 3px;
      color: #ffffff;
      font-size: 18px;
      font-weight: 700;
    }

    .follow-controls-overlay {
      position: absolute;
      top: 14px;
      left: 14px;
      right: 14px;
      z-index: 1000;
      display: flex;
      gap: 6px;
      justify-content: space-between;
      pointer-events: none;
    }

    .follow-controls-overlay .follow-btn {
      pointer-events: auto;
    }

    .follow-btn {
      flex: 1;
      padding: 8px 6px;
      border: 1px solid rgba(180, 205, 225, 0.25);
      border-radius: 8px;
      background: rgba(20, 30, 45, 0.85);
      color: #ffffff;
      backdrop-filter: blur(6px);
      cursor: pointer;
      font-size: 12px;
      font-weight: 600;
    }

	.follow-btn.active {
	  background: #0078ff;
	  border-color: #ffffff;
	  color: #ffffff;
	  box-shadow:
	    0 0 0 2px rgba(255,255,255,0.75),
	    0 0 14px rgba(0,120,255,0.85);
	  transform: translateY(-1px);
	}

	.follow-btn:not(.active) {
  		opacity: 0.72;
	}

	.follow-btn.off.active {
	  background: #7f8b96;
	  border-color: #ffffff;
	  box-shadow:
	    0 0 0 2px rgba(255,255,255,0.65),
	    0 0 12px rgba(127,139,150,0.75);
	}

    .map-status-overlay {
      min-width: 150px;
      margin-bottom: 28px;
      padding: 8px 10px;
      border: 1px solid rgba(180, 205, 225, 0.25);
      border-radius: 8px;
      background: rgba(20, 30, 45, 0.85);
      color: #ffffff;
      backdrop-filter: blur(6px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.25);
      font-size: 12px;
      line-height: 1.4;
    }

    .status-line {
      display: flex;
      justify-content: space-between;
      gap: 10px;
    }

    .leaflet-top {
      top: 56px;
    }

    .leaflet-control-layers {
      border: 1px solid rgba(140, 165, 210, 0.22) !important;
      border-radius: 10px !important;
      overflow: hidden;
      box-shadow: 0 8px 20px rgba(0,0,0,0.22) !important;
    }

    .leaflet-control-layers-expanded {
      padding: 10px 12px !important;
      background: rgba(255,255,255,0.96) !important;
    }



    .can-panel {
      margin-top: 12px;
      display: grid;
      gap: 12px;
    }

    .can-box {
      border: 1px solid rgba(180, 205, 225, 0.14);
      border-radius: 10px;
      padding: 10px;
      background: rgba(12, 20, 32, 0.28);
    }

    .can-box h4 {
      margin: 0 0 8px;
      font-size: 14px;
      color: #ffffff;
    }

    .can-summary-section {
      margin-top: 10px;
      padding-top: 8px;
      border-top: 1px solid rgba(180, 205, 225, 0.10);
    }

    .can-summary-section:first-child {
      margin-top: 0;
      padding-top: 0;
      border-top: 0;
    }

    .can-summary-section > strong {
      display: block;
      margin-bottom: 4px;
      font-size: 12px;
      color: #ffffff;
      letter-spacing: 0.02em;
    }

    .can-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
      color: #dce8f3;
    }

    .can-table td {
      padding: 3px 0;
      border-bottom: 1px solid rgba(180, 205, 225, 0.08);
      vertical-align: top;
    }

    .can-table td:first-child {
      color: #aebfd0;
      padding-right: 8px;
      word-break: break-word;
    }

    .can-table td:last-child {
      color: #ffffff;
      text-align: right;
      white-space: nowrap;
    }

    .popup-can-table {
      border-collapse: collapse;
      font-size: 12px;
      margin-top: 4px;
      min-width: 220px;
    }

    .popup-can-table td {
      padding: 2px 6px 2px 0;
      border-bottom: 1px solid #ddd;
    }

    .popup-can-table td:last-child {
      font-weight: 600;
      text-align: right;
    }



    .vehicle-mini-label {
      border: 1px solid rgba(20, 30, 45, 0.35);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.92);
      color: #172033;
      box-shadow: 0 3px 10px rgba(0,0,0,0.22);
      padding: 4px 6px;
      font-family: Arial, sans-serif;
      font-size: 11px;
      line-height: 1.25;
      white-space: nowrap;
    }

    .vehicle-mini-label strong {
      display: block;
      font-size: 11px;
      margin-bottom: 1px;
    }

    

    

.live-speed-dual {
  display: inline-flex;
  flex-direction: column;   /* 👈 over/under */
  align-items: flex-start;  /* venstrejustert */
  gap: 2px;
  font-size: 12px;         /* 👈 mindre font */
  line-height: 1.2;
}

.live-speed-dual span {
  white-space: nowrap;
}

/* ========================
   CLEANED CAN COMPARISON TABLE
   Final cascade rules for the current table layout.
======================== */

.can-table-scroll {
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 14px;
  border: 1px solid rgba(180, 205, 225, 0.14);
  border-radius: 10px;
    box-sizing: content-box;
}

.can-compare-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  color: #dce8f3;
}

.can-compare-table th,
.can-compare-table td {
  padding: 4px 6px;
  border-bottom: 1px solid rgba(180, 205, 225, 0.1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.can-compare-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(34, 46, 62, 0.98);
  border-bottom: 1px solid rgba(180, 205, 225, 0.25);
  text-align: left;
  color: #ffffff;
}

.can-compare-table th:nth-child(1),
.can-compare-table td:nth-child(1) {
  width: 40%;
}

.can-compare-table th:nth-child(2),
.can-compare-table td:nth-child(2),
.can-compare-table th:nth-child(3),
.can-compare-table td:nth-child(3) {
  width: 30%;
}

.can-compare-table td:nth-child(2),
.can-compare-table td:nth-child(3) {
  text-align: right;
  color: #ffffff;
}

.can-compare-table td.wrap {
  white-space: normal !important;
  word-break: break-word;
}

/* ===== SECTION HEADERS (NON-CAN / CAN BLOKKER) ===== */

.section-row td {
  background: #ffe5e5;
  color: #b00020;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;

  padding: 2px 6px;   /* 🔥 redusert fra ~6px → 2px topp/bunn */

  border-top: 2px solid #b00020;
  line-height: 1.1;   /* 🔥 komprimerer høyden ytterligere */
}

/* ==========================================================
   VIEWPORT-LOCKED KARTSIDE – SYNKRON HØYDE
   Kart, drivline og CAN holder seg innenfor hero-copy.
   Scroll skjer kun i analysis-scroll og can-table-scroll.
   ========================================================== */

html,
body {
  min-height: 100%;
}

body {
  overflow-x: hidden;
}

main {
  padding: 12px 0;
}

main .container {
  width: calc(100vw - 40px);
  max-width: none;
  margin: 0 auto;
}

main .page-block {
  height: calc(100vh - 178px);
  max-height: calc(100vh - 178px);
  min-height: 360px;
  overflow: hidden;
}

main .hero-copy {
  height: 100%;
  max-height: 100%;
  min-height: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-inner {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.map-layout {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  align-items: stretch;
}

.map-panel {
  height: 100%;
  min-height: 0;
  max-width: 900px;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  justify-self: start;
}

.map-panel-header {
  flex: 0 0 auto;
}

.map-frame {
  flex: 1 1 auto;
  min-height: 240px;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  overflow: hidden;
  position: relative;
}

#map {
  width: 100%;
  height: 100% !important;
  min-height: 0;
}

.map-side-two-col {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  overflow: hidden;
}

.map-side-two-col > .map-side {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

.map-status-card,
.map-info-card {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Venstre kolonne: statuskortet fyller hele tilgjengelig høyde. */
.map-side-two-col > .map-side:first-child > .map-status-card {
  flex: 1 1 auto;
}

/* Høyre kolonne: CAN-kortet fyller resten, små kort under beholder innholdshøyde. */
.map-side-two-col > .map-side:last-child > .map-info-card:first-child {
  flex: 1 1 auto;
}

.map-side-two-col > .map-side:last-child > .map-info-card:not(:first-child) {
  flex: 0 0 auto;
}

/* Drivline: overskrift/forklaring står fast, tabellen scroller. */
.drivline-analysis {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.analysis-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 8px;
  margin-top: 8px;
}

/* CAN: overskrift/forklaring står fast, tabellen scroller. */
.can-table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  box-sizing: border-box;
}

/* Sticky tabellhoder må holde seg inne i egne scrollfelt. */
.can-compare-table thead th {
  top: 0;
}





    .drivline-analysis {
      margin-top: 14px;
    }

    .drivline-analysis h4 {
      margin: 0 0 8px 0;
      font-size: 1rem;
    }

    .drivline-analysis .analysis-source {
      margin-bottom: 10px;
      opacity: 0.78;
      font-size: 0.82rem;
    }

.analysis-scroll {
  max-height: 420px;
  overflow-y: auto;
  margin-top: 8px;
}
    .analysis-vehicle {
      margin-top: 12px;
    }

    .analysis-vehicle:first-of-type {
      margin-top: 0;
    }

    .analysis-vehicle-title {
      margin: 0 0 6px 0;
      font-weight: 700;
    }

    .analysis-table {
      width: 100%;
      border-collapse: collapse;
      table-layout: fixed;
    }

    .analysis-table th,
    .analysis-table td {
      padding: 6px 8px;
      vertical-align: top;
      white-space: normal;
	  word-break: break-word;
    }

    .analysis-table th:first-child,
    .analysis-table td:first-child {
      width: 42%;
    }

    .analysis-note {
      line-height: 1.3;
    }

    .analysis-muted {
      opacity: 0.75;
    }
    
	header {
	  padding: 15px 10px;
	  background: #111;
	  border-bottom: 1px solid #333;
	}    
    
    header h1 {
      font-size: 1.5rem;
      margin: 0;
    }
    
    header h2 {
      font-size: 0.95rem;
      margin: 0;
      font-weight: 500;
    }
    
    header p {
      font-size: 0.8rem;
      margin: 0;
      opacity: 0.8;
    }
    
    

    /* ===== KOMPAKT KARTHEADER OG STATUSSTRIPE ===== */
    .map-panel-header {
      padding: 6px 10px 6px !important;
    }

    .map-panel-header .kicker {
      margin: 0 0 2px !important;
      font-size: 11px !important;
      line-height: 1.1 !important;
      letter-spacing: 0.06em !important;
    }

    .map-panel-header p {
      margin: 0 !important;
      font-size: 12px !important;
      line-height: 1.2 !important;
    }

    .map-status-card {
      padding: 8px 10px !important;
    }

    .map-status-card h3 {
      margin: 0 0 5px !important;
      font-size: 14px !important;
      line-height: 1.1 !important;
    }

    .track-list {
      display: flex !important;
      flex-wrap: wrap !important;
      gap: 8px 14px !important;
      margin: 0 0 6px !important;
    }

    .track-row {
      gap: 5px !important;
      font-size: 12px !important;
      line-height: 1.1 !important;
    }

    .track-dot {
      width: 8px !important;
      height: 8px !important;
    }

    .distance-box {
      margin-top: 6px !important;
      padding: 6px 8px !important;
      font-size: 12px !important;
      line-height: 1.2 !important;
    }

    .distance-value {
      margin-top: 1px !important;
      font-size: 14px !important;
    }

    .drivline-analysis {
      margin-top: 8px !important;
    }

    .drivline-analysis h4 {
      margin: 0 0 4px !important;
      font-size: 14px !important;
    }

    .drivline-analysis .analysis-source {
      margin-bottom: 6px !important;
      font-size: 11px !important;
      line-height: 1.25 !important;
    }

    /* Vis flere CAN-parametere før scrolling */
    .can-table-scroll {
      max-height: 760px !important;
      overflow-y: auto !important;
    }


    /* ===== EVENTVARSLER / KJØRETØYSTATUS ===== */
    .alert-stack {
      position: fixed;
      top: 14px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 5000;
      display: grid;
      gap: 8px;
      width: min(74vw, 448px);
      pointer-events: none;
    }

    .event-alert {
      display: none;
      padding: 12px 16px;
      border-radius: 12px;
      color: #111;
      box-shadow: 0 8px 26px rgba(0,0,0,0.35);
      font-weight: 800;
      line-height: 1.25;
      text-align: center;
      border: 2px solid rgba(255,255,255,0.55);
    }

    .event-alert.visible {
      display: block;
    }

    .event-alert small,
    .event-alert .event-values {
      display: block;
      margin-top: 4px;
      font-size: 20px;
      font-weight: 900;
    }

    .event-alert.orange {
      background: rgba(255, 140, 0, 0.95);
      border-color: #ff8c00;
      transition: background 0.3s ease;
    }

	.event-alert.red {
	  background: rgba(160, 30, 30, 0.95);   /* 👈 mørkere */
	  color: #fff;
	  border-color: rgba(255, 160, 160, 0.6);
	}

    .event-alert.green {
      background: rgba(30, 170, 75, 0.96);
      color: #fff;
      border-color: #b9ffd0;
    }

    .event-alert.blue {
      background: rgba(18, 82, 165, 0.97);
      color: #fff;
      border-color: #6fb6ff;
      box-shadow: 0 8px 26px rgba(0,0,0,0.35), 0 0 0 1px rgba(111,182,255,0.45);
    }

    .event-alert.dark {
      background: rgba(25, 30, 40, 0.96);
      color: #fff;
      border-color: #9fb0c6;
    }
    
    #cruise-alert .event-values {
  	  font-size: 16px !important;
  	  font-weight: 700 !important;
	}
	
	.live-speed {
	  font-size: 1.6em;
	  font-weight: 800;
	  color: #4fd1ff;

	  margin-left: 20px;
	  padding-right: 20px;   /* ← øk denne */
	  white-space: nowrap;
	}

	.uncertain-marker {
	  color: #ffd166;
	  font-weight: 900;
	  margin-left: 4px;
	  cursor: help;
	}
.event-alert.orange.over-speed {
  background: rgba(200, 30, 30, 0.95);  /* 👈 rød */
}

.speed-normal {
  background: rgba(255, 140, 0, 0.95);   /* oransje */
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 2px;
}

.speed-high {
  background: rgba(180, 30, 30, 0.95);   /* rød */
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 2px;
}


.vehicle-mini-label.stale-1 {
  background: rgba(255, 165, 0, 0.85);
  color: #111;
  border: 1px solid rgba(200, 140, 0, 0.6);
}

.vehicle-mini-label.stale-2 {
  background: rgba(200, 80, 30, 0.92);
  color: #fff;
  border: 1px solid rgba(255, 190, 120, 0.7);
}

.vehicle-mini-label.stale-3 {
  background: rgba(160, 20, 20, 0.96);
  color: #fff;
  border: 1px solid rgba(255, 170, 170, 0.8);
  text-align: center;
}

.vehicle-mini-label .offline-text {
  font-weight: 900;
  letter-spacing: 0.08em;
}

#parking-alert {
  z-index: 30;
}

#cruise-alert {
  z-index: 20;
}

/* ==========================================================
   HEADER-VARSLER – ENDELIG OVERRIDE
   Ligger etter .event-alert-reglene.
   Cruise og park deler samme grid-celle, slik at park ikke legger seg
   på egen linje. Kun synlig varsel vises visuelt.
   ========================================================== */

.event-alert.header-alert {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: center;

  display: flex !important;
  flex-direction: column;
  justify-content: center;

  visibility: hidden;
  opacity: 0;
  pointer-events: none;

  box-sizing: border-box;
  width: 270px;
  min-height: 56px;

  padding: 6px 10px;
  overflow: hidden;
}

.event-alert.header-alert.visible {
  visibility: visible;
  opacity: 1;
}

#cruise-alert {
  font-size: 11px;
  line-height: 1.08;
}

#cruise-alert .event-values {
  margin-top: 2px;
  font-size: 12px !important;
  line-height: 1.08 !important;
  font-weight: 700 !important;
}

#parking-alert {
  font-size: 15px;
  line-height: 1.12;
}

#parking-alert .event-values {
  margin-top: 2px;
  font-size: 18px !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
}

/* MOBILFIX: hindre kart/layout i å bli bredere enn viewport */

/* ==========================================================
   MEDIA / RESPONSIVE REGLER
   Samlet nederst. Rekkefølgen er beholdt for å bevare cascade.
   ========================================================== */

@media (max-width: 760px) {
  .container {
    width: min(var(--maxw), calc(100% - 24px));
  }

  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-top {
    gap: 10px;
    align-items: flex-start;
    width: 100%;
  }

  .header-top img {
    width: 40px;
  }

  .brand-text strong {
    font-size: 21px;
  }

  .brand-text span {
    font-size: 11px;
  }

  .mini-nav {
    gap: 8px;
    justify-content: flex-start;
  }

  .mini-nav a:hover,
  .mini-nav a:active,
  .mini-nav a:focus,
  .mini-nav a:focus-visible {
    opacity: 0.5;
  }

  .mini-nav a {
    -webkit-tap-highlight-color: transparent;
  }

  .hpv-intro-header {
    max-width: 100%;
    text-align: left;
  }

  .hero-copy {
    padding: 22px 18px 20px;
  }

.tt-heading {
  gap: 8px;
  align-items: center;
  min-width: 0;
  width: 100%;
  }
  
  .tt-title {
	margin: 0;
	font-size: clamp(24px, 7vw, 34px);
	line-height: 1.05;
	white-space: normal;
	min-width: 0;
  }
  
  .tt-inline {
	display: block;
	line-height: 1.05;
	letter-spacing: 0.01em;
	white-space: normal;
  }
  
  .tt-logo {
	height: 32px;
	width: auto;
	flex: 0 0 auto;
  }

  .tt-hero {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .tt-hero-logos {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
  }

  .tt-logo-large {
    width: min(42vw, 140px);
    height: auto;
    transform: none;
  }

  .nice-logo-small {
    width: min(56vw, 190px);
    height: auto;
    object-fit: contain;
    object-position: center;
    margin-top: -30px;
 /*transform: translateY(-30px);   /* 🔥 løfter den opp */
  }

  .content-grid,
  .hpvistech-layout,
  .facts-wrap,
  .fact-table {
    grid-template-columns: 1fr;
  }

  .content-card,
  .facts-card {
    padding: 14px;
  }

  .hpvistech-main .intro {
    max-width: none;
  }

  .fou-program-box .profile {
    flex-direction: column;
    align-items: center;
    text-align: left;
  }

  .fou-program-box .profile img {
    width: 88px;
    height: 88px;
  }
  
  .mini-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center;
    gap: 6px 10px;
  }

  .mini-nav a {
    white-space: nowrap;

    /* 🔥 samme stil som desktop */
    color: rgba(255,255,255,0.85);
    border-bottom: 1px solid rgba(79,174,220,0.4);
    padding-bottom: 2px;

    opacity: 0.8; /* litt høyere på mobil */
   /* 🔥 fjerner blå trykk-effekt på iPhone */
    -webkit-tap-highlight-color: transparent;
  }

  /* 🔥 viktig: fjern “sticky hover” på mobil */
  .mini-nav a:hover {
    opacity: 0.8;
    border-bottom-color: rgba(79,174,220,0.4);
  }

}

@media (max-width: 950px) and (orientation: landscape) and (max-height: 500px) {
  .tt-hero {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tt-hero-logos {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
  }

  .tt-logo-large {
    width: 120px;
  }

  .nice-logo-small {
    width: 180px;
    margin-top: -20px;
  }
}

@media (max-width: 900px) {
  .map-side-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
      .map-side-wrap {
        flex-direction: column;
      }
    
      .map-side-wrap > .map-side {
        width: 100%;
        max-width: 100%;
      }
    }

@media (max-width: 980px) {
      .map-layout {
        grid-template-columns: 1fr;
      }

      #map {
        height: 560px;
      }
    }

@media (max-width: 760px) {
      #map {
        height: 460px;
      }

	  .map-panel-header h2 {
	    grid-template-columns: 1fr;
	    white-space: normal;
	  }


      .follow-controls-overlay {
        top: 8px;
        left: 8px;
        right: 8px;
        gap: 4px;
      }

      .follow-btn {
        padding: 6px 4px;
        font-size: 11px;
      }

      .leaflet-top {
        top: 48px;
      }
    }

@media (max-width: 980px) {
  main .page-block,
  main .hero-copy {
    height: auto;
    max-height: none;
    min-height: 0;
  }

  .hero-inner,
  .map-layout,
  .map-panel,
  .map-side-two-col,
  .map-side-two-col > .map-side {
    height: auto;
    overflow: visible;
  }

  .map-layout,
  .map-side-two-col {
    grid-template-columns: 1fr;
  }

  .map-frame {
    height: min(560px, calc(100vh - 220px));
    min-height: 320px;
  }

  .analysis-scroll,
  .can-table-scroll {
    max-height: 420px !important;
  }
  
  /* Mobil/iPhone: varselboks smalt under fart */
.map-panel-header h2 {
  grid-template-columns: auto auto !important;
  grid-template-rows: auto auto;
  gap: 4px 8px;
  align-items: center;
}

.header-title {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.live-speed.live-speed-dual {
  grid-column: 2 !important;
  grid-row: 1;
  justify-self: start;
}

/* Mobil: header-varsel – full bredde, én linje */
.event-alert.header-alert {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  justify-self: stretch;

  width: 100%;
  min-height: 34px;
  padding: 3px 6px;

  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: center;
  gap: 6px;

  font-size: 9px;
  line-height: 1.05;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Innhold: hindre linjebrudd */
.event-alert.header-alert small,
.event-alert.header-alert .event-values {
  display: inline !important;
  margin: 0;
  white-space: nowrap;
}

#cruise-alert .event-values {
  font-size: 16px !important;
  line-height: 1.05 !important;
}

#parking-alert .event-values {
  font-size: 18px !important;
  line-height: 1.05 !important;
}

}

@media (max-width: 760px) {
  main .container {
    width: calc(100vw - 24px);
  }

  main .hero-copy {
    padding: 10px;
  }

  .map-frame {
    height: min(460px, calc(100vh - 200px));
    min-height: 280px;
  }
}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  main,
  main .container,
  main .page-block,
  main .hero-copy,
  .hero-inner,
  .map-layout,
  .map-panel,
  .map-frame,
  #map,
  .map-side-two-col,
  .map-side-two-col > .map-side,
  .map-status-card,
  .map-info-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  main .container {
    width: calc(100% - 16px) !important;
    margin: 0 auto;
  }

  .map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px;
    overflow: visible;
  }

  .map-panel {
    justify-self: stretch !important;
  }

  .map-frame {
    height: min(430px, calc(100vh - 210px)) !important;
    min-height: 260px !important;
    overflow: hidden;
  }

  #map {
    height: 100% !important;
  }

  .live-speed.live-speed-dual {
    display: flex !important;
    align-items: flex-start !important;
    margin-left: 0 !important;
    padding-right: 0 !important;
    margin-top: 4px;
    font-size: 18px !important;
  }
  
  /* ===== MOBIL: mindre header-varsel ===== */
  .event-alert.header-alert {
    width: 140px;          /* ← viktigste */
    min-width: 0;
  
    padding: 4px 6px;
  
    font-size: 10px;
    line-height: 1.05;
  }
  /* Mobil: park litt mindre relativt */
  #cruise-alert .event-values {
    font-size: 11px !important;
  }
  
  #parking-alert {
    font-size: 0.55em;
  }

  #parking-alert .event-values {
    font-size: 1.1em !important;
  }

}
