/* Hegnsguiden (/hegnsberegner/). Mobil først, desktop lægges på i media query. */
.staby-hg{--hg-bla:#1433AB;--hg-lys:#e3e8f6;--hg-kant:#c9ced3;--hg-graa:#555b60;--hg-bg:#f4f5f7;background:var(--hg-bg);color:#14181b;padding:16px 0 96px}
.staby-hg *{box-sizing:border-box}
.hg-ramme{max-width:1170px;margin:0 auto;padding:0 16px}
.hg-trin{display:flex;gap:6px;list-style:none;margin:0 0 16px;padding:0;overflow-x:auto;scrollbar-width:none;font-size:13px}
.hg-trin::-webkit-scrollbar{display:none}
.hg-trin li{flex:0 0 auto}
.hg-trin span,.hg-trin button{display:block;padding:9px 14px;border-radius:999px;border:1px solid var(--hg-kant);background:#fff;color:var(--hg-graa);font:inherit;white-space:nowrap}
.hg-trin .er-gjort span,.hg-trin .er-gjort button{background:var(--hg-lys);border-color:var(--hg-lys);color:var(--hg-bla);font-weight:600}
.hg-trin button{cursor:pointer}
.hg-trin .er-her span{background:var(--hg-bla);border-color:var(--hg-bla);color:#fff;font-weight:600}
.staby-hg .hg-hoved h1{font-size:26px;line-height:1.2;margin:0 0 6px}
.hg-hoved h1:focus{outline:none}
.hg-hoved p{margin:0 0 18px;color:var(--hg-graa);font-size:15px;line-height:1.5;max-width:640px}
.hg-spm{margin:0 0 20px}
.staby-hg .hg-spm h2{font-weight:700;font-size:17px;margin:0 0 10px}
.hg-valg{display:grid;gap:8px}
.hg-kort{display:flex;flex-direction:column;gap:2px;text-align:left;padding:14px 16px;border:1px solid var(--hg-kant);border-radius:8px;background:#fff;font:inherit;color:inherit;cursor:pointer}
.hg-kort b{font-size:15px}
.hg-kort span{font-size:13px;color:var(--hg-graa)}
.hg-kort.er-valgt,.hg-chip.er-valgt,.hg-variant.er-valgt{border:2px solid var(--hg-bla);padding:13px 15px;background:#f7f9ff}
.hg-chip.er-valgt{padding:7px 11px;color:var(--hg-bla);font-weight:600}
.hg-variant.er-valgt{padding:7px}
.hg-bund{display:flex;flex-direction:column;gap:12px;align-items:stretch;margin:8px 0 16px}
.hg-knap{display:block;text-align:center;background:var(--hg-bla);color:#fff!important;border:0;border-radius:6px;padding:14px 18px;font:inherit;font-weight:600;font-size:16px;cursor:pointer;text-decoration:none!important}
.hg-knap:disabled{opacity:.4;cursor:default}
.hg-link{background:none;border:0;color:var(--hg-bla);font:inherit;font-size:15px;text-decoration:underline;cursor:pointer;padding:6px}
.hg-typer{display:grid;gap:14px}
.hg-type{display:flex;flex-direction:column;text-align:left;padding:0;border:1px solid var(--hg-kant);border-radius:10px;background:#fff;overflow:hidden;font:inherit;color:inherit;cursor:pointer}
.hg-type.er-top{border:2px solid var(--hg-bla)}
.hg-type img,.hg-ingen-bil{width:100%;aspect-ratio:4/3;object-fit:cover;background:#e8ecf0;display:block}
.hg-type-tekst{display:flex;flex-direction:column;gap:6px;padding:14px 16px 16px}
.hg-type-tekst b{font-size:17px}
.hg-type-tekst>span{font-size:14px;color:var(--hg-graa);line-height:1.45}
.hg-type-tekst .hg-fra{color:#14181b;font-weight:700;font-size:16px}
.hg-fra small{display:block;font-weight:400;font-size:12px;color:var(--hg-graa)}
.hg-to{display:grid;gap:16px}
.hg-blok{background:#fff;border-radius:10px;padding:16px;margin-bottom:12px}
.staby-hg .hg-blok h2{font-size:16px;margin:0 0 12px}
.hg-blok h2 small{font-weight:400;color:var(--hg-graa);font-size:13px;margin-left:6px}
.hg-laengde{display:flex;align-items:center;gap:14px}
.hg-laengde input[type=range]{flex:1;min-width:0;accent-color:var(--hg-bla);height:28px}
.hg-tal{display:flex;align-items:center;gap:6px;font-weight:600}
.hg-tal input{width:84px;padding:10px;border:1px solid var(--hg-kant);border-radius:6px;font:inherit;font-size:16px;text-align:right}
.hg-note{font-size:13px;color:var(--hg-graa);margin:10px 0 0;line-height:1.45}
.hg-chips{display:flex;flex-wrap:wrap;gap:8px}
.hg-chip{padding:8px 12px;border:1px solid var(--hg-kant);border-radius:6px;background:#fff;font:inherit;font-size:14px;color:inherit;cursor:pointer}
.hg-varianter{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.hg-variant{display:flex;flex-direction:column;align-items:stretch;gap:8px;text-align:left;padding:8px;border:1px solid var(--hg-kant);border-radius:8px;background:#fff;font:inherit;color:inherit;cursor:pointer}
.hg-variant img{width:100%;aspect-ratio:4/3;height:auto;object-fit:cover;border-radius:4px;background:#e8ecf0}
.hg-variant span{display:flex;flex-direction:column;gap:2px;font-size:14px;min-width:0}
.hg-variant small{color:var(--hg-graa);font-size:13px}
.hg-resume{display:none;background:#fff;border-radius:10px;padding:16px;align-self:start}
.staby-hg .hg-resume h2{font-size:17px;margin:0 0 10px}
.hg-foto{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:6px;margin-bottom:12px}
.hg-resume dl{margin:0;display:grid;gap:6px;font-size:14px}
.hg-resume dl div{display:flex;justify-content:space-between;gap:8px}
.hg-resume dd{margin:0;font-weight:600}
.hg-total{display:flex;justify-content:space-between;align-items:baseline;border-top:1px solid #eef0f2;margin-top:12px;padding-top:12px;font-size:14px}
.hg-total b{font-size:24px}
.hg-pm{margin:2px 0 14px;text-align:right;font-size:13px;color:var(--hg-graa)}
.hg-liste{list-style:none;margin:0;padding:0}
.hg-liste li{border-top:1px solid #eef0f2}
.hg-liste li:first-child{border-top:0}
.hg-liste label{display:flex;align-items:center;gap:10px;padding:10px 0;cursor:pointer;font-size:14px}
.hg-liste input{width:20px;height:20px;accent-color:var(--hg-bla);flex-shrink:0;margin:0}
.hg-ln{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.hg-ln small{color:var(--hg-graa);font-size:12px}
.hg-liste b{white-space:nowrap}
.hg-liste .er-fra .hg-ln,.hg-liste .er-fra b{color:#9aa1a8;text-decoration:line-through}
.hg-mobilbar{position:fixed;left:0;right:0;bottom:0;z-index:50;display:flex;align-items:center;gap:12px;justify-content:space-between;background:#fff;border-top:1px solid var(--hg-kant);padding:10px 16px calc(10px + env(safe-area-inset-bottom));box-shadow:0 -4px 12px rgba(0,0,0,.06)}
.hg-mobilbar span{display:flex;flex-direction:column}
.hg-mobilbar small{font-size:12px;color:var(--hg-graa)}
.hg-mobilbar b{font-size:20px}
.hg-mobilbar .hg-knap{padding:12px 18px}

.hg-maal-hoved{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin-bottom:14px}
.staby-hg .hg-maal-hoved h2{margin:0}
.hg-skift{display:flex;border:1px solid var(--hg-kant);border-radius:8px;overflow:hidden}
.hg-skift button{border:0;background:#fff;color:inherit;font:inherit;font-size:14px;padding:9px 14px;cursor:pointer}
.hg-skift button[aria-pressed=true]{background:var(--hg-bla);color:#fff;font-weight:600}
.hg-kortvalg{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-start;margin-bottom:10px}
.hg-adr{position:relative;flex:1 1 240px;min-width:0}
.staby-hg .hg-adr input{width:100%;padding:9px 12px;border:1px solid var(--hg-kant);border-radius:8px;font:inherit;font-size:16px;margin:0}
.hg-adr-liste{position:absolute;z-index:20;left:0;right:0;top:100%;margin:4px 0 0;padding:4px 0;list-style:none;background:#fff;border:1px solid var(--hg-kant);border-radius:8px;box-shadow:0 6px 16px rgba(0,0,0,.1)}
.hg-adr-liste button{display:block;width:100%;text-align:left;border:0;background:none;padding:9px 12px;font:inherit;font-size:14px;color:inherit;cursor:pointer}
.hg-adr-liste button:hover,.hg-adr-liste button:focus{background:var(--hg-lys)}
.hg-plan-ramme{position:relative}
.hg-kilde{margin:4px 0 0;font-size:11px;line-height:1.4;color:var(--hg-graa)}
.hg-kilde a{color:inherit}
.hg-plan.er-flyt{cursor:grab}
.hg-plan.er-foto .g1{display:none}
.hg-plan.er-foto .g5{stroke:rgba(255,255,255,.35)}
.hg-plan.er-foto .hg-hegn{stroke:#ffd400}
.hg-plan.er-foto .hg-akse{fill:#fff}
.hg-tegn-vaerk{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.hg-tegn-zoom{display:flex;gap:6px;margin-left:auto}
.hg-tegn-zoom .hg-chip{width:40px;padding:8px 0;font-size:18px;line-height:1}
.hg-plan{display:block;width:100%;aspect-ratio:1/1;max-height:70vh;background:#fbfcfd;border:1px solid #e1e5e9;border-radius:8px;touch-action:none;cursor:crosshair;user-select:none;-webkit-user-select:none}
.hg-plan .g1{stroke:#e8ecf0;stroke-width:1;vector-effect:non-scaling-stroke}
.hg-plan .g5{stroke:#d3d9df;stroke-width:1;vector-effect:non-scaling-stroke}
.hg-plan .hg-hegn{fill:none;stroke:#2c2f33;stroke-width:5;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}
.hg-plan .hg-laage{stroke:#fbfcfd;stroke-width:9;vector-effect:non-scaling-stroke}
.hg-plan .hg-laage-streg{stroke:#1433AB;stroke-width:2;stroke-dasharray:4 3;vector-effect:non-scaling-stroke}
.hg-plan .hg-laage-greb{stroke:transparent;stroke-width:22;vector-effect:non-scaling-stroke;cursor:grab}
.staby-hg .hg-side-hoejde,.staby-hg .hg-laage-valg select{width:auto;max-width:100%;margin:0}
.hg-side-hoejde{padding:8px;border:1px solid var(--hg-kant);border-radius:6px;font:inherit;font-size:14px;background:#fff}
.hg-plan .hg-laage-knap{fill:#e8590c;stroke:#fff;stroke-width:2;vector-effect:non-scaling-stroke;pointer-events:none}
.hg-plan .hg-laage-pil{fill:#fff;font-weight:700;text-anchor:middle;dominant-baseline:central;pointer-events:none}
.hg-plan .hg-laage-bue{fill:none;stroke:#e8590c;stroke-width:1.5;stroke-dasharray:4 3;vector-effect:non-scaling-stroke;pointer-events:none}
.hg-plan .hg-laage-tekst{fill:#e8590c}
.hg-plan .hg-start-tekst{fill:#1433AB;font-weight:600;text-anchor:middle;dominant-baseline:middle;paint-order:stroke;stroke:#fff;pointer-events:none}
.hg-plan .hg-naal{fill:#d6336c;stroke:#fff;stroke-width:2;vector-effect:non-scaling-stroke;pointer-events:none}
.hg-plan.er-foto .hg-bag image:nth-child(2){filter:drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff)}
.hg-plan circle.hg-greb{fill:transparent;stroke:none}
.hg-laage-pos{font-weight:400;font-size:13px;color:var(--hg-graa)}
.hg-sider-liste .hg-laage-pos input{width:64px}
.hg-plan .hg-forsmag{stroke:#1433AB;stroke-width:2;stroke-dasharray:6 5;vector-effect:non-scaling-stroke;pointer-events:none}
.hg-plan .hg-punkt{fill:#1433AB;stroke:#fff;stroke-width:2;vector-effect:non-scaling-stroke;cursor:move}
.hg-plan .hg-punkt.er-ende{fill:#fff;stroke:#1433AB;stroke-width:3}
.hg-plan .hg-maal-tekst{fill:#14181b;font-weight:600;text-anchor:middle;dominant-baseline:middle;paint-order:stroke;stroke:#fff;stroke-linejoin:round;pointer-events:none}
.hg-plan .hg-forsmag-tekst{fill:#1433AB}
.hg-under{margin-top:18px;padding-top:14px;border-top:1px solid #eef0f2}
.staby-hg .hg-under h3{font-size:16px;margin:0 0 10px}
.hg-under h3 small{font-weight:400;color:var(--hg-graa);font-size:13px;margin-left:6px}
.hg-plan .hg-akse{fill:#5f666c;text-anchor:middle;dominant-baseline:middle;pointer-events:none}
.hg-plan .hg-skala{stroke:#555b60;stroke-width:3;vector-effect:non-scaling-stroke}
.hg-sider-liste{list-style:none;margin:12px 0 0;padding:0}
.hg-sider-liste li{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:8px 0;border-top:1px solid #eef0f2}
.hg-side-nr{min-width:28px}
.hg-sider-liste .hg-tal input{width:76px;padding:8px}
.hg-laage-valg{display:inline-flex;flex-wrap:wrap;align-items:center;gap:4px 8px}
.hg-laage-valg select{padding:8px;border:1px solid var(--hg-kant);border-radius:6px;font:inherit;font-size:14px;background:#fff}
.hg-x{border:0;background:none;font-size:22px;line-height:1;min-width:44px;min-height:44px;padding:0;cursor:pointer;color:var(--hg-graa)}
.hg-sider-liste .hg-link{font-size:14px;padding:4px}

.hg-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.hg-chip--primaer{background:var(--hg-bla);border-color:var(--hg-bla);color:#fff;font-weight:600}
.hg-tegn-hjaelp{margin:0 0 8px;font-weight:600;color:#14181b}
.hg-ryd{font-size:14px;color:var(--hg-graa);margin-top:8px;min-height:44px}
.hg-sider-liste .hg-link{min-height:44px}
.hg-advarsel,.hg-adr-besked{margin:6px 0 0;font-size:13px;color:#b02a37}
.hg-adr-besked:empty,.hg-advarsel:empty{display:none}
.hg-fagnote{margin:8px 0}
.hg-tryg{list-style:none;margin:12px 0 0;padding:0;font-size:13px;color:#2b6a3a}
.hg-tryg li::before{content:"✓ "}
.hg-hjaelp{margin:10px 0 0;font-size:13px;color:var(--hg-graa);line-height:1.45}
.hg-hjaelp a{color:var(--hg-bla);font-weight:600;white-space:nowrap}
.hg-resume .hg-knap{margin-top:8px}
.hg-type{position:relative}
.hg-maerke{position:absolute;top:10px;left:10px;z-index:1;background:var(--hg-bla);color:#fff;font-size:12px;font-weight:600;padding:4px 10px;border-radius:999px}
.hg-type-tekst .hg-grund{color:#2b6a3a;font-size:13px}
.hg-type-knap{display:block;margin-top:6px;text-align:center;background:var(--hg-lys);color:var(--hg-bla);font-weight:600;padding:10px;border-radius:6px}
.hg-type.er-top .hg-type-knap{background:var(--hg-bla);color:#fff}
@media (max-width:639px){
  .hg-plan-ramme{margin:0 -32px}  /* tegningen helt ud til skærmkanten på mobil */
  .hg-plan{border-radius:0;border-left:0;border-right:0}
}
@media (min-width:640px){
  .hg-valg{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hg-typer{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hg-varianter{grid-template-columns:repeat(3,minmax(0,1fr))}
  .hg-bund{flex-direction:row;align-items:center}
  .hg-kilde{position:absolute;left:1px;bottom:1px;margin:0;padding:2px 6px;font-size:10px;background:rgba(255,255,255,.85);border-radius:0 6px 0 7px;color:#333}
}
@media (min-width:992px){
  .staby-hg{padding:24px 0 48px}
  .staby-hg .hg-hoved h1{font-size:32px}
  .hg-valg{grid-template-columns:repeat(4,minmax(0,1fr))}
  .hg-typer{grid-template-columns:repeat(3,minmax(0,1fr))}
  .hg-to{grid-template-columns:minmax(0,1fr) 340px;gap:24px}
  .hg-to .hg-felt~.hg-resume{display:block;position:sticky;top:90px}
  .hg-mobilbar{display:none}
  .hg-plan{aspect-ratio:16/10}
}
.hg-tilbage{padding:10px 0;margin:-8px 0 8px;font-size:15px;min-height:44px}
.hg-kurv-ok{position:fixed;inset:0;z-index:9999;background:rgba(20,24,27,.45);display:flex;align-items:flex-end;justify-content:center;padding:16px}
.hg-kurv-boks{background:#fff;border-radius:12px;padding:20px;max-width:440px;width:100%;box-shadow:0 10px 30px rgba(0,0,0,.2)}
.hg-kurv-tekst{font-size:17px;font-weight:600;margin:0 0 12px}
@media (min-width:640px){.hg-kurv-ok{align-items:center}}
.hg-mail .hg-note{margin:0 0 12px}
.hg-felt-l{display:flex;flex-direction:column;gap:4px;font-size:14px;font-weight:600;margin-bottom:10px}
.staby-hg .hg-felt-l input,.staby-hg .hg-felt-l textarea{width:100%;padding:10px 12px;border:1px solid var(--hg-kant);border-radius:6px;font:inherit;font-size:16px;font-weight:400;margin:0}
.hg-check{display:flex;align-items:center;gap:10px;min-height:44px;font-size:14px;cursor:pointer}
.hg-check input{width:20px;height:20px;accent-color:var(--hg-bla);margin:0;flex-shrink:0}
.hg-knap--sek{background:#fff;color:var(--hg-bla)!important;border:2px solid var(--hg-bla);margin-top:6px}
.hg-mail-svar{margin:10px 0 0;font-size:14px}
.hg-mail-svar:empty{display:none}
.hg-ok{color:#2b6a3a;font-weight:600}
.hg-mail--lukket{margin:4px 0 16px}
.hg-mail--lukket .hg-knap{width:100%}
.hg-sider-liste .hg-straek{justify-content:space-between;border-top:2px solid #dfe3e7;padding-top:12px;margin-top:6px}
.hg-sider-liste .hg-straek:first-child{border-top:0;margin-top:0}
.hg-valg-oversigt{display:flex;flex-direction:column;gap:6px;font-size:13px;color:#14181b;background:#f4f5f7;border-radius:6px;padding:8px 10px}
.hg-mini{display:flex;align-items:center;gap:4px}
.hg-type .hg-mini img{width:34px;height:34px;aspect-ratio:auto;object-fit:cover;border-radius:4px;border:1px solid #fff;box-shadow:0 0 0 1px #dfe3e7}
.hg-mini em{font-style:normal;font-size:12px;color:var(--hg-graa);margin-left:2px}
/* forslagskort: knappen nederst, så den står i samme højde på alle kort */
.hg-type-tekst{flex:1}
.hg-type-knap{margin-top:auto}
.hg-type-tekst .hg-fra{margin-bottom:6px}
/* prisen står også i samme højde, lige over knappen */
.hg-type-tekst .hg-fra{margin-top:auto}
.hg-type-tekst .hg-type-knap{margin-top:6px}
/* tegning: værktøjslinje og vejledning holder højden, så tegnefladen ikke hopper (UX 14/11) */
.hg-tegn-hjaelp{min-height:4.2em}
@media (min-width:640px){.hg-tegn-hjaelp{min-height:2.8em}}
.hg-chip:disabled{opacity:.45;cursor:default}
.hg-slet-side{margin-left:auto;color:var(--hg-graa)!important;font-size:13px}
@media (max-width:639px){.hg-plan-ramme{margin:0 -16px}} /* lidt kant på mobil, så man kan scrolle forbi tegningen */
/* "Se alle": hvad hegnet er godt til */
.hg-gode{display:flex;flex-wrap:wrap;gap:4px}
.hg-gode em{font-style:normal;font-size:12px;line-height:1;padding:5px 8px;border-radius:999px;background:#eef1f8;color:#1433AB;font-weight:600}
.hg-gode em.er-svar{background:#1433AB;color:#fff}
.hg-gode em.hg-gode-mat{background:#f1f2f4;color:#555b60}
.hg-typer-titel{font-size:18px;margin:24px 0 12px}
.hg-typer-titel:first-of-type{margin-top:8px}
