/* Översikt · tydlig arbetsordning och åtkomliga årsval.
   Avgränsat till vyn; appens semantiska tokens styr båda teman. */
@media screen {
  .ov-workspace { min-width:0; }
  .ov-workspace .page-head { margin-bottom:20px; align-items:center; }
  .ov-workspace .page-head h1 { overflow-wrap:anywhere; }
  .ov-workspace .page-head .sub { line-height:1.6; }
  .ov-workspace .greet { margin-bottom:20px; }
  .ov-workspace .greet-story { line-height:1.65; }
  .ov-workspace .ov-focus {
    display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:24px; row-gap:8px;
    align-items:start; min-height:140px; box-sizing:border-box; padding:20px 24px;
    margin-bottom:20px; border-color:var(--line);
  }
  .ov-workspace .ov-focus-head { grid-column:1; display:flex; flex-direction:column; align-items:flex-start; gap:4px; min-width:0; margin:0; }
  .ov-workspace .ov-focus-head .page-kicker { margin:0; font-size:12px; line-height:1.5; }
  .ov-workspace .ov-focus-head h2 { margin:0; font-size:21px; font-weight:550; line-height:1.35; letter-spacing:-.025em; }
  .ov-workspace .ov-focus-head .label { color:var(--muted); font-size:12px; line-height:1.5; }
  .ov-workspace .ov-focus-text { grid-column:1; min-width:0; max-width:78ch; margin:0; color:var(--ink-2); font-size:14px; line-height:1.65; overflow-wrap:anywhere; }
  .ov-workspace .ov-focus-text p { margin:0; }
  .ov-workspace #ovAction { grid-column:2; grid-row:1 / 3; align-self:center; max-width:280px; margin:0; min-height:44px; white-space:normal; text-align:left; }
  .ov-workspace :is(.btn,.kom-rad) { min-height:44px; }
  .ov-workspace :is(.btn,.kom-rad,.card.stat[role=button],button.bar-col,summary,.t-namn-knapp):focus-visible {
    outline:2px solid var(--brand); outline-offset:3px;
  }
  .ov-workspace .card.stat[role=button]:focus-visible { border-color:var(--brand); }
  .ov-workspace > .grid.k4 { gap:16px; margin-bottom:20px; }
  .ov-workspace > .grid.k4 > .card.stat { padding:20px; min-height:0; }
  .ov-workspace > .grid.k4 > .card.stat .val { margin-top:12px; font-size:clamp(25px,2.5vw,32px); overflow-wrap:anywhere; }
  .ov-workspace > .grid.k4 > .card.stat .val.txt { font-size:23px; line-height:1.25; }
  .ov-workspace > .grid.k4 > .card.stat .meta { margin-top:8px; font-size:12px; line-height:1.6; }
  .ov-workspace .kom-igang { margin-bottom:20px; }
  .ov-workspace .kom-steg { gap:8px; }
  .ov-workspace .kom-rad { padding:10px 12px; border-radius:var(--radius-sm); line-height:1.45; }
  .ov-workspace .kom-rad:focus-visible { border-radius:var(--radius-sm); }
  .ov-workspace .dashboard-next { gap:20px; margin-bottom:20px; }
  .ov-workspace .dashboard-next > .card { min-width:0; }
  .ov-workspace .ov-next-table { width:100%; table-layout:fixed; }
  .ov-workspace .ov-next-table td { padding-block:12px; vertical-align:top; }
  .ov-workspace .ov-next-table td.t-ar { width:86px; }
  .ov-workspace .ov-next-table td.num { width:104px; font-variant-numeric:tabular-nums; }
  .ov-workspace .ov-next-table .t-namn-knapp {
    display:flex; align-items:center; min-height:44px; width:100%; padding:8px 0;
    font-size:14px; font-weight:550; line-height:1.45; overflow-wrap:anywhere;
  }
  .ov-workspace .ov-next-table .t-cat { font-size:12px; line-height:1.6; white-space:normal; }
  .ov-workspace .bars:has(button.bar-col) {
    display:flex; align-items:stretch; height:208px; gap:4px; padding:8px 4px 12px;
    overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin;
    scrollbar-color:var(--line) transparent; scroll-snap-type:x proximity;
  }
  .ov-workspace button.bar-col {
    appearance:none; flex:1 0 44px; min-width:44px; min-height:44px; height:100%;
    display:flex; flex-direction:column; align-items:center; gap:8px;
    padding:4px 0; border:1px solid transparent; border-radius:6px;
    background:transparent; color:var(--ink); font:inherit; cursor:pointer;
    scroll-snap-align:start;
  }
  .ov-workspace button.bar-col:hover { background:var(--soft); border-color:var(--line); }
  .ov-workspace button.bar-col:focus-visible { outline-offset:-2px; background:var(--brand-soft); }
  .ov-workspace button.bar-col .bar-wrap { min-height:0; }
  .ov-workspace button.bar-col .bar { width:62%; max-width:40px; }
  .ov-workspace button.bar-col .bar-yr { flex-shrink:0; font-size:12px; line-height:1.5; color:var(--muted); font-variant-numeric:tabular-nums; }
  .ov-workspace button.bar-col:focus-visible .bar-yr { color:var(--brand); font-weight:600; }
  .ov-workspace .ov-budget-values { margin-top:16px; border-top:1px solid var(--line); }
  .ov-workspace .ov-budget-values > summary { display:list-item; min-height:44px; padding:12px 0; box-sizing:border-box; color:var(--ink-2); font-size:13px; line-height:1.5; cursor:pointer; }
  .ov-workspace .ov-budget-values table { width:100%; font-size:13px; }
  .ov-workspace .ov-budget-values :is(th,td) { padding:10px 8px; font-variant-numeric:tabular-nums; }
  .ov-workspace .ov-budget-values th { white-space:normal; }
  .ov-workspace .ov-budget-values .card-scroll { max-width:100%; }
  .ov-workspace .legend { flex-wrap:wrap; gap:8px 16px; line-height:1.6; }

  @media (max-width:1180px) and (min-width:861px) {
    .ov-workspace .dashboard-next { grid-template-columns:minmax(0,1fr); }
  }
  @media (max-width:860px) {
    .ov-workspace .page-head { align-items:flex-start; }
    .ov-workspace .page-head .toolbar .btn { min-height:44px; }
    .ov-workspace > .grid.k4 { gap:12px; }
    .ov-workspace > .grid.k4 > .card.stat { padding:16px; }
    .ov-workspace > .grid.k4 > .card.stat .val { font-size:26px; }
    .ov-workspace > .grid.k4 > .card.stat .val.txt { font-size:21px; }
    .ov-workspace .ov-focus-head h2 { font-size:20px; }
    .ov-workspace .ov-focus-head .pill { max-width:100%; white-space:normal; }
    .ov-workspace .ov-focus { grid-template-columns:minmax(0,1fr); min-height:0; padding:20px; gap:12px; }
    .ov-workspace #ovAction { grid-column:1; grid-row:auto; justify-self:stretch; width:100%; max-width:none; margin-top:4px; }
    .ov-workspace .dashboard-next { gap:16px; }
    .ov-workspace .dashboard-next .card-scroll:has(.ov-next-table) { overflow:visible; }
    .ov-workspace .ov-next-table { display:block; min-width:0; }
    .ov-workspace .ov-next-table tbody { display:block; }
    .ov-workspace .ov-next-table tbody tr { display:grid; grid-template-columns:minmax(0,1fr); gap:4px; padding:12px 0; border-bottom:1px solid var(--line); }
    .ov-workspace .ov-next-table tbody tr:last-child { border-bottom:0; }
    .ov-workspace .ov-next-table tbody td { display:block; width:auto; min-width:0; padding:0; border:0; text-align:left; }
    .ov-workspace .ov-next-table tbody td.num { display:flex; justify-content:space-between; gap:12px; width:auto; padding-top:8px; white-space:normal; font-weight:550; }
    .ov-workspace .ov-next-table tbody td.num::before { content:attr(data-label); color:var(--muted); font-size:12px; font-weight:400; }
    .ov-workspace .ov-next-table td.t-name { overflow-wrap:anywhere; }
    .ov-workspace .ov-next-table td.t-ar { width:auto; }
    .ov-workspace .ov-next-table .t-namn-knapp { padding-block:8px; }
    .ov-workspace .bars:has(button.bar-col) { height:192px; }
    .ov-workspace .ov-budget-values :is(th,td) { padding-inline:6px; }
  }
  @media (max-width:600px) {
    .ov-workspace #ovAction { width:100%; }
    .ov-workspace .kom-steg { display:grid; grid-template-columns:minmax(0,1fr); }
    .ov-workspace .kom-rad { width:100%; }
  }
  @media (max-width:360px) {
    .ov-workspace > .grid.k4 > .card.stat { padding:12px; }
    .ov-workspace > .grid.k4 > .card.stat .val { font-size:23px; }
    .ov-workspace > .grid.k4 > .card.stat .val.txt { font-size:19px; }
  }
  @media (prefers-reduced-motion:reduce) {
    .ov-workspace :is(.bar,.kom-matare i,.card.stat[role=button]) { transition:none; }
    .ov-workspace .bars { scroll-behavior:auto; scroll-snap-type:none; }
  }
}
