/* Planbo bokföring: arbetsyta för den egna boken. Gemensamma semantiska tokens,
   isolerat från Fortnox/SIE, utskrift och den norska pilotspärren. */
@media screen {
  #bokfInnehall .hb-identity { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:8px 24px; padding:20px 24px; }
  #bokfInnehall .hb-identity > div:first-child { flex:1 1 320px; min-width:0; }
  #bokfInnehall .hb-identity > details { flex:0 1 180px; }
  #bokfInnehall .hb-identity > .banner { flex-basis:100%; }
  #bokfInnehall .hb-identity details[open] { flex-basis:100%; }
  #bokfInnehall .hb-identity h2 { font-size:18px; }
  #bokfInnehall .hb-identity .bokf-connection-details { margin-top:4px; }
  #bokfInnehall .hb-workspace { display:grid; grid-template-columns:196px minmax(0,1fr); gap:24px; align-items:start; margin-top:24px; }
  #bokfInnehall .hb-workspace-main { min-width:0; }
  #bokfInnehall .hb-workspace .hb-flikar { display:flex; flex-direction:column; gap:24px; margin:0; padding:16px 12px; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); }
  #bokfInnehall .hb-workspace .hb-flikgrupp { width:100%; }
  #bokfInnehall .hb-workspace .hb-flikrubrik { margin:0 8px 8px; font-size:11px; letter-spacing:.06em; text-transform:uppercase; }
  #bokfInnehall .hb-workspace .bokf-nav { display:flex; flex-direction:column; gap:4px; width:100%; max-width:none; box-sizing:border-box; border:0; padding:0; margin:0; background:transparent; }
  #bokfInnehall .hb-workspace .bokf-nav button { justify-content:flex-start; text-align:left; width:100%; padding:10px 12px; font-size:13px; }
  #bokfInnehall .hb-workspace .bokf-nav button[aria-pressed=true] { background:var(--brand-soft); border-color:transparent; color:var(--brand); box-shadow:inset 3px 0 var(--brand); }
  #bokfInnehall .hb-workspace .hb-flikar summary { cursor:pointer; font-size:12px; font-weight:600; color:var(--muted); min-height:44px; display:flex; align-items:center; gap:8px; padding:0 8px; list-style:none; }
  #bokfInnehall .hb-workspace .hb-flikar summary::-webkit-details-marker { display:none; }
  #bokfInnehall .hb-workspace .hb-flikar summary::before { content:'›'; font-size:18px; transform:rotate(0); }
  #bokfInnehall .hb-workspace .hb-flikar details[open]>summary::before { transform:rotate(90deg); }
  #bokfInnehall .hb-workspace .hb-nav-mer .hb-flikrubrik { display:none; }
  #bokfInnehall .hb-workspace-head { margin:0 0 24px; }
  #bokfInnehall .hb-eyebrow { display:block; font-size:12px; color:var(--muted); margin:0 0 8px; }
  #bokfInnehall .hb-workspace-head h2 { font-size:28px; font-weight:600; letter-spacing:-.035em; margin:0 0 8px; }
  #bokfInnehall .hb-workspace-head p { color:var(--muted); font-size:14px; line-height:1.6; max-width:64ch; margin:0; }
  #bokfInnehall .hb-workspace-main > .card { margin-bottom:16px; }
  #bokfInnehall .hb-compose-layout { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; }
  #bokfInnehall .hb-section-title { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
  #bokfInnehall .hb-section-title h3 { font-size:15px; margin:0; font-weight:600; }
  #bokfInnehall .hb-step { display:inline-flex; width:24px; height:24px; justify-content:center; align-items:center; border:1px solid var(--line); border-radius:50%; font-size:12px; color:var(--muted); }
  #bokfInnehall .hb-section-rader { margin:24px 0 0; padding-top:24px; border-top:1px solid var(--line); }
  #bokfInnehall .hb-section-rader>span:last-child { margin-left:auto; color:var(--muted); font-size:12px; }
  #bokfInnehall .hb-compose .hb-rader { margin-top:8px; }
  #bokfInnehall .hb-compose .hb-rad:first-child { border-top:0; }
  #bokfInnehall .hb-compose .hb-huvud { grid-template-columns:minmax(140px,.6fr) minmax(0,1.4fr); }
  #bokfInnehall .hb-compose .hb-huvud .field:last-child { grid-column:1 / -1; }
  #bokfInnehall .hb-recent { align-self:start; }
  #bokfInnehall .hb-recent > .btn { margin-top:16px; }
  #bokfInnehall .hb-workspace .hb-summa { gap:12px 24px; border-radius:var(--radius-sm); padding:16px; }
  #bokfInnehall .hb-workspace .hb-summa span { display:flex; flex-direction:column; gap:4px; font-size:12px; color:var(--muted); }
  #bokfInnehall .hb-workspace .hb-summa b { font-size:18px; font-weight:600; color:var(--ink); }
  #bokfInnehall .hb-workspace .hb-summa .hb-varn b { color:var(--warn-ink); }
  #bokfInnehall .hb-workspace :is(input,select) { border-radius:var(--radius-sm); }
  #bokfInnehall .hb-workspace .card-scroll { max-width:100%; }
  #bokfInnehall .hb-workspace .hb-ver > summary { padding:16px 4px; }
}
@media screen and (min-width:1600px) {
  #bokfInnehall .hb-compose-layout { grid-template-columns:minmax(0,1.8fr) minmax(280px,1fr); }
}
@media screen and (max-width:1100px) {
  #bokfInnehall .hb-workspace { grid-template-columns:168px minmax(0,1fr); gap:16px; }
  #bokfInnehall .hb-workspace .hb-rad { flex-wrap:wrap; }
}
@media screen and (max-width:760px) {
  #bokfInnehall .hb-workspace { grid-template-columns:minmax(0,1fr); gap:24px; margin-top:16px; }
  #bokfInnehall .hb-workspace .hb-flikar { gap:4px; padding:12px; }
  #bokfInnehall .hb-workspace .hb-flikgrupp .bokf-nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; }
  #bokfInnehall .hb-workspace .hb-flikrubrik { margin:0 8px 8px; }
  #bokfInnehall .hb-workspace .hb-nav-mer { border-top:1px solid var(--line); margin-top:8px; padding-top:4px; }
  #bokfInnehall .hb-workspace-head h2 { font-size:25px; }
  #bokfInnehall .hb-identity { padding:16px; }
  #bokfInnehall .hb-compose .hb-huvud { grid-template-columns:minmax(0,1fr); }
  #bokfInnehall .hb-compose .hb-huvud .field:last-child { grid-column:auto; }
  #bokfInnehall .hb-compose .hb-rad .hb-f-konto { flex-basis:100%; }
  #bokfInnehall .hb-compose .hb-rad .hb-f-text { flex-basis:calc(100% - 60px); }
  #bokfInnehall .hb-workspace .hb-summa { gap:16px; }
  #bokfInnehall .hb-workspace .hb-summa b { font-size:16px; }
}
@media screen {
  #main:has(.hb-workspace) .page-head #bokfVerktyg { display:none; }
  #bokfInnehall .hb-workspace-main .toolbar[role=group] { gap:4px; }
  #bokfInnehall .hb-workspace-main .toolbar[role=group] .btn:not(.primary) { background:transparent; box-shadow:none; }
}
@media screen and (max-width:760px) {
  #bokfInnehall .hb-workspace .hb-flikar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 8px; }
  #bokfInnehall .hb-workspace .hb-flikar > .hb-flikgrupp { grid-column:1 / -1; }
  #bokfInnehall .hb-workspace .hb-nav-mer { border:0; margin:0; padding:0; }
  #bokfInnehall .hb-workspace .hb-flikar > details[open] { grid-column:1 / -1; }
  #bokfInnehall .hb-workspace .hb-flikar > details summary { padding:0 8px; line-height:1.5; }
  #bokfInnehall .hb-identity { gap:0; padding:16px; }
  #bokfInnehall .hb-identity > div:first-child { flex-basis:100%; }
  #bokfInnehall .hb-identity > details { flex-basis:100%; }
  #bokfInnehall .hb-identity .bokf-connection-details summary { min-height:32px; }
  #bokfInnehall .hb-workspace-head { margin-bottom:16px; }
  #bokfInnehall .hb-eyebrow { display:none; }
}

/* Samma arbetsmönster i bank, fakturor, register, rapporter och bokslut. */
@media screen {
  #bokfInnehall .hb-empty { display:flex; align-items:flex-start; gap:16px; padding:32px 24px; margin-top:16px; border:1px dashed var(--line); border-radius:var(--radius); background:var(--soft); }
  #bokfInnehall .hb-empty-mark { display:flex; align-items:center; justify-content:center; flex:0 0 40px; height:40px; border-radius:var(--radius-sm); background:var(--card); color:var(--muted); }
  #bokfInnehall .hb-empty-mark svg { width:20px; height:20px; }
  #bokfInnehall .hb-empty > div { min-width:0; }
  #bokfInnehall .hb-empty h3 { margin:0 0 8px; font-size:15px; font-weight:600; }
  #bokfInnehall .hb-empty p { max-width:60ch; margin:0; color:var(--muted); font-size:13px; line-height:1.65; }
  #bokfInnehall .hb-empty .btn { margin-top:16px; }
  #bokfInnehall .hb-loading { display:flex; align-items:center; gap:12px; padding:24px 0; }
  #bokfInnehall .hb-loading-dot { width:16px; height:16px; border:2px solid var(--line); border-top-color:var(--brand); border-radius:50%; animation:hb-loading 1s linear infinite; }
  #bokfInnehall .hb-workspace .hb-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:16px; margin-top:24px; padding:20px; }
  #bokfInnehall .hb-workspace .hb-metrics b { font-size:24px; letter-spacing:-.025em; overflow-wrap:anywhere; }
  #bokfInnehall .hb-workspace .hb-metrics .hb-varn { border-left:2px solid var(--warn-ink); padding-left:12px; }
  #bokfInnehall .hb-workspace-main .toolbar[role=group] { display:flex; flex-wrap:wrap; padding:4px; border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--soft); }
  #bokfInnehall .hb-workspace-main .toolbar[role=group] .btn { border-color:transparent; min-height:44px; font-size:13px; }
  #bokfInnehall .hb-workspace-main .toolbar[role=group] .btn[aria-pressed=true] { color:var(--brand); background:var(--card); border-color:var(--line); }
  #bokfInnehall .hb-workspace .hb-verktyg { padding:16px; border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--soft); margin-top:16px; }
  #bokfInnehall .hb-workspace .hb-tabell { font-size:13px; }
  #bokfInnehall .hb-workspace .hb-tabell :is(td,th) { padding:12px; border-bottom:1px solid var(--line); }
  #bokfInnehall .hb-workspace .hb-tabell th { color:var(--muted); font-weight:500; background:var(--soft); text-align:left; }
  #bokfInnehall .hb-workspace .hb-tabell th.num { text-align:right; }
  #bokfInnehall .hb-workspace .hb-tabell .hb-grupp td { background:var(--soft); padding-top:16px; }
  #bokfInnehall .hb-workspace .hb-tabell .hb-resultat td { background:var(--brand-soft); color:var(--ink); }
  #bokfInnehall .hb-account-link { font:inherit; color:var(--brand); text-align:left; background:transparent; border:0; padding:0; cursor:pointer; text-decoration:underline; text-decoration-color:var(--line); text-underline-offset:4px; line-height:1.6; }
  #bokfInnehall .hb-account-link:hover { text-decoration-color:currentColor; }
  #bokfInnehall .hb-workspace .hb-tabell .hb-account-link { min-height:32px; }
  #bokfInnehall .hb-back { margin:0 0 16px; }
  #bokfInnehall .hb-workspace .hb-ver-kropp { padding:8px 16px 24px 32px; }
  #bokfInnehall .hb-workspace .hb-ver[open] { background:var(--soft); border-radius:var(--radius-sm); }
  #bokfInnehall .hb-workspace .hb-ver > summary { cursor:pointer; }
  #bokfInnehall .hb-workspace .hb-ver:has(>summary:focus-visible) { outline:2px solid var(--brand); outline-offset:3px; }
  #bokfInnehall .hb-workspace .hb-kv { margin:16px 0; gap:16px; padding:16px; border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--card); }
  #bokfInnehall .hb-workspace .hb-brad { border-radius:var(--radius); padding:20px; border:1px solid var(--line); margin-bottom:16px; background:var(--card); }
  #bokfInnehall .hb-workspace .hb-brad-forslag { border-radius:var(--radius-sm); padding:16px; background:var(--brand-soft); }
  #bokfInnehall .hb-year-route { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-bottom:24px; }
  #bokfInnehall .hb-year-route button { display:flex; align-items:center; gap:12px; background:var(--card); color:var(--ink); border:1px solid var(--line); border-radius:var(--radius-sm); font:inherit; font-size:13px; padding:16px; text-align:left; cursor:pointer; }
  #bokfInnehall .hb-year-route button:hover { border-color:var(--brand); }
  #bokfInnehall .hb-year-route span { display:flex; flex:0 0 24px; height:24px; align-items:center; justify-content:center; border-radius:50%; background:var(--soft); color:var(--muted); font-size:12px; }
  #bokfInnehall :is(#bokfHbArLista,#bokfHbArkiv,#bokfHbKontrollPanel) { scroll-margin-top:96px; }
  #bokfInnehall .hb-danger-zone { margin-top:32px; border-top:1px solid var(--line); padding-top:16px; }
  #bokfInnehall .hb-danger-zone > summary { cursor:pointer; min-height:44px; display:flex; align-items:center; color:var(--danger-ink); font-size:13px; font-weight:600; gap:8px; }
  #bokfInnehall .hb-danger-zone > summary::before { content:'+'; }
  #bokfInnehall .hb-danger-zone[open] > summary::before { content:'−'; }
  #bokfInnehall .hb-danger-zone > summary::-webkit-details-marker { display:none; }
  #bokfInnehall .hb-danger-zone .hb-fara { margin-top:12px; }
  #bokfInnehall .hb-workspace .hb-logg { list-style:none; padding-left:0; }
  #bokfInnehall .hb-workspace .hb-logg li { border-left:2px solid var(--line); padding:0 0 24px 20px; margin:0; }
  #bokfInnehall .hb-workspace .hb-faktura .hb-fhuvud { padding:16px; background:var(--soft); border-radius:var(--radius-sm); border:1px solid var(--line); }
  #bokfInnehall .hb-workspace .hb-faktura .hb-frader { counter-reset:invoice-row; }
  #bokfInnehall .hb-workspace .hb-faktura .hb-frad { padding:20px 0; gap:12px; }
  #bokfInnehall .hb-workspace .hb-faktura .hb-fr-belopp { align-self:center; padding:12px 16px; border-radius:var(--radius-sm); background:var(--soft); }
  .modal:has([id^="bokfHb"]) :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { box-sizing:border-box; width:100%; min-height:44px; font:inherit; font-size:14px; border-radius:var(--radius-sm); }
  .modal:has([id^="bokfHb"]) .field { min-width:0; margin-bottom:16px; }
  .modal:has([id^="bokfHb"]) .field label { display:block; margin-bottom:8px; color:var(--ink); font-size:13px; font-weight:500; }
  .modal:has([id^="bokfHb"]) .help { line-height:1.65; }
  .modal:has([id^="bokfHb"]) .hb-inram { padding:16px; border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--soft); }
  .modal:has([id^="bokfHb"]) :is(input,select,textarea,button):focus-visible { outline:2px solid var(--brand); outline-offset:3px; }
}
@keyframes hb-loading { to { transform:rotate(360deg); } }
@media screen and (max-width:1100px) {
  #bokfInnehall .hb-year-route { grid-template-columns:minmax(0,1fr); }
  #bokfInnehall .hb-workspace .hb-fhuvud { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #bokfInnehall .hb-workspace .hb-fhuvud :is(.hb-f-kund,.hb-f-medd) { grid-column:1/-1; }
  #bokfInnehall .hb-workspace .hb-fhuvud .hb-f-nykund { margin-top:0; }
}
@media screen and (max-width:760px) {
  #bokfInnehall .hb-empty { padding:24px 16px; gap:12px; }
  #bokfInnehall .hb-empty-mark { display:none; }
  #bokfInnehall .hb-workspace .hb-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); padding:16px; gap:16px 12px; }
  #bokfInnehall .hb-workspace .hb-metrics b { font-size:20px; }
  #bokfInnehall .hb-workspace .hb-ver-kropp { padding:8px 8px 16px; }
  #bokfInnehall .hb-workspace .hb-brad { padding:16px; }
  #bokfInnehall .hb-workspace .hb-verktyg { padding:12px; gap:12px; }
  #bokfInnehall .hb-workspace .hb-verktyg .field { flex-basis:100%; }
  #bokfInnehall .hb-workspace .hb-faktura .hb-fhuvud { padding:12px; }
  #bokfInnehall .hb-workspace .hb-kv { grid-template-columns:minmax(0,1fr); padding:12px; }
  .modal:has([id^="bokfHb"]) :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { font-size:16px; }
}
@media (prefers-reduced-motion:reduce) { #bokfInnehall .hb-loading-dot { animation:none; } }
@media screen {
  #bokfInnehall .hb-onboarding { padding:32px; }
  #bokfInnehall .hb-onboarding .hb-start { margin:0; padding:0; border:0; }
  #bokfInnehall .hb-onboarding h3 { font-size:24px; letter-spacing:-.025em; margin:0 0 12px; }
  #bokfInnehall .hb-onboarding .hb-start > p { max-width:60ch; color:var(--muted); line-height:1.65; }
  #bokfInnehall .hb-onboarding ul { margin:24px 0; padding-left:20px; line-height:1.8; }
  #bokfInnehall .bokf-other-source > summary { min-height:44px; cursor:pointer; color:var(--muted); font-size:13px; margin-bottom:16px; }
}
@media screen and (max-width:760px) { #bokfInnehall .hb-onboarding { padding:20px; } }
@media screen and (max-width:760px) {
  #bokfInnehall .hb-workspace .hb-tabell .hb-account-link { min-height:44px; }
}
@media screen and (max-width:760px) {
  #bokfInnehall .hb-workspace .hb-faktura .hb-fhuvud { grid-template-columns:minmax(0,1fr); }
  #bokfInnehall .hb-workspace .hb-faktura .hb-fhuvud > * { grid-column:1 / -1; }
}

/* Beslut 566 och framåt: delarnas egna regler. Varje del skriver bara mellan sina två märken. Återanvänd hellre klasserna ovan. */
/* del: betalning (början) */
/* Den samlade betalningen: en faktura per rad, med krysset och namnet till vänster och beloppet till höger. Raden bryts på en smal skärm. */
.modal:has([id^="bokfHb"]) .hb-bet-post { display:flex; flex-wrap:wrap; gap:8px 12px; align-items:center; margin:0 0 10px; }
.modal:has([id^="bokfHb"]) .hb-bet-post .hb-kryss { flex:1 1 220px; min-width:0; }
.modal:has([id^="bokfHb"]) .hb-bet-post input.hb-bet-belopp { flex:0 1 150px; width:auto; min-width:0; max-width:100%; text-align:right; }
/* del: betalning (slut) */

/* del: betalfil (början) */
/* del: betalfil (slut) */

/* del: bankfil (början) */
/* Beslut 568: rutan för inläsning (vad som redan är inläst och de samlade posterna), kolumnvalet och raden i en samlad post. */
.modal:has([id^="bokfHb"]) .hb-bankfil-lista { display:grid; gap:6px; margin:8px 0 0; padding-left:18px; color:var(--ink); font-size:13px; line-height:1.55; overflow-wrap:anywhere; }
.modal:has([id^="bokfHb"]) .hb-bankfil-kol th { min-width:136px; padding:8px; vertical-align:bottom; }
.modal:has([id^="bokfHb"]) .hb-bankfil-kol td { max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.modal:has([id^="bokfHb"]) .hb-bankfil-etikett { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
#bokfInnehall .hb-bankfil-post { margin:6px 0 0; }
/* del: bankfil (slut) */

/* del: anlaggning (början) */
@media screen {
  #bokfInnehall .hb-anl-komp > summary { padding-left:24px; }
  #bokfInnehall .hb-anl-manader { margin-top:8px; }
  #bokfInnehall .hb-anl-manader > summary { min-height:44px; display:flex; align-items:center; color:var(--ink-2); font-size:13px; cursor:pointer; }
}
@media screen and (max-width:600px) {
  .modal .hb-anl-rader :is(td,th) { padding:8px 4px; font-size:13px; }
  .modal .hb-anl-rader td:first-child { overflow-wrap:anywhere; }
}
/* del: anlaggning (slut) */

/* del: period (början) */
/* Mallens rader i rutan har fler fält än en verifikatrad: de får bryta rad i stället för att rulla i sidled. */
@media screen {
  .modal .hb-per-rad { flex-wrap:wrap; }
  .modal .hb-per-rad .field { flex:1 1 130px; }
  .modal .hb-per-rad .hb-f-konto { flex:2 1 200px; }
}
/* del: period (slut) */

/* del: skv (början) */
/* Beslut 571: fältets namn i filen är ett långt ord utan mellanrum. Det får brytas, så att beloppet syns utan att tabellen
   rullas i sidled på en smal skärm. Det avstavas inte: ett bindestreck i namnet finns inte i filen. */
@media screen {
  #bokfInnehall .hb-workspace .hb-skv-falt { overflow-wrap:anywhere; -webkit-hyphens:none; hyphens:none; }
}
/* del: skv (slut) */

/* del: roller (början) */
/* del: roller (slut) */

/* del: bokslut (början) */
/* Beslut 573: kontona bakom ett fält i deklarationens underlag står tätare och dämpade under fältets rad. */
#bokfInnehall .hb-tabell .hb-bs-konto td { padding-top:2px; padding-bottom:2px; color:var(--ink-2); font-size:13px; }
#bokfInnehall .hb-tabell .hb-bs-konto .btn { margin-left:8px; }
/* del: bokslut (slut) */

/* del: arsredovisning (början) */
#bokfInnehall .hb-workspace .hb-arsr-steg { margin:0; }
#bokfInnehall .hb-workspace .hb-arsr-osparat { font-size:11px; font-weight:500; opacity:.85; }
#bokfInnehall .hb-workspace .hb-arsr-lista { margin:8px 0 0; padding-left:20px; line-height:1.6; }
#bokfInnehall .hb-workspace .hb-arsr-lista li { margin:4px 0; }
#bokfInnehall .hb-workspace .hb-arsr-tabell :is(td,th):first-child { min-width:150px; hyphens:manual; overflow-wrap:normal; word-break:normal; }
#bokfInnehall .hb-workspace .hb-arsr-tabell .hb-arsr-post td:first-child { padding-left:24px; }
#bokfInnehall .hb-workspace .hb-arsr-tabell .hb-arsr-under td { font-weight:600; padding-top:14px; }
#bokfInnehall .hb-workspace .hb-arsr-tabell .hb-arsr-konto td { color:var(--muted); background:var(--soft); }
#bokfInnehall .hb-workspace .hb-arsr-tabell .hb-arsr-konto td:first-child { padding-left:36px; }
#bokfInnehall .hb-workspace .hb-arsr-kontorad { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 12px; }
#bokfInnehall .hb-workspace .hb-arsr-kontoknappar { display:inline-flex; flex-wrap:wrap; gap:6px; }
#bokfInnehall .hb-workspace .hb-arsr-tal { width:9.5em; max-width:100%; min-height:40px; text-align:right; font-variant-numeric:tabular-nums; }
#bokfInnehall .hb-workspace .hb-arsr-rad { margin:12px 0; padding:12px 14px; border:1px solid var(--line); border-radius:var(--radius-sm); min-width:0; }
#bokfInnehall .hb-workspace .hb-arsr-rad legend { padding:0 6px; font-size:13px; font-weight:600; }
#bokfInnehall .hb-workspace .hb-arsr-falt4 { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:0 16px; }
/* Granskningen 19 nov (BK-11): ett tomt datumfält i fastställelseintyget visar "Välj dag" i stället för dagens datum i grått
   (Safari). hb-datum-wk sätts bara där webbläsaren har datumfältets delar; Firefox behåller sin egen platshållare. */
#bokfInnehall .hb-workspace .hb-datum { position:relative; }
#bokfInnehall .hb-workspace .hb-datum-ph { display:none; font-size:14px; }
#bokfInnehall .hb-workspace .hb-datum-wk.hb-datum-tom input:not(:focus)::-webkit-datetime-edit { color:transparent; -webkit-text-fill-color:transparent; }
#bokfInnehall .hb-workspace .hb-datum-wk.hb-datum-tom input:not(:focus):not(:disabled) + .hb-datum-ph { display:block; position:absolute; left:13px; top:50%; transform:translateY(-50%); color:var(--muted); pointer-events:none; }
@media screen and (max-width:860px) {
  #bokfInnehall .hb-workspace .hb-datum-ph { font-size:16px; }
}
/* GA-11: intygets fält är låsta tills årsredovisningen är märkt som klar. De såg ut som tomma öppna fält på panelens grå botten;
   nu har de streckad ram och ingen fyllning, som en plats som inte går att skriva i än. */
#bokfInnehall .hb-workspace .hb-intyg-last :is(input,select):disabled { background:transparent; border-style:dashed; border-color:var(--muted); color:var(--muted); -webkit-text-fill-color:var(--muted); box-shadow:none; cursor:not-allowed; opacity:1; }
#bokfInnehall .hb-workspace .hb-intyg-last label { color:var(--muted); }
@media screen and (max-width:560px) {
  #bokfInnehall .hb-workspace .hb-arsr-steg .btn { flex:1 1 100%; justify-content:flex-start; }
  #bokfInnehall .hb-workspace .hb-arsr-tabell :is(td,th):first-child { min-width:130px; }
  #bokfInnehall .hb-workspace .hb-arsr-falt4 { grid-template-columns:minmax(0,1fr); }
}
/* del: arsredovisning (slut) */

/* del: lon (början) */
/* Beslut 575: rutan för kostnadsersättning och beloppsgräns under en person i en utbetalning, raderna som visas innan
   utbetalningen bokförs, och periodernas kort. Allt annat i arbetsytan använder klasserna ovan. */
#bokfInnehall .hb-workspace .hb-lon-mer { margin:0 0 8px; }
#bokfInnehall .hb-workspace .hb-lon-ruta { margin:8px 0 12px; padding:16px; border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--soft); }
#bokfInnehall .hb-workspace .hb-lon-ruta h4 { margin:0 0 8px; font-size:13px; }
#bokfInnehall .hb-workspace .hb-lon-ruta .hb-form2 + h4 { margin-top:8px; }
#bokfInnehall .hb-workspace .hb-lon-ruta .field { min-width:0; }
#bokfInnehall .hb-workspace .hb-lon-visning { margin-top:24px; padding-top:24px; border-top:1px solid var(--line); }
#bokfInnehall .hb-workspace .hb-lon-period { padding:16px 0; border-top:1px solid var(--line); }
#bokfInnehall .hb-workspace .hb-lon-period:first-child { padding-top:0; border-top:0; }
#bokfInnehall .hb-workspace .hb-lon-lage { display:flex; flex-wrap:wrap; gap:6px; }
#bokfInnehall .hb-workspace .hb-lon-lage .pill { white-space:normal; }
/* del: lon (slut) */

/* del: valuta (början) */
/* del: valuta (slut) */

/* del: efaktura (början) */
/* del: efaktura (slut) */

/* Beslut 597: Idag, lugn start med avgränsad läsning och en tydlig nästa handling. */
@media screen {
  #bokfInnehall .hb-brad-grund { display:inline-flex; margin-bottom:6px; }
  #bokfInnehall .hb-today-next { background:var(--brand-soft); border-color:var(--line); padding:24px; }
  #bokfInnehall .hb-today-status { display:flex; align-items:center; justify-content:space-between; gap:12px; }
  #bokfInnehall .hb-today-status .hb-eyebrow { display:block; margin:0; color:var(--brand); }
  #bokfInnehall .hb-today-next h3 { margin:18px 0 10px; max-width:30ch; font-size:25px; line-height:1.25; font-weight:600; letter-spacing:-.025em; }
  #bokfInnehall .hb-today-next > p { max-width:68ch; line-height:1.65; margin:0 0 18px; font-size:14px; }
  #bokfInnehall .hb-today-next .hb-today-updated { margin:20px 0 0; color:var(--muted); font-size:12px; }
  #bokfInnehall .hb-today-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
  #bokfInnehall .hb-today-metric { min-width:0; display:flex; flex-direction:column; align-items:flex-start; padding:20px; }
  #bokfInnehall .hb-today-metric .hb-eyebrow { display:block; }
  #bokfInnehall .hb-today-metric strong { font-size:23px; line-height:1.3; letter-spacing:-.025em; overflow-wrap:anywhere; }
  #bokfInnehall .hb-today-metric p { margin:8px 0 16px; font-size:12px; color:var(--muted); line-height:1.6; overflow-wrap:anywhere; }
  #bokfInnehall .hb-today-metric .btn { margin-top:auto; white-space:normal; text-align:left; }
  #bokfInnehall :is(.hb-today-queue,.hb-today-actions) h3 { font-size:16px; margin:0 0 18px; font-weight:600; }
  #bokfInnehall .hb-today-queue ul { list-style:none; margin:0; padding:0; }
  #bokfInnehall .hb-today-queue li { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 0; border-top:1px solid var(--line); }
  #bokfInnehall .hb-today-queue li:first-child { padding-top:0; border:0; }
  #bokfInnehall .hb-today-queue li:last-child { padding-bottom:0; }
  #bokfInnehall .hb-today-queue li > div { min-width:0; }
  #bokfInnehall .hb-today-queue b { font-size:13px; font-weight:600; }
  #bokfInnehall .hb-today-queue p { margin:6px 0 0; font-size:12px; line-height:1.6; color:var(--muted); }
  #bokfInnehall .hb-today-queue .btn { flex-shrink:0; }
  #bokfInnehall .hb-today-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  #bokfInnehall .hb-today-choice { display:grid; grid-template-columns:minmax(0,1fr) 20px; gap:6px 12px; width:100%; text-align:left; background:var(--card); color:var(--ink); border:1px solid var(--line); border-radius:var(--radius-sm); padding:18px; cursor:pointer; font:inherit; }
  #bokfInnehall .hb-today-choice b { grid-column:1; font-size:13px; line-height:1.5; font-weight:600; }
  #bokfInnehall .hb-today-choice span:first-of-type { grid-column:1; color:var(--muted); font-size:12px; line-height:1.6; }
  #bokfInnehall .hb-today-choice span:last-child { grid-column:2; grid-row:1 / 3; align-self:center; color:var(--brand); }
  #bokfInnehall .hb-today-choice:hover { background:var(--soft); border-color:var(--brand); }
  #bokfInnehall .hb-today-choice:focus-visible { outline:2px solid var(--brand); outline-offset:3px; }
  #bokfInnehall .hb-today-template { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-top:20px; padding-top:20px; border-top:1px solid var(--line); }
  #bokfInnehall .hb-today-template b { font-size:13px; font-weight:600; }
  #bokfInnehall .hb-today-template p { margin:6px 0 0; color:var(--muted); font-size:12px; line-height:1.6; }
  #bokfInnehall .hb-today-template .btn { flex-shrink:0; }
  #bokfInnehall .hb-today-scope { margin:16px 0 0; line-height:1.6; max-width:80ch; }
}
@media screen and (max-width:1100px) {
  #bokfInnehall .hb-today-metrics { grid-template-columns:minmax(0,1fr); }
  #bokfInnehall .hb-today-queue li, #bokfInnehall .hb-today-template { align-items:flex-start; flex-direction:column; gap:12px; }
}
@media screen and (max-width:480px) {
  #bokfInnehall .hb-today-next { padding:18px; }
  #bokfInnehall .hb-today-next h3 { font-size:22px; }
  #bokfInnehall .hb-today-choices { grid-template-columns:minmax(0,1fr); }
  #bokfInnehall .hb-today-choice { padding:16px; }
}

@media screen and (max-width:760px) {
  #bokfInnehall .hb-workspace .hb-nav-idag .bokf-nav { grid-template-columns:minmax(0,1fr); }
  #bokfInnehall .hb-workspace .hb-flikgrupp .bokf-nav button:first-child { grid-column:auto; }
}

/* Beslut 596: ett granskat kontoförslag bredvid bankradens manuella formulär. */
@media screen {
  #bokfInnehall .hb-ai-assist { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px 20px; margin:14px 0; padding:16px; background:var(--soft); border:1px solid var(--line); border-radius:var(--radius-sm); }
  #bokfInnehall .hb-ai-assist > div { flex:1 1 240px; min-width:0; }
  #bokfInnehall .hb-ai-assist h4 { margin:12px 0 8px; font-size:14px; font-weight:600; overflow-wrap:anywhere; }
  #bokfInnehall .hb-ai-assist p { margin:6px 0 10px; color:var(--muted); font-size:12px; line-height:1.65; overflow-wrap:anywhere; }
  #bokfInnehall .hb-ai-assist b { font-size:13px; font-weight:600; }
  #bokfInnehall .hb-ai-assist .hb-ai-question { color:var(--ink); }
  #bokfInnehall .hb-ai-assist .btn { min-height:44px; white-space:normal; }
  #bokfInnehall .hb-ai-assist .pill { white-space:normal; line-height:1.5; }
}

/* Arbetsytorna är sökbara utan att det pågående arbetet ritas om. */
@media screen {
  #bokfInnehall .hb-nav-search { min-width:0; grid-column:1/-1; }
  #bokfInnehall .hb-nav-search label { display:block; margin:0 0 8px; color:var(--muted); font-size:12px; font-weight:600; }
  #bokfInnehall .hb-nav-search-field { display:flex; align-items:center; border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--field,var(--soft)); }
  #bokfInnehall .hb-nav-search-field:focus-within { outline:2px solid var(--brand); outline-offset:2px; }
  #bokfInnehall .hb-nav-search-field input { flex:1; min-width:0; width:100%; border:0; background:transparent; padding:10px; min-height:44px; color:var(--ink); font:inherit; font-size:13px; box-shadow:none; outline:none; }
  #bokfInnehall .hb-nav-search-field input::-webkit-search-cancel-button { display:none; }
  #bokfInnehall .hb-nav-search-field .icon-btn { flex:0 0 44px; min-width:44px; min-height:44px; color:var(--muted); }
  #bokfInnehall .hb-nav-search p { color:var(--muted); font-size:12px; line-height:1.6; margin:8px 0 0; overflow-wrap:anywhere; }
  #bokfInnehall .hb-nav-unsaved { margin-left:auto; font-size:11px; font-weight:600; color:var(--warn-ink); }
  #bokfInnehall .hb-flikar [hidden] { display:none !important; }
}
@media screen and (min-width:761px) {
  #bokfInnehall .hb-workspace .hb-flikar { position:sticky; top:96px; max-height:calc(100dvh - 112px); overflow-y:auto; scrollbar-width:thin; }
}
@media screen and (max-width:760px) {
  #bokfInnehall .hb-nav-search-field input { font-size:16px; }
  #bokfInnehall .hb-nav-search { margin-bottom:8px; }
}

/* Telefonen visar vald arbetsyta direkt. Menyn öppnas när användaren vill byta. */
@media screen { #bokfInnehall .hb-nav-mobile-head { display:none; } }
@media screen and (max-width:760px) {
  #bokfInnehall .hb-workspace .hb-flikar { gap:12px 8px; padding:8px 12px; }
  #bokfInnehall .hb-nav-mobile-head { display:block; grid-column:1/-1; }
  #bokfInnehall .hb-nav-mobile-toggle { display:flex; align-items:center; justify-content:space-between; gap:16px; width:100%; min-height:52px; padding:4px 0; border:0; color:var(--ink); background:transparent; font:inherit; text-align:left; cursor:pointer; }
  #bokfInnehall .hb-nav-mobile-toggle > span:first-child { min-width:0; }
  #bokfInnehall .hb-nav-mobile-toggle b { display:block; font-size:14px; font-weight:600; overflow-wrap:anywhere; }
  #bokfInnehall .hb-nav-mobile-label { display:block; color:var(--muted); font-size:11px; line-height:1.6; }
  #bokfInnehall .hb-nav-mobile-action { flex-shrink:0; font-size:12px; font-weight:600; color:var(--brand); }
  #bokfInnehall .hb-nav-mobile-toggle:focus-visible { outline:2px solid var(--brand); outline-offset:2px; border-radius:var(--radius-sm); }
  #bokfInnehall .hb-flikar[data-expanded="false"] > :not(.hb-nav-mobile-head) { display:none !important; }
}

/* Fullständig fakturasökning: tydligt avskild från arbetsytesökningen. */
@media screen {
  #bokfInnehall .hb-invoice-search { display:flex; flex-wrap:wrap; align-items:flex-end; gap:8px; margin:16px 0; padding:16px; background:var(--soft); border:1px solid var(--line); border-radius:var(--radius-sm); }
  #bokfInnehall .hb-invoice-search .field { flex:1 1 260px; margin:0; min-width:0; }
  #bokfInnehall .hb-invoice-search input { width:100%; min-width:0; min-height:44px; box-sizing:border-box; }
  #bokfInnehall .hb-invoice-search > .btn { min-height:44px; }
  #bokfInnehall .hb-invoice-search > p { flex-basis:100%; margin:0; }
  #bokfInnehall .hb-invoice-results { margin:0 0 16px; overflow-wrap:anywhere; }
}
@media screen and (max-width:760px) { #bokfInnehall .hb-invoice-search { padding:12px; } #bokfInnehall .hb-invoice-search input { font-size:16px; } }
/* Beslut 605: kvitton och fakturor med telefonen. Kameraknappen först, och knappar på minst 44 px för tummen. */
@media screen {
  #bokfInnehall .hb-in-ta, #bokfInnehall .hb-in-idag { display:grid; gap:10px; margin-bottom:14px; }
  #bokfInnehall .hb-in-ta h3, #bokfInnehall .hb-in-idag h3 { margin:0; }
  #bokfInnehall .hb-in-knappar { display:flex; flex-wrap:wrap; gap:10px; }
  #bokfInnehall .hb-in-knappar .btn { min-height:44px; cursor:pointer; }
  #bokfInnehall .hb-in-lagen { margin:0 0 12px; }
  #bokfInnehall .hb-in-lista { display:grid; gap:12px; }
  #bokfInnehall .hb-in-kort { display:grid; gap:10px; }
  #bokfInnehall .hb-in-kort .help { margin:0; }
  #bokfInnehall .hb-in-huvud { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
  #bokfInnehall .hb-in-huvud > div { display:grid; gap:2px; min-width:0; }
  #bokfInnehall .hb-in-huvud b { overflow-wrap:anywhere; }
  #bokfInnehall .hb-in-falt { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 14px; }
  #bokfInnehall .hb-in-falt .hb-in-text { grid-column:1 / -1; }
  #bokfInnehall .hb-in-forslag ul { list-style:none; margin:0; padding:0; display:grid; gap:8px; }
  #bokfInnehall .hb-in-forslag li { display:flex; justify-content:space-between; align-items:center; gap:10px; border:1px solid var(--line); border-radius:var(--radius-sm); padding:10px 12px; background:var(--card); }
  #bokfInnehall .hb-in-forslag li > div { display:grid; gap:2px; min-width:0; }
  #bokfInnehall .hb-in-forslag li span { color:var(--muted); font-size:13px; overflow-wrap:anywhere; }
  #bokfInnehall .hb-in-atg { display:flex; flex-wrap:wrap; gap:8px; }
  #bokfInnehall .hb-in-atg .btn, #bokfInnehall .hb-in-forslag .btn { min-height:44px; }
}
@media screen and (max-width:900px) {
  #bokfInnehall .hb-in-falt { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media screen and (max-width:760px) {
  #bokfInnehall .hb-in-knappar .btn { flex:1 1 100%; justify-content:center; }
  #bokfInnehall .hb-in-falt { grid-template-columns:1fr; }
  #bokfInnehall .hb-in-forslag li { flex-direction:column; align-items:stretch; }
  #bokfInnehall .hb-in-atg .btn { flex:1 1 auto; }
}

/* Den publicerade väljaren är kvar på smala arbetsytor; sökningen öppnar samma behörighetsstyrda meny vid behov. */
@media screen {
  #bokfInnehall .hb-nav-open-search { margin-top:8px; }
  #bokfInnehall.hb-smalyta .hb-workspace nav.hb-flikar[data-expanded="true"] { display:flex; position:static; max-height:none; overflow:visible; }
  #bokfInnehall.hb-smalyta .hb-nav-mobile-head { display:block; }
  #bokfInnehall.hb-smalyta .hb-nav-mobile-toggle { display:flex; align-items:center; justify-content:space-between; gap:16px; width:100%; min-height:44px; border:0; background:transparent; color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
  #bokfInnehall.hb-smalyta .hb-nav-mobile-toggle b, #bokfInnehall.hb-smalyta .hb-nav-mobile-label { display:block; }
  #bokfInnehall.hb-smalyta .hb-nav-mobile-label { color:var(--muted); font-size:11px; }
  #bokfInnehall.hb-smalyta .hb-nav-mobile-action { color:var(--brand); font-size:12px; }
}

/* Beständiga utskicksreferenser och bankens faktiska driftläge. */
.hb-utskick-journal { overflow-wrap:anywhere; }
.hb-utskick-journal .toolbar { flex-wrap:wrap; margin:12px 0; }
.hb-bank-drift { border-inline-start:3px solid var(--brand); padding:2px 0 2px 12px; margin:12px 0; }
.hb-bank-drift p { margin:5px 0; }

@media screen {
  #bokfInnehall .hb-puls { padding:28px; background:var(--card); }
  #bokfInnehall .hb-puls-heading { display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:20px; margin-bottom:26px; }
  #bokfInnehall .hb-puls-heading h2 { font-size:28px; letter-spacing:-.035em; line-height:1.15; margin:0 0 10px; }
  #bokfInnehall .hb-puls-period { width:min(100%,260px); margin:0; }
  #bokfInnehall .hb-puls-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
  #bokfInnehall .hb-puls-metric { min-width:0; padding:22px; display:flex; flex-direction:column; align-items:flex-start; border-right:1px solid var(--line); border-bottom:1px solid var(--line); }
  #bokfInnehall .hb-puls-metric strong { font-size:clamp(22px,2.3vw,32px); font-weight:600; letter-spacing:-.045em; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; line-height:1.2; }
  #bokfInnehall .hb-puls-metric p { color:var(--muted); font-size:12px; line-height:1.6; margin:12px 0 20px; max-width:36ch; }
  #bokfInnehall .hb-puls-metric .btn { margin-top:auto; }
  #bokfInnehall .hb-puls-cash { background:var(--brand-soft); grid-row:span 2; justify-content:center; }
  #bokfInnehall .hb-puls-cash strong { color:var(--brand); font-size:clamp(26px,3vw,38px); }
  #bokfInnehall .hb-puls-bottom { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); gap:28px; margin-top:30px; }
  #bokfInnehall .hb-puls-bottom h3 { margin:0; font-size:16px; font-weight:600; letter-spacing:-.02em; }
  #bokfInnehall .hb-puls-bottom .toolbar { flex-wrap:wrap; gap:4px; }
  #bokfInnehall .hb-puls-cashflow { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:18px 0; }
  #bokfInnehall .hb-puls-cashflow>div { padding:16px; background:var(--soft); border-radius:var(--radius-sm); display:flex; flex-direction:column; gap:7px; min-width:0; }
  #bokfInnehall .hb-puls-cashflow span,#bokfInnehall .hb-puls-cashflow small { color:var(--muted); font-size:12px; }
  #bokfInnehall .hb-puls-cashflow strong { font-size:21px; letter-spacing:-.03em; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
  #bokfInnehall .hb-puls-events { margin:0; padding:0; list-style:none; border-top:1px solid var(--line); }
  #bokfInnehall .hb-puls-events li { border-bottom:1px solid var(--line); }
  #bokfInnehall .hb-puls-events button { display:grid; grid-template-columns:minmax(0,1fr) auto 12px; gap:6px 12px; text-align:left; align-items:center; width:100%; padding:14px 0; border:0; background:transparent; color:var(--ink); font:inherit; cursor:pointer; }
  #bokfInnehall .hb-puls-event-date { grid-column:1 / -1; font-size:11px; color:var(--muted); }
  #bokfInnehall .hb-puls-events b { font-size:13px; font-weight:600; display:block; overflow-wrap:anywhere; }
  #bokfInnehall .hb-puls-events small { display:block; font-size:11px; color:var(--muted); margin-top:4px; overflow-wrap:anywhere; }
  #bokfInnehall .hb-puls-events strong { font-size:13px; font-weight:600; font-variant-numeric:tabular-nums; }
  #bokfInnehall .hb-puls-events button:hover b { color:var(--brand); }
  #bokfInnehall .hb-puls-events button:focus-visible { outline:2px solid var(--brand); outline-offset:3px; border-radius:4px; }
  #bokfInnehall .hb-puls-chart { display:flex; align-items:stretch; gap:8px; height:150px; border-bottom:1px solid var(--line); margin:26px 0 32px; padding:0 4px; }
  #bokfInnehall .hb-puls-chart>div { flex:1; min-width:0; position:relative; display:flex; align-items:flex-end; justify-content:center; gap:3px; }
  #bokfInnehall .hb-puls-chart span { flex:1; max-width:24px; min-height:1px; border-radius:3px 3px 0 0; }
  #bokfInnehall .hb-puls-bar-income { background:var(--brand); }
  #bokfInnehall .hb-puls-bar-cost { background:var(--muted); opacity:.5; }
  #bokfInnehall .hb-puls-chart small { position:absolute; bottom:-22px; font-size:10px; color:var(--muted); }
  #bokfInnehall .hb-puls-legend-income { color:var(--brand); }
  #bokfInnehall .hb-puls-legend-cost { color:var(--muted); }
  #bokfInnehall .hb-puls-months { list-style:none; margin:12px 0; padding:0; }
  #bokfInnehall .hb-puls-months li { padding:10px 0; border-bottom:1px solid var(--line); display:flex; flex-direction:column; gap:4px; font-size:12px; }
  #bokfInnehall .hb-puls-stamp { border-top:1px solid var(--line); padding-top:18px; margin:24px 0 0; }
  #bokfInnehall .hb-smalyta .hb-puls-bottom { grid-template-columns:minmax(0,1fr); }
}
@media screen and (max-width:1000px) {
  #bokfInnehall .hb-puls { padding:20px; }
  #bokfInnehall .hb-puls-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #bokfInnehall .hb-puls-cash { grid-row:auto; grid-column:1 / -1; }
  #bokfInnehall .hb-puls-metric { padding:18px; }
  #bokfInnehall .hb-puls-bottom { grid-template-columns:minmax(0,1fr); }
}
@media screen and (max-width:420px) {
  #bokfInnehall .hb-puls { padding:16px; }
  #bokfInnehall .hb-puls-heading h2 { font-size:25px; }
  #bokfInnehall .hb-puls-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #bokfInnehall .hb-puls-metric { padding:18px; }
  #bokfInnehall .hb-puls-metric strong { font-size:21px; }
  #bokfInnehall .hb-puls-cash strong { font-size:30px; }
  #bokfInnehall .hb-puls-metric { padding:14px; }
  #bokfInnehall .hb-puls-metric p { font-size:11px; }
  #bokfInnehall .hb-puls-cashflow { grid-template-columns:minmax(0,1fr); }
}

@media screen { #bokfInnehall .hb-puls .hb-eyebrow { display:block; } #bokfInnehall .hb-puls .hb-today-next { margin-top:22px; } }

/* Beslut613: filsläpp kompletterar den vanliga filväljaren. */
@media screen {
  .hb-file-drop { border:1px dashed var(--line); background:var(--soft); border-radius:var(--radius-sm); padding:16px; min-width:0; transition:border-color .15s,background .15s; }
  .hb-file-drop .hb-drop-hint { font-size:12px; line-height:1.6; color:var(--muted); margin:0 0 12px; max-width:64ch; }
  .hb-file-drop .hb-drop-status { overflow-wrap:anywhere; margin:10px 0 0; }
  .hb-file-drop .hb-drop-status:empty { display:none; }
  .hb-file-drop[data-dragging],.hb-file-drop:focus-within { border-color:var(--brand); background:var(--brand-soft); outline:2px solid var(--brand); outline-offset:3px; }
  .hb-in-knappar>.hb-file-drop { width:100%; }
  .hb-file-drop .btn { margin:0 6px 4px 0; }
  .hb-file-drop .field:last-of-type { margin-bottom:0; }
}
@media (prefers-reduced-motion:reduce) { .hb-file-drop { transition:none; } }

@media screen {
  #bokfInnehall button.hb-puls-metric { text-align:left; font-family:inherit; color:var(--ink); border-top:0; border-left:0; background:transparent; cursor:pointer; }
  #bokfInnehall button.hb-puls-cash { background:var(--brand-soft); }
  #bokfInnehall .hb-puls-caption { display:block; color:var(--muted); font-size:12px; line-height:1.6; margin-top:12px; }
  #bokfInnehall .hb-puls-metric:focus-visible { outline:2px solid var(--brand); outline-offset:-3px; }
  #bokfInnehall .hb-puls-metric:hover { background:var(--soft); }
  #bokfInnehall .hb-puls-metric .hb-eyebrow { display:flex; justify-content:space-between; gap:12px; width:100%; }
  #bokfInnehall .hb-today-choice span:last-child { grid-row:1; }
}

/* Endast journalens dolda fält/primärknapp: .btn har annars egen display som vinner över UA[hidden]. */
#modalRoot .btn[data-hb-utskick][hidden],#modalRoot #bokfHbKsCompose[hidden] { display:none!important; }
