@font-face { font-family: "Familjen"; src: url("../fonts/familjen-grotesk.woff2") format("woff2"); font-weight: 400 600; font-display: optional; }
@font-face { font-family: "JBMono"; src: url("../fonts/jetbrains-mono-400.woff2") format("woff2"); font-weight: 400; font-display: optional; }

@property --wall { syntax: "<color>"; inherits: true; initial-value: #ebebe9; }
@property --ink { syntax: "<color>"; inherits: true; initial-value: #131415; }
@property --paper { syntax: "<color>"; inherits: true; initial-value: #ffffff; }

:root {
  --wall: #ebebe9;
  --ink: #131415;
  --ink-end: #131415;
  --sheet: #ffffff;
  --paper: #ffffff;
  --soft: #55585a;
  --line: #c4c4c1;
  --origin: #C06BCD;
  --gut: clamp(16px, 4vw, 64px);
  --sans: "Familjen", system-ui, sans-serif;
  --mono: "JBMono", ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --wall: #0d0e10; --ink: #f1efeb; --ink-end: #f1efeb; --paper: #fdfcfa; --sheet: #17181b; --soft: #a5a8aa; --line: #33363a; color-scheme: dark; } }
:root[data-theme="dark"] { --wall: #0d0e10; --ink: #f1efeb; --ink-end: #f1efeb; --paper: #fdfcfa; --sheet: #17181b; --soft: #a5a8aa; --line: #33363a; color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--wall); color: var(--ink); -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body { margin: 0; font: 400 1.125rem/1.55 var(--sans); background: var(--wall); color: var(--ink); overflow-wrap: break-word; }
h1, h2, h3, p, dl, dd, ul, ol, figure, table { margin: 0; padding: 0; }
h1, h2, h3 { font-weight: 500; line-height: 1.05; letter-spacing: -0.025em; text-wrap: balance; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
svg, canvas { display: block; max-width: 100%; }

.skip { position: absolute; left: var(--gut); top: -5rem; z-index: 20; background: var(--ink); color: var(--wall); padding: 0.75rem 1rem; }
.skip:focus { top: 0.5rem; }

.mono { font: 400 0.8125rem/1.6 var(--mono); letter-spacing: 0; }

/* Huvud och fot */
.head { position: relative; z-index: 5; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 2rem; padding: 0.75rem var(--gut); }
.name { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; font-weight: 500; text-decoration: none; }
.head ul { display: flex; flex-wrap: wrap; gap: 0 clamp(0.75rem, 2.4vw, 2rem); list-style: none; }
.head li a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; text-decoration: none; }
.head li a:hover, .head li a[aria-current] { text-decoration: underline; }

#theme { order: 3; min-width: 60px; min-height: 44px; padding: 0 0.9rem; border: 1px solid currentColor; background: none; color: inherit; font: inherit; cursor: pointer; }
#theme:hover { background: var(--ink); color: var(--wall); }
#theme[hidden] { display: none; }
.head nav { margin-left: auto; }
.paper { fill: var(--paper); }
.dim text, .dim g { color: #131415; }

.foot { margin-top: clamp(6rem, 16vh, 12rem); padding: 2rem var(--gut) 3rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 3rem; }
.foot ul { display: flex; flex-wrap: wrap; gap: 0 2rem; list-style: none; }
.foot li a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }

.go { display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.4rem; border: 1px solid currentColor; text-decoration: none; }
.go:hover { background: var(--ink); color: var(--wall); border-color: var(--ink); }
.go[hidden] { display: none; }
.ways { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Arket: A2 420 x 594, faltet ar 80 procent i bada led */
.sheet { position: relative; aspect-ratio: 420 / 594; background: var(--paper); }
.field { position: absolute; inset: 10%; background: var(--origin); }

/* Oppningen */
.open { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(1.5rem, 6vw, 7rem); align-items: end; min-height: calc(100svh - 68px); padding: 1rem var(--gut) clamp(1.5rem, 5vh, 4rem); }
.open .sheet { height: min(72svh, 820px); }
.open h1 { font-size: clamp(2.6rem, 6.4vw, 7rem); max-width: 11ch; margin: 0.12em 0 0.28em; letter-spacing: -0.045em; line-height: 0.92; }
.open .say + .say { margin-top: 0.9rem; }
.open .say + p:not(.say) { margin-top: 1rem; max-width: 34rem; }
.hook { margin-top: 1.25rem; font-size: clamp(1.15rem, 1.6vw, 1.45rem); line-height: 1.35; }
.open .facts + .facts { margin-top: -1rem; }
.ask-big h2 { font-size: clamp(2rem, 4.4vw, 4.25rem); letter-spacing: -0.035em; }
.turnline { font-size: clamp(1.5rem, 3vw, 2.6rem); line-height: 1.2; letter-spacing: -0.02em; max-width: 22ch; margin-bottom: 2.5rem; }
#journey { outline: none; font-size: clamp(2rem, 4.4vw, 4.25rem); letter-spacing: -0.035em; }
.hero-art { justify-self: end; display: grid; gap: 0.75rem; justify-items: end; }
.hero-art .stack { position: absolute; inset: 0; }
.hero-art .stack svg { opacity: 0; }
.hero-art .stack .s0 { opacity: 1; }
.trio { display: none; }
.pausehero { min-height: 44px; min-width: 44px; padding: 0 0.9rem; border: 1px solid var(--line); background: none; color: inherit; font: inherit; font-size: 0.9375rem; cursor: pointer; }
.pausehero[hidden] { display: none; }
@keyframes cyc { 0% { opacity: 0; } 5%, 20% { opacity: 1; } 25%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-art .stack .s0 { opacity: 0; }
  .hero-art .stack svg { animation: cyc 20s linear infinite backwards; }
  .hero-art .stack .s1 { animation-delay: 4s; } .hero-art .stack .s2 { animation-delay: 8s; } .hero-art .stack .s3 { animation-delay: 12s; } .hero-art .stack .s4 { animation-delay: 16s; }
  .hero-art.paused .stack svg { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-art > .sheet { display: none; }
  .trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; width: min(100%, 560px); }
}
.ask { font-style: italic; }
.close { display: grid; gap: 1.4rem; }
.close .say { font-size: clamp(1.5rem, 3vw, 2.6rem); line-height: 1.2; letter-spacing: -0.02em; max-width: 26ch; }
.open .say { font-size: clamp(1.2rem, 1.7vw, 1.6rem); line-height: 1.3; max-width: 24ch; }
.open .facts { margin: 2rem 0 2rem; }

/* Faltet delar sig, styrt av scroll */
.birth { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 6vw, 7rem); padding: 0 var(--gut); margin-top: clamp(4rem, 12vh, 9rem); }
.intro { grid-column: 1 / -1; max-width: 46rem; padding-bottom: 3rem; }
.intro h2, .part h2 { font-size: clamp(2rem, 4.4vw, 4.25rem); letter-spacing: -0.035em; }
.intro p { margin-top: 1.5rem; font-size: clamp(1.2rem, 1.8vw, 1.6rem); line-height: 1.35; }
.steps { list-style: none; }
.step { min-height: 58svh; display: flex; flex-direction: column; justify-content: center; gap: 0.6rem; }
.step h3 { font-size: clamp(1.8rem, 3.6vw, 3.4rem); }
.step p { max-width: 30ch; }
.step .still { width: min(220px, 60%); margin-top: 1rem; }
.stagewrap { display: none; }
.live .step .still { display: none; }
.live .stagewrap { display: block; }
.stage { position: sticky; top: max(2rem, calc((100svh - min(84svh, 900px)) / 2)); display: flex; flex-direction: column; align-items: end; gap: 0.75rem; }
.stage .sheet { height: min(84svh, 900px); max-width: 100%; }
.stage canvas { position: absolute; inset: 10%; width: 80%; height: 80%; }
.stagenote { align-self: end; text-align: right; color: var(--soft); }

/* Textsektioner */
.part { padding: 0 var(--gut); margin-top: clamp(5rem, 16vh, 11rem); }
.part .text { max-width: 40rem; margin-top: 1.75rem; display: grid; gap: 1.1rem; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem clamp(1.5rem, 6vw, 7rem); }
.two .text { margin-top: 0.4rem; }
.acts { list-style: none; margin-top: 2.5rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
.acts li { border-top: 1px solid var(--ink); padding-top: 0.9rem; }
.acts b { display: block; font-weight: 500; font-size: 1.35rem; margin-bottom: 0.3rem; }

/* Undersidor */
.top { padding: clamp(2rem, 8vh, 6rem) var(--gut) 0; }
.top h1 { font-size: clamp(2.6rem, 7vw, 7rem); letter-spacing: -0.045em; line-height: 0.95; }
.top .lead { margin-top: 1.75rem; font-size: clamp(1.2rem, 1.8vw, 1.6rem); line-height: 1.35; max-width: 34ch; }
.work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem clamp(1.5rem, 6vw, 7rem); padding: clamp(2rem, 6vh, 4rem) var(--gut) 0; align-items: end; }
.work h1 { font-size: clamp(2.6rem, 6vw, 6rem); letter-spacing: -0.045em; line-height: 0.95; }
.work .say { margin: 1.5rem 0 2rem; max-width: 34ch; }
.work .sheet { height: min(80svh, 860px); max-width: 100%; justify-self: end; }
.h3 { font-size: 1.35rem; }
.qa { display: grid; gap: 2.25rem; margin-top: 2.25rem; max-width: 44rem; }
.qa h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }

dl.spec { display: grid; grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr); margin-top: 2rem; max-width: 56rem; }
dl.spec dt, dl.spec dd { padding: 0.7rem 0; border-top: 1px solid var(--line); }
dl.spec dt { color: var(--soft); padding-right: 1rem; }
table { border-collapse: collapse; width: 100%; max-width: 56rem; margin-top: 2rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; font-weight: 400; padding: 0.65rem 1rem 0.65rem 0; border-top: 1px solid var(--line); vertical-align: top; }
thead th { color: var(--soft); border-top: 0; }
.dim { width: min(100%, 520px); margin-top: 2rem; }
.halves { width: min(100%, 520px); margin-top: 2rem; }

/* Verken och matrisen */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.infield { position: absolute; inset: 10%; width: 80%; height: 80%; }
.wall { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 6vw, 6rem) clamp(1rem, 5vw, 6rem); }
.wall a { display: block; text-decoration: none; }
.wall a:hover b { text-decoration: underline; }
.wall b { display: block; font-weight: 500; font-size: clamp(1.1rem, 1.7vw, 1.5rem); margin-top: 0.9rem; }
.sheet.small { display: block; }
.wallnote { margin-top: 1.5rem; color: var(--soft); }
.minis { list-style: none; margin-top: 2.5rem; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: clamp(0.5rem, 1.6vw, 1.5rem); }
.minis .mini { width: 100%; height: auto; }
.turn { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.turn a { display: inline-flex; align-items: center; min-height: 44px; }
.count { margin-top: 1rem; color: var(--soft); }
.choose { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 2rem clamp(2rem, 7vw, 8rem); margin-top: 2rem; align-items: start; }
.how { margin-bottom: 1.25rem; max-width: 34rem; }
.how b { font-weight: 600; }
.matrix { max-width: none; margin: 0; table-layout: fixed; }
.matrix th, .matrix td { border: 0; padding: 2px; vertical-align: middle; }
.matrix thead th:first-child, .matrix tbody th { width: 2.4rem; font: 400 0.75rem/1 var(--mono); color: var(--ink); }
.matrix .mini { width: 100%; height: auto; }
.spot, .col { display: block; position: relative; }
.col { text-align: center; padding: 0.8rem 0; font: 400 0.8125rem/1 var(--mono); }
th.part .col { color: var(--soft); text-decoration: line-through; }
button.spot, button.col { width: 100%; border: 0; padding: 0; margin: 0; background: none; color: inherit; cursor: pointer; }
button.col { min-height: 44px; border: 1px solid var(--ink); }
button.col[aria-pressed="true"] { background: var(--ink); color: var(--wall); }
@media (hover: hover) { button.spot:hover { outline: 2px solid var(--ink); outline-offset: 0; z-index: 1; } button.col:hover { outline: 2px solid var(--ink); } }
button.spot:focus-visible, button.col:focus-visible { outline: 3px dashed var(--ink); outline-offset: 2px; z-index: 2; }
button.spot[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: -3px; }
button.spot[aria-pressed="true"]::after { content: ""; position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; background: var(--ink); }
button.spot[aria-pressed="true"]::before { content: ""; position: absolute; z-index: 1; right: 6px; bottom: 5px; width: 4px; height: 8px; border: solid var(--wall); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.gone .mini { opacity: 0.12; }
.pick[hidden] { display: none; }
.pick { position: sticky; top: 1.5rem; display: grid; grid-template-columns: min(220px, 40%) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
#picker { grid-column: 1 / -1; }
#morecolor { display: none; }
.pick .sheet { width: 100%; }
.board { max-width: 560px; }
.pick canvas { position: absolute; inset: 10%; width: 80%; height: 80%; }
.picktext { display: grid; gap: 0.6rem; }
#seen { font-size: clamp(1.2rem, 1.8vw, 1.6rem); line-height: 1.2; }
#sum { font-weight: 600; font-variant-numeric: tabular-nums; }
#sum:empty { display: none; }
#picker[hidden] { display: none; }
#picker { display: grid; gap: 0.5rem; }
.paint { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: center; max-width: 480px; }
.now { display: grid; }
.now i { display: block; aspect-ratio: 1.414; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 6px; }
.swatches button { min-width: 0; aspect-ratio: 0.707; padding: 0; border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); border-radius: 0; cursor: pointer; }
.swatches button[hidden] { display: none; }
.swatches button:hover { border-color: var(--ink); }
.swatches button[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.swatches button:focus-visible { outline: 3px dashed var(--ink); outline-offset: 2px; }
#clear { background: none; color: inherit; font: inherit; cursor: pointer; min-height: 44px; }
#clear:hover { background: var(--ink); color: var(--wall); }
#clear[hidden] { display: none; }
.fine { color: var(--soft); }

.four { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(0.75rem, 3vw, 3rem); max-width: 76rem; }
.pairs { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: clamp(0.4rem, 1.4vw, 1.25rem); margin: 2.5rem 0 2rem; }
.four svg, .pairs svg { width: 100%; height: auto; }

/* Hero: vaggen */
#room.hero-room { overflow: hidden; margin-top: 0.25rem; }
#room.hero-room svg { display: block; width: 100%; height: auto; aspect-ratio: 886 / 280; max-height: 68svh; cursor: default; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #room.hero-room { --w: #1c1e23; --f: #2a2b2e; --plank: #222326; --ceil: #0b0c0e; --skirt: #15171a; --pool: 0.26; } }
:root[data-theme="dark"] #room.hero-room { --w: #1c1e23; --f: #2a2b2e; --plank: #222326; --ceil: #0b0c0e; --skirt: #15171a; --pool: 0.26; }
.opener { min-height: 0; align-items: start; padding-top: clamp(1.75rem, 5vh, 3.5rem); }
.opener h1 { margin: 0; }
.h1a { display: block; }
.h1b { display: block; font-size: clamp(1.35rem, 2.1vw, 1.9rem); letter-spacing: -0.015em; line-height: 1.2; margin-top: 0.9rem; max-width: 22ch; font-weight: 400; }
.opener > div:last-child > p:first-child { margin-top: 0; max-width: 36rem; }

/* Galleriet */
.gal { padding-top: 0.5rem; }
#room { --w: #e9e7e2; --f: #b68d60; --plank: #8f6a43; --ceil: #d8d6d1; --skirt: #f4f3ef; --pool: 0.9; overflow-x: auto; background: var(--w); }
#room[data-wall="grey"] { --w: #8d9294; --f: #4b4e50; --plank: #414446; --ceil: #2b2d2f; --skirt: #7a7f81; --pool: 0.42; }
#room[data-wall="night"] { --w: #1c1e23; --f: #2a2b2e; --plank: #222326; --ceil: #0b0c0e; --skirt: #15171a; --pool: 0.26; }
#room[data-wall="blue"] { --w: #2e3f70; --f: #a87f55; --plank: #86613c; --ceil: #1d2747; --skirt: #263460; --pool: 0.32; }
#room[data-wall="oxblood"] { --w: #642527; --f: #8d6440; --plank: #6f4c2e; --ceil: #3b1415; --skirt: #561e20; --pool: 0.28; }
#room[data-wall="sage"] { --w: #8ea497; --f: #b68d60; --plank: #8f6a43; --ceil: #6d8175; --skirt: #dfe5df; --pool: 0.5; }
#room svg { width: auto; max-width: none; height: 70svh; touch-action: pan-y; }
#room.on { overflow: hidden; }
#room.on svg { width: 100%; height: clamp(360px, 70svh, 900px); cursor: grab; user-select: none; -webkit-user-select: none; }
#room.on svg:active { cursor: grabbing; }
#room .w { fill: var(--w); } #room .f { fill: var(--f); } #room .ceil { fill: var(--ceil); } #room .skirt { fill: var(--skirt); }
#room rect { transition: fill 0.5s; }
#room .planks { stroke: var(--plank); stroke-width: 0.5; fill: none; opacity: 0.75; }
#room .rail { stroke: #17181a; stroke-width: 2; } #room .lamp { fill: #17181a; }
#room .pool { fill: url(#light); opacity: var(--pool); pointer-events: none; }
#room .cast { fill: #000; opacity: 0.34; } #room .sheetpaper { fill: #fdfcfa; }
#room .frame { fill: none; } #room[data-frame="black"] .frame { fill: #151515; } #room[data-frame="oak"] .frame { fill: #a77c4c; }
#room .label rect { fill: #fbfaf7; } #room .label text { font: 1.35px var(--sans); fill: #131415; }
#room .bench path { fill: #4a3524; } #room .bench .front { fill: #2f2117; } #room .shade { fill: #000; opacity: 0.4; }
#room .person { opacity: 0.9; } #room .p1 { fill: #23252b; } #room .p2 { fill: #1a1c20; } #room .p3 { fill: #4b4f58; } #room .p4 { fill: #3b3f47; } #room .p5 { fill: #5a5f69; } #room .skin { fill: #b98e72; } #room .hair { fill: #2b211b; }
#room .art { cursor: pointer; }
#controls[hidden] { display: none; }
#controls { display: flex; flex-wrap: wrap; gap: 1.25rem 2.5rem; padding: 1.25rem var(--gut) 0; align-items: start; }
.walk { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; width: 100%; }
.walk .go, .set button { background: none; color: inherit; font: inherit; cursor: pointer; }
#step { min-width: 8.2rem; justify-content: center; }
#caption { margin-left: 0.75rem; font-size: clamp(1.1rem, 1.6vw, 1.4rem); }
.set { display: grid; gap: 0.4rem; }
.set .mono { color: var(--soft); }
.set div { display: flex; flex-wrap: wrap; gap: 4px; }
.set button { min-height: 44px; min-width: 44px; padding: 0 0.7rem; border: 1px solid var(--line); }
.set button[aria-pressed="true"] { background: var(--ink); color: var(--wall); border-color: var(--ink); }
.set button:hover { border-color: var(--ink); }
.galnote { padding: 1.5rem var(--gut) 0; color: var(--soft); max-width: 60rem; }

/* Linjen */
.lines { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem clamp(2rem, 7vw, 8rem); align-items: start; }
.lines[hidden], .desk [hidden], .lines [hidden] { display: none; }
.lines h2, .desk h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); outline: none; }
.lines h2.sr { position: absolute; }
.lines form, .compose { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr); gap: 0.7rem; justify-items: start; }
.lines h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.lines label, .compose label { font-size: 1rem; }
::placeholder { color: var(--soft); opacity: 1; }
.text > *, .qa > *, dd { min-width: 0; overflow-wrap: anywhere; }
.skipto { position: absolute; left: -999rem; }
.skipto:focus { position: static; }
:root:not(.js) .board, :root:not(.js) .minis, :root:not(.js) #start, :root:not(.js) .choosepart .how b { display: none; }
#wall, #more a { display: inline-flex; align-items: center; min-height: 44px; }
#more { display: flex; gap: 1.25rem; }
#more[hidden] { display: none; }
#pick:focus { outline: none; }
tr.here th { font-weight: 600; text-decoration: underline; }
#room .art.here .frame { stroke: var(--origin); stroke-width: 1.4; }
textarea, input[type="text"], input[type="password"], input[type="email"] { width: 100%; padding: 0.8rem; border: 1px solid var(--ink); border-radius: 0; background: var(--sheet); color: var(--ink); font: inherit; }
input.mono { font-family: var(--mono); }
input[type="file"] { width: 100%; min-width: 0; max-width: 100%; font: inherit; font-size: 0.95rem; min-height: 44px; }
#drop { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr); gap: 0.8rem; width: 100%; padding: 2rem 1.25rem; border: 1px dashed var(--ink); cursor: pointer; }
#drop.over { background: var(--origin); color: #131415; }
button.go { background: none; color: inherit; font: inherit; cursor: pointer; }
button.go:hover { background: var(--ink); color: var(--wall); }
button.go[disabled] { opacity: 0.4; cursor: not-allowed; }
#dropchoice { background: none; border: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; min-height: 44px; }
.alert { padding: 0.7rem 0.9rem; border-left: 4px solid #b5373c; background: var(--sheet); }
.keysheet { width: min(100%, 420px); }
.keysheet canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.keytext { font: 400 1.15rem/1.7 var(--mono); overflow-wrap: anywhere; margin: 1.25rem 0; }
.tick { display: flex; gap: 0.7rem; align-items: center; min-height: 44px; margin: 1rem 0; }
.tick input { width: 22px; height: 22px; flex: none; }
#keep > div + div > p { margin-top: 0.9rem; }
#mini { width: 150px; margin-bottom: 1.25rem; }
.msgs { display: grid; gap: 1.5rem; margin: 1.5rem 0 2.5rem; }
.msg { border-top: 1px solid var(--line); padding-top: 0.8rem; }
.msg .mono { color: var(--soft); }
.msg.desk { border-top: 2px solid var(--origin); }
.words { white-space: pre-wrap; margin-top: 0.3rem; max-width: 60ch; }
.pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 0.8rem; }
.pics img { width: 100%; height: auto; display: block; }
.rows { list-style: none; margin: 1.5rem 0 3rem; max-width: 56rem; }
.row { display: grid; gap: 0.2rem; width: 100%; padding: 0.8rem 0; border: 0; border-top: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.row.unread { font-weight: 600; }
.desk .compose { max-width: 40rem; margin-bottom: 1.5rem; }

/* Gryningen: en punkt, sedan faltet, sedan rummet */
@media (prefers-reduced-motion: no-preference) {
  .dawn:not(:has(:target)) { animation: dawn 0.9s linear 0.9s backwards, ink 0.9s linear 0.9s backwards; }
  .dawn:not(:has(:target)) .open .stack { animation: grow 1.3s cubic-bezier(0.6, 0, 0.1, 1) 0.4s backwards; }
}
@keyframes dawn { from { --wall: #08080a; --paper: #08080a; } }
/* Texten byter i ett steg, sa att den aldrig mots i gratt med vaggen. */
@keyframes ink { 0%, 49.9% { --ink: #f3f1ee; } 50%, 100% { --ink: var(--ink-end); } }
@keyframes grow { from { transform: scale(var(--px, 0.0028), var(--py, 0.002)); } }

@media (max-width: 800px) {
  .open { grid-template-columns: minmax(0, 1fr); align-content: start; min-height: 0; }
  #room.hero-room svg { aspect-ratio: 1.15; max-height: none; }
  .open .sheet { height: auto; width: min(74vw, 52svh); }
  .hero-art { justify-self: center; justify-items: center; order: -1; }
  .birth { display: flex; flex-direction: column; gap: 0; }
  .intro { order: 0; }
  .stagewrap { order: 1; }
  .steps { order: 2; }
  .stagewrap { position: sticky; top: 0; z-index: 2; background: var(--wall); padding: 0.75rem 0; }
  .stage { position: static; align-items: center; }
  .stage .sheet { height: 46svh; }
  .stagenote { align-self: center; text-align: center; }
  .step { min-height: 52svh; justify-content: flex-start; padding-top: 2rem; }
  .two, .work, .lines { grid-template-columns: minmax(0, 1fr); }
  .work .sheet { height: auto; width: min(80vw, 56svh); justify-self: center; order: -1; }
  .acts { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .minis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pairs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .choose { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .choosepart { padding: 0 10px; }
  .choosepart h2, .choosepart .count, .how { padding: 0 6px; }
  .choosepart h2 { margin-bottom: 0.75rem; }
  .matrix th, .matrix td { padding: 1.5px; }
  .matrix thead th:first-child, .matrix tbody th { width: 1.9rem; font-size: 0.6875rem; }
  .col { font-size: 0.75rem; }
  .pick { top: auto; bottom: 0; z-index: 4; margin: 0 -10px; padding: 10px 16px; background: var(--wall); border-top: 1px solid var(--ink); grid-template-columns: 52px minmax(0, 1fr); gap: 0.9rem; align-items: center; }
  .pick .sheet { width: 52px; }
  .picktext { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.9rem; font-size: 0.9375rem; line-height: 1.3; }
  #seen, #picked { flex-basis: 100%; }
  .picktext p:has(#toreq) { order: 1; }
  .picktext p:has(#clear) { order: 2; }
  .picktext p:has(#wall) { order: 3; }
  .pick { max-height: 46svh; overflow-y: auto; }
  html:has(#pick) { scroll-padding-bottom: 14rem; }
  #seen { font-size: 1.05rem; }
  #picked { max-height: 3.9em; overflow: auto; }
  .picktext .go { min-height: 44px; padding: 0 0.9rem; }
  #morecolor { display: block; justify-self: start; min-height: 44px; padding: 0 0.9rem; border: 1px solid currentColor; background: none; color: inherit; font: inherit; font-size: 0.9375rem; cursor: pointer; }
  #picker:not(.open) .paint, #picker:not(.open) #code { display: none; }
  #picker { gap: 0.25rem; }
  .pick { row-gap: 6px; }
  #pickhead { display: none; }
  #picked { max-height: 1.4em; }
  .paint { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; max-width: none; }
  .swatches { grid-template-columns: repeat(auto-fill, minmax(28px, 1fr)); gap: 5px; }
}
@media (max-width: 480px) {
  .name { flex: 1; }
  .head nav { order: 4; width: 100%; margin: 0; }
  .head ul { gap: 0 0.5rem; }
  .head li a { font-size: 0.95rem; }
  dl.spec { grid-template-columns: minmax(0, 1fr); }
  dl.spec dt { padding-bottom: 0; }
  dl.spec dd { border-top: 0; padding-top: 0; }
}
@media (max-width: 380px) {
  .paint { grid-template-columns: 1fr; }
  .now { display: none; }
}
@media (max-width: 800px) {
  #room.on svg { height: 62svh; }
  #caption { margin: 0; width: 100%; }
}

/* Sequence: den ensamma raden under figuren */
.aside { margin-top: 1.5rem; font-size: clamp(1.05rem, 1.4vw, 1.25rem); font-style: italic; opacity: 0.85; max-width: 30ch; }
.top .lead + .lead { margin-top: 1rem; }
#a2 ~ div .say { font-size: clamp(1.3rem, 2vw, 1.75rem); line-height: 1.25; letter-spacing: -0.015em; margin-bottom: 1rem; }

/* Galleriets kontroller */
#controls { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 1.5rem clamp(2rem, 4vw, 3.5rem); padding: 1.5rem var(--gut) 0; }
.walk { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); width: auto; }
.where { display: grid; gap: 0.35rem; }
#caption { margin: 0; font-size: clamp(1.2rem, 1.8vw, 1.6rem); letter-spacing: -0.01em; }
#more { gap: 1.5rem; font-size: 0.9375rem; }
#more a { min-height: 32px; }
.set { gap: 0.6rem; }
.set > .mono { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); background: none; }
.set .seg { gap: 0; }
.seg button { min-height: 44px; min-width: 44px; padding: 0 0.85rem; border: 0; border-left: 1px solid var(--line); background: none; color: inherit; font: inherit; font-size: 0.9375rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; transition: background-color .15s, color .15s; }
.seg button:first-child { border-left: 0; }
.seg button:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--wall); }
.seg button:disabled { opacity: 0.35; cursor: default; background: none; }
.seg button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; position: relative; z-index: 1; }
.nav #step { min-width: 9rem; }
#walls button::before, #frames button::before { content: ""; width: 0.8rem; height: 0.8rem; border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent); flex: none; box-shadow: 0 0 0 1px rgba(128,128,128,.6); }
#walls [data-wall="white"]::before { background: #f1efe9; } #walls [data-wall="grey"]::before { background: #8d9294; } #walls [data-wall="night"]::before { background: #1c1e23; }
#walls [data-wall="blue"]::before { background: #2e3f70; } #walls [data-wall="oxblood"]::before { background: #642527; } #walls [data-wall="sage"]::before { background: #8ea497; }
#frames [data-frame="none"]::before { background: none; border: 1px dashed currentColor; } #frames [data-frame="black"]::before { background: #151515; } #frames [data-frame="oak"]::before { background: #a77c4c; }
.galnote { padding: 1.25rem var(--gut) 0; font-size: 0.8125rem; }
@media (max-width: 1100px) { #controls { grid-template-columns: auto; } }
@media (max-width: 800px) {
  .walk { flex-direction: column; align-items: stretch; }
  .nav { display: flex; } .nav button { flex: 1; }
  .set .seg { display: grid; gap: 1px; background: var(--line); }
  #lines { grid-template-columns: repeat(5, 1fr); }
  #walls, #frames { grid-template-columns: repeat(3, 1fr); }
  .set .seg button { border: 0; background: var(--wall); min-width: 0; padding: 0 0.5rem; }
  .set .seg button[aria-pressed="true"] { background: var(--ink); }
}

/* Footern som katalognotering */
.foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2.5rem 3rem; }
.foot .cat { display: flex; flex-wrap: wrap; gap: 1.25rem 4rem; }
.foot .cat p { line-height: 1.6; }
.foot .cat .mono { font-size: 0.8125rem; color: var(--soft); }
.foot .soft { color: var(--soft); }
.foot .legal { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2rem; font-size: 0.875rem; }
.foot .legal .mono { font-size: 0.75rem; color: var(--soft); }
@media (max-width: 800px) { .foot { grid-template-columns: minmax(0, 1fr); } }

/* Acquire: the first divergence */
#fd ~ .text .say { font-size: clamp(1.4rem, 2.4vw, 2.1rem); line-height: 1.2; letter-spacing: -0.02em; margin: 1.25rem 0; max-width: 24ch; }
.spec.cert { margin-top: 1.5rem; }
.cellnote { margin: 0.25rem 0 0.5rem; font-size: 0.9375rem; color: var(--soft); }
.choosepart > .text { margin-bottom: 1.25rem; max-width: 40rem; }
.nice { margin-top: 2.5rem; font-size: 0.8125rem; color: var(--soft); }

/* Hero: kortet om verket */
#room.hero-room { position: relative; overflow: visible; z-index: 3; }
#room.hero-room svg { overflow: hidden; }
#room.hero-room .hw { cursor: pointer; outline: none; }
#room.hero-room .hw .frame { transition: stroke 0.35s, stroke-width 0.35s; }
#room.hero-room .hw.on .frame, #room.hero-room .hw:focus-visible .frame { stroke: #131415; stroke-width: 0.3; }
/* Kortet som en museiskylt: papper, harlinje, luft. Samma i ljust och morkt, som en riktig skylt pa vaggen. */
.tip { position: absolute; z-index: 2; width: 17.5rem; max-width: calc(100% - 16px); padding: 1.35rem 1.4rem 1.2rem; background: #fbfaf7; color: #131415; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 18px 40px -12px rgba(0, 0, 0, 0.28); pointer-events: none; opacity: 0; transform: translateY(6px); transition: opacity 0.28s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1); }
.tip.in { opacity: 1; transform: none; }
.tip p { margin: 0; }
.tip .tno { font-size: 0.6875rem; letter-spacing: 0.22em; color: #6b6d6f; }
.tip .tt { margin-top: 0.35rem; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; }
.tip .tl { margin-top: 0.95rem; padding-top: 0.95rem; position: relative; font-size: 1.0625rem; line-height: 1.38; letter-spacing: -0.005em; }
.tip .tl::before { content: ""; position: absolute; top: 0; left: 0; width: 1.75rem; border-top: 1px solid #131415; }
.tip .tn { margin-top: 1rem; font-size: 0.6875rem; letter-spacing: 0.08em; color: #55585a; }
.tip .tgo { margin-top: 0.3rem; font-size: 0.6875rem; letter-spacing: 0.08em; color: #131415; }
.tip .tgo::after { content: " \2192"; }
@media (max-width: 699px) { .tip { width: 15.5rem; padding: 1rem 1.1rem 0.95rem; } .tip .tl { font-size: 0.9875rem; margin-top: 0.75rem; padding-top: 0.75rem; } }
@media (prefers-reduced-motion: reduce) { .tip { transition: none; transform: none; } }

/* Registret */
.verify h2 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); margin-top: clamp(3rem, 8vh, 5rem); }
.vgrid { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4.5rem); align-items: start; }
.vwork { margin: 0; }
.vwork figcaption { margin-top: 0.9rem; color: var(--soft); }
.vsheet { display: block; width: 100%; height: auto; background: #fbfaf7; padding: 12.5%; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 14px 34px -14px rgba(0, 0, 0, 0.35); }
.vspec { margin-top: 0; }
.vstates + .vspec { margin-top: 2.5rem; }
.vhash { display: inline-block; max-width: 100%; font-size: clamp(0.72rem, 1.4vw, 1rem); line-height: 1.7; overflow-wrap: anywhere; word-break: break-all; padding: 1rem 1.1rem; border: 1px solid var(--line); background: var(--sheet); }
.vresult:empty { display: none; }
.vresult { overflow-wrap: anywhere; }
.vdraft { margin-top: 1.5rem; max-width: 40rem; }
.vstates { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: clamp(0.5rem, 1.2vw, 1rem); }
.vstates a { display: block; text-decoration: none; }
.vstates a:hover .mono, .vstates a:focus-visible .mono { text-decoration: underline; }
.vmini { display: block; width: 100%; height: auto; background: #fbfaf7; padding: 10%; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }
.vstates .mono { display: block; margin-top: 0.5rem; font-size: 0.6875rem; line-height: 1.4; }
.vform { max-width: 30rem; }
.vform + .text h2 { margin-top: clamp(3rem, 8vh, 5rem); }
@media (max-width: 760px) {
  .vgrid { grid-template-columns: minmax(0, 1fr); }
  .vwork { max-width: 14rem; }
  .vstates { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.vsmall { font-size: 0.75rem; line-height: 1.6; color: var(--soft); overflow-wrap: anywhere; word-break: break-all; }
.ordercmd { margin: 1.5rem 0; padding: 1rem 1.1rem; border: 1px solid var(--line); background: var(--sheet); display: grid; gap: 0.6rem; }
.ordercmd .mono { overflow-wrap: anywhere; }

/* Forfragan */
.rgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 31rem); gap: clamp(2rem, 6vw, 6rem); margin-top: 1.75rem; align-items: start; }
.rgrid .text { margin-top: 0; }
.rsel { padding: 1rem 1.1rem; border: 1px solid var(--line); background: var(--sheet); }
.hp { position: absolute; left: -999rem; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 860px) { .rgrid { grid-template-columns: minmax(0, 1fr); } }
.rform[hidden], .rdone[hidden] { display: none; }

/* Loggan: avsandaren bakom systemet. Samma monospace som metadatan, versaler, luft, en langsam markor. */
.name, .cat .mark { font-family: var(--mono); font-weight: 500; font-size: 0.8125rem; letter-spacing: 0.16em; text-transform: uppercase; }
.name .cursor { margin-left: 0.08em; animation: cursor 2.6s steps(1, end) infinite; }
@keyframes cursor { 0%, 58% { opacity: 1; } 58.01%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .name .cursor { animation: none; } }

/* Forfragan som ett dokument: papper, harlinjer, luft. Samma i ljust och morkt, som skylten pa vaggen. */
.rcard { --pi: #131415; --ps: #5b5e61; background: #fbfaf7; color: var(--pi); padding: clamp(1.6rem, 3.5vw, 2.8rem) clamp(1.4rem, 3.2vw, 2.6rem) clamp(1.4rem, 3vw, 2.2rem);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 30px 60px -30px rgba(0, 0, 0, 0.35); }
.rcard a { color: var(--pi); }
.rhead { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.6875rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ps);
  padding-bottom: 1rem; border-bottom: 1px solid var(--pi); margin-bottom: 0.6rem; }
.rform { display: grid; gap: 0; }
.rf { display: grid; gap: 0.15rem; padding: 1.15rem 0 0.2rem; }
.rf label { display: flex; align-items: baseline; gap: 0.9rem; font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ps); }
.rn { color: #707274; letter-spacing: 0.08em; }
.ropt { margin-left: auto; letter-spacing: 0.12em; color: var(--ps); }
.rcard .rf input, .rcard .rf textarea { width: 100%; padding: 0.45rem 0 0.55rem; border: 0; border-bottom: 1px solid #a9abad; border-radius: 0; background: transparent;
  color: var(--pi); font: inherit; font-size: 1.15rem; line-height: 1.4; outline: none; transition: border-color 0.25s; }
.rcard .rf textarea { resize: vertical; min-height: 5.5rem; }
.rcard .rf input:focus, .rcard .rf textarea:focus { border-bottom-color: var(--pi); box-shadow: 0 1px 0 0 var(--pi); }
.rcard .rf input:focus-visible, .rcard .rf textarea:focus-visible { outline: none; }
.rcard .consent { display: flex; gap: 0.8rem; align-items: flex-start; margin-top: 1.6rem; font-size: 0.9rem; line-height: 1.5; }
.rcard .consent input { appearance: none; -webkit-appearance: none; width: 1.05rem; height: 1.05rem; margin: 0.18rem 0 0; flex: none; border: 1px solid var(--pi); background: transparent; display: grid; place-content: center; cursor: pointer; }
.rcard .consent input::after { content: ""; width: 0.55rem; height: 0.55rem; background: var(--pi); transform: scale(0); transition: transform 0.15s; }
.rcard .consent input:checked::after { transform: scale(1); }
.rcard .consent input:focus-visible { outline: 2px solid var(--pi); outline-offset: 3px; }
.rsend { margin-top: 1.8rem; width: 100%; min-height: 3.6rem; border: 1px solid var(--pi); background: var(--pi); color: #fbfaf7; font-family: var(--mono); font-size: 0.75rem;
  letter-spacing: 0.24em; text-transform: uppercase; cursor: pointer; transition: background 0.25s, color 0.25s; }
.rsend::after { content: "\00a0\00a0\2192"; }
.rsend:hover { background: transparent; color: var(--pi); }
.rsend:focus-visible { outline: 2px solid var(--pi); outline-offset: 3px; }
.rsend[disabled] { opacity: 0.55; cursor: progress; }
.rfine { margin-top: 1rem; font-size: 0.6875rem; letter-spacing: 0.06em; color: var(--ps); text-align: center; }
.rerr { margin-top: 1rem; padding: 0.7rem 0.9rem; border-left: 3px solid #9b2c32; background: #f1eee9; color: var(--pi); font-size: 0.95rem; }
.rerr[hidden] { display: none; }
.rcard .rdone { padding: 1.2rem 0 0.4rem; outline: none; }
.rdk { font-size: 0.6875rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ps); }
.rdt { font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -0.02em; line-height: 1.15; margin: 0.8rem 0 0.9rem; }
.rcard .rdone .nice { margin-top: 1.6rem; color: var(--ps); }
