/* Spareflyt — Flyt: hele budsjettet som treemap (flater, areal = beløp/mnd). Svart, skarpt, pikselpreget. Ingen avrunding, ingen blur. */
html.fl-html, body.page-flyt { height: 100%; overflow: hidden; overscroll-behavior: none; }
body.page-flyt { min-height: 0; }
.fl { position: fixed; inset: 0; height: 100dvh; display: flex; flex-direction: column; background: #000; z-index: 1;
  padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.fl-top { flex: none; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: calc(env(safe-area-inset-top, 0px) + 0px) 8px 0 8px; height: calc(env(safe-area-inset-top, 0px) + 44px); border-bottom: 1px solid var(--line); }
.fl-back { flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px; border: 1px solid var(--line2); text-decoration: none; font-family: var(--mono); font-size: .74rem; font-weight: 600; color: var(--mid); background: #000; }
.fl-back:hover, .fl-back:active { color: #000; background: var(--accent); border-color: var(--accent); }
.fl-crumb { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .8rem; color: var(--dim); white-space: nowrap; overflow: hidden; }
.fl-crumb b { color: #fff; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.fl-crumb a { color: var(--accent); text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; padding: 0 2px; }
.fl-crumb i { font-style: normal; color: var(--dim); }
.fl-period { flex: none; font-family: var(--mono); font-size: .72rem; color: var(--mid); text-transform: capitalize; letter-spacing: .02em; }

.fl-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; margin: 2px; background: #000; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.tl { position: absolute; overflow: hidden; cursor: pointer; opacity: 1; font-variant-numeric: tabular-nums; outline: none;
  transition: left .2s ease, top .2s ease, width .2s ease, height .2s ease, opacity .2s ease; }
.tl.nt { transition: none !important; }
.tl.out { opacity: 0; pointer-events: none; }
.tl.g { z-index: 1; box-shadow: inset 0 0 0 1px var(--bd); background: var(--bgc); }
.tl.v { z-index: 2; color: #000; background: var(--fill); background-image: repeating-conic-gradient(rgba(0, 0, 0, .09) 0 25%, transparent 0 50%); background-size: 4px 4px;   /* grov 2px-dither-struktur */
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .28), inset -1px -1px 0 rgba(0, 0, 0, .35); }
.tl.g.flat { color: #000; background: var(--fill); background-image: repeating-conic-gradient(rgba(0, 0, 0, .09) 0 25%, transparent 0 50%); background-size: 4px 4px; box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .28), inset -1px -1px 0 rgba(0, 0, 0, .35); }
.tl:focus-visible, .tl.sel { outline: 2px solid #fff; outline-offset: -3px; z-index: 3; }
.tl.sel { box-shadow: inset 0 0 0 1px #000, inset 1px 1px 0 rgba(255, 255, 255, .28); }
.tl:active { filter: brightness(1.12); }

.tl .hd { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 6px; color: var(--hc); font-family: var(--mono); font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; }
.tl .hd i { font-style: normal; color: var(--mid); font-weight: 600; letter-spacing: 0; text-transform: none; }
.tl.focus .hd { font-size: .78rem; padding: 0 8px; }
.tl .tx { position: absolute; left: 0; top: 0; right: 0; bottom: 0; padding: 5px 6px; display: flex; flex-direction: column; justify-content: flex-start; gap: 1px; overflow: hidden; }
.tl .n { font-weight: 700; font-size: .72rem; line-height: 1.15; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl .a { font-family: var(--mono); font-weight: 600; font-size: .66rem; line-height: 1.2; opacity: .82; white-space: nowrap; }
.tl.l .n { font-size: .9rem; white-space: normal; } .tl.l .a { font-size: .78rem; } .tl.l .tx { padding: 8px 9px; }
.tl.xl .n { font-size: 1.1rem; } .tl.xl .a { font-size: .92rem; }
.tl.s .tx { padding: 3px 4px; } .tl.s .n { font-size: .62rem; }
.tl .p { font-family: var(--mono); font-size: .62rem; opacity: .7; font-weight: 600; }

.fl-empty { position: absolute; left: 0; right: 0; top: 44px; bottom: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; }
.fl-empty[hidden] { display: none; }
.fl-e-t { font-size: 1.3rem; font-weight: 800; letter-spacing: -.03em; }
.fl-e-s { max-width: 30ch; color: var(--mid); font-size: .92rem; line-height: 1.45; }
.fl-e-b { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; background: var(--accent); color: #000; font-weight: 800; text-decoration: none; border: 0; margin-top: 6px; }

.fl-bot { flex: none; border-top: 1px solid var(--line); padding: 4px 8px calc(env(safe-area-inset-bottom, 0px) + 6px); background: #000; }
.fl-info { min-height: 20px; font-family: var(--mono); font-size: .68rem; color: var(--mid); line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-info b { color: #fff; font-weight: 700; }
.fl-sum { display: flex; flex-wrap: wrap; gap: 4px 14px; font-family: var(--mono); font-size: .74rem; line-height: 1.5; }
.fl-sum span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--mid); }
.fl-sum i { width: 8px; height: 8px; display: inline-block; background: var(--c); }
.fl-sum b { color: #fff; font-weight: 700; }
.fl-sum .neg b { color: #ff8585; }

@media (min-width: 700px) {
  .fl-top { padding: 0 14px; gap: 16px; } .fl-crumb { font-size: .9rem; } .fl-period { font-size: .8rem; }
  .fl-bot { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 6px 14px calc(env(safe-area-inset-bottom, 0px) + 8px); }
  .fl-info { order: 2; flex: 1; text-align: right; font-size: .76rem; } .fl-sum { order: 1; flex: none; font-size: .82rem; gap: 4px 22px; }
  .tl .hd { font-size: .7rem; } .tl.focus .hd { font-size: .86rem; }
  .tl .n { font-size: .8rem; } .tl .a { font-size: .74rem; } .tl.l .n { font-size: 1rem; } .tl.l .a { font-size: .86rem; } .tl.xl .n { font-size: 1.35rem; } .tl.xl .a { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .tl { transition: none !important; } .tl:active { filter: none; } }


/* ===== v12: «Igjen» = vanlig flis. Samme firkantede, pikselkantede ramme og dither-fyll som de andre flisene (.tl.v.mute); pikselvæsken er et rolig fyll INNE i flisen.
   Størrelse/posisjon kommer fra treemap-cellen (inline left/top/width/height fra box()), flisen klipper alt (overflow:hidden), ingen min-størrelse, ingen avrunding.
   (v11-feil: klassen «.hero» kolliderte med forsidens .hero { min-height: 196px } og strakk flisen utenfor cellen.) ===== */
.tl { min-width: 0; min-height: 0; max-width: 100%; contain: paint; border-radius: 0; }
.hcv { position: absolute; left: 0; top: 0; z-index: 0; display: block; max-width: none; pointer-events: none; image-rendering: crisp-edges; image-rendering: pixelated; border-radius: 0; }
.tl .hx { z-index: 1; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 0; pointer-events: none; }
.hx-big { display: flex; align-items: baseline; gap: .16em; max-width: 100%; font-family: var(--mono); font-weight: 700; line-height: 1.05; letter-spacing: -.04em; color: #fff; white-space: nowrap; overflow: hidden; }
.hx-big b { font-weight: 700; overflow: hidden; text-overflow: clip; }
.hx-big i { font-style: normal; font-size: .4em; letter-spacing: 0; color: #fff; font-weight: 600; }
.hx-k { max-width: 100%; margin-top: 1px; font-family: var(--mono); font-size: .62rem; font-weight: 700; letter-spacing: .08em; line-height: 1.2; text-transform: uppercase; color: #e4e6e8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 700px) { .hx-k { font-size: .7rem; } }
.tl .tx > span, .tl .hd > span { min-width: 0; }
.tl .a, .tl .p { overflow: hidden; text-overflow: ellipsis; }
.tl .hd .hl { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
.tl .hd i { flex: none; }
.tl .tx { right: auto; bottom: auto; }
.tl .hd { right: auto; }

/* ===== v12: navigasjon når man er zoomet inn ===== */
.pxi { display: block; flex: none; shape-rendering: crispEdges; }
.fl-back { gap: 6px; } .fl-back .pxi { width: 14px; height: 14px; }
.fl-up { position: absolute; z-index: 12; left: 5px; top: 5px; height: 22px; min-width: 56px; padding: 0 9px 0 7px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--mono); font-size: .7rem; font-weight: 700; letter-spacing: .02em; color: #000; background: var(--accent); border: 0; border-radius: 0; cursor: pointer;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .45), inset -1px -1px 0 rgba(0, 0, 0, .35); -webkit-tap-highlight-color: transparent; }
.fl-up[hidden] { display: none; }
.fl-up::after { content: ''; position: absolute; left: -5px; right: -5px; top: -5px; bottom: -5px; }   /* ≥ 32 px treffflate uten at brikken blir stor */
.fl-up:active { filter: brightness(1.15); }
.fl-up:focus-visible, .fl-back:focus-visible, .fl-crumb a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tl.focus .hd { padding-left: 70px; }
.fl-crumb a { padding: 0 6px; min-height: 30px; border: 1px solid var(--accent); text-transform: none; font-weight: 700; }
.fl-crumb a:hover, .fl-crumb a:active { color: #000; background: var(--accent); }
.fl-bot { position: relative; }
.fl-hint { position: absolute; z-index: 3; left: 0; right: 0; top: 4px; height: 20px; margin: 0; padding: 0 8px; display: flex; align-items: center; background: #000; font-family: var(--mono); font-size: .68rem; line-height: 20px; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.fl-hint[hidden] { display: none; } .fl-hint.on { opacity: 1; } .fl-hint b { color: #fff; font-weight: 700; margin: 0 .35em; }
.fl-info.dim { opacity: 0; }
@media (min-width: 700px) { .fl-hint { left: auto; right: 14px; top: 50%; transform: translateY(-50%); width: auto; max-width: 50%; font-size: .76rem; } .fl-up { font-size: .76rem; height: 24px; } }
@media (prefers-reduced-motion: reduce) { .fl-hint { transition: none; } }

/* ===== v11: ubrukt/ufordelt dempes — «Igjen» + «Brukt» + Ufordelt-gruppen er rolige, mørke og avmettede; de brukte budsjettlinjene er hovedinnholdet.
   Fortsatt lesbart (AA): lys, men ikke hvit tekst på mørk flate; showcasen er rolig (6 bilder/s, dempet lysstyrke), ikke fjernet. ===== */
.tl.v.mute, .tl.g.flat.mute { color: #cdd0d5; background-image: repeating-conic-gradient(rgba(255, 255, 255, .035) 0 25%, transparent 0 50%); background-size: 4px 4px;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .07), inset -1px -1px 0 rgba(0, 0, 0, .4); }
.tl.mute .a { opacity: .9; } .tl.mute .p { opacity: .8; }
.tl.g.mute .hd i { color: var(--dim); }
.fl-sum .mute b { color: var(--mid); }
.fl-sum .mute i { opacity: .8; }

/* ===== v13: «Igjen» tydeligere — samme firkantede flis, men: 2 px aksentkant (venstre + topp, følger tempo-fargen) lagt OVER væsken, etikett «IGJEN» som svart brikke med aksentskrift (AA uansett hva som ligger bak),
   rent hvitt tall med hard 1 px skygge (ingen uskarphet), tydeligere pikselvæske/glitring (js/igjen.js). Alt inni cellen; ingen glød. ===== */
.tl.igj { --ie: #3ddec8; }
.tl.igj.pace-warn { --ie: #ffb020; } .tl.igj.pace-low { --ie: #ff8a4c; }
.tl.igj::after { content: ''; position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 2; pointer-events: none; box-shadow: inset 2px 0 0 var(--ie), inset 0 2px 0 var(--ie), inset -1px -1px 0 rgba(0, 0, 0, .55); }
.tl.igj .hx-big { text-shadow: 1px 1px 0 #000; }
.tl.igj .hx-k { align-self: flex-start; margin-top: 3px; padding: 1px 5px 1px 4px; background: #000; color: var(--ie); font-weight: 700; letter-spacing: .1em; box-shadow: inset 2px 0 0 var(--ie); padding-left: 7px; }

/* ===== v14: «Brukt i måneden» → fordelt på kategori (drill-down #brukt) ===== */
.fl-sum .drill a { position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--mid); text-decoration: none; border-bottom: 1px dotted var(--mid); }
.fl-sum .drill a::after { content: ''; position: absolute; left: -6px; right: -6px; top: -10px; bottom: -10px; }
.fl-sum .drill a:active, .fl-sum .drill a:hover { color: #fff; border-bottom-color: #fff; }
.fl-sum .drill a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
