:root{--paper:#f7f6f2;--ink:#707070;--dark:#1a2224;--accent:#ff786b;--baseline:1.5rem;--rail:31vw;--sans:"din-2014","din-condensed",Arial,sans-serif;--serif:"adobe-garamond-pro","garamond-premier-pro",Garamond,serif}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);font-weight:300}.screen-reader-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.menu-open{overflow:hidden}
.home-cover{position:relative;min-height:100svh;overflow:hidden;background:#1c2838;color:#8d8c88}.home-cover__media,.home-cover__shade{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.home-cover__shade{background:linear-gradient(180deg,rgba(11,22,33,.04),rgba(19,23,49,.5) 68%,rgba(22,24,48,.82))}.home-cover__wordmark{position:absolute;top:0;left:32px;color:#8d8c88;text-decoration:none;font-size:.9rem;letter-spacing:.25em}.home-cover__content{position:relative;z-index:2;min-height:100svh;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;padding:0 6vw 26vh;text-align:center}.home-cover h1{max-width:18ch;margin:0;font-family:var(--sans);font-size:clamp(3.4rem,6.2vw,8rem);font-weight:300;line-height:1.03;transform:rotate(-1deg)}.home-cover__start{margin-top:2.2rem;color:var(--accent);font-family:var(--serif);font-size:clamp(1.35rem,1.7vw,2rem);text-underline-offset:.22em}.sound-toggle{margin-top:1.1rem;border:0;background:transparent;padding:8px;cursor:pointer}.sound-toggle__bars{height:30px;display:flex;align-items:center;gap:4px}.sound-toggle__bars i{display:block;width:2px;height:var(--h,12px);background:var(--accent);transform:rotate(-10deg)}.sound-toggle__bars i:nth-child(1),.sound-toggle__bars i:nth-child(7){--h:8px}.sound-toggle__bars i:nth-child(2),.sound-toggle__bars i:nth-child(6){--h:16px}.sound-toggle__bars i:nth-child(3),.sound-toggle__bars i:nth-child(5){--h:24px}.sound-toggle__bars i:nth-child(4){--h:30px}
.chapter-page,.manuscript-page,.intro-page{display:grid;grid-template-columns:minmax(0,calc(100% - var(--rail))) var(--rail);min-height:100svh}.chapter-page__content{min-width:0}.chapter-hero{position:relative;height:100svh;overflow:hidden}.chapter-hero h1{position:absolute;inset:50% auto auto 50%;margin:0;transform:translate(-50%,-50%) rotate(-1deg);font-size:clamp(4rem,7vw,8.5rem);font-weight:300;line-height:1;color:#777775;white-space:nowrap}.image-placeholder{display:grid;place-items:center;background:#e4e2dc;color:#777;border:0}.image-placeholder span{padding:.8rem 1rem;border:1px solid rgba(60,60,60,.18);font-size:.8rem;letter-spacing:.18em;text-align:center}.image-placeholder--hero{position:absolute;inset:0;background:linear-gradient(135deg,#647173,#263538);color:#ddd}.photo-sequence{padding:40px 0 0}.portrait-card{margin:0 0 calc(var(--baseline)*4)}.portrait-card__frame{padding:0 40px}.image-placeholder--portrait{aspect-ratio:3/2;width:100%}.portrait-card figcaption{text-align:center;padding:calc(var(--baseline)*.65) 40px 0;color:var(--ink)}.portrait-card figcaption strong,.portrait-card figcaption span,.portrait-card figcaption em{display:block}.portrait-card figcaption strong{font-family:var(--sans);font-weight:700;font-size:1.05rem;line-height:1.1}.portrait-card figcaption span{font-family:var(--sans);font-size:1rem;line-height:1.25}.portrait-card figcaption em{margin-top:var(--baseline);font-family:var(--serif);font-size:1.15rem;line-height:1.3}.pause-image{height:100svh;padding:40px}.image-placeholder--pause{height:100%;background:linear-gradient(135deg,#718084,#253236);color:#ddd}
.site-rail{position:sticky;top:0;align-self:start;height:100svh;padding:9vh 4.2vw;background:#fbfaf7}.site-rail a{color:var(--ink);text-decoration:none}.site-rail__top{display:flex;flex-direction:column;font-family:var(--serif);font-size:1rem;line-height:1.45}.site-rail__chapters{display:flex;flex-direction:column;margin-top:7vh;font-size:clamp(2rem,2.7vw,3.7rem);line-height:1.12}.site-rail__chapters a{width:max-content}.site-rail__chapters a:hover,.site-rail__chapters .is-current{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.12em}.site-rail__minor{display:flex;flex-direction:column;margin-top:6vh;font-family:var(--serif);font-size:1rem;line-height:1.45}
.mobile-menu-toggle{display:none;position:fixed;z-index:80;top:22px;right:24px;border:0;background:transparent;padding:0}.mobile-menu-toggle img{display:block;width:40px}.mobile-menu-toggle--home{display:none}.mobile-menu{position:fixed;inset:0;z-index:100;background:#fff;color:var(--ink)}.mobile-menu[hidden]{display:none}.mobile-menu__close{position:absolute;top:24px;right:25px;border:0;background:none;color:var(--ink);font-size:3.4rem;font-weight:200;line-height:.7;transform:rotate(5deg)}.mobile-menu__inner{padding:10vh 17vw}.mobile-menu a{color:var(--ink);text-decoration:none}.mobile-menu__small{font-family:var(--serif);font-size:1.1rem}.mobile-menu__chapters{display:flex;flex-direction:column;margin-top:4rem;font-size:clamp(2.5rem,10vw,4.5rem);line-height:1.18}.mobile-menu__minor{display:flex;flex-direction:column;margin-top:3rem;font-family:var(--serif);font-size:1.1rem;line-height:1.5}
.manuscript,.intro-page__copy{padding:12vh 4vw 10vh}.manuscript{max-width:1100px}.manuscript__header h1{margin:0;font-size:clamp(2.5rem,3vw,4.2rem);font-weight:300;line-height:1.1}.manuscript__header p{margin:.25rem 0 calc(var(--baseline)*3);font-weight:700}.manuscript__body{font-family:var(--serif);font-size:1.3rem;line-height:var(--baseline)}.manuscript__body p{margin:0 0 calc(var(--baseline)*1.5)}.manuscript__body h2{font-family:var(--sans);font-size:2rem;font-weight:400;line-height:calc(var(--baseline)*2);margin:calc(var(--baseline)*3) 0 var(--baseline)}.intro-page__copy{display:flex;flex-direction:column;justify-content:center;max-width:1000px}.intro-page__copy h1,.intro-page__copy h2{font-weight:300;line-height:1.22;margin:0 0 calc(var(--baseline)*2)}.intro-page__copy h1{font-size:clamp(2.4rem,3.2vw,4.5rem)}.intro-page__copy h2{font-size:clamp(2rem,2.7vw,3.6rem)}.intro-page__copy p{max-width:70ch;font-family:var(--serif);font-size:1.2rem;line-height:1.5;margin:0 0 var(--baseline)}
@media(max-width:800px){:root{--rail:0}.chapter-page,.manuscript-page,.intro-page{display:block}.site-rail{display:none}.mobile-menu-toggle,.mobile-menu-toggle--home{display:block}.home-cover__wordmark{left:22px}.home-cover__content{align-items:flex-start;padding:0 8vw 24vh;text-align:left}.home-cover h1{font-size:clamp(3rem,13vw,5.5rem)}.home-cover__start{margin-left:0}.sound-toggle{margin-left:-8px}.chapter-hero h1{font-size:clamp(3.7rem,15vw,6.3rem)}.photo-sequence{padding-top:0}.portrait-card{margin-bottom:calc(var(--baseline)*3)}.portrait-card__frame{padding:0}.portrait-card figcaption{padding:calc(var(--baseline)*1.1) 8vw 0}.pause-image{padding:0;height:100svh}.manuscript,.intro-page__copy{padding:13vh 8vw 8vh}.manuscript__body{font-size:1.15rem;line-height:1.5rem}.mobile-menu__inner{padding:10vh 17vw}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.home-cover__media{display:none}}

/* Fase 2 designjusteringer */
body{background:#fff}
.manuscript-page,.intro-page{background:var(--paper)}
.chapter-page{background:#fff}
.home-cover h1{transform:rotate(1deg)}
.portrait-card figcaption strong,.portrait-card figcaption span{font-family:"din-2014",Arial,sans-serif;font-style:normal;font-weight:400}
.site-rail{padding:9vh 40px}
.site-rail__chapters{margin-top:3vh;line-height:1.28}
.site-rail__minor{margin-top:3vh}
.site-rail__chapters a:hover,.site-rail__chapters .is-current{text-decoration-thickness:2px;text-decoration-skip-ink:none;text-underline-offset:.13em;transform:rotate(1deg);transform-origin:left center}
.pause-image{padding:0}
.image-placeholder--pause{height:100svh}
.sound-toggle__icon{display:block;width:42px;height:42px;object-fit:contain}
.sound-toggle__icon--on{display:none}
.sound-toggle.is-sound-on .sound-toggle__icon--off{display:none}
.sound-toggle.is-sound-on .sound-toggle__icon--on{display:block}
@media(max-width:800px){
  .image-placeholder--portrait{aspect-ratio:1/1}
  
  .mobile-menu__chapters{margin-top:2rem;line-height:1.28}
  .mobile-menu__minor{margin-top:2rem}
}

/* Fase 3: korrigeringer etter designgjennomgang */
.home-cover__start{
  position:relative;
  display:inline-block;
  text-decoration:none;
  transform:none;
}
.home-cover__start::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-.14em;
  height:2px;
  background:currentColor;
  transform:rotate(-1deg);
  transform-origin:left center;
}
.home-cover__start:hover,
.home-cover__start:focus-visible{color:#fff}

.sound-toggle{
  background:transparent;
  border-radius:0;
}
.sound-toggle:hover,
.sound-toggle:focus-visible{
  background:transparent;
}
.sound-toggle__icon{
  filter:none;
  transition:filter .18s ease;
}
.sound-toggle:hover .sound-toggle__icon,
.sound-toggle:focus-visible .sound-toggle__icon{
  filter:brightness(0) invert(1);
}


.portrait-card figcaption strong{
  font-family:"din-2014",Arial,sans-serif;
  font-weight:700;
}
.portrait-card figcaption span{
  font-family:"din-2014",Arial,sans-serif;
  font-weight:400;
}

.site-rail{
  position:fixed;
  z-index:30;
  top:0;
  right:0;
  bottom:0;
  width:var(--rail);
  height:100svh;
  align-self:auto;
  overflow-y:auto;
  background:#fff;
}
.site-rail__chapters a{
  position:relative;
  display:block;
  width:max-content;
  text-decoration:none;
  transform:none;
}
.site-rail__chapters a::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:.02em;
  height:2px;
  background:currentColor;
  opacity:0;
  transform:rotate(1deg);
  transform-origin:left center;
}
.site-rail__chapters a:hover,
.site-rail__chapters .is-current{
  text-decoration:none;
  transform:none;
}
.site-rail__chapters a:hover::after,
.site-rail__chapters .is-current::after{
  opacity:1;
}
.site-rail__top,
.site-rail__minor{
  line-height:1.62;
}

.mobile-menu__chapters a{
  position:relative;
  width:max-content;
  text-decoration:none;
}
.mobile-menu__chapters a::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:.02em;
  height:2px;
  background:currentColor;
  opacity:0;
  transform:rotate(1deg);
  transform-origin:left center;
}
.mobile-menu__chapters a:hover::after,
.mobile-menu__chapters a:focus-visible::after{
  opacity:1;
}
.mobile-menu__small,
.mobile-menu__minor{
  line-height:1.65;
}

@media(max-width:800px){
  
}

/* Fase 4: tettere og konsekvente understreker */
.home-cover__start::after{
  bottom:-.04em;
  height:1px;
  transform:rotate(1deg);
}

.site-rail__chapters a::after,
.mobile-menu__chapters a::after{
  bottom:.09em;
}

.site-rail__top a,
.site-rail__minor a,
.mobile-menu__small,
.mobile-menu__minor a{
  position:relative;
  display:block;
  width:max-content;
  text-decoration:none;
}
.site-rail__top a::after,
.site-rail__minor a::after,
.mobile-menu__small::after,
.mobile-menu__minor a::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:.08em;
  height:1px;
  background:currentColor;
  opacity:0;
  transform:rotate(1deg);
  transform-origin:left center;
}
.site-rail__top a:hover::after,
.site-rail__top a:focus-visible::after,
.site-rail__top a.is-current::after,
.site-rail__top a.current-menu-item::after,
.site-rail__top a[aria-current="page"]::after,
.site-rail__minor a:hover::after,
.site-rail__minor a:focus-visible::after,
.site-rail__minor a.is-current::after,
.site-rail__minor a.current-menu-item::after,
.site-rail__minor a[aria-current="page"]::after,
.mobile-menu__small:hover::after,
.mobile-menu__small:focus-visible::after,
.mobile-menu__small.is-current::after,
.mobile-menu__small[aria-current="page"]::after,
.mobile-menu__minor a:hover::after,
.mobile-menu__minor a:focus-visible::after,
.mobile-menu__minor a.is-current::after,
.mobile-menu__minor a.current-menu-item::after,
.mobile-menu__minor a[aria-current="page"]::after{
  opacity:1;
}

.site-rail__chapters a[aria-current="page"]::after,
.site-rail__chapters a.current-menu-item::after,
.mobile-menu__chapters a[aria-current="page"]::after,
.mobile-menu__chapters a.is-current::after,
.mobile-menu__chapters a.current-menu-item::after{
  opacity:1;
}

/* Fase 5: bildekanter, menyplassering og fullskjerm avslutningsbilde */
@media(min-width:801px){
  /* Hovedbildet flukter med portrettbildenes høyrekant. */
  .chapter-hero{
    margin-right:40px;
  }

  /* Menyen flyttes tilsvarende mot venstre. */
  .site-rail{
    right:40px;
  }
}

/* Sluttbildet bryter ut av innholdskolonnen og dekker hele viewporten over menyen. */
.pause-image{
  position:relative;
  z-index:60;
  width:100vw;
  height:100svh;
  margin:0;
  padding:0;
}
.image-placeholder--pause{
  width:100%;
  height:100%;
}

/* Fase 6: tettere understreker, nye lydikoner og presis mobilmeny */
.home-cover__start::after{
  bottom:.01em;
}
.site-rail__chapters a::after,
.mobile-menu__chapters a::after{
  bottom:.14em;
}
.site-rail__top a::after,
.site-rail__minor a::after,
.mobile-menu__small::after,
.mobile-menu__minor a::after{
  bottom:.13em;
}

/* De nye lyd-SVG-ene arver ønsket rødfarge via filter. */
.sound-toggle__icon{
  width:48px;
  height:auto;
  filter:invert(58%) sepia(64%) saturate(1024%) hue-rotate(316deg) brightness(108%) contrast(101%);
}
.sound-toggle:hover .sound-toggle__icon,
.sound-toggle:focus-visible .sound-toggle__icon{
  filter:brightness(0) invert(1);
}

@media(max-width:800px){
  :root{--mobile-edge:8vw}

  .mobile-menu-toggle,
  .mobile-menu-toggle--home{
    display:block;
    top:22px;
    right:24px;
    width:40px;
    height:40px;
    padding:10px;
    border:0;
    border-radius:0;
    background:transparent !important;
    color:var(--ink);
    cursor:pointer;
    z-index:120;
  }
  .mobile-menu-toggle:hover,
  .mobile-menu-toggle:focus-visible,
  .mobile-menu-toggle:active{
    background:transparent !important;
  }
  .mobile-menu-toggle.is-on-dark{
    color:#fff;
  }
  .mobile-menu-toggle[aria-expanded="true"]{
    color:var(--ink);
  }
  .mobile-menu-toggle__icon{
    display:block;
    width:20px;
    height:20px;
    background:currentColor;
    -webkit-mask:url('../images/ui/burger.svg') center/contain no-repeat;
    mask:url('../images/ui/burger.svg') center/contain no-repeat;
  }
  .mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle__icon{
    -webkit-mask-image:url('../images/ui/burger_hover.svg');
    mask-image:url('../images/ui/burger_hover.svg');
  }

  .mobile-menu{
    inset:0 var(--mobile-edge) 0 0;
    width:auto;
    min-height:100svh;
    background:#fff;
    color:var(--ink);
    overflow-y:auto;
  }
  .mobile-menu__inner{
    padding:10vh var(--mobile-edge) 8vh;
  }
  .mobile-menu__close{
    display:none;
  }
}


/* Fase 7: finjusteringer etter mobiltest */
/* Start-streken skal ligge tett under ordet. */
.home-cover__start::after{
  bottom:.11em;
}

/* Små menylenker får streken tettere enn tidligere. */
.site-rail__top a::after,
.site-rail__minor a::after,
.mobile-menu__small::after,
.mobile-menu__minor a::after{
  bottom:.2em;
}

/* Mobilmenyen ligger på høyre side, slik at siden skimtes til venstre. */
@media(max-width:800px){
  .mobile-menu{
    inset:0 0 0 var(--mobile-edge);
  }
  .mobile-menu__inner{
    padding:10vh var(--mobile-edge) 8vh;
  }
}

/* Fase 8: felles kapittelovergang for normal og omvendt scroll */
.chapter-transition{
  position:relative;
  z-index:20;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:clamp(1.5rem,3vh,2.25rem);
  min-height:auto;
  padding:clamp(2.5rem,5vh,4rem) 40px;
  background:#fff;
  color:var(--ink);
}
.chapter-transition__link-wrap{
  order:1;
}
.chapter-transition__link{
  position:relative;
  display:inline-block;
  color:var(--ink);
  font-family:var(--sans);
  font-size:clamp(2rem,2.5vw,3.6rem);
  font-weight:300;
  line-height:1.08;
  text-decoration:none;
}
.chapter-transition__link::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-.12em;
  height:1px;
  background:currentColor;
  transform:rotate(1deg);
  transform-origin:left center;
}
.chapter-transition__keyboard-note{
  order:2;
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:.25em;
  margin:0;
  color:var(--ink);
  font-family:var(--serif);
  font-size:1rem;
  line-height:1.4;
}
.chapter-transition__keyboard-icon,
.chapter-transition__desktop-only{
  color:var(--accent);
}
.chapter-transition--reverse{
  min-height:auto;
  padding-top:clamp(2.5rem,5vh,4rem);
}
.chapter-transition--reverse .chapter-transition__keyboard-note{
  order:1;
}
.chapter-transition--reverse .chapter-transition__link-wrap{
  order:2;
}

@media(max-width:800px){
  .chapter-transition{
    min-height:auto;
    gap:1.75rem;
    padding:3rem var(--mobile-edge,8vw);
  }
  .chapter-transition__link{
    font-size:clamp(2rem,9vw,3rem);
  }
  .chapter-transition__keyboard-note{
    display:none;
  }
  .chapter-transition--reverse .chapter-transition__link-wrap{
    order:1;
  }
}


/* Råolje 1.0 – Fotosider, release candidate */
:root{
  --paper:#f7f6f2;
  --ink:#707070;
  --accent:#ff786b;
}

/* Foto-, forside- og menysider er hvite. Krem er reservert for tekstmaler. */
.home-cover,
.chapter-page,
.chapter-page__content,
.chapter-hero,
.photo-sequence,
.site-rail,
.mobile-menu{
  background-color:#fff;
}

/* Forside: skrå H1. Lenketeksten er rett; bare streken er skrå. */
.home-cover h1{
  transform:rotate(1deg);
}
.home-cover__start{
  color:var(--accent);
  transform:none;
}
.home-cover__start::after{
  bottom:.16em;
  height:2px;
  transform:rotate(1deg);
}
.home-cover__start:hover,
.home-cover__start:focus-visible{
  color:#fff;
}

/* Lydikon: bruker original SVG-geometri, rød standard og hvit hover. */
.sound-toggle{
  color:var(--accent);
  background:transparent !important;
}
.sound-toggle:hover,
.sound-toggle:focus-visible{
  color:#fff;
  background:transparent !important;
}
.sound-toggle__icon{
  display:block;
  width:48px;
  height:auto;
  line-height:0;
  filter:none;
}
.sound-toggle__icon svg{
  display:block;
  width:100%;
  height:auto;
  overflow:visible;
}
.sound-toggle__icon svg line{
  stroke:currentColor !important;
  vector-effect:non-scaling-stroke;
}
.sound-toggle__icon--on{display:none}
.sound-toggle.is-sound-on .sound-toggle__icon--off{display:none}
.sound-toggle.is-sound-on .sound-toggle__icon--on{display:block}
.sound-toggle.is-sound-on .sound-toggle__icon--on line{
  animation:raaolje-sound-pulse 1.8s linear infinite;
}
.sound-toggle.is-sound-on .sound-toggle__icon--on line:nth-of-type(1){animation-delay:0s}
.sound-toggle.is-sound-on .sound-toggle__icon--on line:nth-of-type(2){animation-delay:.12s}
.sound-toggle.is-sound-on .sound-toggle__icon--on line:nth-of-type(3){animation-delay:.24s}
.sound-toggle.is-sound-on .sound-toggle__icon--on line:nth-of-type(4){animation-delay:.36s}
.sound-toggle.is-sound-on .sound-toggle__icon--on line:nth-of-type(5){animation-delay:.48s}
.sound-toggle.is-sound-on .sound-toggle__icon--on line:nth-of-type(6){animation-delay:.60s}
.sound-toggle.is-sound-on .sound-toggle__icon--on line:nth-of-type(7){animation-delay:.72s}
.sound-toggle.is-sound-on .sound-toggle__icon--on line:nth-of-type(8){animation-delay:.84s}
.sound-toggle.is-sound-on .sound-toggle__icon--on line:nth-of-type(9){animation-delay:.96s}
.sound-toggle.is-sound-on .sound-toggle__icon--on line:nth-of-type(10){animation-delay:1.08s}
.sound-toggle.is-sound-on .sound-toggle__icon--on line:nth-of-type(11){animation-delay:1.20s}
.sound-toggle.is-sound-on .sound-toggle__icon--on line:nth-of-type(12){animation-delay:1.32s}
.sound-toggle.is-sound-on .sound-toggle__icon--on line:nth-of-type(13){animation-delay:1.44s}
.sound-toggle.is-sound-on .sound-toggle__icon--on line:nth-of-type(14){animation-delay:1.56s}
.sound-toggle.is-sound-on .sound-toggle__icon--on line:nth-of-type(15){animation-delay:1.68s}
@keyframes raaolje-sound-pulse{
  0%,86%,100%{stroke-width:2px}
  8%,18%{stroke-width:3.4px}
}
@media(prefers-reduced-motion:reduce){
  .sound-toggle.is-sound-on .sound-toggle__icon--on line{animation:none}
}


/* Portrettnavn er bold, beskrivelse regular. */
.portrait-card figcaption strong{font-weight:700;font-style:normal}
.portrait-card figcaption span{font-weight:400;font-style:normal}

/* Permanent desktopmeny: helt fast og hvit. */
.site-rail{
  position:fixed;
  top:0;
  right:40px;
  bottom:0;
  width:var(--rail);
  height:100svh;
  overflow-y:auto;
  overscroll-behavior:contain;
  background:#fff;
  transform:none;
}
.site-rail__chapters a,
.mobile-menu__chapters a{
  color:var(--ink);
  transform:none;
}
.site-rail__chapters a::after,
.mobile-menu__chapters a::after{
  height:2px;
  transform:rotate(1deg);
  background:currentColor;
}
.site-rail__chapters a:hover,
.site-rail__chapters a:focus-visible,
.site-rail__chapters a.is-current,
.site-rail__chapters a[aria-current="page"],
.mobile-menu__chapters a:hover,
.mobile-menu__chapters a:focus-visible,
.mobile-menu__chapters a.is-current,
.mobile-menu__chapters a[aria-current="page"]{
  color:var(--ink);
}
.site-rail__chapters a:hover::after,
.site-rail__chapters a:focus-visible::after,
.site-rail__chapters a.is-current::after,
.site-rail__chapters a[aria-current="page"]::after,
.mobile-menu__chapters a:hover::after,
.mobile-menu__chapters a:focus-visible::after,
.mobile-menu__chapters a.is-current::after,
.mobile-menu__chapters a[aria-current="page"]::after{
  opacity:1;
}
.site-rail__chapters a.is-visited,
.mobile-menu__chapters a.is-visited{
  color:var(--accent);
}
.site-rail__chapters a.is-visited::after,
.mobile-menu__chapters a.is-visited::after{
  opacity:1;
  background:var(--accent);
}
.site-rail__top,
.site-rail__minor,
.mobile-menu__minor{
  line-height:1.78;
}

/* Reell omvendt scroll: Nordsjøen starter på helten nederst og hjulretningen vendes. */
.chapter-page--reverse .chapter-page__content{
  background:#fff;
}
.chapter-page--reverse .photo-sequence{
  padding-top:0;
}

@media(max-width:800px){
  .image-placeholder--portrait{aspect-ratio:1/1}
  
  .mobile-menu{background:#fff}
  .mobile-menu__chapters{line-height:1.28}
  .mobile-menu__minor{line-height:1.78}
}

/* RC2: presis omvendt scroll, originalt lyd-av-ikon og mobilmenyjusteringer */
.home-cover__start::after{
  bottom:calc(.16em + 2px);
}

/* Lyd av beholder SVG-ens originale strektykkelser. */
.sound-toggle__icon--off svg line{
  stroke-width:revert !important;
}

/* Scrollhåndtaket starter øverst, mens Nordsjøen-innholdet beveger seg motsatt vei. */
.chapter-page--reverse{
  position:relative;
  min-height:100svh;
}
.chapter-page--reverse .chapter-page__content{
  position:fixed;
  top:0;
  left:0;
  width:calc(100% - var(--rail));
  will-change:transform;
}

@media(max-width:800px){
  .chapter-page--reverse .chapter-page__content{
    width:100%;
  }

  /* Burger og X bruker samme boks, midtpunkt og kantavstand. */
  .mobile-menu-toggle,
  .mobile-menu-toggle--home{
    top:18px;
    right:20px;
    width:52px;
    height:52px;
    padding:9px;
    display:grid;
    place-items:center;
  }
  .mobile-menu-toggle__icon{
    width:34px;
    height:34px;
    -webkit-mask-position:center;
    mask-position:center;
    -webkit-mask-size:contain;
    mask-size:contain;
  }
}

/* RC3: behold original ikon-geometri, eksakt mobiloverlapp og helsidebilde over desktopmenyen. */
.chapter-page--reverse .chapter-page__content{
  z-index:70;
}
.pause-image{
  position:relative;
  z-index:90;
  width:100vw;
}

@media(max-width:800px){
  /* Samme faste koordinatsystem for brukerens originale burger- og X-SVG. */
  .mobile-menu-toggle,
  .mobile-menu-toggle--home{
    position:fixed;
    top:18px;
    right:20px;
    width:52px;
    height:52px;
    padding:0;
  }
  .mobile-menu-toggle__icon{
    position:absolute;
    top:50%;
    left:50%;
    width:40px;
    height:40px;
    transform:translate(-50%,-50%);
    -webkit-mask-position:50% 50%;
    mask-position:50% 50%;
    -webkit-mask-size:40px 40px;
    mask-size:40px 40px;
    -webkit-mask-repeat:no-repeat;
    mask-repeat:no-repeat;
  }
  .pause-image{
    width:100vw;
  }
}

/* RC4: mobilikonene bruker samme 40 x 40-boks og skalerer de originale 20 x 20-SVG-ene identisk. */
@media(max-width:800px){
  .mobile-menu-toggle,
  .mobile-menu-toggle--home{
    position:fixed !important;
    top:28px !important;
    right:32px !important;
    width:40px !important;
    height:40px !important;
    min-width:40px !important;
    min-height:40px !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    transform:none !important;
    display:block !important;
  }
  .mobile-menu-toggle__icon{
    position:absolute !important;
    inset:0 !important;
    width:40px !important;
    height:40px !important;
    margin:0 !important;
    transform:none !important;
    -webkit-mask-position:0 0 !important;
    mask-position:0 0 !important;
    -webkit-mask-size:40px 40px !important;
    mask-size:40px 40px !important;
    -webkit-mask-repeat:no-repeat !important;
    mask-repeat:no-repeat !important;
  }
}

/* RC5: bruk korrekt lyd-av-SVG og flytt kun åpen X 7 px mot venstre på mobil. */
@media(max-width:800px){
  .mobile-menu-toggle[aria-expanded="true"],
  .mobile-menu-toggle--home[aria-expanded="true"]{
    right:39px !important;
  }
}

/* RC6: presise korreksjoner uten nye effekter. */
.home-cover__start::after{
  height:1px;
}

@media(max-width:800px){
  /* Burger og X byttes momentant. Ingen slide, overgang eller animasjon. */
  .mobile-menu-toggle,
  .mobile-menu-toggle--home,
  .mobile-menu-toggle__icon{
    transition:none !important;
    animation:none !important;
  }

  /* X flyttes ytterligere 5 px mot venstre. Burger beholdes på samme sted. */
  .mobile-menu-toggle[aria-expanded="true"],
  .mobile-menu-toggle--home[aria-expanded="true"]{
    right:44px !important;
  }
}

/* RC8: den lille piltastmarkøren flyttes nøyaktig 3 px ned. */
.chapter-transition__keyboard-icon{position:relative;top:3px}

/* RC9: avtalte meny-, pil- og navigasjonskorreksjoner. */
.site-rail{
  right:0;
}
.site-rail__top,
.site-rail__minor,
.mobile-menu__small,
.mobile-menu__minor{
  display:flex;
  flex-direction:column;
}
.site-rail__top a.is-visited,
.site-rail__minor a.is-visited,
.mobile-menu__small a.is-visited,
.mobile-menu__minor a.is-visited{
  color:var(--accent);
}
.site-rail__top a.is-visited::after,
.site-rail__minor a.is-visited::after,
.mobile-menu__small a.is-visited::after,
.mobile-menu__minor a.is-visited::after{
  opacity:1;
  background:var(--accent);
}
/* Aktiv side skal fortsatt være grå, også når den er registrert som lest. */
.site-rail a.is-current,
.site-rail a[aria-current="page"],
.mobile-menu a.is-current,
.mobile-menu a[aria-current="page"]{
  color:var(--ink);
}
.chapter-transition__keyboard-icon{
  top:1px;
}
.chapter-page--reverse .chapter-page__content{
  visibility:hidden;
}
.chapter-page--reverse .chapter-page__content.is-reverse-ready{
  visibility:visible;
}
.portrait-card,
.pause-image,
.chapter-transition{
  scroll-margin-top:clamp(20px,2.1vw,40px);
}

/* RC11: rettelser basert på RC9. */
@media(min-width:801px){
  /* Behold typografistørrelsene fra RC9, men fjern intern scrolling. */
  .site-rail{
    right:0;
    overflow:hidden;
    overscroll-behavior:none;
    padding:clamp(24px,9vh,96px) 0 clamp(24px,9vh,96px) clamp(24px,2.1vw,40px);
  }
  .site-rail__fit{
    width:100%;
    transform:scale(var(--rail-fit-scale,1));
    transform-origin:top left;
  }
  .site-rail__top,
  .site-rail__minor{
    font-size:1rem;
    line-height:1.45;
  }
  .site-rail__chapters{
    margin-top:clamp(10px,2vh,22px);
    font-size:clamp(2rem,2.7vw,3.7rem);
    line-height:1.12;
  }
  .site-rail__minor{
    margin-top:clamp(10px,2vh,22px);
  }
}

/* Heldekkende bilder skal alltid lande helt i toppen. */
.chapter-hero,
.pause-image{
  scroll-margin-top:0;
}
.portrait-card,
.chapter-transition{
  scroll-margin-top:clamp(20px,2.1vw,40px);
}

/* Brukerens piler.svg, rød og omtrent halv størrelse av forrige visning. */
.chapter-transition__keyboard-icon{
  position:relative;
  top:1px;
  display:block;
  width:5px;
  height:10px;
  flex:0 0 5px;
  background:var(--accent);
  -webkit-mask:url('../images/ui/piler.svg') center/contain no-repeat;
  mask:url('../images/ui/piler.svg') center/contain no-repeat;
}


/* RC12: helsidebilder, menyplassering og pilstoerrelse. */
@media(min-width:801px){
  .site-rail{
    right:0;
    width:calc(var(--rail) + 40px);
    padding-left:clamp(24px,2.1vw,40px);
    padding-right:0;
    overflow:hidden;
  }
  .site-rail__fit{
    transform:none !important;
  }
  .site-rail__top,
  .site-rail__minor{
    font-size:1rem;
    line-height:1.78;
  }
  .site-rail__chapters{
    line-height:1.12;
  }
}
@media(min-width:801px) and (max-height:900px){
  .site-rail{
    padding-top:24px;
    padding-bottom:24px;
  }
  .site-rail__chapters{
    margin-top:12px;
    font-size:clamp(1.8rem,2.25vw,3rem);
  }
  .site-rail__minor{
    margin-top:12px;
  }
}

/* Helsidebilder skal treffe viewport-toppen ved piltastnavigasjon. */
.chapter-hero,
.pause-image{
  scroll-margin-top:0 !important;
}

/* Brukerens piler.svg, fortsatt roed, men litt stoerre enn i RC11. */
.chapter-transition__keyboard-icon{
  width:7px;
  height:14px;
  flex-basis:7px;
}

/* RC13: kun godkjente menyrettelser. Pilnavigasjon og piler.svg er låst. */
@media (min-width:801px){
  /* Fjern eventuell kant/seam langs venstre side av den faste menyen. */
  .site-rail{
    border-left:0 !important;
    box-shadow:none !important;
    outline:0 !important;
    background:#fff;
  }

  /* Behold størrelsen, men gi de store menypunktene mer luft. */
  .site-rail__chapters{
    line-height:1.18;
  }
}

@media (max-width:800px){
  /* X skal alltid være synlig mot den hvite menyflaten. */
  .mobile-menu-toggle[aria-expanded="true"],
  .mobile-menu-toggle--home[aria-expanded="true"]{
    color:var(--ink) !important;
  }
}


/* RC14: korrekt mobilikonreferanse og farge. */
@media (max-width:800px){
  /* Burger følger bakgrunnskontrasten: grå på lys flate, hvit på mørk flate. */
  .mobile-menu-toggle,
  .mobile-menu-toggle--home{
    color:var(--ink);
  }
  .mobile-menu-toggle.is-on-dark,
  .mobile-menu-toggle--home.is-on-dark{
    color:#fff;
  }

  /* Åpen meny bruker brukerens burger_hover.svg og skal alltid være grå. */
  .mobile-menu-toggle[aria-expanded="true"],
  .mobile-menu-toggle--home[aria-expanded="true"]{
    color:var(--ink) !important;
  }
  .mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle__icon,
  .mobile-menu-toggle--home[aria-expanded="true"] .mobile-menu-toggle__icon{
    -webkit-mask-image:url('../images/ui/burger_hover.svg') !important;
    mask-image:url('../images/ui/burger_hover.svg') !important;
  }
}

/* RC23: kun stabil menyposisjon og avtalte lenketilstander. */
@media (min-width:801px){
  html{
    overflow-y:scroll;
  }
}

/* Lest lenke: rod uten understrek. Aktiv side og hover: understrek. */
.site-rail a.is-visited:not(.is-current):not([aria-current="page"]),
.mobile-menu a.is-visited:not(.is-current):not([aria-current="page"]){
  color:var(--accent) !important;
}
.site-rail a.is-visited:not(.is-current):not([aria-current="page"]):not(:hover):not(:focus-visible)::after,
.mobile-menu a.is-visited:not(.is-current):not([aria-current="page"]):not(:hover):not(:focus-visible)::after{
  opacity:0;
}
.site-rail a.is-current::after,
.site-rail a[aria-current="page"]::after,
.site-rail a:hover::after,
.site-rail a:focus-visible::after,
.mobile-menu a.is-current::after,
.mobile-menu a[aria-current="page"]::after,
.mobile-menu a:hover::after,
.mobile-menu a:focus-visible::after{
  opacity:1 !important;
}

/* RC24: Nordsjoen - meny over vanlig reverse-innhold, helsidebilder fortsatt foran. */
@media (min-width:801px){
  .chapter-page--reverse > .site-rail{
    z-index:80;
  }
}


/* RC25: tekstsidemal. Meny og fotosider er urørt. */
.manuscript-page--history .manuscript{
  width:100%;
  max-width:none;
  padding:9vh 40px 12vh;
}
.manuscript-page--history .manuscript__header,
.manuscript-page--history .manuscript__body{
  width:80%;
  max-width:980px;
}
.manuscript-page--history .manuscript__header h1{
  margin:0;
  font-family:var(--sans);
  font-size:clamp(2rem,2.7vw,3.7rem);
  font-weight:300;
  line-height:1.12;
}
.manuscript-page--history .manuscript__byline{
  margin:.35rem 0 calc(var(--baseline)*2.25);
  font-family:var(--sans);
  font-size:1.05rem;
  font-weight:700;
  line-height:1.2;
}
.manuscript-page--history .manuscript__body{
  font-family:var(--serif);
  font-size:1.2rem;
  line-height:1.48;
}
.manuscript-page--history .manuscript__body p{
  margin:0 0 1.15em;
}
.manuscript-page--history .manuscript__body blockquote,
.manuscript-page--history .manuscript__body em{
  font-style:italic;
}
.manuscript-page--history .manuscript__body h2,
.manuscript-page--history .manuscript__body h3{
  margin:2.4em 0 .8em;
  font-family:var(--sans);
  font-size:1.05rem;
  font-weight:700;
  line-height:1.2;
}
.manuscript-page--history .manuscript__body figcaption{
  font-family:var(--sans);
  font-size:1rem;
  line-height:1.25;
  text-align:center;
}
.manuscript-page--history .manuscript__body .footnotes,
.manuscript-page--history .manuscript__body .footnote{
  font-size:15px;
}
@media (min-width:801px) and (max-width:1200px){
  .manuscript-page--history .manuscript__header,
  .manuscript-page--history .manuscript__body{width:94%}
}
@media (max-width:800px){
  .manuscript-page--history .manuscript{padding:13vh 8vw 8vh}
  .manuscript-page--history .manuscript__header,
  .manuscript-page--history .manuscript__body{width:100%;max-width:none}
  .manuscript-page--history .manuscript__body{font-size:1.15rem;line-height:1.5}
}


/* RC26: PDF paragraph indents and text-page chapter transition. */
.manuscript-page--history .manuscript__body p.manuscript-indent{
  text-indent:2em;
}
.manuscript-page--history > .chapter-transition{
  margin-top:0;
}


/* RC27: hold tekst og neste-kapittel i samme hovedkolonne. */
.manuscript-page--history .manuscript-page__content{
  min-width:0;
}


/* RC29: alle tekstkapitler, kremfarget forrige/neste-kapittel. */
.text-chapter-navigation{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:3rem;
  min-height:34svh;
  padding:clamp(4rem,8vh,7rem) 40px;
  background:var(--paper);
  border-top:1px solid rgba(114,113,113,.18);
}
.text-chapter-navigation__link{display:flex;flex-direction:column;align-items:flex-start;color:var(--ink);text-decoration:none;font-family:var(--sans)}
.text-chapter-navigation__link--next{grid-column:2;text-align:right;align-items:flex-end}
.text-chapter-navigation__link span{margin-bottom:.7rem;font-family:var(--serif);font-size:1rem}
.text-chapter-navigation__link strong{position:relative;display:inline-block;font-size:clamp(1.7rem,2.2vw,3.1rem);font-weight:300;line-height:1.08}
.text-chapter-navigation__link strong::after{content:"";position:absolute;left:0;right:0;bottom:-.12em;height:1px;background:currentColor;transform:rotate(1deg)}
@media(max-width:800px){.text-chapter-navigation{grid-template-columns:1fr;gap:3.5rem;padding:4rem 8vw}.text-chapter-navigation__link--next{grid-column:1;align-items:flex-start;text-align:left}}


/* RC30: shared next-chapter styling for photo and text pages. */
.chapter-transition__link::after{bottom:.2em}
.chapter-transition__link:hover,
.chapter-transition__link:focus-visible{color:var(--accent)}
.chapter-transition--paper{background:var(--paper)}
.manuscript-page--history .chapter-transition{border-top:0;margin-top:0}
.text-chapter-navigation{display:none!important}

/* RC31: referanser samles nederst i hvert tekstkapittel. */
.manuscript-references{
  margin-top:clamp(2.5rem,5vw,5rem);
}
.manuscript-references .footnote{
  margin:0 0 .45em;
}


/* RC32: finjustert vertikal rytme for referanser og neste kapittel. */
.manuscript-page--history .manuscript{
  padding-bottom:0;
}
.manuscript-references{
  margin-top:.75rem;
}
.manuscript-references .footnote{
  margin:0 0 .18em;
}
.manuscript-page--history .chapter-transition{
  padding-top:100px;
  padding-bottom:100px;
}


/* RC33: tettere fotnoter og justert luft rundt neste kapittel. */
.manuscript-references .footnote{
  margin:0 0 .04em;
  line-height:1.28;
}
.manuscript-page--history .chapter-transition{
  padding-top:72px;
  padding-bottom:132px;
}

/* RC34: låste menytilstander og korrigert mobilmeny. */
.site-rail a,
.mobile-menu a{
  color:var(--ink);
  text-decoration:none;
}

/* Ikke lest: grå uten strek. Lest: rød uten strek. */
.site-rail a.is-visited,
.mobile-menu a.is-visited{
  color:var(--accent);
}
.site-rail a.is-visited::after,
.mobile-menu a.is-visited::after{
  opacity:0;
}

/* Hover/fokus: rød med rød strek. */
.site-rail a:hover,
.site-rail a:focus-visible,
.mobile-menu a:hover,
.mobile-menu a:focus-visible{
  color:var(--accent);
}
.site-rail a:hover::after,
.site-rail a:focus-visible::after,
.mobile-menu a:hover::after,
.mobile-menu a:focus-visible::after{
  opacity:1;
  background:var(--accent);
}

/* Aktiv side: grå med grå strek, også når siden tidligere er markert lest. */
.site-rail a.is-current,
.site-rail a[aria-current="page"],
.mobile-menu a.is-current,
.mobile-menu a[aria-current="page"]{
  color:var(--ink);
}
.site-rail a.is-current::after,
.site-rail a[aria-current="page"]::after,
.mobile-menu a.is-current::after,
.mobile-menu a[aria-current="page"]::after{
  opacity:1;
  background:var(--ink);
}

@media(max-width:800px){
  /* Topplenkene må styles som lenker, ikke som selve nav-elementet. */
  .mobile-menu__small a{
    position:relative;
    display:block;
    width:max-content;
    color:inherit;
    text-decoration:none;
  }
  .mobile-menu__small a::after{
    content:"";
    position:absolute;
    left:0;
    right:0;
    bottom:.2em;
    height:1px;
    background:currentColor;
    opacity:0;
    transform:rotate(1deg);
    transform-origin:left center;
  }
  html.menu-open,
  html.menu-open body{
    overflow:hidden;
  }
  .mobile-menu[hidden]{display:none !important}
}

/* RC35: real Media Library images on photo chapters. */
.chapter-hero__image,.portrait-card__image,.pause-image__image{display:block;width:100%;height:100%;object-fit:cover}
.chapter-hero__image{position:absolute;inset:0}
.portrait-card__frame{aspect-ratio:3/2;overflow:hidden}
.pause-image__image{height:100%}
/* Visited: red without line; red underline only on hover. */
.site-rail a.is-visited:not(.is-current):not([aria-current="page"]):hover::after,
.mobile-menu a.is-visited:not(.is-current):not([aria-current="page"]):hover::after{transform:scaleX(1);background:currentColor}

/* RC41: designjusteringer for portrett- og pauseoppslag. */
@media (min-width:801px){
  /* 2400 x 1450-format. Bildet vises i 100 % og sentreres i rammen. */
  .portrait-card__frame{
    aspect-ratio:48 / 29;
    padding:0;
    position:relative;
    overflow:hidden;
  }
  .portrait-card__image{
    position:absolute;
    left:50%;
    top:50%;
    width:110%;
    height:110%;
    max-width:none;
    object-fit:cover;
    /* object-position set inline from the ACF focal-point fields. */
    transform:translate(-50%,-50%);
  }

  /* Litt mer luft mellom navn og beskrivelse. */
  .portrait-card figcaption strong + span{
    margin-top:10px;
  }

  /* Lange sitater holdes innenfor 80 % av bildebredden. */
  .portrait-card figcaption em{
    width:80%;
    max-width:80%;
    margin-left:auto;
    margin-right:auto;
  }

  /* Hvit avstand etter pausebildet, lik bildemargen på venstre side. */
  .pause-image{
    margin-bottom:40px;
  }
}

@media (max-width:800px){
  /* Behold eksisterende mobilformat og bruk mobilens horisontale marg som pauseavstand. */
  .portrait-card__image{
    position:static;
    width:100%;
    height:100%;
    max-width:100%;
    transform:none;
  }
  .portrait-card figcaption strong + span{
    margin-top:10px;
  }
  .portrait-card figcaption em{
    width:100%;
    max-width:100%;
  }
  .pause-image{
    margin-bottom:8vw;
  }
}

/* RC43: korrigert bildemarg og tettere navn/beskrivelse. */
@media (min-width:801px){
  .portrait-card__frame{
    margin-left:clamp(24px,2.1vw,40px);
    margin-right:clamp(24px,2.1vw,40px);
  }
  .portrait-card figcaption strong + span{
    margin-top:2px;
  }
}

@media (max-width:800px){
  .portrait-card figcaption strong + span{
    margin-top:2px;
  }
}


/* Neste kapittel bruker samme skala, strek og avstand som store menypunkter. */
.chapter-transition__link{
  font-family:var(--sans);
  font-size:clamp(2rem,2.7vw,3.7rem);
  font-weight:300;
  line-height:1.12;
  color:var(--ink);
  text-decoration:none;
}
.chapter-transition__link::after{
  bottom:-.04em;
  height:2px;
  background:currentColor;
  transform:rotate(1deg);
  transform-origin:left center;
}
.chapter-transition__link:hover,
.chapter-transition__link:focus-visible{
  color:var(--accent);
}

/* RC48: general text spread for photo chapters. */
.text-spread{
  min-height:100svh;
  display:grid;
  place-items:center;
  padding:clamp(40px,7vh,96px) clamp(24px,6vw,120px);
  background:#fff;
  text-align:center;
}
.text-spread__inner{width:min(80%,980px);margin:auto}
.text-spread__block{
  font-family:var(--serif);
  font-size:1.15rem;
  line-height:1.3;
  font-style:normal;
  font-weight:400;
}
.text-spread__block--semibold{font-weight:600}
.text-spread__block--italic{font-style:italic;font-weight:400}
.text-spread__block:last-child{margin-bottom:0!important}
@media(max-width:800px){
  .text-spread{padding:12vh 8vw;min-height:100svh}
  .text-spread__inner{width:100%}
}

/* RC49: use the full, uncropped source image and scale portraits to 110% of their own frame. */

/* RC68h: consolidated photo-chapter title system.
   Clean replacement for RC68g. Only the title layer is positioned;
   reverse-scroll containers, background images and site rail are untouched. */
.chapter-page .chapter-hero__title{
  position:absolute;
  z-index:2;
  top:46%;
  left:-5%;
  width:110%;
  pointer-events:none;
  transform:translateY(-50%);
}
.chapter-page .chapter-hero__title h1{
  position:static;
  width:100%;
  margin:0;
  color:#FFF73B;
  text-align:center;
  white-space:nowrap;
  line-height:.90;
  transform:translateY(-.055em) rotate(1deg);
  transform-origin:center center;
}
.chapter-page .chapter-hero__title h1 span{display:block}
.chapter-page .chapter-hero__title--nordsjoen{top:49%;}
.chapter-page .chapter-hero__title--nordsjoen h1{font-size:clamp(5.8rem,11.4vw,14.1rem)}
.chapter-page .chapter-hero__title--land h1{font-size:clamp(6.5rem,13.3vw,16rem)}
.chapter-page .chapter-hero__title--familie h1{font-size:clamp(6.1rem,12.4vw,15rem)}
.chapter-page .chapter-hero__title--arsak h1{font-size:clamp(6.5rem,13.2vw,15.8rem)}
.chapter-page .chapter-hero__title--siste-kapittel h1{font-size:clamp(5.2rem,10.2vw,12.4rem)}
.chapter-page .chapter-hero__title--ringene-i-vannet h1{
  font-size:clamp(4.9rem,9.2vw,11.2rem);
  line-height:.84;
  white-space:normal;
}

@media(max-width:800px){
  .chapter-page .chapter-hero__title{
    top:40%;
    left:-4%;
    width:108%;
  }
  .chapter-page .chapter-hero__title h1{line-height:.92}
  .chapter-page .chapter-hero__title--nordsjoen{top:43%;}
  .chapter-page .chapter-hero__title--nordsjoen h1{font-size:clamp(4.4rem,18.5vw,7.4rem)}
  .chapter-page .chapter-hero__title--land h1{font-size:clamp(5rem,21.2vw,8.3rem)}
  .chapter-page .chapter-hero__title--familie h1{font-size:clamp(4.7rem,19.6vw,7.8rem)}
  .chapter-page .chapter-hero__title--arsak h1{font-size:clamp(5rem,21.2vw,8.3rem)}
  .chapter-page .chapter-hero__title--siste-kapittel h1{font-size:clamp(3.8rem,15.8vw,6.3rem)}
}

/* Portrait mobile: keep Ringene i vannet on one line and fit it to the viewport.
   The PHP markup contains two spans, so both are explicitly restored to inline. */
@media(max-width:800px) and (orientation:portrait){
  .chapter-page .chapter-hero__title--ringene-i-vannet{
    left:0;
    width:100%;
  }
  .chapter-page .chapter-hero__title--ringene-i-vannet h1{
    display:block;
    box-sizing:border-box;
    width:calc(100vw - 24px);
    max-width:calc(100vw - 24px);
    margin-inline:auto;
    padding:0;
    font-size:clamp(2.35rem,10.6vw,4rem);
    line-height:.94;
    white-space:nowrap;
    overflow:visible;
  }
  .chapter-page .chapter-hero__title--ringene-i-vannet h1 span{
    display:inline !important;
    white-space:nowrap;
  }
  .chapter-page .chapter-hero__title--ringene-i-vannet h1 span + span::before{
    content:" ";
  }
}

/* RC60 test: generisk innholdsside for Om prosjektet og Takk til. */
.publication-page .publication-page__article{
  width:100%;
  max-width:none;
  min-height:100svh;
}
.publication-page .publication-page__body{
  min-height:calc(100svh - 21vh);
}

/* H6 er reservert for referanser og kolofon. Den arver brødtekstens gråfarge. */
.manuscript-page--history .manuscript__body h6{
  margin:0 0 .04em;
  padding:0;
  color:inherit;
  font-family:var(--serif);
  font-size:15px;
  font-weight:400;
  line-height:1.28;
  letter-spacing:0;
  text-transform:none;
}

/* Takk til: kolofonen (H6) presses til bunnen av den venstre tekstflaten. */
.publication-page--credits .publication-page__article,
.publication-page--credits .publication-page__body{
  display:flex;
  flex-direction:column;
}
.publication-page--credits .publication-page__body{
  flex:1;
}
.publication-page--credits .publication-page__body > h6:first-of-type{
  margin-top:auto;
}
.publication-page--credits .publication-page__body > h6:last-child{
  padding-bottom:80px;
}

@media(max-width:800px){
  .publication-page .publication-page__body{
    min-height:calc(100svh - 21vh);
  }
  .publication-page--credits .publication-page__body > h6:last-child{
    padding-bottom:16vw;
  }
}

/* RC61 test: ferdig innhold og typografi for generiske publikasjonssider. */
.publication-page .publication-page__body > h2{
  margin:0 0 clamp(2rem,4vh,3.5rem);
  font-family:var(--sans);
  font-size:clamp(2rem,2.7vw,3.7rem);
  font-weight:300;
  line-height:1.18;
  letter-spacing:0;
  text-transform:none;
}
.publication-page .publication-page__body > p{
  max-width:70ch;
}
.publication-page--credits .publication-page__body > h2{
  max-width:25ch;
}
.publication-page--credits .publication-page__body > h6{
  width:80%;
  max-width:980px;
  color:inherit;
}

@media(max-width:800px){
  .publication-page .publication-page__body > h2{
    font-size:clamp(2rem,9vw,3.2rem);
    margin-bottom:2rem;
  }
  .publication-page--credits .publication-page__body > h2,
  .publication-page--credits .publication-page__body > h6{
    width:100%;
    max-width:none;
  }
}

/* RC62 test: informasjonssidenes H2 følger den optiske størrelsen til de store menypunktene. */
@media (min-width:801px){
  .publication-page .publication-page__body > h2{
    font-size:clamp(2rem,2.7vw,3.7rem);
    line-height:1.18;
  }
}
@media (min-width:801px) and (max-height:900px){
  .publication-page .publication-page__body > h2{
    font-size:clamp(1.8rem,2.25vw,3rem);
  }
}
@media (max-width:800px){
  .publication-page .publication-page__body > h2{
    font-size:clamp(2.5rem,10vw,4.5rem);
    line-height:1.18;
  }
}

/* RC64: corrected information-page typography and compact About ending. */
/* H4 uses DIN Pro regular. Size remains approximately two thirds of H2. */
.manuscript-page--history .manuscript__body h4{
  margin:0 0 2rem;
  font-family:var(--sans);
  font-size:clamp(2rem,2.8vw,3rem);
  font-weight:400;
  line-height:.96;
  letter-spacing:-.01em;
  text-transform:none;
  color:inherit;
}

/* Om prosjektet must fit comfortably inside a standard 16:9 viewport. */
.publication-page--about .publication-page__article,
.publication-page--about .publication-page__body{
  min-height:0;
}
.publication-page--about .publication-page__article{
  padding-bottom:0;
}
.publication-page--about .chapter-transition--compact{
  min-height:0;
  gap:0;
  margin:0;
  padding:1.15em 40px 6vh;
  border-top:0;
}
.publication-page--about .chapter-transition--compact .chapter-transition__keyboard-note{
  margin:0;
}

@media(max-width:800px){
  .manuscript-page--history .manuscript__body h4{
    font-size:clamp(1.75rem,7vw,2.5rem);
    line-height:1.02;
  }
  .publication-page--about .chapter-transition--compact{
    padding:1.15em 8vw 8vh;
  }
}


/* RC65: information-page corrections. */
/* All primary text and keyboard-help text use the same neutral gray. */
:root{--ink:#707070}
.chapter-transition__keyboard-note,
.publication-keyboard-note{color:var(--ink)}

/* H4: DIN Pro regular at half the previous responsive scale. */
.manuscript-page--history .manuscript__body h4{
  margin:0 0 1.25rem;
  font-family:var(--sans);
  font-size:clamp(1rem,1.4vw,1.5rem);
  font-weight:400;
  line-height:1.15;
  letter-spacing:0;
  text-transform:none;
  color:inherit;
}

/* Om prosjektet: compact single-viewport layout without chapter-transition spacing. */
.publication-page--about .publication-page__article{
  min-height:0;
  padding-top:clamp(28px,4.5vh,52px);
  padding-bottom:clamp(28px,4.5vh,52px);
}
.publication-page--about .publication-page__body{
  min-height:0;
}
.publication-page--about .publication-page__body > p:last-child{
  margin-bottom:0;
}
.publication-keyboard-note{
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:.25em;
  margin:1.48em 0 0;
  font-family:var(--serif);
  font-size:1rem;
  line-height:1.48;
}
.publication-keyboard-note .chapter-transition__keyboard-icon{
  position:relative;
  top:1px;
}

@media(max-width:800px){
  .manuscript-page--history .manuscript__body h4{
    font-size:clamp(1rem,4vw,1.35rem);
    line-height:1.18;
  }
  .publication-page--about .publication-page__article{
    padding-top:clamp(72px,10vh,96px);
    padding-bottom:8vh;
  }
  .publication-keyboard-note{display:none}
}

/* RC66: final alignment for publication pages. */
/* Om prosjektet keeps H2 and starts at the same vertical position as text chapters. */
.publication-page--about .publication-page__article{
  padding-top:9vh;
  padding-bottom:12vh;
}

/* Takk til uses DIN Pro Regular in a slightly larger H4 with more leading. */
.manuscript-page--history .manuscript__body h4{
  font-family:var(--sans);
  font-size:clamp(1.2rem,1.65vw,1.8rem);
  font-weight:400;
  line-height:1.45;
  letter-spacing:0;
  color:inherit;
}

/* Compensate for the WordPress admin bar in logged-in previews. */
body.admin-bar .home-cover,
body.admin-bar .publication-page--about{
  min-height:calc(100svh - 32px);
}
body.admin-bar .home-cover__content{
  min-height:calc(100svh - 32px);
}

@media(max-width:782px){
  body.admin-bar .home-cover,
  body.admin-bar .publication-page--about,
  body.admin-bar .home-cover__content{
    min-height:calc(100svh - 46px);
  }
}

@media(max-width:800px){
  .publication-page--about .publication-page__article{
    padding-top:13vh;
    padding-bottom:8vh;
  }
  .manuscript-page--history .manuscript__body h4{
    font-size:clamp(1.15rem,4.8vw,1.55rem);
    line-height:1.45;
  }
}


/* RC67 QA: rendering, menu order, keyboard text and mobile menu fit. */
/* Keyboard guidance follows the same type size as manuscript body text. */
.chapter-transition__keyboard-note,
.publication-keyboard-note{
  font-size:1.2rem;
  line-height:1.48;
}

@media(max-width:800px){
  .chapter-transition__keyboard-note,
  .publication-keyboard-note{
    font-size:1.15rem;
    line-height:1.5;
  }

  /* The overlay is always white; the open-state X is always dark gray. */
  .mobile-menu{
    overflow:hidden;
    background:#fff;
  }
  .mobile-menu-toggle[aria-expanded="true"],
  .mobile-menu-toggle--home[aria-expanded="true"]{
    color:var(--ink) !important;
  }

  /* Small links keep their established fixed size. */
  .mobile-menu__small,
  .mobile-menu__minor{
    font-size:1.1rem;
  }

  /* All large links remain equal and scale together only when height requires it. */
  .mobile-menu__chapters{
    font-size:clamp(2.5rem,10vw,4.5rem);
    line-height:1.18;
    transform:none;
  }

  .mobile-menu__inner{
    min-height:100%;
    overflow:hidden;
  }

  /* On very short screens, reduce only vertical whitespace—not small-link type size. */
  .mobile-menu.is-height-constrained .mobile-menu__inner{
    padding-top:5vh;
    padding-bottom:4vh;
  }
  .mobile-menu.is-height-constrained .mobile-menu__chapters{
    margin-top:1rem;
  }
  .mobile-menu.is-height-constrained .mobile-menu__minor{
    margin-top:1rem;
    line-height:1.42;
  }
}

/* RC68c: consolidated staging/mobile corrections. */
@media (max-width:800px){
  .home-cover h1{font-size:clamp(3.3rem,14.3vw,6.05rem)}
  .home-cover__start{font-size:clamp(1.755rem,2.21vw,2.6rem)}

  .publication-page--about .publication-page__body > h2{
    font-size:clamp(1.5rem,6vw,2.7rem);
    line-height:1.18;
  }

  .mobile-menu{
    height:100dvh;
    min-height:100dvh;
    overflow:hidden;
    background:#fff;
  }
  .mobile-menu__inner{
    box-sizing:border-box;
    height:100dvh;
    min-height:0;
    padding:20px var(--mobile-edge);
    display:flex;
    flex-direction:column;
    justify-content:center;
    overflow:hidden;
  }
  .mobile-menu__small,
  .mobile-menu__minor{flex:0 0 auto}
  .mobile-menu__chapters{
    flex:0 0 auto;
    margin-top:clamp(12px,3dvh,28px);
    line-height:1.14;
  }
  .mobile-menu__minor{
    margin-top:clamp(12px,3dvh,28px);
    line-height:1.42;
  }
  .mobile-menu.is-height-constrained .mobile-menu__inner{
    padding-top:20px;
    padding-bottom:20px;
  }
  .mobile-menu.is-height-constrained .mobile-menu__chapters,
  .mobile-menu.is-height-constrained .mobile-menu__minor{margin-top:10px}

  /* Burger and X share exactly the same button box and visual centre. */
  .mobile-menu-toggle,
  .mobile-menu-toggle--home,
  .mobile-menu-toggle[aria-expanded="true"],
  .mobile-menu-toggle--home[aria-expanded="true"]{
    right:32px !important;
  }

  .chapter-page--normal .photo-sequence{padding-top:8vw}
  .portrait-card{margin-bottom:8vw}
  .portrait-card figcaption{padding-top:4vw}
  .portrait-card figcaption em{margin-top:12px}

  .publication-page--about .publication-next-mobile{
    display:block;
    margin-top:auto;
    padding-top:2rem;
    font-family:var(--serif);
    font-size:1.15rem;
    line-height:1.5;
    color:var(--ink);
    text-decoration:none;
  }
  .publication-page--about .publication-page__article{
    display:flex;
    flex-direction:column;
    min-height:100svh;
  }
}
@media (min-width:801px){
  .publication-next-mobile{display:none}
}

/* Calm hero loading: reserve a dark surface and reveal only the image. */
.chapter-hero{background:var(--dark)}
.chapter-hero__image.is-awaiting-reveal{opacity:0}
.chapter-hero__image.is-loaded{opacity:1}
.chapter-hero__image{transition:opacity .22s ease}
@media(prefers-reduced-motion:reduce){
  .chapter-hero__image{transition:none}
}


/* QA03: Om prosjektet baseline alignment + responsive small desktop menu type.
   Shared variables keep the About opening aligned with the first large menu item
   instead of maintaining unrelated vh offsets. */
@media (min-width:801px){
  :root{
    --rail-small-size:1.2rem;
    --rail-small-leading:1.78;
    --rail-chapter-gap:clamp(10px,2vh,22px);
    --rail-top-space:clamp(24px,9vh,96px);
  }

  .site-rail__top,
  .site-rail__minor{
    font-size:var(--rail-small-size);
  }

  /* The first line on Om prosjektet shares the vertical line-box start of
     Nordsjøen: rail top + one small-top line + the chapter-group gap.
     H2 and menu chapter titles already share the same DIN size/leading scale. */
  .publication-page--about .publication-page__article{
    padding-top:calc(
      var(--rail-top-space)
      + (var(--rail-small-size) * var(--rail-small-leading))
      + var(--rail-chapter-gap)
    );
  }
}

/* On shorter desktop screens keep the compact menu size that already fits.
   The About alignment uses the same variables, so it remains locked to Nordsjøen. */
@media (min-width:801px) and (max-height:900px){
  :root{
    --rail-small-size:1rem;
    --rail-top-space:24px;
    --rail-chapter-gap:12px;
  }
}

/* Mobile keeps its existing spacing; there is no permanent rail to align to. */


/* QA05: final requested visual corrections. */

/* Test: only the homepage title is yellow. Start and sound controls keep accent red. */
.home-cover h1{
  color:#FFF73B;
}

/* Om prosjektet: the bottom link to Nordsjøen uses the exact visual language
   of the existing "Til kapittel" links, regardless of its template class. */
.publication-page--about .publication-page__article a[href*="/foto/nordsjoen/"]{
  position:relative;
  display:inline-block;
  width:max-content;
  max-width:100%;
  color:var(--ink);
  font-family:var(--sans);
  font-size:clamp(2rem,2.7vw,3.7rem);
  font-weight:300;
  line-height:1.12;
  text-decoration:none;
}
.publication-page--about .publication-page__article a[href*="/foto/nordsjoen/"]::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-.04em;
  height:2px;
  background:currentColor;
  transform:rotate(1deg);
  transform-origin:left center;
}
.publication-page--about .publication-page__article a[href*="/foto/nordsjoen/"]:hover,
.publication-page--about .publication-page__article a[href*="/foto/nordsjoen/"]:focus-visible{
  color:var(--accent);
}

@media(max-width:800px){
  .publication-page--about .publication-page__article a[href*="/foto/nordsjoen/"]{
    font-size:clamp(2rem,9vw,3rem);
  }
}


/* QA06 */

/* Homepage: interactive rollover uses the same yellow as the title. */
.home-cover a:hover,
.home-cover a:focus-visible,
.home-cover button:hover,
.home-cover button:focus-visible{
  color:#FFF73B;
}
.home-cover button:hover svg,
.home-cover button:focus-visible svg{
  color:#FFF73B;
}

/* Om prosjektet: the bottom Nordsjøen chapter link is a mobile-only affordance. */
@media (min-width:801px){
  .publication-page--about .publication-page__article a[href*="/foto/nordsjoen/"]{
    display:none !important;
  }
}







/* QA09: restore the proven QA03 relationship, adjusted only for the removed Hjem row. */

/* Forside: the old hover rule applies a white-producing filter to the icon.
   Neutralise that filter and let the inline SVG follow the yellow currentColor. */
.home-cover .sound-toggle:hover,
.home-cover .sound-toggle:focus-visible{
  color:#FFF73B !important;
}
.home-cover .sound-toggle:hover .sound-toggle__icon,
.home-cover .sound-toggle:focus-visible .sound-toggle__icon{
  filter:none !important;
  color:#FFF73B !important;
}
.home-cover .sound-toggle:hover .sound-toggle__icon svg line,
.home-cover .sound-toggle:focus-visible .sound-toggle__icon svg line{
  stroke:currentColor !important;
}

/* Om prosjektet:
   QA03 already calculated the correct responsive relation to the rail.
   Removing Hjem moves Nordsjøen up by exactly one small-link line.
   Move the content by that same computed line-height; do not replace the
   existing responsive article padding with a new padding value. */
@media (min-width:801px){
  .publication-page--about .publication-page__body{
    transform:translateY(
      calc(-1 * var(--rail-small-size) * var(--rail-small-leading))
    );
  }
}
