/* Megademo · mustvedt.net/vilt/ · Workbench 1.3: blå, hvit, svart, oransje. Én pikselskrift. */
@font-face { font-family: "Workbench"; src: url(fonts/workbench.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --blaa: #0055AA;
  --blaa-lys: #3D8BE0;
  --hvit: #FFFFFF;
  --svart: #000020;
  --oransje: #FF8800;
  --lys: #C4DCFF;
  --roed: #FF3B1F;
  --skrift: "Workbench", ui-monospace, "Cascadia Mono", "Courier New", monospace;
  --linje: 48px;
  --kant: clamp(16px, 5vw, 72px);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--blaa); scroll-padding-top: calc(var(--linje) + 16px); scrollbar-color: var(--hvit) var(--blaa); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/24px var(--skrift); font-variation-settings: "SCAN" 14; color: var(--hvit); background: var(--blaa); caret-color: var(--oransje); cursor: url(pil.svg) 1 1, auto; overflow-x: clip; }
::selection { background: var(--oransje); color: var(--svart); }
::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track { background: var(--blaa); border-left: 2px solid var(--hvit); }
::-webkit-scrollbar-thumb { background: var(--hvit); border: 4px solid var(--blaa); border-left-width: 6px; }
:focus-visible { outline: 3px solid var(--oransje); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; font-variation-settings: inherit; }
a, button, label { cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hopp { position: absolute; left: 16px; top: -200px; z-index: 30; padding: 8px 16px; background: var(--hvit); color: var(--blaa); }
.hopp:focus { top: calc(var(--linje) + 8px); }

#skjerm { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: none; image-rendering: crisp-edges; image-rendering: pixelated; }
.gl #skjerm { display: block; }

/* ---------- Lenker og knapper: harde bytter, ingen overganger ---------- */
.lenke { color: var(--hvit); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.lenke:hover { background: var(--hvit); color: var(--blaa); text-decoration: none; }
.knapp { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; background: var(--oransje); color: var(--svart); border: 2px solid var(--hvit); box-shadow: inset 0 0 0 2px var(--svart); text-decoration: none; white-space: nowrap; }
.knapp:hover { background: var(--hvit); }
.knapp:active { background: var(--svart); color: var(--oransje); }
.knapp--to { background: var(--blaa); color: var(--hvit); box-shadow: none; }
.knapp--to:hover { background: var(--hvit); color: var(--blaa); }
.knapp--to[aria-pressed="true"] { background: var(--svart); color: var(--oransje); }
.knapp--liten { min-height: 40px; padding: 0 12px; }
.knapper { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.note { color: var(--lys); }

/* ---------- Skjermlinja ---------- */
.linje { position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: var(--linje); display: flex; align-items: center; gap: 12px; padding: 0 12px; background: var(--hvit); color: var(--blaa); border-bottom: 2px solid var(--svart); }
.linje :focus-visible { outline-color: var(--svart); outline-offset: 1px; }
.linje__merke { display: flex; align-items: center; gap: 8px; height: 100%; color: var(--blaa); text-decoration: none; white-space: nowrap; }
.linje__merke:hover { color: var(--svart); }
.linje__deler { display: none; height: 100%; }
.linje__deler a { display: flex; align-items: center; padding: 0 10px; color: var(--blaa); text-decoration: none; white-space: nowrap; }
.linje__deler a:hover { background: var(--svart); color: var(--hvit); }
.linje__deler a[aria-current="true"] { background: var(--blaa); color: var(--hvit); }
.linje__klokke { display: none; margin-left: auto; min-width: 22ch; text-align: right; color: var(--svart); white-space: nowrap; }
.linje__klokke.neste { background: var(--svart); color: var(--oransje); padding: 0 6px; }
.linje__lyd { display: flex; align-items: center; gap: 6px; min-height: 40px; margin-left: auto; padding: 0 10px; background: var(--hvit); color: var(--blaa); border: 2px solid var(--blaa); white-space: nowrap; }
.linje__lyd:hover { background: var(--blaa); color: var(--hvit); }
.linje__lyd[aria-pressed="true"] { background: var(--svart); color: var(--oransje); border-color: var(--svart); }
.linje__lyd .lyd__paa, .linje__lyd[aria-pressed="true"] .lyd__av { display: none; }
.linje__lyd[aria-pressed="true"] .lyd__paa { display: inline; }
.linje .knapp { border-color: var(--svart); box-shadow: none; }
.linje .knapp:hover { background: var(--svart); color: var(--oransje); }
.linje__merke span { display: none; }

/* ---------- Deler ---------- */
main { position: relative; z-index: 1; }
.del { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 24px; min-height: 100vh; min-height: 100svh; padding: 26vh 16px; }
.del--v { align-items: flex-start; }
.del--h { align-items: flex-end; }

/* ---------- Workbench-vindu ---------- */
.vindu { position: relative; width: 100%; max-width: 640px; background: var(--blaa); border: 2px solid var(--hvit); }
.vindu--bred { max-width: 912px; }
.vindu__bar { display: flex; align-items: stretch; min-height: 40px; background: var(--hvit); color: var(--blaa); border-bottom: 2px solid var(--hvit); }
.vindu__tittel { flex: 0 1 auto; padding: 6px 10px; font-size: 24px; line-height: 28px; font-variation-settings: "SCAN" 30; text-wrap: balance; }
.vindu__striper { flex: 1 1 16px; min-width: 16px; margin: 8px 6px; background: repeating-linear-gradient(to bottom, var(--blaa) 0 2px, var(--hvit) 2px 6px); }
.gadget { flex: 0 0 36px; }
.gadget--lukk { border-right: 2px solid var(--blaa); background: linear-gradient(var(--svart) 0 0) center / 6px 4px no-repeat, linear-gradient(var(--hvit) 0 0) center / 14px 10px no-repeat, linear-gradient(var(--blaa) 0 0) center / 20px 16px no-repeat; }
.gadget--dybde { border-left: 2px solid var(--blaa); background: linear-gradient(var(--hvit) 0 0) calc(50% + 4px) calc(50% + 3px) / 12px 8px no-repeat, linear-gradient(var(--blaa) 0 0) calc(50% + 4px) calc(50% + 3px) / 16px 12px no-repeat, linear-gradient(var(--svart) 0 0) calc(50% - 4px) calc(50% - 3px) / 16px 12px no-repeat; }
.vindu__kropp { padding: 16px; }
.vindu__fot { padding: 10px 16px; border-top: 2px solid var(--hvit); }
.vindu--straale::after { content: ""; position: absolute; inset: -6px; padding: 4px; pointer-events: none; background: conic-gradient(from var(--v, 40deg), transparent 0 290deg, var(--oransje) 290deg 340deg, var(--hvit) 340deg 360deg); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }

/* ---------- Del 0: intro ---------- */
.intro { display: grid; grid-template-rows: minmax(200px, 33svh) auto 96px; justify-content: stretch; gap: 0; min-height: 100svh; padding: var(--linje) 0 0; }
.intro__scene { position: relative; overflow: hidden; background: #000 repeating-linear-gradient(to bottom, #000 0 28px, #5A0A00 28px 32px, #B43C00 32px 36px, #FF8800 36px 40px, #FFD070 40px 44px, #FF8800 44px 48px, #B43C00 48px 52px, #5A0A00 52px 56px); display: grid; place-items: center; }
.gl .intro__scene { background: none; }
.intro__logo { font-size: clamp(48px, 15vw, 192px); line-height: 1; color: var(--hvit); text-shadow: 4px 4px 0 #000; font-variation-settings: "SCAN" 40; }
.gl .intro__logo { display: none; }
.intro__flate { display: grid; gap: 32px; align-content: start; padding: 24px 16px 32px; background: var(--blaa); border-top: 2px solid var(--hvit); border-bottom: 2px solid var(--hvit); }
.intro h1 { margin-bottom: 16px; font-size: 32px; line-height: 36px; font-variation-settings: "SCAN" 34; text-shadow: 2px 2px 0 var(--svart); text-wrap: balance; }
.lede { max-width: 62ch; font-size: 16px; line-height: 24px; }
.intro .note { max-width: 62ch; margin-top: 12px; }
.intro__rull { background: #000; }
.gl .intro__rull, .gl .slutt__rull { background: none; }
html:not(.gl) .intro__rull { display: none; }
html:not(.gl) .intro { grid-template-rows: minmax(200px, 33svh) auto; }

.skall { align-self: start; }
.skall__form label { display: block; margin-bottom: 8px; }
.skall__linje { display: flex; align-items: center; gap: 8px; }
.skall__prompt { color: var(--lys); }
input[type="text"], input[type="email"] { flex: 1 1 auto; min-width: 0; width: 100%; height: 48px; padding: 0 10px; background: var(--svart); color: var(--hvit); border: 2px solid var(--hvit); border-radius: 0; }
input::placeholder { color: #9DB8DE; opacity: 1; }
input:focus-visible { border-color: var(--oransje); }
.skall .knapp--liten { min-height: 48px; padding: 0 16px; }
.skall__ut { min-height: 96px; margin-top: 12px; }
.skall__ut p + p { margin-top: 2px; }
.skall__ut .knapp { margin-top: 12px; white-space: normal; padding-block: 8px; }

/* ---------- Del 1: kunder ---------- */
.lister { display: grid; padding: 0; }
.lister__liste { margin: 0; padding: 0; list-style: none; }
.lister__rad { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 6px 16px 6px 12px; background: none; color: var(--hvit); border: 0; text-align: left; }
.lister__rad:hover { background: var(--svart); }
.lister__rad[aria-pressed="true"] { background: var(--hvit); color: var(--blaa); }
.lister__navn { white-space: nowrap; }
.lister__type { color: var(--lys); text-align: right; white-space: nowrap; }
.lister__rad[aria-pressed="true"] .lister__type { color: var(--blaa); }
.lister__info { padding: 12px; border-block: 2px solid var(--hvit); }
.lister__info img, .lister__vis img { width: 100%; margin-bottom: 12px; border: 2px solid var(--hvit); }
.lister__info p, .lister__vis p { margin-bottom: 12px; max-width: 62ch; }
.js .lister__info { display: none; }
.js .lister__rad[aria-pressed="true"] + .lister__info { display: block; }
.lister__vis { display: none; }

/* ---------- Del 2: tracker ---------- */
.tracker { display: grid; gap: 24px; padding: 0 16px 8px; }
.tracker__steg { margin: 0; padding: 0; list-style: none; }
.tracker__steg li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; padding: 14px 0; border-bottom: 2px solid var(--blaa-lys); }
.tracker__steg li:last-child { border-bottom: 0; }
.tracker__nr { align-self: start; padding: 0 4px; }
.tracker__steg li.spiller .tracker__nr { background: var(--oransje); color: var(--svart); }
.tracker__steg h3 { font-size: 24px; line-height: 28px; font-variation-settings: "SCAN" 30; margin-bottom: 4px; }
.tracker__steg p { max-width: 62ch; }
.tracker__tid { grid-column: 2; justify-self: start; padding: 0 8px; background: var(--svart); color: var(--oransje); white-space: nowrap; }
.tracker__live { display: none; }

/* ---------- Del 3: pristavle ---------- */
.bryter { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 20px; padding: 0; border: 0; }
.bryter legend { width: 100%; margin-bottom: 8px; padding: 0; }
.bryter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bryter span { display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border: 2px dashed var(--hvit); }
.bryter label:hover span { background: var(--svart); }
.bryter input:checked + span { background: var(--hvit); color: var(--blaa); border-style: solid; }
.bryter input:focus-visible + span { outline: 3px solid var(--oransje); outline-offset: 3px; }
html:not(.js) .bryter { display: none; }
.stripe { display: grid; gap: 8px 16px; align-items: center; margin-bottom: 12px; padding: 28px 16px; color: var(--svart);
  background: linear-gradient(to bottom, #2A1000 0 4px, #552200 4px 8px, #803300 8px 12px, #AA5500 12px 16px, #D46E00 16px 20px, var(--oransje) 20px calc(100% - 20px), #D46E00 calc(100% - 20px) calc(100% - 16px), #AA5500 calc(100% - 16px) calc(100% - 12px), #803300 calc(100% - 12px) calc(100% - 8px), #552200 calc(100% - 8px) calc(100% - 4px), #2A1000 calc(100% - 4px) 100%); }
.stripe h3 { font-size: 24px; line-height: 28px; font-variation-settings: "SCAN" 30; }
.stripe__pris { white-space: nowrap; font-size: 24px; line-height: 1; }
.tall { display: inline-block; font-size: 64px; line-height: 64px; font-variation-settings: "SCAN" 0; font-variant-numeric: tabular-nums; }
.stripe .knapp { justify-self: start; background: var(--svart); color: var(--hvit); border-color: var(--svart); box-shadow: none; }
.stripe .knapp:hover { background: var(--hvit); color: var(--svart); }
.stripe :focus-visible { outline-color: var(--svart); }
.tavle__vilkaar p { max-width: 62ch; margin-top: 12px; }
.js .tavle[data-betaling="kjop"] [data-vis="abo"], .js .tavle[data-betaling="abo"] [data-vis="kjop"], .js .uten-js { display: none; }

/* ---------- Del 4: utkast ---------- */
.slutt { padding-bottom: 0; }
.guru { width: 100%; max-width: 640px; padding: 14px 20px; background: #000; color: var(--roed); border: 6px solid var(--roed); text-align: center; }
.guru.av { border-color: #000; }
.utkast { display: grid; gap: 16px; }
.felt { display: grid; gap: 6px; }
.utkast .knapp { justify-self: start; }
.utkast__ring { margin-top: 20px; padding-top: 16px; border-top: 2px solid var(--blaa-lys); }
.fot { display: grid; gap: 12px; width: 100%; max-width: 640px; padding: 16px; background: var(--svart); border: 2px solid var(--hvit); }
.fot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.fot .lenke { display: inline-flex; align-items: center; min-height: 32px; }
.slutt__rull { align-self: stretch; height: 96px; margin: 40px -16px 0; background: #000; }
html:not(.gl) .slutt__rull { display: none; }
html:not(.gl) .slutt { padding-bottom: 12vh; }

/* ---------- Større skjermer ---------- */
@media (min-width: 560px) {
  .linje__merke span { display: inline; }
  .tracker__steg li { grid-template-columns: auto minmax(0, 1fr) auto; }
  .tracker__tid { grid-column: 3; align-self: start; }
  .stripe { grid-template-columns: minmax(0, 1fr) auto; }
  .stripe .knapp { grid-column: 2; justify-self: end; }
  .stripe__pris { grid-column: 2; grid-row: 1; text-align: right; }
  .tall { min-width: 6ch; text-align: right; }
}
@media (min-width: 760px) {
  body { font-size: 20px; line-height: 28px; }
  .linje, .linje .knapp, .linje__lyd { font-size: 16px; line-height: 24px; }
  .linje__klokke { display: block; }
  .linje__lyd { margin-left: 0; }
  .del:not(.intro) { padding-inline: var(--kant); }
  .vindu__tittel { font-size: 32px; line-height: 36px; padding: 8px 12px; }
  .vindu__striper { margin: 12px 8px; }
  .vindu__kropp { padding: 24px; }
  .vindu__fot { padding: 12px 24px; }
  .lede { font-size: 24px; line-height: 32px; }
  .intro .note { font-size: 16px; line-height: 24px; }
  .intro { grid-template-rows: minmax(200px, 33svh) auto 132px; }
  .intro__flate { padding: 24px var(--kant) 28px; }
  .lister { grid-template-columns: minmax(0, 23rem) minmax(0, 1fr); padding: 0; }
  .lister__liste { border-right: 2px solid var(--hvit); }
  .lister__type { font-size: 16px; line-height: 20px; }
  .js .lister__rad[aria-pressed="true"] + .lister__info { display: none; }
  .js .lister__vis { display: block; padding: 16px; }
  .lister__vis p { font-size: 16px; line-height: 24px; }
  .tracker { padding: 0 24px 8px; }
  .stripe { padding: 28px 24px; }
  .tavle__vilkaar p, .utkast .note { font-size: 16px; line-height: 24px; }
  .guru { font-size: 20px; }
  .fot { font-size: 16px; line-height: 24px; }
  .slutt__rull { height: 132px; margin-inline: calc(var(--kant) * -1); }
}
@media (min-width: 1000px) {
  .linje__deler { display: flex; }
  .intro__flate { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; }
  .intro h1 { font-size: 48px; line-height: 52px; text-shadow: 3px 3px 0 var(--svart); }
  .skall { justify-self: end; }
  .tracker { grid-template-columns: minmax(0, 1fr) auto; }
  .tracker__live { display: block; align-self: start; margin-top: 14px; padding: 12px; background: var(--svart); border: 2px solid var(--hvit); font-size: 16px; line-height: 20px; }
  .tracker__live pre { margin: 6px 0; font: inherit; color: var(--lys); min-height: 160px; }
  .tracker__live pre b { font-weight: 400; background: var(--hvit); color: var(--svart); }
  .tracker__hode { color: var(--oransje); white-space: pre; }
  .tracker__merk { max-width: 16ch; color: var(--lys); }
  html:not(.js) .tracker__live { display: none; }
}
@media (pointer: coarse) {
  .linje__lyd, .knapp--liten { min-height: 44px; }
  .fot .lenke { min-height: 44px; }
}


/* Mobil: logo og rulletekst samlet i første skjermbilde */
@media (max-width: 759px) {
  .gl .intro { grid-template-rows: minmax(160px, 26svh) 96px auto; }
  .gl .intro__rull { grid-row: 2; }
  .gl .intro__flate { grid-row: 3; }
  .intro .note { display: none; }
}
