/* parentthings.no – oppsettet for sidene. Bygger på tokens.css og parent-things.css (designsystemet, design/parent-things).
   Ingen nye farger, radier eller skygger her: bare plassering, og appens egne farger inne i .pt-app. */

@font-face { font-family: "Pixelify Sans"; src: url(/fonter/PixelifySans-Medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Pixelify Sans"; src: url(/fonter/PixelifySans-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }

/* Arial Rounded MT Bold finnes på iPhone, iPad og Mac. Den lastes ikke ned (webfontlisens), andre får Arial. */
:root { --side: 48px; color-scheme: light; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
img { max-width: 100%; }

.w { box-sizing: border-box; max-width: var(--container); margin-inline: auto;
  padding-left: max(var(--side), env(safe-area-inset-left, 0px)); padding-right: max(var(--side), env(safe-area-inset-right, 0px)); }
.pt-topp, .pt-bunn { padding-inline: 0; margin-inline: 0; }
.pt-topp { min-height: 36px; }
/* Logoen i toppen holder av plass til hele navnet, så menyen til høyre står stille når t-ene åpner seg. Hele navnet er 6,05 × --lh bredt. */
.pt-topp .pt-logo { --lh: 28px; min-width: calc(var(--lh) * 6.05); flex: none; }
/* Logoen som lenke åpner seg med klassen .apen (js/logo-lenke.js), de samme reglene som [aria-expanded="true"] i parent-things.css */
.pt-logo.apen .pt-logo__del--v { width: calc(var(--lh) * 2.8388); }
.pt-logo.apen .pt-logo__del--h { width: calc(var(--lh) * 2.8767); }
.pt-logo.apen .pt-t { margin-inline: 0; }
/* Hjertene på knappen går gjennom hverandre og tilbake når pekeren er over (Motion: Hjertene) */
@media (hover: hover) {
  .pt-btn:hover .pt-prikker i:first-child { animation: pt-hjerte-v 1.3s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
  .pt-btn:hover .pt-prikker i:last-child { animation: pt-hjerte-h 1.3s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
}
/* Undersidene: hårlinjen går over hele bredden (som .pt-topp--linje, men utenfor .w) */
.topplinje { border-bottom: 1px solid var(--linje); background: var(--grunn); }
.band { padding-block: var(--space-12); }
.band--varm { background: var(--grunn-varm); }
.mt1 { margin-top: var(--space-1); } .mt2 { margin-top: var(--space-2); } .mt3 { margin-top: var(--space-3); } .mt4 { margin-top: var(--space-4); } .mt6 { margin-top: var(--space-6); }

/* Scenene: tekst til venstre, telefonen til høyre */
.scene__grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-8); align-items: end; padding-top: var(--space-3); padding-bottom: 16px; }
.scene__tekst { align-self: center; padding-bottom: var(--space-8); min-width: 0; }
.scene__tekst .pt-h1 { font-size: clamp(40px, 5.2vw, 60px); max-width: 11em; }
.art { position: relative; width: 300px; height: 560px; justify-self: end; }
.art .pt-telefon { position: absolute; left: 25px; top: 0; }
.art .pt-slagskygge { left: 40px; top: 490px; width: 220px; height: 90px; }
.kveld .scene__grid { padding-top: var(--space-8); }
.kveld .pt-kjegle { left: calc(50% + min(600px, 50%) - var(--side) - 150px - 23%); width: 46%; }
.kveld .pt-lyspytt { left: -30px; top: 452px; width: 360px; height: 90px; }
.kveld .pt-slagskygge { height: 60px; --retning: 0deg; }

/* Appens skjermer og bokser (dramatisering til ekte skjermbilder finnes) */
.pt-app__bg { position: absolute; inset: 0; z-index: -1; background: url(/bilder/app/borg.png) center top / 230px auto no-repeat; image-rendering: pixelated; }
.skjerm { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 0; }
.skjerm__kol { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 34px; flex: 1; }
.skjerm__kol--kveld { padding-top: 70px; gap: 12px; }
.skjerm img.skjerm__logo { width: 111px; height: 87px; }
.skjerm canvas { width: 153px; height: 153px; margin: -18px 0 -6px; cursor: pointer; }
.skjerm__kol--kveld canvas { margin: 0; }
.skjerm__liten { font-size: 13px; color: #E8ECFF; }
.skjerm .pt-app__bar { width: 150px; }
.skjerm__kister { display: flex; gap: 14px; margin-top: 8px; }
.skjerm__kister img { width: 32px; height: 22px; }
.skjerm__faner { align-self: stretch; display: flex; justify-content: space-around; align-items: center; height: 44px; background: #121736; border-top: 2px solid #2B356C; }
.skjerm__faner span { display: grid; place-items: center; width: 36px; height: 30px; }
.skjerm__faner span.pa { background: #232C5E; box-shadow: 0 2px 0 #F2C230; }
.skjerm__faner img { width: 18px; height: 16px; }
.flamme-v { left: 40px; top: 278px; } .flamme-h { left: 184px; top: 278px; animation-delay: -.25s !important; }

.kort { list-style: none; margin: var(--space-6) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.kort figure { margin: 0; }
/* Boksene er tegnet i 360 × 240 (samme 3:2 som bildefeltet) og skaleres i sin helhet til feltets bredde (--s settes i side.js).
   Da fyller borgen, figuren og skiltene feltet likt på mobil, nettbrett og stor skjerm. */
.kort .pt-app { position: absolute; left: 0; top: 0; width: 360px; height: 240px; transform-origin: 0 0; transform: scale(var(--s, 1)); }
.kort .pt-app__bg { background-size: 460px auto; background-position: center -372px; }
.kort canvas { cursor: pointer; }
.kort__tittel { margin-top: var(--space-3); display: flex; align-items: baseline; gap: 10px; font: 700 18px/1.4 var(--font-body); }
.kort__tekst { margin-top: 4px; color: var(--blekk-dempet); font-size: 16px; max-width: 26em; }
.k1 canvas { position: absolute; left: 6%; bottom: 8%; width: 102px; height: 102px; }
.k1 .k1__plate { position: absolute; right: 7%; top: 50%; transform: translateY(-50%); display: grid; gap: 10px; justify-items: stretch; width: 150px; }
.k1 .pt-app__plate { font-size: 17px; padding: 8px 10px 9px; }
.k2 { background: #1B2250; }
.k2__straler { position: absolute; left: 50%; top: 56%; width: 640px; height: 640px; margin: -320px; z-index: -1; background: repeating-conic-gradient(#232C63 0 15deg, #1B2250 15deg 30deg); animation: straler 48s linear infinite; }
@keyframes straler { to { transform: rotate(360deg); } }
.k2 .pt-app__plate { position: absolute; left: 50%; top: 9%; transform: translateX(-50%); white-space: nowrap; }
.k2 canvas { position: absolute; left: 50%; bottom: 17%; width: 102px; height: 102px; margin-left: -51px; }
.k2__lv { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); padding: 2px 12px 3px; background: #F2C230; color: #1B2148; font-weight: 700; font-size: 15px; box-shadow: 0 0 0 2px #1B1B3A; }
.k3 .pt-app__bg { background-position: center -590px; }
.k3 img { position: absolute; left: 50%; top: 54%; width: 100px; height: 80px; margin: -40px 0 0 -50px; }
.k3 .pt-app__stjerne { width: 4px; height: 4px; box-shadow: 4px 0 #FFEFA8, -4px 0 #FFEFA8, 0 4px #FFEFA8, 0 -4px #FFEFA8; }
.merknad { margin-top: var(--space-4); max-width: 34em; }

/* Påmelding */
.bli { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: var(--space-8); align-items: start; }
.slik { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; gap: 12px; max-width: 34em; }
.slik li { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: baseline; }
.barn { display: grid; gap: var(--space-1); }
.barn__rad { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: var(--space-1); align-items: center; }
.barn__fjern { all: unset; box-sizing: border-box; display: grid; place-items: center; width: 40px; height: var(--kontroll-hoyde); border-radius: var(--radius-field); color: var(--blekk); cursor: pointer; font: 700 22px/1 var(--font-body); }
.barn__fjern:hover { background: var(--grunn); }
.barn__fjern:focus-visible { outline: 3px solid var(--blekk); outline-offset: 2px; }
.barn__fjern[hidden] { display: none !important; }
.leggtil { all: unset; justify-self: start; cursor: pointer; color: var(--blekk); font: 400 16px/1.4 var(--font-body); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.leggtil:hover { text-decoration-thickness: 2px; }
.leggtil:focus-visible { outline: 3px solid var(--blekk); outline-offset: 4px; border-radius: 4px; }
textarea.pt-felt__input { min-height: 112px; resize: vertical; }
.avkrysning { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; font: 400 16px/1.45 var(--font-body); color: var(--blekk); cursor: pointer; }
.avkrysning input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--knapp); }
.felle { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.skjema__hjelp { text-align: center; }
.skjema__hjelp .pt-link { font-size: 14px; }

/* Avsender */
.om { padding-top: var(--space-8); }
.om__grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: var(--space-6); align-items: end; }
.om__tekst { padding-bottom: var(--space-12); }
.om__figur { position: relative; height: 200px; }
.om__figur .pt-slagskygge { left: 54px; top: 150px; width: 100px; height: 60px; }
.om__figur img { position: absolute; left: 50px; top: 0; height: 160px; width: auto; }

/* Bunnlinje */
.pt-bunn img { height: 22px; width: auto; display: block; }
.pt-bunn__lenker { flex-wrap: wrap; }

/* Undersidene: tekst i én kolonne */
.dok { max-width: 760px; }
.dok .pt-h1 { font-size: clamp(40px, 5vw, 56px); }
.ingress { font-size: 20px; line-height: 1.5; max-width: 34em; }
.steg { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; gap: var(--space-3); }
.steg > li { padding: var(--space-4); border-radius: var(--radius-card); background: var(--flate); display: grid; gap: var(--space-2); }
.steg__tittel { display: flex; align-items: baseline; gap: 10px; font: 700 20px/1.35 var(--font-body); }
.steg ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.sporsmal { margin-top: var(--space-4); display: grid; border-top: 1px solid var(--linje); }
.sporsmal details { border-bottom: 1px solid var(--linje); }
.sporsmal summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); padding: var(--space-3) 0; font: 700 18px/1.4 var(--font-body); }
.sporsmal summary::-webkit-details-marker { display: none; }
.sporsmal summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--blekk); border-bottom: 2px solid var(--blekk); transform: translateY(-3px) rotate(45deg); transition: transform var(--motion-fast) var(--ease); }
.sporsmal details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.sporsmal summary:focus-visible { outline-offset: 2px; }
.sporsmal .svar { padding: 0 0 var(--space-3); display: grid; gap: 12px; max-width: 34em; }
.lenker { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: 12px; }

/* Lang tekst: instruksen og personvernet */
.prosa { max-width: 34em; }
.prosa > * + * { margin-top: var(--space-2); }
.prosa h2 { font-family: var(--font-heading); font-weight: 700; font-size: 32px; line-height: 1.15; letter-spacing: -0.02em; margin-top: var(--space-8); text-wrap: balance; }
.prosa h3 { font-family: var(--font-heading); font-weight: 700; font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; margin-top: var(--space-4); }
.prosa ul, .prosa ol { padding-left: 1.3em; display: grid; gap: 6px; }
.prosa a { color: var(--blekk); text-underline-offset: 4px; }
.prosa .tabell { overflow-x: auto; max-width: 100%; }
.prosa table { border-collapse: collapse; font-size: 16px; line-height: 1.45; min-width: 560px; }
.prosa th, .prosa td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--linje); }
.prosa th { font-weight: 700; }
.meta { font: 400 14px/1.45 var(--font-body); color: var(--blekk-dempet); }

@media (prefers-reduced-motion: reduce) { .k2__straler, .pt-btn:hover .pt-prikker i { animation: none !important; } }
@media (max-width: 900px) {
  :root { --side: 20px; }
  .band { padding-block: var(--space-8); }
  .scene__grid, .bli, .om__grid, .kort { grid-template-columns: minmax(0, 1fr); }
  .scene__grid { gap: var(--space-4); }
  .scene__tekst { padding-bottom: 0; }
  .art { justify-self: center; }
  .kveld .pt-kjegle { left: 27%; }
  .kort { gap: var(--space-4); } .bli { gap: var(--space-4); }
  .pt-topp__meny { gap: var(--space-2); }
  .pt-topp .pt-logo { --lh: 24px; }
  .om__tekst { padding-bottom: 0; } .om__figur { width: 240px; justify-self: end; }
  .pt-bunn { flex-wrap: wrap; }
  .steg > li { padding: var(--space-3); }
}
/* Topplinjen: logo, to lenker og «Bli testfamilie» som en liten knapp uten hjertene.
   Punktumet for siden man står på ligger utenfor teksten, så lenkene ikke flytter seg når det kommer. */
.pt-topp__meny { margin-left: auto; }
.pt-topp__meny a { position: relative; white-space: nowrap; }
.pt-topp__meny a[aria-current="page"]::after { position: absolute; left: 100%; bottom: .35em; width: 4px; height: 4px; margin-left: 2px; }
.topp-knapp { min-height: 40px; padding: 8px 18px; margin-bottom: 0; font-size: 16px; flex: none; }
@media (max-width: 560px) {
  .pt-topp { flex-wrap: wrap; gap: 12px var(--space-2); }
  .topp-knapp { order: 2; margin-left: auto; }
  .pt-topp__meny { order: 3; flex-basis: 100%; margin-left: 0; gap: var(--space-3); }
}
@media (max-width: 420px) {
  .barn__rad { grid-template-columns: 96px minmax(0, 1fr) auto; }
  .pt-skjemaflate { padding: var(--space-3); }
}
@media print {
  .pt-topp, .pt-bunn, .pt-hopp { display: none; }
  body { background: #fff; }
}

/* Skisser av App Store på iPhone (/test, steg 2). iOS sine egne farger gjelder inne i skjermen, som appens farger i .pt-app.
   Det oransje punktet (barn) viser hvor man trykker, og er nummerets punktum i rekkefølgen. */
.ios-rad { margin-top: var(--space-2); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }
.ios-steg { margin: 0; min-width: 0; }
.ios-steg .pt-bildetekst { margin-top: 12px; font-size: 15px; }
.ios-steg .pt-bildetekst__nr { flex: none; white-space: nowrap; }
.ios { box-sizing: border-box; width: 100%; max-width: 168px; aspect-ratio: 9 / 18; border-radius: 26px; background: #3B3350; padding: 7px; box-shadow: 0 var(--knapp-dybde) 0 var(--skygge); }
.ios__skjerm { position: relative; height: 100%; border-radius: 20px; overflow: hidden; background: #F2F2F7; color: #1C1C1E;
  font: 400 11px/1.3 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; display: flex; flex-direction: column; padding: 22px 8px 0; box-sizing: border-box; }
.ios__topp { display: flex; justify-content: space-between; align-items: center; padding: 4px 2px 8px; }
.ios__topp b { font-size: 17px; font-weight: 700; }
.ios__profil { position: relative; width: 22px; height: 22px; border-radius: 50%; background: #C7C7CC; flex: none; }
.ios__profil--liten { width: 20px; height: 20px; }
.ios__kort { height: 34%; border-radius: 10px; background: #FFFFFF; margin-bottom: 8px; }
.ios__kort--lav { height: 18%; }
.ios__faner { margin: auto -8px 0; height: 30px; display: flex; justify-content: space-around; align-items: center; background: #F9F9F9; border-top: 1px solid #D1D1D6; }
.ios__faner i { width: 12px; height: 12px; border-radius: 3px; background: #C7C7CC; }
.ios__faner i:first-child { background: #0A84FF; }
.ios__ark { flex: 1; margin: 0 -8px; padding: 8px; border-radius: 12px 12px 0 0; background: #F2F2F7; box-shadow: 0 -1px 0 #D1D1D6; display: flex; flex-direction: column; gap: 8px; }
.ios__arktopp { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 2px 2px 4px; }
.ios__arktopp b { font-size: 12px; font-weight: 600; }
.ios__arktopp span:last-child { text-align: right; }
.ios__bla { color: #0A84FF; font-weight: 600; }
.ios__gruppe { border-radius: 9px; background: #FFFFFF; overflow: visible; }
.ios__rad { position: relative; min-height: 24px; display: flex; align-items: center; gap: 6px; padding: 0 8px; box-shadow: 0 1px 0 #E5E5EA; }
.ios__rad:last-child { box-shadow: none; }
.ios__rad:empty::before { content: ""; width: 55%; height: 6px; border-radius: 3px; background: #E5E5EA; }
.ios__rad--navn { min-height: 34px; font-weight: 600; }
.ios__pil { margin-left: auto; color: #C7C7CC; font-size: 14px; }
.ios__rad--rod { justify-content: center; color: #FF3B30; }
.ios__gruppe--bunn { margin-top: auto; margin-bottom: 18px; }
.ios__tekst { margin: 10px 0 2px; font-weight: 600; text-align: center; }
.ios__felt { padding: 7px 8px; border-radius: 8px; background: #FFFFFF; box-shadow: inset 0 0 0 1px #D1D1D6; color: #3A3A3C; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ios__knapp { position: relative; padding: 7px; border-radius: 8px; background: #0A84FF; color: #FFFFFF; text-align: center; font-weight: 600; }
.ios__trykk { position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--barn); box-shadow: 0 0 0 5px rgba(232, 111, 32, .3); }
.ios__profil .ios__trykk { right: 6px; }
@media (max-width: 700px) { .ios-rad { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4) var(--space-3); } .ios { max-width: none; } }

