/* Page-specific styles for Löner. Tokens and components come from ../assets/css/base.css. */
#langSeg button { padding: 6px 9px; }

/* controls */
.controls .crow { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end; }
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fld > span { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.fld.grow { flex: 1 1 340px; }
.fld select { max-width: 100%; }
.search { position: relative; }
.search input { width: 100%; }
.sug { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow); max-height: 320px; overflow: auto; }
.sug li { padding: 7px 9px; border-radius: 7px; cursor: pointer; font-size: 14px; display: flex; justify-content: space-between; gap: 10px; }
.sug li small { color: var(--faint); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sug li[aria-selected="true"], .sug li:hover { background: var(--accent-soft); }
.sug li.nohit { cursor: default; color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; min-height: 32px; }
.chip { display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); font-size: 13.5px; font-weight: 600; max-width: 100%; }
.chip.lead { border-color: var(--text); }
.chip .nm { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; padding: 5px 4px 5px 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .nm small { color: var(--faint); font-weight: 500; font-size: 11.5px; }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sc); flex: none; }
.chip .x { all: unset; cursor: pointer; width: 22px; height: 22px; margin-right: 4px; line-height: 21px; text-align: center; border-radius: 50%; color: var(--muted); font-size: 15px; flex: none; }
.chip .x:hover, .chip .x:focus-visible, .chip .nm:focus-visible { background: var(--border); color: var(--text); }
.chips .none { color: var(--faint); font-size: 13.5px; align-self: center; }
.hint { min-height: 18px; font-size: 12.5px; color: var(--warn); margin-top: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* occupation browser */
.browser { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; max-height: 520px; overflow: auto; }
.browser details { border-radius: 8px; }
.browser summary { cursor: pointer; padding: 6px 8px; border-radius: 8px; font-size: 14px; list-style-position: inside; }
.browser summary:hover { background: var(--surface-2); }
.browser summary b { font-variant-numeric: tabular-nums; margin-right: 6px; }
.browser summary small { color: var(--faint); margin-left: 6px; }
.browser .fieldset > summary { font-weight: 650; }
.browser .grp { margin-left: 18px; }
.browser .grp > summary { color: var(--text2, var(--h-text2)); }
.browser ul { list-style: none; margin: 0 0 6px 30px; padding: 0; }
.browser li button { all: unset; box-sizing: border-box; width: 100%; display: flex; gap: 8px; align-items: baseline; padding: 4px 8px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.browser li button b { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.browser li button small { margin-left: auto; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.browser li button:hover, .browser li button:focus-visible { background: var(--surface-2); }
.browser li button.on { background: var(--accent-soft); font-weight: 650; }

/* KPI tiles */
.kpis { min-width: 0; }
.kh { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 4px 2px 10px; }
.kh b { font-family: var(--head); font-stretch: 112%; font-size: 19px; }
.kh small { color: var(--muted); font-size: 13px; }
.kh .dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; align-self: center; }
.ktiles { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kpi .value { font-size: 30px; }
.kpi .na { font-size: 16px; color: var(--faint); font-weight: 600; cursor: help; }

/* charts */
.headrow { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: flex-start; }
.tools { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.tog { font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.wrapseg { flex-wrap: wrap; }
.boxkey i { display: inline-block; vertical-align: -1px; margin-right: 6px; }
.boxkey .bx { width: 16px; height: 10px; border: 1px solid var(--muted); background: color-mix(in srgb, var(--muted) 22%, transparent); border-radius: 2px; }
.boxkey .wk { width: 16px; height: 0; border-top: 1.5px solid var(--muted); vertical-align: 3px !important; }
.boxkey .md { width: 3px; height: 12px; background: var(--muted); border-radius: 0; }
.boxkey .av { width: 8px; height: 8px; border-radius: 50%; border: 1.8px solid var(--muted); background: var(--surface); }
svg text.rlab { fill: var(--text); font-weight: 600; font-size: 12.5px; }
svg .ref text.rlab { fill: var(--muted); }
svg text.vlab { fill: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; font-size: 12.5px; }
svg text.nalab { fill: var(--faint); font-style: italic; }
svg text.clab { fill: var(--muted); font-size: 11.5px; }
svg line.track { stroke: var(--border); }
svg line.mine { stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 3 3; }
svg text.minelab { fill: var(--text); font-weight: 650; }
svg line.rule { stroke: var(--border-strong); pointer-events: none; }
svg line.ref100 { stroke: var(--muted); stroke-dasharray: 2 3; }
svg rect.projzone { fill: var(--surface-2); }
svg text.projyr { fill: var(--faint); }
.legend b { font-weight: 600; margin-left: 4px; font-variant-numeric: tabular-nums; }

/* where do you stand */
.stand { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.stand input { width: 160px; font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
.stand span { color: var(--muted); font-weight: 600; }
.standout ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.standout li { display: grid; grid-template-columns: 1fr; gap: 4px; }
.standout .nm { font-size: 13.5px; font-weight: 600; display: flex; gap: 7px; align-items: center; }
.standout .nm i { width: 10px; height: 10px; border-radius: 50%; background: var(--sc); flex: none; }
.standout .pbar { height: 8px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.standout .pbar b { display: block; height: 100%; background: var(--sc); }
.standout .pt { font-size: 12.5px; color: var(--muted); }
.standout .empty { text-align: left; padding: 6px 0; }

/* leaderboards */
ol.lb { list-style: none; margin: 8px 0 0; padding: 0; }
ol.lb li[data-add] { position: relative; display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 7px; cursor: pointer; font-size: 13.5px; isolation: isolate; border-left: 3px solid transparent; }
ol.lb li[data-add]::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: var(--w); background: var(--surface-2); border-radius: 5px; z-index: -1; }
ol.lb li[data-add]:hover, ol.lb li[data-add]:focus-visible { outline: 1px solid var(--border-strong); outline-offset: 0; }
ol.lb li.on { border-left-color: var(--sc); font-weight: 650; }
ol.lb .rk { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 12px; }
ol.lb .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ol.lb .nm small { color: var(--faint); font-size: 11.5px; }
ol.lb .vv { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
ol.rel { max-height: 560px; overflow: auto; }

/* job ads */
.jobs { display: grid; grid-template-columns: 200px 1fr 1.4fr; gap: 20px 28px; align-items: start; }
.jtotal b { display: block; font-size: 40px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.jtotal span { display: block; color: var(--muted); font-size: 13.5px; margin-bottom: 10px; }
.jtotal a { font-size: 13px; }
.jcol h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 8px; }
ol.bars { list-style: none; margin: 0; padding: 0; }
ol.bars li { position: relative; display: flex; justify-content: space-between; gap: 8px; padding: 3px 8px; font-size: 13px; isolation: isolate; }
ol.bars li::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: var(--w); background: var(--surface-2); border-radius: 4px; z-index: -1; }
ol.bars b { font-variant-numeric: tabular-nums; font-weight: 600; }
ul.ads { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
ul.ads a { font-weight: 600; font-size: 14px; text-decoration: none; color: var(--text); }
ul.ads a:hover { text-decoration: underline; }
ul.ads small { display: block; color: var(--faint); font-size: 12px; }
.jobs .empty { text-align: left; }

/* methods */
.methods ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; max-width: 100ch; }
.methods li { margin: 4px 0; }
.methods details { margin-top: 10px; }
.methods summary { cursor: pointer; font-size: 13.5px; font-weight: 600; }

@media (max-width: 1000px) { .jobs { grid-template-columns: 1fr 1fr; } .jtotal { grid-column: 1 / -1; } }
@media (max-width: 560px) {
  .fld { width: 100%; } .fld select { width: 100%; }
  .jobs { grid-template-columns: 1fr; }
  .ktiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi .value { font-size: 24px; }
  .topbar .in { gap: 10px; }
}

/* links to the other dashboards */
.xlink { font-size: 13px; font-weight: 600; text-decoration: none; }
.xlink:hover { text-decoration: underline; }
.kh .xlink { margin-left: auto; }
.xlinks { margin: 8px 0 0; }
.xlinks .xlink::after { content: " →"; }
