/* Hemnavets landningssida. Bygger på /publik/publik.css (typsnitt, knappar, hjälte, sektioner) med Hemnavets varumärke:
   logotypens blå som accent och ordbilden med symbolen (src/marke.js).
   Kontrast (WCAG): vit text på #0c59aa 6,9:1; #0c59aa på vitt 6,9:1, på --farg-ljus 6,1:1; vit på #0c3d73 11:1;
   mörkt läge: #6badde på #0b0f14 8:1. */
:root {
  --farg: #0c59aa; --farg-knapp: #0c59aa; --farg-lank: #0c59aa; --farg-mork: #0c3d73; --farg-ljus: #e9f1fb; --farg-text-pa: #fff;
}
@media (prefers-color-scheme: dark) {
  :root { --farg-lank: #6badde; --farg-ljus: #13233a; }
}

/* ordbild */
.hn-marke { display: flex; align-items: center; gap: 10px; }
.hn-symbol-ruta { flex: none; display: block; }
.hn-ordbild { font: 650 1.3rem/1 var(--rubrik); letter-spacing: -.01em; color: #fff; }

/* hjälte med telefon */
.hn-hjalte .hjalte-toning { background: linear-gradient(100deg, rgba(6, 18, 36, .86) 0%, rgba(6, 18, 36, .62) 45%, rgba(6, 18, 36, .2) 100%); }
/* Rubriken ligger i en egen container över hela bredden, och storleken följer containern så att
   "bostadsrättsföreningen" (ca 11,4 em i Fraunces 650) alltid får plats på en rad. overflow-wrap är sista skyddet. */
.hn-hjalte { overflow: visible; z-index: 2; }
.hn-hjalte .hjalte-bild { overflow: hidden; }
.hn-hjalte-rad { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 3rem; align-items: start;
  --hn-luft-under: clamp(2.5rem, 7vw, 5.5rem); }
.hn-hjalte-rubrik { container-type: inline-size; min-width: 0; }
.hn-hjalte h1 { max-width: none; font-size: clamp(1.6rem, 7vw, 5.75rem); font-size: min(5.75rem, 8.4cqi); }
.hn-hjalte-ingress { min-width: 0; }
@media (min-width: 980px) {
  .hn-hjalte-rad { grid-template-columns: minmax(0, 1fr) 304px; }
  .hn-hjalte-rubrik { grid-column: 1 / -1; }
  .hn-hjalte-ingress { grid-column: 1; grid-row: 2; padding-top: .4rem; }
}
/* telefonram runt skärmdumpen; på mobil mindre och under texten */
/* Telefonen hänger ut nedanför heron (200 px på bred skärm, 120 px på smal) och ligger över nästa sektion. */
.hn-telefon {
  position: relative; z-index: 3; justify-self: start; width: 220px; padding: 10px; border-radius: 40px; background: #0b0f14;
  box-shadow: 0 40px 80px rgba(6, 18, 36, .45), 0 12px 24px rgba(6, 18, 36, .3), inset 0 0 0 2px rgba(255, 255, 255, .14);
  margin-top: 2.5rem; margin-left: 4px; margin-bottom: calc(-1 * (var(--hn-luft-under) + 120px));
}
.hn-hjalte + .del { padding-top: calc(var(--luft) + 140px); }
.hn-telefon img { width: 100%; height: auto; border-radius: 30px; display: block; }
@media (min-width: 980px) {
  .hn-telefon { grid-column: 2; grid-row: 2; justify-self: end; width: 280px; padding: 12px; border-radius: 46px;
    margin: 0; margin-bottom: calc(-1 * (var(--hn-luft-under) + 200px)); }
  .hn-telefon img { border-radius: 34px; }
  /* Nästa sektion har vanlig luft. Rubriken står till vänster bredvid telefonens nedre del (aldrig under den), och
     rubrikblockets min-height gör att funktionsraden börjar minst 48 px under telefonens nederkant (200 px under heron). */
  .hn-hjalte + .del { padding-top: var(--luft); }
  .hn-hjalte + .del .hn-del-topp { max-width: calc(100% - 304px - 3rem); min-height: calc(200px + 48px - var(--luft) - 1.5rem); }
  .hn-hjalte + .del .hn-del-topp h2 { max-width: none; margin-bottom: 0; }
  .hn-hjalte + .del .hn-funktioner { margin-top: 1.5rem; }
}

/* funktioner */
.hn-funktioner { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; gap: 2.2rem 2.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.hn-funktioner h3 { font-size: 1.2rem; margin: .9rem 0 .4rem; }
.hn-funktioner p { color: var(--dampad); margin: 0; }
.hn-ikon { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--farg-ljus); color: var(--farg-lank); }
.hn-mork { background: #0b1626; color: #eef2f7; padding-top: var(--luft) !important; }
.hn-mork .etikett { color: #6badde; }
.hn-mork .hn-funktioner p { color: rgba(238, 242, 247, .72); }
.hn-mork .hn-ikon { background: rgba(107, 173, 222, .14); color: #8fc3ea; }
.hn-mork + .del { padding-top: var(--luft); }

/* egen hemsida: webbläsarram */
.hn-webbram { border-radius: 16px; overflow: hidden; background: var(--yta); border: 1px solid var(--kant); box-shadow: 0 30px 60px rgba(0, 0, 0, .12); position: relative; }
.hn-webbram-topp { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--kant); font-size: .8rem; color: var(--dampad); }
.hn-webbram-topp span { width: 10px; height: 10px; border-radius: 50%; background: var(--kant); }
.hn-webbram-topp em { font-style: normal; margin-left: 10px; }
.hn-webbram img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hn-webbram-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.5rem 1.4rem 1.2rem; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .7)); display: grid; }
.hn-webbram-text b { font: 600 1.5rem/1.2 var(--rubrik); }

/* säkerhet */
.hn-sakerhet { background: var(--farg-ljus); padding-top: var(--luft) !important; }
.hn-sakerhet + .del { padding-top: var(--luft); }

/* priser */
.hn-prisrad { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
@media (min-width: 900px) { .hn-prisrad { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.hn-priskort, .hn-kalkylator { background: var(--yta); border: 1px solid var(--kant); border-radius: 22px; padding: clamp(1.5rem, 4vw, 2.5rem); }
.hn-priskort { background: linear-gradient(160deg, var(--farg) 0%, var(--farg-mork) 100%); color: #fff; border: 0; }
.hn-pris { margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .8rem; }
.hn-pris-belopp { font: 650 clamp(3.5rem, 6vw + 1rem, 5.5rem)/1 var(--rubrik); }
.hn-ingar { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.hn-ingar li { display: flex; gap: .7rem; align-items: flex-start; }
.hn-ingar .hn-ikon { width: 26px; height: 26px; padding: 4px; border-radius: 50%; background: rgba(255, 255, 255, .18); color: #fff; flex: none; }
.hn-kalkylator h3 { margin-bottom: 1rem; }
.hn-kalkylator label { font-weight: 600; display: block; margin-bottom: .5rem; }
.hn-kalk-falt { display: flex; gap: 1rem; align-items: center; }
.hn-kalk-falt input[type="range"] { flex: 1; accent-color: var(--farg-knapp); min-height: 44px; }
.hn-kalk-falt input[type="number"] { width: 6.5rem; font: inherit; color: inherit; background: var(--bakgrund); border: 1px solid var(--kant); border-radius: 12px; padding: .7rem .8rem; min-height: 48px; }
.hn-kalk-svar { margin: 1.4rem 0 .6rem; font-size: 1.1rem; }
.hn-kalk-svar output:first-child { font: 650 clamp(2rem, 3vw + 1rem, 2.8rem)/1.1 var(--rubrik); color: var(--farg-lank); }
.hn-kalk-exempel { color: var(--dampad); font-size: .9375rem; margin: .6rem 0 0; }
.knapp-sekundar { background: transparent; color: var(--text); border-color: var(--kant); }
.js .hn-kalk-knapp { display: none; }
.hn-exempel { margin: 2rem 0 0; border-collapse: collapse; width: 100%; max-width: 640px; font-size: .9375rem; }
.hn-exempel caption { text-align: left; font-weight: 600; margin-bottom: .5rem; }
.hn-exempel td { padding: .5rem .8rem .5rem 0; border-top: 1px solid var(--kant); }
.hn-tillagg-rubrik { margin-top: 3rem; }
.hn-tillagg { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.hn-tillagg li { border: 1px solid var(--kant); border-radius: 18px; padding: 1.4rem; background: var(--yta); }
.hn-tillagg h4 { font: 600 1.2rem/1.3 var(--rubrik); margin: 0 0 .3rem; }
.hn-tillagg-pris { font-weight: 600; color: var(--farg-lank); margin: 0 0 .4rem; }
.hn-tillagg p:last-child { margin: 0; color: var(--dampad); }
.hn-moms { margin: 2rem 0 0; }

/* frågor */
.hn-fragor details { border-top: 1px solid var(--kant); padding: 1.1rem 0; }
.hn-fragor details:last-child { border-bottom: 1px solid var(--kant); }
.hn-fragor summary { cursor: pointer; font: 600 1.15rem/1.4 var(--brod); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.hn-fragor summary::-webkit-details-marker { display: none; }
.hn-fragor summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--farg-lank); }
.hn-fragor details[open] summary::after { content: "–"; }
.hn-fragor p { margin: .8rem 0 0; color: var(--dampad); }

/* boka visning */
.hn-visning { background: var(--farg-ljus); padding-top: var(--luft) !important; }
.hn-formular { grid-template-columns: 1fr; }
@media (min-width: 640px) { .hn-formular { grid-template-columns: 1fr 1fr; } .hn-formular .falt:has(textarea), .hn-formular > p, .hn-formular > .knapp { grid-column: 1 / -1; } }

/* textsidor */
.hn-textsida { padding-top: calc(68px + var(--luft)) !important; }
.hn-kommer { display: inline-block; vertical-align: middle; margin-left: .5rem; padding: .15rem .55rem; border-radius: 999px; font: 600 .75rem/1.4 var(--brod); letter-spacing: .02em; background: #e8f1fb; color: #0c3d73; }

/* /prova: välj roll i demon */
.hn-prova { background: #f6f8fb; }
.hn-prova .hn-marke { display: flex; align-items: center; gap: 10px; margin-bottom: 2rem; }
.hn-ordbild-mork { color: #0c3d73; }
.ingress-mork { font-size: 1.15rem; line-height: 1.6; max-width: 46ch; }
.hn-prova-knappar { display: grid; gap: 1.25rem; margin: 2rem 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.hn-prova-val { background: #fff; border-radius: 16px; padding: 1.5rem; box-shadow: 0 1px 2px rgba(6, 18, 36, .08), 0 8px 24px rgba(6, 18, 36, .06); }
.hn-prova-val h2 { font-size: 1.5rem; margin-bottom: .4rem; }
.hn-prova-fel { color: #b42318; font-weight: 600; }

/* "Prova själv" på landningssidan: två val i en <details> (fungerar utan JS) */
.hn-prova-meny { position: relative; }
.hn-prova-meny > summary { list-style: none; cursor: pointer; }
.hn-prova-meny > summary::-webkit-details-marker { display: none; }
.hn-prova-meny > summary::after { content: ""; display: inline-block; margin-left: .55rem; width: .45rem; height: .45rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.hn-prova-meny[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.hn-prova-lista { position: absolute; z-index: 5; top: calc(100% + 8px); left: 0; min-width: 240px; display: grid; background: #fff; border-radius: 12px; padding: 6px;
  box-shadow: 0 12px 32px rgba(6, 18, 36, .25); }
.hn-prova-lista a { display: block; padding: .7rem .9rem; border-radius: 8px; color: #0c3d73; font-weight: 600; text-decoration: none; }
.hn-prova-lista a:hover, .hn-prova-lista a:focus-visible { background: #e8f1fb; }
.hn-prova-ljus > summary { background: transparent; color: #0c59aa; border-color: #0c59aa; }

/* Integritetspolicy och villkor: samma typografi som landningssidan, lättläst bredd, tabeller som går att scrolla på mobil */
.hn-juridik h1 { font-size: clamp(2.2rem, 4vw + 1rem, 3.5rem); margin-bottom: .4em; }
.hn-juridik h2 { font-size: clamp(1.4rem, 1.2vw + 1rem, 1.85rem); margin: 2.4rem 0 .6rem; }
.hn-juridik h3 { font-size: 1.2rem; margin: 1.8rem 0 .5rem; }
.hn-juridik p, .hn-juridik li { max-width: 68ch; }
.hn-juridik ul { padding-left: 1.2rem; }
.hn-juridik li + li { margin-top: .35rem; }
.hn-version { color: var(--text-dampad, #5b6676); font-style: italic; margin-bottom: 1.6rem; }
.hn-tabell { overflow-x: auto; margin: 1rem 0 1.4rem; -webkit-overflow-scrolling: touch; }
.hn-tabell table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.hn-tabell th, .hn-tabell td { text-align: left; vertical-align: top; padding: .65rem .8rem; border-bottom: 1px solid rgba(12, 61, 115, .14); }
.hn-tabell thead th { font-weight: 650; color: #0c3d73; border-bottom: 2px solid rgba(12, 61, 115, .3); }
.hn-tabell tbody th { font-weight: 600; width: 32%; }
.hn-bilaga { margin-top: 4rem; padding-top: 2.5rem; border-top: 2px solid rgba(12, 61, 115, .18); scroll-margin-top: 90px; }
.hn-bilaga h2 { margin-top: 0; }
.hn-tillbaka { margin-top: 3rem; }

/* Hjälpen (/hjalp) */
.hj-ram { max-width: 980px; }
.hj-dampad { color: #5b6676; font-size: .95rem; }
.hj-sok { position: relative; margin: 1.2rem 0 1.6rem; }
.hj-sok-etikett { display: block; font-weight: 650; margin-bottom: .4rem; }
.hj-sok-rad { display: flex; gap: .5rem; }
.hj-sok-rad input { flex: 1; min-width: 0; min-height: 48px; padding: .6rem .9rem; font: inherit; border: 2px solid #9fb3c8; border-radius: 10px; background: #fff; color: #111; }
.hj-sok-rad input:focus-visible { outline: 3px solid #0c59aa; outline-offset: 1px; border-color: #0c59aa; }
.hj-sok > .hj-dampad { margin: .4rem 0 0; font-size: .875rem; }
.hj-forslag { position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% - 1.6rem); list-style: none; margin: 0; padding: 6px; background: #fff; border-radius: 12px;
  box-shadow: 0 12px 32px rgba(6, 18, 36, .22); }
.hj-forslag a { display: grid; gap: 2px; padding: .6rem .8rem; border-radius: 8px; color: inherit; text-decoration: none; }
.hj-forslag [aria-selected="true"] a, .hj-forslag a:hover { background: #e8f1fb; }
.hj-flikar { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.6rem; }
.hj-flikar a { padding: .45rem .9rem; border-radius: 999px; border: 1px solid #9fb3c8; color: #0c3d73; text-decoration: none; font-weight: 600; }
.hj-flikar a[aria-current="page"] { background: #0c59aa; border-color: #0c59aa; color: #fff; }
.hj-grupp { margin-top: 2rem; }
.hj-grupp h2 { font-size: 1.45rem; margin-bottom: .8rem; }
.hj-kortlista, .hj-lista { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.hj-lista { grid-template-columns: 1fr; }
.hj-kortlista a, .hj-lista a { display: grid; gap: .3rem; height: 100%; padding: 1rem 1.1rem; border-radius: 14px; background: #fff; color: inherit; text-decoration: none;
  box-shadow: 0 1px 2px rgba(6, 18, 36, .08), 0 6px 18px rgba(6, 18, 36, .06); }
.hj-kortlista a:hover, .hj-lista a:hover, .hj-kortlista a:focus-visible, .hj-lista a:focus-visible { box-shadow: 0 0 0 2px #0c59aa; }
.hj-kort-titel { font-weight: 650; color: #0c3d73; }
.hj-index { columns: 2 260px; padding-left: 1.1rem; }
.hj-index li { break-inside: avoid; margin-bottom: .35rem; }
.hj-bokstaver { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: 1rem; }
.hj-bokstaver a { min-width: 2.2rem; text-align: center; padding: .3rem .5rem; border-radius: 8px; background: #e8f1fb; color: #0c3d73; font-weight: 650; text-decoration: none; }
.hj-fot { margin-top: 3rem; }
.hj-artikel h1 { font-size: clamp(2rem, 3vw + 1rem, 3rem); margin-bottom: .3em; overflow-wrap: break-word; }
.hj-verktyg { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.4rem; }
.knapp-sekundar { background: transparent; color: #0c59aa; border-color: #0c59aa; }
.hj-behover { background: #f2f7fd; border-left: 4px solid #0c59aa; border-radius: 8px; padding: .9rem 1.1rem; margin: 0 0 1.6rem; }
.hj-behover-rubrik { font: 650 1rem/1.4 var(--brod); margin: 0 0 .3rem; }
.hj-behover ul { margin: 0; padding-left: 1.1rem; }
.hj-text h2 { font-size: clamp(1.35rem, 1vw + 1rem, 1.7rem); margin: 2.2rem 0 .6rem; scroll-margin-top: 90px; }
.hj-text h3 { font-size: 1.2rem; margin: 1.6rem 0 .5rem; scroll-margin-top: 90px; }
.hj-text p, .hj-text li { max-width: 70ch; }
.hj-text ol, .hj-text ul { padding-left: 1.4rem; }
.hj-text li + li { margin-top: .3rem; }
.hj-tips { background: #fff8e6; border-left: 4px solid #b7791f; border-radius: 8px; padding: .8rem 1rem; margin: 1.2rem 0; max-width: 70ch; }
.hj-tabell { overflow-x: auto; margin: 1rem 0 1.4rem; }
.hj-tabell table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.hj-tabell th, .hj-tabell td { text-align: left; vertical-align: top; padding: .6rem .75rem; border-bottom: 1px solid rgba(12, 61, 115, .14); }
.hj-tabell thead th { color: #0c3d73; border-bottom: 2px solid rgba(12, 61, 115, .3); }
.hj-markning { display: inline-block; vertical-align: middle; margin-left: .4rem; padding: .1rem .5rem; border-radius: 999px; background: #e8f1fb; color: #0c3d73; font: 600 .75rem/1.4 var(--brod); }
.hj-relaterat { margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid rgba(12, 61, 115, .18); }
.hj-relaterat h2 { font-size: 1.2rem; }
.hj-utskrift { background: #fff; }
.hj-utskrift main { padding: 2rem 16px; }
@media print {
  .topp, .fot, .hj-sok, .hj-verktyg, .hj-flikar, .hoppa { display: none !important; }
  .hj-text a::after { content: ""; }
  .hj-tips, .hj-behover { break-inside: avoid; }
  body { background: #fff; }
}
.hj-tabell:focus-visible, .hn-tabell:focus-visible { outline: 3px solid #0c59aa; outline-offset: 2px; }
