/* xFiks – plantegningen. Én skrift, én aksent, hårfine linjer. */

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/schibsted-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/schibsted-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/schibsted-grotesk-italic-latin.woff2") format("woff2");
}

:root {
  --paper: #f2f3f1;
  --paper-2: #e9eae7;
  --ink: #23272f;
  --ink-2: #5b6170;
  --ink-3: #8b909c;
  --line: #c9ccd0;
  --line-2: #dfe1e3;
  --wall: #23272f;
  --accent: #ef7a1a;
  --accent-deep: #c85f0a;
  --accent-text: #a94f09;
  --accent-wash: #fbe6d3;
  --accent-wash-2: #fdf1e6;
  --focus: var(--accent);

  --font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --fs-0: 0.8125rem;
  --fs-1: 1.0625rem;
  --fs-2: 1.25rem;
  --fs-3: clamp(1.5rem, 1.15rem + 1.4vw, 2.125rem);
  --fs-4: clamp(2.5rem, 1.6rem + 3.6vw, 4.75rem);

  --lh: 1.55;
  --measure: 68ch;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 78rem;
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2.5rem;
  --s-5: 4rem;
  --s-6: clamp(4.5rem, 6vw, 6rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t: 220ms;

  color-scheme: light;
  accent-color: var(--accent);
}

/* ---------- Reset ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  position: relative; /* forankrer .float-objektene */
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-1);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: var(--accent-wash); color: var(--ink); }
::-moz-selection { background: var(--accent-wash); color: var(--ink); }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-4); font-weight: 800; letter-spacing: -0.035em; line-height: 0.98; }
h2 { font-size: var(--fs-3); }
h3 { font-size: var(--fs-2); letter-spacing: -0.01em; }

p { margin: 0; }
p + p { margin-top: 1em; }
ul, ol { margin: 0; padding: 0; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
  transition: text-decoration-color var(--t) var(--ease-out);
}
a:hover { text-decoration-color: var(--ink); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: var(--gutter); top: -3rem;
  z-index: 100;
  padding: 0.5rem 0.75rem;
  background: var(--ink); color: var(--paper);
  text-decoration: none;
  transition: top var(--t) var(--ease-out);
}
.skip:focus { top: 0.5rem; }

/* ---------- Typografiske hjelpere ---------- */

.label {
  font-size: var(--fs-0);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.lede {
  font-size: var(--fs-2);
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 36ch;
  text-wrap: pretty;
}

.num, .dimtext { font-variant-numeric: tabular-nums; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

/* Målsettingslinje: ├── etikett ──┤ */
.dim {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--ink-2);
  font-size: var(--fs-0);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.dim::before,
.dim::after {
  content: "";
  flex: 1;
  height: 9px;
  border-bottom: 1px solid var(--line);
  transform: translateY(-4px);
}
.dim::before { border-left: 1px solid var(--line); }
.dim::after { border-right: 1px solid var(--line); }
.dim--start::before { flex: 0 0 1.5rem; }

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 5;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand svg { width: 2.25rem; height: 2.25rem; }
.brand-name {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
  line-height: 1;
}
.brand-name b { color: var(--accent); font-weight: inherit; }

.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
}
.nav a {
  font-size: var(--fs-0);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color var(--t) var(--ease-out);
}
.nav a:hover,
.nav a[aria-current="page"] { border-bottom-color: var(--accent); }

/* ---------- Hero / plantegning ---------- */

.hero {
  position: relative;
  padding-block: var(--s-5) var(--s-6);
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.hero-copy { position: relative; z-index: 2; }
.hero-copy .label { display: block; margin-bottom: var(--s-3); }
.hero-copy h1 { margin-bottom: var(--s-3); }
.hero-copy .lede { margin-bottom: var(--s-4); }

.search {
  display: flex;
  max-width: 34rem;
  border: 1px solid var(--ink);
  background: #fff;
  transition: box-shadow var(--t) var(--ease-out);
}
.search:focus-within {
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.search input {
  caret-color: var(--accent);
  flex: 1;
  min-width: 0;
  padding: 0.95rem 1.1rem;
  border: 0;
  background: transparent;
  font-size: 1.0625rem;
}
.search input::placeholder { color: var(--ink-2); }
.search input:focus-visible { outline: none; }
.search button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 1.25rem;
  border: 0;
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--t) var(--ease-out);
}
.search button:hover { background: var(--accent-deep); }
.search button:focus-visible { outline-offset: -4px; outline-color: var(--ink); }
.search button svg { width: 1.1rem; height: 1.1rem; }

.hero-hint {
  margin-top: var(--s-2);
  font-size: var(--fs-0);
  color: var(--ink-2);
}
.hero-hint a { text-decoration-thickness: 1px; }

.plan-wrap { position: relative; }

.plan {
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: var(--font);
}
.plan path { fill: none; }
.plan a { text-decoration: none; outline: none; }
.plan .wall { stroke: var(--wall); stroke-width: 4; fill: none; stroke-linecap: square; }
.plan .wall-in { stroke: var(--wall); stroke-width: 2.5; fill: none; stroke-linecap: square; }
.plan .cut { stroke: var(--paper); stroke-width: 6; }
.plan .fix { stroke: var(--ink-3); stroke-width: 1.25; fill: none; }
.plan .arc { stroke: var(--ink-3); stroke-width: 1; fill: none; stroke-dasharray: 3 3; }
.plan .win { stroke: var(--ink); stroke-width: 1.25; }
.plan .deck { stroke: var(--line); stroke-width: 1; }
.plan .dimline { stroke: var(--ink-3); stroke-width: 1; }
.plan .dimtext {
  fill: var(--ink-2);
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.plan .room-name {
  fill: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.plan .room-tema {
  fill: var(--ink-2);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.plan .room-code { fill: var(--ink-3); font-weight: 600; }
.plan .marker { fill: var(--accent); }
.plan .room-hit { fill: transparent; }

.plan a .room-hit { transition: fill var(--t) var(--ease-out); }
.plan a:hover .room-hit,
.plan a:focus-visible .room-hit { fill: var(--accent-wash); }
.plan a:hover .room-name,
.plan a:focus-visible .room-name { fill: var(--accent-text); }
.plan a:focus-visible .room-hit {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 4 3;
}

.plan .tb { stroke: var(--ink-3); stroke-width: 1; fill: #fff; }
.plan .tb-line { stroke: var(--line); stroke-width: 1; }
.plan .tb-k { fill: var(--ink-2); font-size: 8.5px; font-weight: 600; letter-spacing: 0.1em; }
.plan .tb-v { fill: var(--ink); font-size: 11px; font-weight: 600; }
.plan a:hover .tb-v,
.plan a:focus-visible .tb-v { fill: var(--accent-text); }

/* Tegningen tegner seg selv ved første last */
.plan .draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.4s var(--ease-out) forwards;
}
.plan .draw:nth-child(2) { animation-delay: 0.15s; }
.plan .draw:nth-child(3) { animation-delay: 0.3s; }
.plan .draw:nth-child(4) { animation-delay: 0.4s; }
.plan .draw:nth-child(5) { animation-delay: 0.5s; }
.plan .fade {
  opacity: 0;
  animation: fade 0.8s var(--ease-out) 0.9s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

/* ---------- Flytende verktøy (parallakse) ---------- */

.float {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  color: var(--ink);
  transform: rotate(var(--rot, 0deg));
  will-change: transform;
}
.float svg {
  width: 100%;
  height: auto;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.float .a { stroke: var(--accent); }
.float .f { fill: var(--accent); stroke: none; }
.float .g { stroke: var(--ink-3); stroke-width: 1; }
.float .w { stroke: var(--paper); }

/* ---------- Seksjoner ---------- */

.section {
  position: relative;
  padding-block: var(--s-6);
}
.section > .wrap { position: relative; z-index: 2; }
.section > .wrap > .dim { margin-bottom: var(--s-4); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-3) var(--s-5);
  align-items: end;
  margin-bottom: var(--s-4);
}
.section-head p { color: var(--ink-2); max-width: 44ch; text-wrap: pretty; }

/* Tegnforklaring / legend-liste */
.legend {
  list-style: none;
  border-top: 1px solid var(--line);
}
.legend li { border-bottom: 1px solid var(--line); }
.legend a {
  position: relative;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  gap: var(--s-3);
  align-items: baseline;
  padding: 1.1rem 0;
  text-decoration: none;
}
.legend a::before {
  content: "";
  position: absolute;
  inset: 0 -0.75rem;
  z-index: -1;
  background: transparent;
  transition: background var(--t) var(--ease-out);
}
.legend a:hover::before,
.legend a:focus-visible::before { background: var(--accent-wash-2); }
.legend a:focus-visible { outline-offset: 0.35rem; }
.legend .code {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--fs-0);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}
.legend .code::before {
  content: "";
  width: 9px; height: 9px;
  background: var(--accent);
  flex: none;
}
.legend .title {
  font-weight: 700;
  font-size: var(--fs-2);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.legend .desc {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-2);
  font-weight: 400;
  font-size: var(--fs-1);
  line-height: 1.45;
}
.legend .meta {
  font-size: var(--fs-0);
  color: var(--ink-2);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.legend .meta .arrow {
  display: inline-block;
  margin-left: 0.4rem;
  transition: transform var(--t) var(--ease-out);
}
.legend a:hover .meta .arrow { transform: translateX(4px); }

/* Utkast-merke – for plassholderinnhold */
.draft {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  margin-left: 0.5rem;
  border: 1px dashed var(--ink-3);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  vertical-align: 0.15em;
}

/* Om-blokk */
.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--s-3) var(--s-5);
}
.about .prose { max-width: var(--measure); }
.about .prose p { color: var(--ink-2); text-wrap: pretty; }
.about .prose p + p { margin-top: 1.1em; }
.about .prose strong { color: var(--ink); font-weight: 600; }

.principles {
  list-style: none;
  margin-top: var(--s-3);
  border-top: 1px solid var(--line);
}
.principles li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: var(--s-2);
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.principles .n {
  font-size: var(--fs-0);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  padding-top: 0.25rem;
}
.principles b { font-weight: 700; }
.principles span { display: block; color: var(--ink-2); }

/* ---------- Footer som tegningshode ---------- */

.site-footer {
  position: relative;
  z-index: 2;
  margin-top: var(--s-5);
  border-top: 1px solid var(--ink);
  background: var(--paper);
}
.tb-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-left: 1px solid var(--line);
}
.tb-cell {
  padding: 1.25rem 1.25rem 1.5rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.tb-cell .label { display: block; margin-bottom: 0.6rem; font-size: 0.6875rem; }
.tb-cell ul { list-style: none; }
.tb-cell li + li { margin-top: 0.35rem; }
.tb-cell a { text-decoration-color: var(--line); }
.tb-cell a:hover { text-decoration-color: var(--accent); }
.tb-cell p { color: var(--ink-2); font-size: 0.9375rem; }
.tb-cell .brand-name { font-size: 1.35rem; }
.tb-cell .brand { margin-bottom: 0.6rem; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-2);
  padding: 1rem 0 1.5rem;
  font-size: var(--fs-0);
  color: var(--ink-2);
  letter-spacing: 0.04em;
}

/* ---------- Undersider ---------- */

.page {
  position: relative;
  padding-block: var(--s-4) var(--s-6);
}
.page > .wrap { position: relative; z-index: 2; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  list-style: none;
  font-size: var(--fs-0);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: var(--s-4);
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs li + li::before {
  content: "";
  display: inline-block;
  width: 1.25rem;
  height: 1px;
  background: var(--line);
  margin-right: 0.6rem;
  vertical-align: middle;
}
.crumbs [aria-current] { color: var(--ink); }

.page-head { max-width: 52rem; margin-bottom: var(--s-5); }
.page-head h1 { font-size: clamp(2.25rem, 1.5rem + 3vw, 4rem); margin-bottom: var(--s-3); }
.page-head .lede { max-width: 46ch; }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: var(--s-3);
  font-size: var(--fs-0);
  color: var(--ink-2);
  letter-spacing: 0.04em;
}
.meta-row b { color: var(--ink); font-weight: 600; }

.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin-bottom: var(--s-4);
}
.filter a,
.filter button {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  background: transparent;
  font-size: var(--fs-0);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--t) var(--ease-out), background var(--t) var(--ease-out);
}
.filter a:hover,
.filter button:hover { border-color: var(--ink); }
.filter [aria-pressed="true"],
.filter [aria-current] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.empty {
  padding: var(--s-4) 0;
  color: var(--ink-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.empty b { color: var(--ink); }

/* Artikkel */
.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16rem;
  gap: var(--s-5) clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.article-aside {
  position: sticky;
  top: 2rem;
}
.toc {
  list-style: none;
  border-top: 1px solid var(--line);
}
.toc ul { list-style: none; }
.toc li { border-bottom: 1px solid var(--line); }
.toc a {
  display: block;
  padding: 0.6rem 0;
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--ink-2);
  transition: color var(--t) var(--ease-out), transform var(--t) var(--ease-out);
}
.toc a:hover { color: var(--ink); transform: translateX(0.4rem); }
.toc .label { display: block; padding: 0.6rem 0; }

.aside-slot {
  margin-top: var(--s-4);
  padding: var(--s-3);
  border: 1px dashed var(--line);
  color: var(--ink-2);
  font-size: var(--fs-0);
  letter-spacing: 0.05em;
  text-align: center;
  min-height: 12rem;
  display: grid;
  place-items: center;
}

.prose {
  max-width: var(--measure);
  font-size: 1.125rem;
  line-height: 1.65;
}
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  margin-top: 2.2em;
  margin-bottom: 0.6em;
  padding-top: 1em;
  border-top: 1px solid var(--line);
  font-size: var(--fs-3);
}
.prose h3 { margin-top: 1.6em; margin-bottom: 0.4em; }
.prose h2 + h3 { margin-top: 0; }
.prose p { text-wrap: pretty; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: 0.35em; }
.steps { list-style: none; counter-reset: step; padding-left: 0 !important; }
.steps > li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: var(--s-2);
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.steps > li:first-child { border-top: 1px solid var(--line); }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  font-size: var(--fs-0);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  padding-top: 0.3rem;
  font-variant-numeric: tabular-nums;
}
.steps > li b { display: block; font-weight: 700; }

.summary {
  padding: var(--s-3) 0 0;
  border-top: 2px solid var(--ink);
}

.summary p { font-size: 1.1875rem; line-height: 1.5; font-weight: 500; }

.note {
  position: relative;
  padding: 1.5rem 1.5rem 1.5rem 2.75rem;
  background: var(--accent-wash-2);
}
.note::before {
  content: "";
  position: absolute;
  left: 1.5rem;
  top: calc(1.5rem + 0.45em);
  width: 9px; height: 9px;
  background: var(--accent);
}
.note .label { display: block; margin-bottom: 0.4rem; color: var(--accent-text); }
.note p { font-size: 1.0625rem; }

.checklist { list-style: none; padding: 0 !important; }
.checklist li {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}
.checklist li::before {
  content: "";
  width: 11px; height: 11px;
  border: 1.5px solid var(--ink);
  transform: translateY(1px);
}

.article-foot {
  margin-top: var(--s-5);
  padding-top: var(--s-3);
  border-top: 1px solid var(--ink);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-2);
  font-size: var(--fs-0);
  color: var(--ink-2);
  letter-spacing: 0.04em;
}

.related { margin-top: var(--s-6); }
.related .dim { margin-bottom: var(--s-4); }

/* 404 */
.notfound {
  min-height: 60vh;
  display: grid;
  align-content: center;
  gap: var(--s-3);
}
.notfound h1 { font-size: clamp(3rem, 2rem + 6vw, 8rem); }

/* ---------- Responsivt ---------- */

@media (max-width: 64em) {
  .hero .wrap { grid-template-columns: 1fr; }
  .plan-wrap { margin-top: var(--s-3); }
  .article-grid { grid-template-columns: 1fr; }
  .article-aside { position: static; }
  .aside-slot { display: none; }
  .tb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 44em) {
  .site-header .wrap { padding-block: 0.9rem; }
  .brand-name { font-size: 1.3rem; }
  .hero { padding-block: var(--s-4) var(--s-5); }
  .section-head, .about { grid-template-columns: 1fr; }
  .legend a { grid-template-columns: 1fr; gap: 0.35rem; }
  .legend .meta { justify-self: start; }
  .search input { padding: 0.85rem 0.9rem; font-size: 1rem; }
  .search button span { display: none; }
  .search button { padding: 0 1rem; }
  .tb-grid { grid-template-columns: 1fr; }
  .float[data-mobile="hide"] { display: none; }
  .prose { font-size: 1.0625rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  .plan .draw, .plan .fade { animation: none; stroke-dashoffset: 0; opacity: 1; }
}

@media print {
  .site-header, .site-footer, .float, .article-aside, .skip { display: none; }
  body { background: #fff; }
}

/* ---------- Plassering av flytende verktøy ---------- */

[data-pos="hero-hammer"] { --rot: -14deg; right: 1%; top: -0.5rem; width: 7.5rem; }
[data-pos="hero-plank"]  { --rot: -7deg; left: 3%; bottom: -0.5rem; width: 17rem; }
[data-pos="hero-rule"]   { --rot: 8deg; left: 34%; bottom: 3rem; width: 11rem; }
[data-pos="hero-pencil"] { --rot: 24deg; left: 41%; top: 0.5rem; width: 9rem; }
[data-pos="temaer-level"] { --rot: -3deg; right: -1%; top: 7rem; width: 14rem; }
[data-pos="siste-plank"]  { --rot: 4deg; left: 2%; top: 3rem; width: 19rem; }
[data-pos="siste-hammer"] { --rot: 22deg; right: 1%; bottom: -4.5rem; width: 6rem; }
[data-pos="om-rule"]      { --rot: -20deg; right: 1%; top: -5rem; width: 12rem; }
.aside-slot[hidden] { display: none; }
[data-pos="page-pencil"]  { --rot: -30deg; right: 4%; top: 4rem; width: 9rem; }
[data-pos="page-hammer"]  { --rot: 18deg; right: 3%; top: 3rem; width: 6.5rem; }
[data-pos="page-rule"]    { --rot: -24deg; right: -2rem; top: 42%; width: 9rem; }

@media (max-width: 64em) {
  [data-pos="hero-rule"]   { left: auto; right: 4%; bottom: 44%; width: 8rem; }
  [data-pos="hero-pencil"] { left: 62%; top: 2rem; width: 7rem; }
}
@media (max-width: 44em) {
  [data-pos="hero-hammer"] { display: none; }
  [data-pos="hero-plank"]  { left: 0; bottom: 1rem; width: 12rem; }
  [data-pos="siste-plank"] { width: 12rem; top: 0.25rem; left: -1rem; }
  .plan-wrap { margin-inline: calc(-1 * var(--gutter)); }
  .plan .room-name { font-size: 21px; letter-spacing: 0.05em; }
  .plan .room-tema, .plan .tb-block, .plan .dims { display: none; }
  .plan .dimtext { font-size: 15px; }
  .plan .marker { transform: scale(1.4); transform-box: fill-box; transform-origin: center; }
}
