/* ---------------------------------------------------------------------------
   Skriftene: Geist og Geist Mono (SIL OFL), servert herfra (latin + latin-ext),
   så forsiden ikke henter noe fra andre domener.
   --------------------------------------------------------------------------- */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonter/geist-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonter/geist-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonter/geist-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonter/geist-mono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Siden står alene: ingen marg rundt, og bakgrunnen også bak overscroll. */
html {
  color-scheme: light dark;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: #fafafa;
}
@media (prefers-color-scheme: dark) {
  body {
    background: #09090b;
  }
}

/* ---------------------------------------------------------------------------
   mentaltraining.center (site/index.html): Blueprint-designet fra MT-backenden,
   portert fra prototypen (MtcForside) til ren HTML + CSS.
   - Prikkrutenett på 20 px fra sidens øvre venstre hjørne; bokser (.mtc-boks) står
     tett på prikkene med kryss på hjørnene. Alt bygges i hele ruter (linjehøyder, marger,
     mediestørrelser), så kantene treffer prikkene uten skript; calc-size er sikkerhetsnett.
   - Lys som grunn, mørk av seg selv (prefers-color-scheme).
   - Rolig bevegelse: bare transform og opacity, og ingenting når besøkeren ber om
     redusert bevegelse.
   Alle klassene har prefikset mtc- og finnes bare på denne siden.
   --------------------------------------------------------------------------- */

.mtc {
  --mtc-rute: 20px;
  --font-geist: 'Geist';
  --font-geist-mono: 'Geist Mono';
  --mtc-bg: #fafafa;
  --mtc-kort: #ffffff;
  --mtc-linje: #e4e4e7;
  --mtc-prikk: #d4d4d8;
  --mtc-blekk: #09090b;
  --mtc-dempet: #71717a;
  --mtc-svak: #a1a1aa;
  --mtc-aksent: #0284c7;
  --mtc-aksent-lys: #38bdf8;
  --mtc-varm: #f59e0b;
  --mtc-kryss: rgb(113 113 122 / 0.75);
  --mtc-flis: #0c0c0f;
  --mtc-aksent-kant: rgb(2 132 199 / 0.45);
  --mtc-aksent-flate: linear-gradient(180deg, #ffffff, #f3f9fd);
  --mtc-aksent-glod: 0 40px 120px -40px rgb(56 189 248 / 0.45);

  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  color: var(--mtc-blekk);
  background-color: var(--mtc-bg);
  background-image: radial-gradient(circle, var(--mtc-prikk) 1px, transparent 1.5px);
  background-size: var(--mtc-rute) var(--mtc-rute);
  background-position: calc(var(--mtc-rute) / -2) calc(var(--mtc-rute) / -2);
  font-family: var(--font-geist), ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  text-decoration: none;
}

@media (prefers-color-scheme: dark) {
  .mtc {
    --mtc-bg: #09090b;
    --mtc-kort: #0c0c0f;
    --mtc-linje: rgb(255 255 255 / 0.12);
    --mtc-prikk: rgb(255 255 255 / 0.13);
    --mtc-blekk: #fafafa;
    --mtc-dempet: #a1a1aa;
    --mtc-svak: #71717a;
    --mtc-aksent: #38bdf8;
    --mtc-varm: #fbbf24;
    --mtc-kryss: rgb(161 161 170 / 0.9);
    --mtc-flis: #141418;
    --mtc-aksent-kant: rgb(56 189 248 / 0.38);
    --mtc-aksent-flate: linear-gradient(180deg, #0b1016, #0a0c10);
    --mtc-aksent-glod: 0 40px 140px -40px rgb(56 189 248 / 0.28);
  }
}

.mtc *,
.mtc *::before,
.mtc *::after {
  box-sizing: border-box;
}
.mtc a {
  color: inherit;
  text-decoration: none;
}
/* Nullstillingen har null spesifisitet (:where), så klassene under (.mtc-h1, .mtc-ingress osv.) får beholde margene. */
:where(.mtc) :where(ul, ol, dl, dd, p, h1, h2, h3) {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Det myke lyset øverst, som glødet bak appens forside. */
.mtc-glod-topp {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto 0;
  height: 900px;
  pointer-events: none;
  background:
    radial-gradient(40% 50% at 75% 30%, rgb(56 189 248 / 0.16), transparent 70%),
    radial-gradient(30% 40% at 15% 10%, rgb(245 158 11 / 0.07), transparent 70%);
}

/* Rammen: bredde og venstrekant på prikkene, som .bp-container. */
.mtc-ramme {
  --mtc-maks: 1180px;
  /* Reserve for nettlesere uten CSS round() (Chrome/Edge før 125, Firefox før 118): samme ramme, bare ikke låst til prikkene. */
  width: min(var(--mtc-maks), calc(100% - 2 * var(--mtc-rute)));
  margin-left: max(var(--mtc-rute), calc((100% - min(var(--mtc-maks), 100% - 2 * var(--mtc-rute))) / 2));
  width: min(var(--mtc-maks), round(down, calc(100% - 2 * var(--mtc-rute)), var(--mtc-rute)));
  margin-left: max(var(--mtc-rute), round(down, calc((100% - min(var(--mtc-maks), 100% - 2 * var(--mtc-rute))) / 2), var(--mtc-rute)));
  margin-right: 0;
}

/* ------------------------------ Boksene ------------------------------ */
/* Kanten er 1 px tegnet MIDT PÅ boksens ytterkant (½ px innenfor + ½ px utenfor, med skygger i stedet for
   border), så den ligger nøyaktig over prikkene og ikke legger til høyde, som .bp-box i MT-backenden. */
.mtc-boks {
  --mtc-boks-linje: var(--mtc-linje);
  position: relative;
  box-sizing: border-box;
  border: 0;
  background-color: var(--mtc-kort);
  box-shadow:
    inset 0 0 0 0.5px var(--mtc-boks-linje),
    0 0 0 0.5px var(--mtc-boks-linje);
}
/* Sikkerhetsnettet (Chrome/Edge): en boks som likevel blir litt høyere enn hele ruter, rundes opp til neste rute.
   I et eget lag, så en fast høyde på boksen vinner. */
@supports (height: calc-size(auto, size)) {
  @layer mtc-nett {
    .mtc-boks {
      height: calc-size(auto, round(up, size, var(--mtc-rute)));
    }
  }
}
/* Fire kryss (13 px) sentrert på hjørneprikkene, tegnet med gradienter i ett pseudo-element. */
.mtc-boks::after {
  content: '';
  position: absolute;
  inset: -7px;
  pointer-events: none;
  background:
    linear-gradient(var(--mtc-kryss), var(--mtc-kryss)) left 0.5px top 6.5px / 13px 1px no-repeat,
    linear-gradient(var(--mtc-kryss), var(--mtc-kryss)) left 6.5px top 0.5px / 1px 13px no-repeat,
    linear-gradient(var(--mtc-kryss), var(--mtc-kryss)) right 0.5px top 6.5px / 13px 1px no-repeat,
    linear-gradient(var(--mtc-kryss), var(--mtc-kryss)) right 6.5px top 0.5px / 1px 13px no-repeat,
    linear-gradient(var(--mtc-kryss), var(--mtc-kryss)) left 0.5px bottom 6.5px / 13px 1px no-repeat,
    linear-gradient(var(--mtc-kryss), var(--mtc-kryss)) left 6.5px bottom 0.5px / 1px 13px no-repeat,
    linear-gradient(var(--mtc-kryss), var(--mtc-kryss)) right 0.5px bottom 6.5px / 13px 1px no-repeat,
    linear-gradient(var(--mtc-kryss), var(--mtc-kryss)) right 6.5px bottom 0.5px / 1px 13px no-repeat;
}
.mtc-boks-aksent {
  --mtc-boks-linje: var(--mtc-aksent-kant);
  background-image: var(--mtc-aksent-flate);
  box-shadow:
    inset 0 0 0 0.5px var(--mtc-boks-linje),
    0 0 0 0.5px var(--mtc-boks-linje),
    var(--mtc-aksent-glod);
}

/* ------------------------------ Tekst ------------------------------ */
.mtc-etikett {
  font-family: var(--font-geist-mono), ui-monospace, monospace;
  font-size: 11px;
  line-height: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mtc-dempet);
}
.mtc-etikett-strek {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.mtc-etikett-strek::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--mtc-aksent);
}
.mtc-h1 {
  margin-top: 20px;
  font-size: clamp(44px, 6.2vw, 80px);
  /* Hele ruter: linjehøyden rundes opp til nærmeste 20 px. */
  line-height: round(up, 1em, var(--mtc-rute));
  font-weight: 600;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.mtc-uthevet {
  background: linear-gradient(100deg, var(--mtc-aksent) 10%, var(--mtc-aksent-lys) 60%, #7dd3fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.mtc-h2 {
  margin-top: 20px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.mtc-h3 {
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.mtc-ingress {
  margin-top: 30px;
  max-width: 34em;
  font-size: 18px;
  line-height: 30px;
  color: var(--mtc-dempet);
  text-wrap: pretty;
}
.mtc-tekst {
  margin-top: 20px;
  max-width: 38em;
  font-size: 16px;
  line-height: 26px;
  color: var(--mtc-dempet);
  text-wrap: pretty;
}
.mtc-tekst-liten {
  margin-top: 4px;
  font-size: 14px;
  line-height: 22px;
}

/* ------------------------------ Toppen ------------------------------ */
.mtc-topp {
  height: 60px;
  border-bottom: 1px solid var(--mtc-linje);
  background: color-mix(in srgb, var(--mtc-bg) 82%, transparent);
  backdrop-filter: blur(8px);
}
.mtc-topp-indre {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.mtc-merke {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.mtc-merke-logo {
  width: 28px;
  height: 28px;
}
.mtc-merke-navn {
  display: block;
  font-size: 15px;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.mtc-merke-under {
  display: block;
  font-size: 12px;
  line-height: 16px;
  color: var(--mtc-dempet);
}
.mtc-topp-hoyre {
  display: flex;
  align-items: center;
  gap: 20px;
}
.mtc-topp-lenke {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--mtc-dempet);
  transition: color 0.2s;
}
.mtc-topp-lenke:hover {
  color: var(--mtc-blekk);
}
.mtc-pil {
  width: 14px;
  height: 14px;
  flex: none;
  transition: transform 0.25s ease;
}
a:hover > .mtc-pil {
  transform: translateX(3px);
}

/* Chipsene (status). */
.mtc-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--mtc-linje);
  background: var(--mtc-kort);
  font-family: var(--font-geist-mono), ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mtc-dempet);
  white-space: nowrap;
}
.mtc-chip-live {
  color: var(--mtc-blekk);
}
.mtc-chip-test {
  border-color: color-mix(in srgb, var(--mtc-aksent) 45%, transparent);
  color: var(--mtc-aksent);
}
.mtc-chip-bygges {
  border-color: color-mix(in srgb, var(--mtc-varm) 50%, transparent);
  color: color-mix(in srgb, var(--mtc-varm) 75%, var(--mtc-blekk));
}
.mtc-prikk {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mtc-aksent-lys);
}
.mtc-prikk::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--mtc-aksent-lys);
  animation: mtc-puls 3s ease-out infinite;
}
@keyframes mtc-puls {
  0% { transform: scale(1); opacity: 0.7; }
  70%, 100% { transform: scale(3.2); opacity: 0; }
}

/* ------------------------------ Helten ------------------------------ */
.mtc-helt {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  padding-top: 80px;
  padding-bottom: 40px;
}
@media (min-width: 1000px) {
  .mtc-helt {
    grid-template-columns: minmax(0, 1fr) 580px;
    align-items: center;
    gap: 40px;
    padding-top: 100px;
  }
}
.mtc-helt-tekst {
  animation: mtc-inn 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.mtc-knapper {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}
.mtc-knapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--mtc-linje);
  background: var(--mtc-kort);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.mtc-knapp:hover {
  border-color: var(--mtc-dempet);
}
.mtc-knapp-hoved {
  border-color: var(--mtc-blekk);
  background: var(--mtc-blekk);
  color: var(--mtc-bg) !important;
}
.mtc-knapp-hoved:hover {
  border-color: var(--mtc-blekk);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--mtc-aksent-lys) 35%, transparent);
}
.mtc-knapp:focus-visible,
.mtc-topp-lenke:focus-visible,
.mtc-merke:focus-visible,
.mtc-bunn-lenke:focus-visible {
  outline: 2px solid var(--mtc-aksent);
  outline-offset: 3px;
}
.mtc-merker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 40px;
}
.mtc-merker li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.mtc-merker li::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--mtc-aksent-lys);
}

/* Målestreken over maskinen. */
.mtc-helt-maskin {
  position: relative;
  animation: mtc-inn 1.2s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.mtc-mal {
  position: relative;
  display: flex;
  justify-content: center;
  height: 20px;
  margin-bottom: 20px;
}
.mtc-mal::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  height: 9px;
  border-left: 1px solid var(--mtc-svak);
  border-right: 1px solid var(--mtc-svak);
  background: linear-gradient(var(--mtc-svak), var(--mtc-svak)) center / 100% 1px no-repeat;
  transform: translateY(-4px);
}
.mtc-mal .mtc-etikett {
  position: relative;
  padding: 0 10px;
  background: var(--mtc-bg);
  line-height: 20px;
}

/* ------------------------------ Pustemaskinen ------------------------------ */
.mtc-maskin-topp {
  display: flex;
  height: 40px;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--mtc-linje);
}
.mtc-kjorer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mtc-aksent);
}
.mtc-maskin-flate {
  padding: 20px;
}
.mtc-maskin-svg {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  margin: 0 auto;
  overflow: visible;
}
.mtc-pust-1 { stop-color: #e0f2fe; stop-opacity: 1; }
.mtc-pust-2 { stop-color: #7dd3fc; stop-opacity: 0.55; }
.mtc-pust-3 { stop-color: #38bdf8; stop-opacity: 0.15; }
@media (prefers-color-scheme: dark) {
  .mtc-pust-1 { stop-color: #61c4fa; stop-opacity: 0.55; }
  .mtc-pust-2 { stop-color: #0ea5e9; stop-opacity: 0.22; }
  .mtc-pust-3 { stop-color: #0ea5e9; stop-opacity: 0.04; }
}
.mtc-skisse line,
.mtc-skisse circle {
  fill: none;
  stroke: var(--mtc-linje);
  stroke-width: 1;
}
.mtc-skisse .mtc-stiplet {
  stroke-dasharray: 2 6;
  stroke: var(--mtc-svak);
  opacity: 0.6;
}
.mtc-skala {
  stroke: var(--mtc-svak);
  stroke-width: 1;
  opacity: 0.55;
  transform-box: view-box;
  transform-origin: 240px 240px;
  animation: mtc-snurr 240s linear infinite;
}
@keyframes mtc-snurr {
  to { transform: rotate(360deg); }
}
.mtc-ring rect {
  fill: var(--mtc-t);
}
/* Logoens fargeforløp: lys himmelblå øverst, dyp marine nederst (fem nivåer etter høyden i ringen). */
.mtc-t0 { --mtc-t: #7dd3fc; }
.mtc-t1 { --mtc-t: #38bdf8; }
.mtc-t2 { --mtc-t: #0ea5e9; }
.mtc-t3 { --mtc-t: #0369a1; }
.mtc-t4 { --mtc-t: #0c3a5c; }
@media (prefers-color-scheme: dark) {
  .mtc-t3 { --mtc-t: #0284c7; }
  .mtc-t4 { --mtc-t: #075985; }
}
.mtc-trigram {
  animation: mtc-monter 1.1s calc(0.35s + var(--i) * 0.14s) cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes mtc-monter {
  from { transform: translateY(-36px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.mtc-ring .mtc-trigram-tegning rect {
  fill: none;
  stroke: var(--mtc-varm);
  stroke-width: 1.2;
  stroke-dasharray: 4 3;
}
.mtc-trigram-tegning {
  animation:
    mtc-monter 1.1s calc(0.35s + var(--i) * 0.14s) cubic-bezier(0.2, 0.8, 0.2, 1) both,
    mtc-blink 4s 2s ease-in-out infinite;
}
@keyframes mtc-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.mtc-paskrift polyline {
  fill: none;
  stroke: var(--mtc-varm);
  stroke-width: 1;
}
.mtc-paskrift circle {
  fill: var(--mtc-varm);
}
.mtc-paskrift text {
  font-family: var(--font-geist-mono), ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: color-mix(in srgb, var(--mtc-varm) 75%, var(--mtc-blekk));
}
.mtc-paskrift {
  animation: mtc-fram 1s 1.8s ease both;
}
@keyframes mtc-fram {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Pusten: 10 s per runde, 4 s inn (40 %) og 6 s ut. */
.mtc-pust,
.mtc-pust-kant,
.mtc-glod {
  transform-box: view-box;
  transform-origin: 240px 240px;
  animation: mtc-pust 10s ease-in-out infinite;
}
.mtc-pust-kant {
  fill: none;
  stroke: var(--mtc-aksent-lys);
  stroke-width: 1.5;
  opacity: 0.8;
}
.mtc-glod {
  fill: var(--mtc-aksent-lys);
  opacity: 0.12;
  animation-name: mtc-pust-glod;
}
@keyframes mtc-pust {
  0% { transform: scale(0.52); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  40% { transform: scale(1); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  100% { transform: scale(0.52); }
}
@keyframes mtc-pust-glod {
  0% { transform: scale(0.6); opacity: 0.06; animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  40% { transform: scale(1.18); opacity: 0.16; animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  100% { transform: scale(0.6); opacity: 0.06; }
}
.mtc-pust-tekst text {
  text-anchor: middle;
  font-family: var(--font-geist), ui-sans-serif, system-ui, sans-serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  fill: var(--mtc-blekk);
}
.mtc-tekst-inn { animation: mtc-tekst-inn 10s linear infinite; }
.mtc-tekst-ut { animation: mtc-tekst-ut 10s linear infinite; }
.mtc-tekst-rolig { opacity: 0; }
@keyframes mtc-tekst-inn {
  0%, 34% { opacity: 1; }
  40%, 96% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes mtc-tekst-ut {
  0%, 34% { opacity: 0; }
  40%, 94% { opacity: 1; }
  100% { opacity: 0; }
}

/* Sporet under sirkelen. */
.mtc-spor {
  position: relative;
  display: grid;
  grid-template-columns: 4fr 6fr;
  height: 40px;
  margin: 0 20px;
  border: 1px solid var(--mtc-linje);
}
.mtc-spor > div:not(.mtc-spor-lop) {
  display: flex;
  align-items: center;
  padding: 0 10px;
}
.mtc-spor-inn {
  border-right: 1px solid var(--mtc-linje);
  background: color-mix(in srgb, var(--mtc-aksent-lys) 10%, transparent);
}
.mtc-spor-ut {
  justify-content: flex-end;
  background: repeating-linear-gradient(90deg, transparent 0 19px, color-mix(in srgb, var(--mtc-linje) 80%, transparent) 19px 20px);
}
.mtc-spor-lop {
  position: absolute;
  inset: -1px 0;
  pointer-events: none;
  animation: mtc-lop 10s linear infinite;
}
.mtc-spor-markor {
  position: absolute;
  left: 0;
  top: -4px;
  bottom: -4px;
  width: 2px;
  margin-left: -1px;
  background: var(--mtc-aksent);
  box-shadow: 0 0 12px var(--mtc-aksent-lys);
}
@keyframes mtc-lop {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}

.mtc-avlesning {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 20px;
  border-top: 1px solid var(--mtc-linje);
}
.mtc-avlesning > div {
  padding: 10px 20px;
}
.mtc-avlesning > div + div {
  border-left: 1px solid var(--mtc-linje);
}
.mtc-avlesning dd {
  font-family: var(--font-geist-mono), ui-monospace, monospace;
  font-size: 15px;
  line-height: 20px;
  margin-bottom: 10px;
}

/* ------------------------------ Spesifikasjonen ------------------------------ */
.mtc-seksjon-tett {
  padding-top: 40px;
}
.mtc-spek {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 760px) {
  .mtc-spek {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.mtc-spek > div {
  padding: 10px 20px 10px;
  border-left: 1px solid var(--mtc-linje);
  margin-left: -1px;
  border-top: 1px solid var(--mtc-linje);
  margin-top: -1px;
}
.mtc-spek dd {
  font-size: 16px;
  line-height: 20px;
  font-weight: 500;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

/* ------------------------------ Seksjonene ------------------------------ */
.mtc-seksjon {
  padding-top: 140px;
}
.mtc-seksjon-hode {
  margin-bottom: 40px;
}

/* Byggeplassen. */
.mtc-moduler {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
@media (min-width: 700px) {
  .mtc-moduler {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1000px) {
  .mtc-moduler {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.mtc-modul {
  display: flex;
  flex-direction: column;
  padding: 0 0 0;
  transition: border-color 0.3s, transform 0.3s;
}
.mtc-modul:hover {
  border-color: color-mix(in srgb, var(--mtc-aksent) 50%, var(--mtc-linje));
}
.mtc-modul-topp {
  display: flex;
  height: 40px;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px dashed var(--mtc-linje);
}
.mtc-modul-kropp {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px;
  flex: 1;
}
.mtc-modul-flis {
  display: grid;
  flex: none;
  width: 60px;
  height: 60px;
  place-items: center;
  background: radial-gradient(circle at 50% 35%, #1b2a36, var(--mtc-flis) 75%);
  border: 1px solid rgb(255 255 255 / 0.06);
}
.mtc-modul-ikon {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.er-under-bygging .mtc-modul-flis {
  background: var(--mtc-flis);
}
.er-under-bygging .mtc-modul-ikon {
  opacity: 0.55;
  filter: grayscale(0.6);
}

/* Måleren nederst i hver modul: hel og rolig i test, stripet (anleggsbånd) under bygging. */
.mtc-maler {
  position: relative;
  display: block;
  height: 6px;
  overflow: hidden;
  border-top: 1px solid var(--mtc-linje);
}
.er-i-test .mtc-maler {
  background: linear-gradient(90deg, var(--mtc-aksent), var(--mtc-aksent-lys));
}
.er-i-test .mtc-maler::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.7), transparent);
  animation: mtc-glimt 6s ease-in-out infinite;
}
@keyframes mtc-glimt {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(260%); }
}
.er-under-bygging .mtc-maler::before {
  content: '';
  position: absolute;
  inset: 0 -20px 0 0;
  background: repeating-linear-gradient(-45deg, var(--mtc-varm) 0 6px, transparent 6px 12px);
  opacity: 0.65;
  animation: mtc-band 3s linear infinite;
}
@keyframes mtc-band {
  to { transform: translateX(-16.97px); }
}

/* Slik virker det. */
.mtc-steg {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  counter-reset: steg;
}
@media (min-width: 900px) {
  .mtc-steg {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  /* Koblingen mellom stegene: en stiplet linje gjennom mellomrommet. */
  .mtc-steg-boks + .mtc-steg-boks::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 39px;
    width: 20px;
    border-top: 1px dashed var(--mtc-aksent);
  }
}
.mtc-steg-boks {
  padding: 20px;
}
.mtc-steg-nr {
  display: inline-grid;
  width: 40px;
  height: 40px;
  margin-bottom: 20px;
  place-items: center;
  border: 1px solid var(--mtc-linje);
  border-radius: 50%;
  font-family: var(--font-geist-mono), ui-monospace, monospace;
  font-size: 12px;
  color: var(--mtc-aksent);
}

/* Stille vann. */
.mtc-vann {
  margin-top: 20px;
  height: 320px;
}
/* Klippingen ligger på en indre flate, så hjørnekryssene (::after på boksen) ikke klippes bort. */
.mtc-vann-flate {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.mtc-vann-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.mtc-himmel-1 { stop-color: #f0f9ff; }
.mtc-himmel-2 { stop-color: #ffffff; }
.mtc-sjo-1 { stop-color: #e0f2fe; }
.mtc-sjo-2 { stop-color: #f8fafc; }
.mtc-sol-1 { stop-color: #fbbf24; stop-opacity: 0.35; }
.mtc-sol-2 { stop-color: #fbbf24; stop-opacity: 0; }
.mtc-sol { fill: #fcd34d; opacity: 0.9; }
@media (prefers-color-scheme: dark) {
  .mtc-himmel-1 { stop-color: #0b1220; }
  .mtc-himmel-2 { stop-color: #0d1824; }
  .mtc-sjo-1 { stop-color: #0a1724; }
  .mtc-sjo-2 { stop-color: #0c0c0f; }
  .mtc-sol-1 { stop-color: #fbbf24; stop-opacity: 0.22; }
  .mtc-sol { fill: #fbbf24; opacity: 0.75; }
}
.mtc-horisont {
  stroke: var(--mtc-aksent);
  stroke-width: 1;
  opacity: 0.5;
}
.mtc-sol-glod {
  transform-box: fill-box;
  transform-origin: center;
  animation: mtc-pust 10s ease-in-out infinite;
}
.mtc-krusning {
  stroke: var(--mtc-aksent-lys);
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.25;
  animation: mtc-krusning 7s calc(var(--i) * -0.9s) ease-in-out infinite;
}
@keyframes mtc-krusning {
  0%, 100% { opacity: 0.12; transform: translateX(0); }
  50% { opacity: 0.5; transform: translateX(14px); }
}
.mtc-vann-tekst {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 50px;
}
.mtc-vann-tittel {
  max-width: 14em;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.mtc-vann-etikett {
  position: absolute;
  top: 10px;
  left: 20px;
}

/* Folkene. */
.mtc-folk {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
@media (min-width: 800px) {
  .mtc-folk {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.mtc-person {
  display: flex;
  gap: 20px;
  padding: 20px;
}
.mtc-monogram {
  display: grid;
  flex: none;
  width: 80px;
  height: 80px;
  place-items: center;
  background:
    linear-gradient(var(--mtc-linje), var(--mtc-linje)) center / 1px 100% no-repeat,
    linear-gradient(var(--mtc-linje), var(--mtc-linje)) center / 100% 1px no-repeat,
    var(--mtc-bg);
  border: 1px solid var(--mtc-linje);
  font-family: var(--font-geist-mono), ui-monospace, monospace;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--mtc-aksent);
}
/* Initialene står på en liten plate over trådkorset, så strekene ikke går gjennom bokstavene. */
.mtc-monogram-tekst {
  position: relative;
  padding: 2px 6px;
  background: var(--mtc-bg);
}
.mtc-person .mtc-h3 {
  margin-top: 0;
}

/* Avslutningen. */
.mtc-slutt {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  padding: 40px 20px;
}
@media (min-width: 800px) {
  .mtc-slutt {
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: center;
    padding: 60px 40px;
  }
}
.mtc-slutt-pust {
  position: relative;
  width: 200px;
  height: 200px;
}
.mtc-slutt-pust span {
  position: absolute;
  inset: 0;
  border: 1px solid var(--mtc-aksent-lys);
  border-radius: 50%;
  opacity: 0;
  animation: mtc-ring 9s ease-out infinite;
}
.mtc-slutt-pust span:nth-child(2) { animation-delay: 3s; }
.mtc-slutt-pust span:nth-child(3) { animation-delay: 6s; }
.mtc-slutt-pust::after {
  content: '';
  position: absolute;
  inset: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #e0f2fe, var(--mtc-aksent-lys) 60%, var(--mtc-aksent));
  box-shadow: 0 0 40px rgb(56 189 248 / 0.45);
}
@keyframes mtc-ring {
  0% { transform: scale(0.2); opacity: 0; }
  15% { opacity: 0.8; }
  100% { transform: scale(1); opacity: 0; }
}

/* Bunnen. */
.mtc-bunn {
  margin-top: 140px;
  border-top: 1px solid var(--mtc-linje);
  background: var(--mtc-kort);
}
.mtc-bunn-indre {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 40px;
  align-items: center;
  justify-content: space-between;
  padding: 30px 0 30px;
}
.mtc-bunn-lenke {
  transition: color 0.2s;
}
.mtc-bunn-lenke:hover {
  color: var(--mtc-aksent);
}

/* Inngangen: rolig opp på plass. */
@keyframes mtc-inn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------ Mobil ------------------------------ */
@media (max-width: 640px) {
  .mtc-topp-lenke {
    display: none;
  }
  .mtc-helt {
    padding-top: 60px;
  }
  .mtc-ingress {
    font-size: 17px;
    line-height: 28px;
  }
  .mtc-seksjon {
    padding-top: 100px;
  }
  .mtc-maskin-flate {
    padding: 10px;
  }
  .mtc-avlesning > div {
    padding: 10px 10px 0;
  }
  .mtc-avlesning dd {
    font-size: 13px;
  }
  .mtc-vann {
    height: 380px;
  }
  .mtc-person {
    flex-direction: column;
  }
  .mtc-knapp {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* ------------------------------ Redusert bevegelse ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .mtc *,
  .mtc *::before,
  .mtc *::after {
    animation: none !important;
    transition: none !important;
  }
  .mtc-pust,
  .mtc-pust-kant,
  .mtc-glod {
    transform: scale(0.8);
  }
  .mtc-tekst-inn,
  .mtc-tekst-ut {
    opacity: 0;
  }
  .mtc-tekst-rolig {
    opacity: 1;
  }
  .mtc-spor-lop {
    display: none;
  }
}
