/* luba — shared web look of lubadash, vm and oanserhub.
 *
 * Flat sections instead of cards: a small-caps heading over a hairline, the
 * content directly on the page. Figures sit in ONE frame with hairlines, not
 * in single tiles. Status is a dot + word, never a pill. Inter with
 * tabular-nums everywhere. No emoji; icons are thin strokes in text colour.
 * Light and dark; without a stored choice the page follows the device.
 *
 * Use: copy this file and fonts/ next to the page (pages are served under a
 * subpath, so no root-relative URLs) and link it — or inline it for a
 * single-file page. Markup examples: STYLE.md.
 */

@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
}
*, *::before, *::after { box-sizing: border-box; }

/* ----------------------------------------------------------- tokens */
:root {
  --bg: #FFFFFF; --sunk: #F6F7F8; --sunk-2: #ECEEF1; --shadow: rgba(0,0,0,.14);
  --line: #E3E7EC; --line-2: #CDD3DA;
  --ink: #14171B; --ink-2: #4B535C; --ink-3: #78818B; --on-ink: #FFFFFF;
  --id: #2E7D32; --id-bg: #E4F2E5;                 /* luba green: identity / done */
  --ok: #256B1B; --ok-bg: #E4F2E5; --bad: #B3261E; --warn: #9A6700; --info: #3C6E9E;
  /* chart series, in this order */
  --c-1: #3C8DAD; --c-2: #8B64B5; --c-3: #D9822B; --c-4: #2E7D32; --c-5: #D1453B; --c-n: #CDD3DA;
  --r-s: 4px; --pad: 16px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
/* Dark tokens twice: once for an explicit choice, once for "follow the device". */
:root[data-theme="dark"] {
  --bg: #131518; --sunk: #1B1E22; --sunk-2: #252930; --shadow: rgba(0,0,0,.55);
  --line: #2A2F36; --line-2: #3D444D;
  --ink: #E7EAED; --ink-2: #AEB5BD; --ink-3: #848D97; --on-ink: #131518;
  --id: #3FB950; --id-bg: #16301A;
  --ok: #6BBF5C; --ok-bg: #16301A; --bad: #EF7A74; --warn: #E3B341; --info: #8EB8DE;
  --c-1: #8EC9DE; --c-2: #B796D8; --c-3: #F0883E; --c-4: #3FB950; --c-5: #F1736B; --c-n: #3D444D;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131518; --sunk: #1B1E22; --sunk-2: #252930; --shadow: rgba(0,0,0,.55);
    --line: #2A2F36; --line-2: #3D444D;
    --ink: #E7EAED; --ink-2: #AEB5BD; --ink-3: #848D97; --on-ink: #131518;
    --id: #3FB950; --id-bg: #16301A;
    --ok: #6BBF5C; --ok-bg: #16301A; --bad: #EF7A74; --warn: #E3B341; --info: #8EB8DE;
    --c-1: #8EC9DE; --c-2: #B796D8; --c-3: #F0883E; --c-4: #3FB950; --c-5: #F1736B; --c-n: #3D444D;
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------- base */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px; line-height: 1.45; letter-spacing: -.005em;
  font-feature-settings: "cv11", "ss03"; font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink-3); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
code, .mono { font-family: var(--mono); font-size: 12px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--c-1); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ------------------------------------------------------------ shell */
.bar { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 9px var(--pad);
  padding-top: calc(env(safe-area-inset-top, 0px) + 9px); background: var(--bg); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 25; }
.marke { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; letter-spacing: -.03em; margin-right: auto; }
.marke img { width: 26px; height: 26px; display: block; border-radius: 6px; }
.marke small { font-weight: 500; color: var(--ink-3); font-size: 13px; letter-spacing: 0; }
.fresh { font-size: 12px; color: var(--ink-3); white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.fresh i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: block; }
.fresh.stale i { background: var(--warn); }
.ib { width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink-3); margin-right: -8px; flex: none; }
.ib:hover { color: var(--ink); }
.ib svg { width: 18px; height: 18px; }
main { padding: 6px var(--pad) 48px; max-width: 1180px; margin: 0 auto; }
@media (min-width: 920px) { main { padding: 26px 34px 56px; } }

/* ----------------------------------------------------------- blocks */
h1 { font-size: 23px; font-weight: 700; margin: 12px 0 2px; letter-spacing: -.025em; }
@media (min-width: 920px) { h1 { margin-top: 0; font-size: 26px; } }
.unter { color: var(--ink-3); font-size: 13px; margin: 0 0 20px; }
h2 { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin: 0; }
.sec { margin: 0 0 32px; min-width: 0; }
.kopf { display: flex; align-items: center; gap: 10px; padding-bottom: 7px; margin-bottom: 12px;
  border-bottom: 1px solid var(--line-2); flex-wrap: wrap; min-height: 34px; }
.kopf .neben { color: var(--ink-3); font-size: 12px; margin-left: auto; }
.raster2 { display: grid; gap: 0 40px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .raster2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.raster2 > * { min-width: 0; }
.leise { color: var(--ink-3); }
.hint { font-size: 12px; color: var(--ink-3); margin: 8px 0 0; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* figures: one frame, hairlines inside */
.figs { display: grid; border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-bottom: 32px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
@media (min-width: 700px) { .figs.q { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 600px) { .figs { grid-template-columns: 1fr 1fr; } }
.f { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 14px; min-width: 0;
  display: flex; flex-direction: column; gap: 3px; }
.f .l { order: -1; display: flex; align-items: center; gap: 8px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.f .l .sev { margin-left: auto; }
.f .v { font-size: 23px; font-weight: 700; line-height: 1.15; letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f .v small { font-size: 14px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.f .d { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 380px) { .f .v { font-size: 20px; } }
.meter { height: 4px; background: var(--sunk-2); margin-top: 6px; overflow: hidden; border-radius: 2px; }
.meter > i { display: block; height: 100%; background: var(--ink-2); border-radius: 2px; }
.meter.good > i { background: var(--ok); } .meter.warn > i { background: var(--warn); } .meter.bad > i { background: var(--bad); }

/* rows: the default list (responsive by construction, instead of wide tables) */
.rows > .row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.rows > .row:last-child { border-bottom: 0; }
.row .main { flex: 1; min-width: 0; }
.row .t { font-weight: 600; overflow-wrap: anywhere; }
.row .s { color: var(--ink-3); font-size: 12.5px; margin-top: 1px; overflow-wrap: anywhere; }
.row .side { flex: none; text-align: right; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.row .lead { flex: none; width: 86px; padding-top: 1px; color: var(--ink-3); }

/* expandable row: summary in one line, details on tap */
details.blk > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 11px 0;
  border-bottom: 1px solid var(--line); min-height: 44px; }
details.blk > summary::-webkit-details-marker { display: none; }
details.blk > summary::before { content: "▸"; color: var(--ink-3); width: 10px; transition: transform .15s; flex: none; }
details.blk[open] > summary::before { transform: rotate(90deg); }
details.blk > summary .t { font-weight: 600; }
details.blk > summary .neben { margin-left: auto; color: var(--ink-3); font-size: 12px; text-align: right; }
details.blk > .more { padding: 8px 0 12px 20px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 13px; }

/* cells: a grid of items in one frame (apps, options, places) */
.cells { display: grid; border-top: 1px solid var(--line); border-left: 1px solid var(--line);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); margin-bottom: 30px; }
.cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 9px; min-width: 0; }
a.cell { text-decoration: none; } a.cell:hover { background: var(--sunk); }
.cell .ph { margin: -14px -16px 0; aspect-ratio: 16/9; background: var(--sunk) center/cover no-repeat; border-bottom: 1px solid var(--line); }
.cell .top { display: flex; align-items: flex-start; gap: 9px; }
.cell .nm { font-weight: 700; font-size: 15px; letter-spacing: -.015em; }
.cell .kind { margin-left: auto; font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.cell .ds { color: var(--ink-2); font-size: 13px; }
.cell .ft { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: auto; padding-top: 8px;
  border-top: 1px dashed var(--line); font-size: 12px; color: var(--ink-3); }

/* tables */
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--ink-3); padding: 6px 10px 8px;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t th:first-child, table.t td:first-child { padding-left: 0; }
table.t th:last-child, table.t td:last-child { padding-right: 0; }
table.t .num { text-align: right; }

/* status: a dot and the word, no bubble */
.sev { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; white-space: nowrap; color: var(--sc, var(--ink-3)); }
.sev::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.sev.ok { --sc: var(--ok); } .sev.warn { --sc: var(--warn); } .sev.bad { --sc: var(--bad); } .sev.info { --sc: var(--info); }
/* small square marks: ✓ ~ ✕ ? */
.st { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; font-size: 11px; font-weight: 800; font-style: normal; flex: none; }
.st.ok { color: var(--ok); background: var(--ok-bg); }
.st.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.st.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 13%, transparent); }
.st.info { color: var(--ink-3); background: var(--sunk-2); }
.tag { display: inline-flex; align-items: baseline; gap: 5px; border: 1px solid var(--line-2); border-radius: 3px;
  padding: 1px 6px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.tag b { color: var(--ink); font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.gut { color: var(--ok); } .schlecht { color: var(--bad); } .warn { color: var(--warn); }

/* controls: small outlined segments, the chosen one filled in ink */
.wahl { display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; border: 1px solid var(--line-2); border-radius: var(--r-s); }
.wahl::-webkit-scrollbar { display: none; }
.wahl button { padding: 0 11px; min-height: 28px; font-size: 12px; white-space: nowrap; color: var(--ink-2); font-weight: 500; border-right: 1px solid var(--line-2); }
.wahl button:last-child { border-right: 0; }
.wahl button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); font-weight: 600; }
@media (max-width: 919px) { .wahl button { min-height: 36px; padding: 0 12px; font-size: 12.5px; } }
.knopf { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line-2);
  border-radius: var(--r-s); font-weight: 600; font-size: 13px; text-decoration: none; }
.knopf:hover { background: var(--sunk); }
.knopf.voll { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

/* ------------------------------------------------------------ charts */
/* horizontal bars in HTML: label, track, value */
.hb { display: grid; grid-template-columns: minmax(64px, 30%) 1fr auto; gap: 6px 12px; align-items: center; font-size: 13px; }
.hb .k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb .tr { height: 14px; position: relative; }
.hb .tr i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--bc, var(--c-1)); border-radius: 0 3px 3px 0; min-width: 2px; transition: opacity .12s; }
.hb.hov .tr i:not(.on) { opacity: .45; }
.hb .v { text-align: right; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; min-width: 4.5em; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: block; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--ink-3); font-size: 10.5px; }
.chart .lbl { fill: var(--ink-2); font-size: 11.5px; font-weight: 600; }
.chart .ref { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.tip { position: fixed; pointer-events: none; background: var(--bg); border: 1px solid var(--line-2); box-shadow: 0 6px 20px var(--shadow);
  padding: 7px 10px; font-size: 12px; z-index: 50; white-space: nowrap; }
.tip b { display: block; font-weight: 600; margin-bottom: 2px; }
.tip span { color: var(--ink-2); }

footer { border-top: 1px solid var(--line); padding-top: 12px; font-size: 11.5px; color: var(--ink-3); line-height: 1.6; }
