/* Werkregie-Dashboard — the visual family of Werkator (werkator.css, RFC 0001 option G "Kin"):
   white paper, IBM Plex, a blue-shifted petrol used only as an accent, a neutral dark mode.
   Tokens, header, footer, statuses, chips and tags follow Werkator's rules and names, so the two
   UIs read as one; a change there should be mirrored here. */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/plex-sans-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/plex-mono-500.woff2") format("woff2"); }

:root {
    color-scheme: light dark;
    --bg: #ffffff;
    --panel: #fafafa;
    --panel-2: #f4f5f5;
    --line: #e4e7e7;
    --line-2: #d1d6d5;
    --text: #141616;
    --text-2: #3e4645;
    --muted: #6e7c7a;
    --ghost: #9ea9a7;
    --accent: #0e6b7d;
    --accent-2: #0a5262;
    --accent-soft: #e3f0f3;
    --accent-soft-2: #c6e0e6;
    --clay: #b0563b;
    --clay-soft: #f6e9e4;
    --amber: #b8860b;
    --amber-soft: #f9f0d2;
    --blue: #3a62b0;
    --green: #2e7d4a;
    --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
    --shadow: 0 2px 6px rgb(20 22 22 / 0.05);
}

/* Dark twice, as in Werkator (RFC 0003): for the browser's preference unless light was chosen,
   and for a chosen dark whatever the browser prefers. The two token lists must stay identical. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #242928;
        --panel: #2a302f;
        --panel-2: #313837;
        --line: #3e4645;
        --line-2: #545f5d;
        --text: #f4f5f5;
        --text-2: #d1d6d5;
        --muted: #9ea9a7;
        --ghost: #6e7c7a;
        --accent: #63bccb;
        --accent-2: #8ed0db;
        --accent-soft: #1f3b41;
        --accent-soft-2: #27505a;
        --clay: #e09070;
        --clay-soft: #3e2a22;
        --amber: #e3b341;
        --amber-soft: #3d3418;
        --blue: #8eaef0;
        --green: #7cc793;
        --shadow: 0 2px 6px rgb(0 0 0 / 0.25);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #242928;
    --panel: #2a302f;
    --panel-2: #313837;
    --line: #3e4645;
    --line-2: #545f5d;
    --text: #f4f5f5;
    --text-2: #d1d6d5;
    --muted: #9ea9a7;
    --ghost: #6e7c7a;
    --accent: #63bccb;
    --accent-2: #8ed0db;
    --accent-soft: #1f3b41;
    --accent-soft-2: #27505a;
    --clay: #e09070;
    --clay-soft: #3e2a22;
    --amber: #e3b341;
    --amber-soft: #3d3418;
    --blue: #8eaef0;
    --green: #7cc793;
    --shadow: 0 2px 6px rgb(0 0 0 / 0.25);
}

:root[data-theme="light"] {
    color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans); }
main { width: min(1180px, calc(100% - 64px)); margin: 0 auto; padding-top: 20px; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
code { font-family: var(--mono); font-size: 13px; }
[hidden] { display: none !important; }

/* ---- icons: stroke glyphs as CSS masks, colored by currentColor (Werkator's glyphs) ---- */
.icon { display: inline-block; width: 16px; height: 16px; flex: none; vertical-align: -3px; background-color: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.icon-home { --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11.5 12 4l8 7.5'/%3E%3Cpath d='M6 10v9h5v-5h2v5h5v-9'/%3E%3C/svg%3E"); }
.icon-copy { --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='11' height='11' rx='2'/%3E%3Cpath d='M5 15V6a2 2 0 0 1 2-2h9'/%3E%3C/svg%3E"); }
.icon-restart { --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a8 8 0 1 1-2.3-5.7M20 4v5h-5'/%3E%3C/svg%3E"); }
.icon-theme { --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 3a9 9 0 0 0 0 18z' fill='black' stroke='none'/%3E%3C/svg%3E"); }
.icon-close { --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); }
.icon-key { --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='15' r='4'/%3E%3Cpath d='M10.8 12.2 20 3M17 6l2.5 2.5M14 9l2.5 2.5'/%3E%3C/svg%3E"); }
.icon-pr { --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='5' r='2'/%3E%3Ccircle cx='6' cy='19' r='2'/%3E%3Ccircle cx='18' cy='19' r='2'/%3E%3Cpath d='M6 7v10M18 17V9a3 3 0 0 0-3-3h-4M13 3l-3 3 3 3'/%3E%3C/svg%3E"); }
.icon-terminal { --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 7l5 5-5 5M12 17h7'/%3E%3C/svg%3E"); }
.icon-board { --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='5' height='16' rx='1'/%3E%3Crect x='9.5' y='4' width='5' height='10' rx='1'/%3E%3Crect x='16' y='4' width='5' height='13' rx='1'/%3E%3C/svg%3E"); }
.icon-chat { --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H9l-5 4z'/%3E%3C/svg%3E"); }
.icon-history { --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12a8 8 0 1 0 2.3-5.7M4 4v5h5'/%3E%3Cpath d='M12 8v4l3 2'/%3E%3C/svg%3E"); }
.icon-pulse { --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h4l3-7 4 14 3-7h4'/%3E%3C/svg%3E"); }
.icon-book { --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h11a3 3 0 0 1 3 3v13H8a3 3 0 0 1-3-3z'/%3E%3Cpath d='M5 17a3 3 0 0 1 3-3h11M9 8h6'/%3E%3C/svg%3E"); }
.icon-check { --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E"); }

/* ---- the logos of the tools: their own pictures; the black ones turn white in the dark ---- */
.app-logo { display: inline-block; width: 18px; height: 18px; flex: none; object-fit: contain; border-radius: 4px; vertical-align: -4px; }
.app-logo-line { fill: none; stroke: var(--accent); stroke-width: 6.5; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .app-logo.is-mono { filter: invert(1); }
}
:root[data-theme="dark"] .app-logo.is-mono { filter: invert(1); }

/* ---- header: Werkator's — wordmark left, the tabs, then the tools; a hairline with a soft shadow ---- */
.site-header { position: sticky; top: 0; z-index: 4; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.site-header-inner { width: min(1180px, calc(100% - 64px)); margin: 0 auto; display: flex; align-items: stretch; gap: 14px; min-height: 52px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 600; color: var(--text); }
.brand:hover { color: var(--accent); }
.logo { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--accent); stroke-width: 7.5; stroke-linecap: round; stroke-linejoin: round; }
.logo circle { fill: var(--accent); stroke: none; }
.tabs { margin-left: auto; display: flex; align-items: stretch; gap: 2px; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; font-size: 14px; font-weight: 500; color: var(--text-2); white-space: nowrap; box-shadow: inset 0 -2px transparent; }
.tab:hover { color: var(--accent); }
.tab.is-active { color: var(--accent); box-shadow: inset 0 -2px var(--accent); }
.tab-short { display: none; }
.tab-badge { min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--panel-2); color: var(--text-2); font: 500 11px/18px var(--mono); text-align: center; }
.tab-badge:empty { display: none; }
.tab-badge-bad { background: var(--clay); color: var(--bg); }
.tab-badge-warn { background: var(--amber); color: var(--bg); }
.tab-badge-accent { background: var(--accent-soft-2); color: var(--accent-2); }
.header-tools { display: inline-flex; align-items: center; gap: 8px; }
/* the live indicator says whether this browser reaches the dashboard's backend */
#live-indicator { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border: 1px solid var(--line-2); border-radius: 999px; font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
#live-indicator::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
#live-indicator.status-success { color: var(--accent); border-color: var(--accent-soft-2); }
#live-indicator.status-success::before { animation: pulse 1.6s ease-in-out infinite; }
#live-indicator.status-error { color: var(--clay); border-color: var(--clay); }
#live-indicator.status-warn { color: var(--amber); border-color: var(--amber); }
.lang-switch { display: inline-flex; height: 30px; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; }
.lang-switch button { appearance: none; padding: 0 8px; border: 0; background: var(--bg); color: var(--muted); font: 500 11.5px var(--mono); cursor: pointer; }
.lang-switch button + button { border-left: 1px solid var(--line-2); }
.lang-switch button:hover { color: var(--accent); }
.lang-switch button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.icon-button { appearance: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg); color: var(--text-2); cursor: pointer; }
.icon-button:hover { color: var(--accent); border-color: var(--accent-soft-2); background: var(--accent-soft); }
.icon-button.has-token { color: var(--accent); border-color: var(--accent-soft-2); }
.reload-button.is-reloading .icon { animation: reload-spin 0.6s ease-out; }
@keyframes reload-spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.35; } }

/* the demo notice: the accent, not the clay of a problem */
.demo-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; padding: 9px 12px; border: 1px solid var(--accent-soft-2); border-radius: 6px; background: var(--accent-soft); color: var(--text-2); font-size: 13px; }
.demo-banner strong { font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.demo-banner .chip { margin-left: auto; }
.stale-banner { border-color: var(--amber); background: var(--amber-soft); }
.stale-banner strong { color: var(--amber); }

/* the token dialog: a panel like the others */
.token-dialog { width: min(440px, calc(100% - 36px)); padding: 0; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: var(--text); box-shadow: 0 12px 32px rgb(0 0 0 / 0.25); }
.token-dialog::backdrop { background: rgb(20 22 22 / 0.4); }
.token-dialog form { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 16px; }
.token-dialog h2 { margin: 0 -16px 4px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); font: 500 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.token-dialog p { margin: 0; font-size: 13px; color: var(--text-2); }
.token-dialog .control { width: 100%; height: 32px; font-family: var(--mono); }
.token-error { color: var(--clay) !important; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.dialog-actions .chip { padding: 4px 12px; font-size: 13px; }

/* ---- panels: Werkator's home panels — a Mono header strip, then rows ---- */
.view { display: grid; gap: 20px; }
.board { display: grid; gap: 20px; }
.board-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.panel { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; min-width: 0; background: var(--bg); }
.panel h2, .section-title { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel); font: 500 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.panel h2 em, .section-title em { flex: none; font: 400 11.5px var(--sans); font-style: normal; letter-spacing: 0; text-transform: none; }
.panel h2 a:hover { color: var(--accent); }
/* the title, then the tools the panel's rows come from */
.panel-title { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; }
.panel-sources { font: 500 12px var(--sans); letter-spacing: 0; text-transform: none; color: var(--text-2); }
.day { padding: 7px 14px; border-bottom: 1px solid var(--line-2); background: var(--bg); color: var(--muted); font: 500 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.row + .day { border-top: 1px solid var(--line); }
.empty { padding: 22px 14px; color: var(--muted); text-align: center; font-size: 14px; }
.empty-small { padding: 12px 14px; font-size: 13px; }
/* a list whose source still loads: rows of placeholders, so that "nothing there" is not said too early */
.skeleton-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; padding: 14px; border-bottom: 1px solid var(--line); }
.skeleton-row:last-child { border-bottom: 0; }
.skeleton-row span { height: 12px; border-radius: 6px; background: var(--panel-2); animation: skeleton-pulse 1.2s ease-in-out infinite alternate; }
.skeleton-row span + span { width: 70%; }
@keyframes skeleton-pulse { from { opacity: 1; } to { opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) { .skeleton-row span { animation: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.empty-good { color: var(--accent); }
.empty-good .icon { width: 18px; height: 18px; vertical-align: -4px; }
/* the Werkjournal proposal: a day or the days of a month, then one block per entry with its hours, its text and its evidence */
.journal-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
input.control.journal-day { min-width: 0; width: 150px; }
.journal-actions { display: flex; gap: 8px; margin-left: auto; }
.journal-actions .chip { padding: 4px 12px; font-size: 13px; }
.journal-source { display: flex; gap: 4px; }
.journal-source .chip { padding: 4px 12px; font-size: 13px; }
.journal-actions .chip:disabled { opacity: 0.5; cursor: default; }
.journal-warning { margin: 0; padding: 8px 14px; border-bottom: 1px solid var(--line); color: var(--clay); font-size: 13px; }
.journal-entry { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.journal-head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 14px; }
.journal-minutes, .journal-time { color: var(--muted); font: 400 12px var(--mono); }
.journal-minutes { margin-left: auto; }
.journal-hours { display: flex; flex-direction: column; gap: 2px; color: var(--muted); font-size: 12px; }
.journal-hours input.control { flex: none; min-width: 0; width: 70px; }
textarea.control.journal-text { height: auto; min-height: 52px; padding: 6px 10px; resize: vertical; line-height: 1.4; }
.journal-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 13px; }
.journal-entry details { grid-column: 1 / -1; font-size: 13px; color: var(--text-2); }
.journal-entry summary { cursor: pointer; color: var(--muted); }
.journal-evidence { margin: 4px 0 0; padding-left: 18px; }
.journal-entry.is-unmapped strong { color: var(--muted); }
.journal-missing { color: var(--clay); font-size: 13px; font-weight: 600; }
.journal-hints { border-bottom: 1px solid var(--line); }
.journal-hints > summary { padding: 6px 14px; cursor: pointer; color: var(--muted); font-size: 13px; }
.journal-hints > .journal-entry:last-child { border-bottom: 0; }
.axis { display: flex; justify-content: space-between; font: 400 11px var(--mono); color: var(--muted); }
.c-ok { color: var(--accent); }
.c-bad { color: var(--clay); font-weight: 600; }

/* ===== the overview ===== */

/* the connection bar: one line that says whether everything is connected, then a logo per source */
.connection { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 12px 14px; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 8px; }
.connection-warn { border-top-color: var(--amber); }
.connection-bad { border-top-color: var(--clay); }
.connection-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; flex: 1 1 320px; }
.connection-head strong { font-size: 16px; font-weight: 600; white-space: nowrap; }
.connection-dot { align-self: center; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); flex: none; }
.connection-warn .connection-dot { background: transparent; box-shadow: inset 0 0 0 2.5px var(--amber); }
.connection-bad .connection-dot { background: var(--clay); animation: pulse 1.6s ease-in-out infinite; }
.connection-note { font-size: 13.5px; color: var(--text-2); }
.connection-bad .connection-note { color: var(--clay); }
.tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.tile-wrap { position: relative; display: inline-flex; }
.tile { appearance: none; position: relative; display: inline-flex; align-items: center; gap: 7px; height: 34px; min-width: 34px; padding: 0 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text-2); font: inherit; font-size: 12.5px; cursor: pointer; }
.tile:hover, .tile[aria-expanded="true"] { border-color: var(--accent); }
.tile .app-logo { width: 19px; height: 19px; vertical-align: 0; }
.tile-dot { position: absolute; right: -4px; bottom: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.tile-dot-back { right: 3px; }
.tile-dot-warn { background: var(--bg); box-shadow: 0 0 0 2px var(--bg), inset 0 0 0 2.5px var(--amber); }
.tile-dot-bad { background: var(--clay); }
.tile-warn { border-color: var(--amber); background: var(--amber-soft); }
.tile-bad { border-color: var(--clay); background: var(--clay-soft); color: var(--clay); }
/* the menu of a logo: one line per instance or relay, with its state */
.tile-menu { position: absolute; z-index: 4; top: calc(100% + 6px); left: 0; display: flex; flex-direction: column; min-width: 240px; max-width: min(420px, calc(100vw - 32px)); padding: 4px 0; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); box-shadow: var(--shadow); }
.tile-menu[hidden] { display: none; }
.tile-menu-end { left: auto; right: 0; }
.tile-entry { display: grid; grid-template-columns: 10px minmax(0, 1fr); align-items: baseline; column-gap: 9px; padding: 6px 12px; color: var(--text); font-size: 13.5px; text-decoration: none; }
a.tile-entry:hover { background: var(--accent-soft); }
.tile-entry-dot { align-self: center; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.tile-entry-warn .tile-entry-dot { background: transparent; box-shadow: inset 0 0 0 2px var(--amber); }
.tile-entry-bad .tile-entry-dot { background: var(--clay); }
.tile-entry-name { font-weight: 500; overflow-wrap: anywhere; }
.tile-entry-state { grid-column: 2; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.tile-entry-bad .tile-entry-state { color: var(--clay); }

.overview-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr;
    grid-template-areas: "todo side" "cards side" "lanes side"; gap: 20px; align-items: start; }
.todo-panel { grid-area: todo; }
.side { grid-area: side; }
.cards-section { grid-area: cards; }
.lanes-panel { grid-area: lanes; }
.side, .side-stack { display: grid; gap: 14px; min-width: 0; }
.side-stack:empty { display: none; }

/* "Du bist dran": a group per action, the most urgent first */
.group { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-top: 1px solid var(--line); background: var(--panel); font: 600 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
#todo .group:first-child { border-top: 0; }
.group-count { padding: 0 7px; border-radius: 9px; font: 500 11px/18px var(--mono); letter-spacing: 0; }
.group-hint { font: 400 12px var(--sans); letter-spacing: 0; text-transform: none; color: var(--muted); }
.group-secure { color: var(--clay); } .group-secure .group-count { background: var(--clay); color: var(--bg); }
.group-costs { color: var(--amber); } .group-costs .group-count { background: var(--amber); color: var(--bg); }
.group-stuck { color: var(--clay); } .group-stuck .group-count { background: var(--clay); color: var(--bg); }
.group-rework { color: var(--clay); } .group-rework .group-count { background: var(--clay-soft); color: var(--clay); }
.group-approve { color: var(--amber); } .group-approve .group-count { background: var(--amber-soft); color: var(--amber); }
.group-merge { color: var(--accent); } .group-merge .group-count { background: var(--accent-soft); color: var(--accent); }
.group-answer { color: var(--blue); } .group-answer .group-count { background: var(--panel-2); color: var(--blue); }
.todo-row { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-top: 1px solid var(--line); min-height: 50px; color: var(--text); }
.todo-row:hover { background: var(--panel-2); color: var(--text); }
.todo-row .app-logo { width: 20px; height: 20px; vertical-align: 0; }
.todo-what { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.todo-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-detail { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-author { display: flex; align-items: center; gap: 4px; margin-top: 3px; min-width: 0; }
.author-button, .author-name { appearance: none; display: inline-flex; align-items: center; gap: 5px; min-width: 0; padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 5px; background: transparent; color: var(--text-2); font: inherit; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.author-button { cursor: pointer; }
.author-button:hover { color: var(--accent); border-color: var(--accent-soft-2); }
.todo-author .app-logo { width: 13px; height: 13px; }
.todo-age { font: 400 12px var(--mono); color: var(--muted); white-space: nowrap; }
/* the action: a slim link, no box */
.act { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 8px; border-radius: 5px; font-size: 12.5px; font-weight: 500; color: var(--accent); white-space: nowrap; }
.act-arrow { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.75; }
.todo-row:hover .act { background: var(--accent-soft); }
.tip-button { appearance: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--muted); font-size: 15px; cursor: pointer; }
.tip-button:hover, .tip-button[aria-expanded="true"] { color: var(--accent); border-color: var(--line-2); }
.todo-tip { display: none; flex-direction: column; gap: 2px; margin-top: 4px; font-size: 13px; color: var(--text-2); white-space: normal; overflow-wrap: anywhere; }
.todo-row.is-open .todo-tip { display: flex; }
.dismiss-button { appearance: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--ghost); font-size: 13px; cursor: pointer; }
.dismiss-button:hover { color: var(--accent); border-color: var(--line-2); }
.dismiss-button:disabled, .dismiss-button[aria-disabled="true"] { opacity: 0.35; cursor: default; }
.dismiss-button[aria-disabled="true"]:hover { color: var(--ghost); border-color: transparent; }

/* Werkator's load: the verdict in the heading, then a tile per metric with its line of 24 hours */
.load-level { font-weight: 500 !important; color: var(--accent); }
.load-state { display: inline-flex; align-items: baseline; gap: 10px; flex: none; }
.load-builds { font: 600 12px var(--mono) !important; font-variant-numeric: tabular-nums; color: var(--text-2); }
.load-builds-warn { color: var(--amber); }
.load-builds-bad { color: var(--clay); }
.load-pressure .load-level { color: var(--amber); }
.load-overloaded .load-level { color: var(--clay); }
.load-pressure { border-top: 3px solid var(--amber); }
.load-overloaded { border-top: 3px solid var(--clay); }
.load-reasons { padding: 8px 14px 0; font-size: 12.5px; color: var(--text-2); }
.charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; padding: 10px 14px 12px; }
.chart { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 6px;
    padding: 6px 8px 4px; border-radius: 6px; background: var(--panel-2); }
.chart-label { font: 500 10.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-value { font: 600 13px var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.chart-warn .chart-value { color: var(--amber); }
.chart-bad .chart-value { color: var(--clay); }
.chart .spark { grid-column: 1 / -1; height: 30px; }
.spark { display: block; width: 100%; height: 42px; }
.spark-area { fill: var(--accent-soft); }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; }
.spark-warn .spark-line { stroke: var(--amber); }
.spark-warn .spark-area { fill: var(--amber-soft); }
.spark-bad .spark-line { stroke: var(--clay); }
.spark-bad .spark-area { fill: var(--clay-soft); }

/* Werkator's builds: running and failed ones, a bar per hour */
.build-row { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--text); }
.build-row.is-failed { background: var(--clay-soft); }
.build-row.is-running { background: var(--accent-soft); }
a.build-row:hover { color: var(--text); filter: brightness(0.97); }
.build-what { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.build-project { font-weight: 600; }
.build-branch { font: 400 12px var(--mono); color: var(--muted); }
.build-when { font: 400 12px var(--mono); color: var(--muted); white-space: nowrap; }
.build-row.is-failed .build-when { color: var(--clay); }
.hour-chart { padding: 10px 14px 8px; }
.hour-chart svg { display: block; width: 100%; height: 40px; }
.bar-ok { fill: var(--accent); }
.bar-failed { fill: var(--clay); }
.bar-running { fill: var(--accent-soft-2); }

/* werkrevisor's costs: a small tile */
.costs-tile { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: var(--text); }
a.costs-tile:hover { border-color: var(--accent); color: var(--text); }
.costs-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.costs-label { display: inline-flex; align-items: center; gap: 7px; font: 500 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.costs-label .app-logo { width: 15px; height: 15px; vertical-align: 0; }
.costs-sum { font: 600 20px/1.3 var(--mono); }
.costs-sum small { font: 400 12px var(--mono); color: var(--muted); }
.costs-week { font: 400 12px var(--mono); color: var(--muted); }
.costs-chart { width: 96px; height: 34px; flex: none; }
.aws-tile { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; }
.aws-chart { width: 100%; height: 40px; margin-top: 6px; }
.aws-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; font: 400 11px var(--mono); color: var(--muted); }
.aws-key i { display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 2px; }
.aws-age { margin-left: auto; }

/* the open sessions over time: the maximum as bars, the typical value as a line */
.history-tile { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; }
.history-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; font: 400 12px var(--mono); color: var(--muted); margin-top: 4px; }
.history-label b { color: var(--text); font-weight: 600; }
.history-keys { display: inline-flex; gap: 10px; }
.history-key { display: inline-flex; align-items: center; gap: 4px; }
.history-key i { display: inline-block; width: 10px; }
/* the width of the panel counts, not that of the screen: where the label needs the line, the start of the scale goes, the gap in the bars stays */
.history-tile { container-type: inline-size; }
@container (max-width: 520px) { .history-from { display: none; } }
.key-bar { height: 9px; border-radius: 2px; }
.key-line { height: 0; border-top: 2px solid; }
.history-chart { display: block; width: 100%; height: 64px; }
.history-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.history-chart g:hover .merges-hit { fill: var(--panel-2); }
.history-open .history-bar, .key-bar.key-open { fill: color-mix(in srgb, var(--accent) 25%, transparent); background: color-mix(in srgb, var(--accent) 25%, transparent); }
.history-open .history-line, .key-line.key-open { stroke: var(--accent); border-color: var(--accent); }
.history-age .history-bar, .key-bar.key-age { fill: color-mix(in srgb, var(--clay) 30%, transparent); background: color-mix(in srgb, var(--clay) 30%, transparent); }
.history-age .history-line, .key-line.key-age { stroke: var(--clay); border-color: var(--clay); }
.history-empty { margin: 0; font: 400 12px var(--mono); color: var(--muted); }

/* the merges of a Gitea: stacked bars per day, week or month */
.merges-tile { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; }
.merges-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
a.costs-label:hover { color: var(--accent); }
.merges-switches { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.merges-units { display: inline-flex; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; }
.merges-unit { font: 500 11px var(--mono); padding: 2px 7px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.merges-unit + .merges-unit { border-left: 1px solid var(--line-2); }
.merges-unit.is-active { background: var(--accent-soft); color: var(--accent-2); }
.merges-chart { display: block; width: 100%; height: 48px; }
.merges-hit { fill: transparent; }
.merges-chart g:hover .merges-hit { fill: var(--panel-2); }
.merges-legend { display: flex; flex-direction: column; gap: 2px; font: 400 12px var(--mono); color: var(--muted); }
.merges-author { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; white-space: nowrap; }
.merges-author i { width: 9px; height: 9px; border-radius: 2px; }
.merges-author b { color: var(--text); font-weight: 600; }
.merges-author small { font-size: 11px; }
.bar-day { fill: var(--accent-soft-2); }
.bar-today { fill: var(--accent); }

/* what runs and which sessions wait: cards */
.cards-section { display: grid; gap: 10px; }
.cards-section .section-title { padding: 0; border: 0; background: none; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.card { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
.card:hover { border-color: var(--accent); color: var(--text); }
.card.is-waiting { border-style: dashed; }
.card-head { display: flex; align-items: center; gap: 7px; min-height: 22px; }
.card-head .app-logo { width: 16px; height: 16px; vertical-align: 0; }
.card-age { margin-left: auto; font: 400 11.5px var(--mono); color: var(--muted); white-space: nowrap; }
.card-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-more { align-items: center; justify-content: center; border-style: dashed; color: var(--accent); font-weight: 500; }

/* A card or a row of "Du bist dran" with new content shows for 12 s in the other mode: its tokens are pairs of the light and the dark
   lists above, and its color-scheme picks the one the page does not use. It switches at once and fades back;
   the fade moves nothing, so it stays for prefers-reduced-motion as well. */
.is-flash {
    color-scheme: dark;
    --bg: light-dark(#ffffff, #242928);
    --panel: light-dark(#fafafa, #2a302f);
    --panel-2: light-dark(#f4f5f5, #313837);
    --line: light-dark(#e4e7e7, #3e4645);
    --line-2: light-dark(#d1d6d5, #545f5d);
    --text: light-dark(#141616, #f4f5f5);
    --text-2: light-dark(#3e4645, #d1d6d5);
    --muted: light-dark(#6e7c7a, #9ea9a7);
    --ghost: light-dark(#9ea9a7, #6e7c7a);
    --accent: light-dark(#0e6b7d, #63bccb);
    --accent-2: light-dark(#0a5262, #8ed0db);
    --accent-soft: light-dark(#e3f0f3, #1f3b41);
    --accent-soft-2: light-dark(#c6e0e6, #27505a);
    --clay: light-dark(#b0563b, #e09070);
    --clay-soft: light-dark(#f6e9e4, #3e2a22);
    --amber: light-dark(#b8860b, #e3b341);
    --amber-soft: light-dark(#f9f0d2, #3d3418);
    --blue: light-dark(#3a62b0, #8eaef0);
    --green: light-dark(#2e7d4a, #7cc793);
}
.todo-row.is-flash { background: var(--bg); }
.todo-row.is-flash:hover { background: var(--panel-2); }
.is-flash .app-logo.is-mono { filter: invert(1); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .is-flash { color-scheme: light; }
    :root:not([data-theme="light"]) .is-flash .app-logo.is-mono { filter: none; }
}
:root[data-theme="dark"] .is-flash { color-scheme: light; }
:root[data-theme="dark"] .is-flash .app-logo.is-mono { filter: none; }
.is-flash-end, .is-flash-end * { transition: background-color 0.8s, border-color 0.8s, color 0.8s, stroke 0.8s, filter 0.8s; }

/* the history of 24 hours: a lane per tool, a cell per hour */
.lanes { display: grid; gap: 5px; padding: 12px 14px 10px; }
.lane { display: grid; grid-template-columns: 20px 96px minmax(0, 1fr); align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; }
a.lane:hover { color: var(--accent); }
.lane .app-logo { width: 16px; height: 16px; vertical-align: 0; }
.lane-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cells { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; }
.cell { display: block; height: 14px; border-radius: 3px; background: var(--panel-2); }
.cell-done { background: var(--accent); opacity: var(--n, 1); }
.cell-failed { background: var(--clay); }
.cell-running { background: var(--accent-soft-2); }
.lane-axis { margin-top: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend .cell { width: 12px; height: 12px; }

/* the sources view: one row per source */
.source-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.source-row:last-child { border-bottom: 0; }
.source-row .app-logo { width: 22px; height: 22px; vertical-align: 0; }
.source-row .what { flex: 1; }
.source-count { font: 400 12px var(--mono); color: var(--muted); white-space: nowrap; }

/* ===== the lists ===== */

/* ---- filters: Werkator's chips, and form controls dressed alike ---- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.chip { appearance: none; padding: 2px 8px; border: 1px solid var(--line-2); border-radius: 5px; background: transparent; color: var(--muted); font: 500 12px var(--sans); cursor: pointer; }
.chip:hover { color: var(--accent); }
.chip.is-active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.control { appearance: none; -webkit-appearance: none; height: 26px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 6px; background-color: var(--bg); color: var(--text); font: 400 13px var(--sans); }
.control:focus { outline: none; border-color: var(--accent); }
select.control { padding-right: 26px; cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e7c7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 7px center; background-size: 14px; }
select.control option { color: var(--text); background: var(--panel); }
input.control { min-width: 180px; }
input.control::placeholder { color: var(--ghost); }
/* the project combobox: the input dresses like a select, its list like a menu */
.combo { position: relative; display: inline-flex; }
.combo-input { width: 240px; padding-right: 28px; cursor: text;
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e7c7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 7px center; background-size: 14px; }
.combo-input:not(:placeholder-shown) { background-image: none; }
.combo-input::placeholder { color: var(--text); }
.combo-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--ghost); cursor: pointer; }
.combo-clear .icon { width: 13px; height: 13px; }
.combo-clear:hover { color: var(--accent); }
.combo-list { position: absolute; z-index: 3; top: calc(100% + 4px); left: 0; min-width: 100%; max-height: 300px; overflow-y: auto; margin: 0; padding: 4px 0; list-style: none; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg); box-shadow: var(--shadow); }
.combo-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 5px 10px; font-size: 13px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.combo-list li small { font: 400 11.5px var(--mono); color: var(--muted); }
.combo-list li.is-active { background: var(--accent-soft); color: var(--text); }
.combo-list li.is-selected { color: var(--accent); font-weight: 500; }
.combo-list mark { background: transparent; color: var(--accent); font-weight: 600; }
.combo-list .combo-empty { color: var(--muted); cursor: default; }
.filters .control-search { margin-left: auto; }

.row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--panel-2); }
.row.is-running { background: var(--accent-soft); }
.row.is-failed { background: var(--clay-soft); }
.when { padding-top: 2px; font: 400 12.5px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.what { min-width: 0; }
.title { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
/* a Matrix row: who wrote where first, the text after it */
.msg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.msg-room { font-weight: 700; color: var(--accent); overflow-wrap: anywhere; }
.msg-sender { font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.title.msg-text { display: block; font-weight: 400; color: var(--text); }
.title.msg-text { white-space: pre-line; }
.title.msg-text.is-folded { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.msg-more { font-size: 13px; }
.mark-read-button { appearance: none; padding: 1px 8px; border: 1px solid var(--line-2); border-radius: 4px; background: transparent; color: var(--text-2); font: 600 11px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; cursor: pointer; }
.mark-read-button:hover { color: var(--accent); border-color: var(--accent); }
.mark-read-button:disabled { opacity: 0.5; cursor: default; }
a.title:hover { color: var(--accent); }
.meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 2px; font-size: 13px; color: var(--text-2); }
.meta .origin { display: inline-flex; align-items: center; gap: 6px; font: 500 10.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.meta .origin .app-logo { width: 14px; height: 14px; vertical-align: 0; }
.meta .project { font-weight: 500; }
.meta .detail { color: var(--muted); overflow-wrap: anywhere; }
.aside { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 10px; max-width: 380px; padding-top: 2px; }

/* pull requests: time, approval and status chips on top, the long title line below at full width */
.row-stacked { display: block; }
.row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 4px; }
.row-head .when { padding-top: 0; }
.row-head .aside { margin-left: auto; max-width: none; padding-top: 0; }
.row-stacked .what { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.row-stacked .meta { margin-top: 0; }

/* pull request markers: a filled chip each, the row itself stays plain so the rows stay apart */
.flag-stuck, .flag-rework { --flag: var(--clay); }
.flag-approve, .flag-merge { --flag: var(--amber); }
.flag-review { --flag: var(--blue); }
.flag-approved { --flag: var(--green); }
/* Matrix messages: addressed to the user, or from a room the user follows */
.flag-direct, .flag-mention { --flag: var(--amber); }
.flag-unknown { --flag: var(--amber); }
.flag-hidden { --flag: var(--ghost); }
.flag-room { --flag: var(--blue); }
.flag-unread { --flag: var(--clay); }
/* a message the user read in Element or elsewhere: still there, but quiet */
.row.is-read { opacity: 0.6; }
.row.is-read:hover { opacity: 1; }
.link-button { border: 0; padding: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
.flag { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; border-radius: 4px; background: var(--flag); color: var(--bg); font: 600 11px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.flag-reason { font-weight: 400; text-transform: none; letter-spacing: 0; font-family: var(--sans); }
.flag-count { font-weight: 600; color: var(--clay); }
/* drafts: nobody's turn yet */
.row.is-draft { opacity: 0.55; }
.row.is-draft:hover { opacity: 1; }

/* ---- statuses: a dot and a Mono word, no pill (Werkator's) ---- */
.status { display: inline-flex; align-items: center; gap: 6px; font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.status-success, .status-running { color: var(--accent); }
.status-task { color: var(--text-2); }
.status-task::before { background: var(--dot, currentColor); }
.status-running::before { animation: pulse 1.4s ease-in-out infinite; }
.status-failed { color: var(--clay); }
.status-timeout { color: var(--amber); }
.status-pending { color: var(--text-2); }
.status-pending::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.status-unknown { color: var(--ghost); }

/* ---- tags: Werkator's small outlined labels, here the commit statuses of a pull request ---- */
.tag { font: 400 11.5px var(--sans); line-height: 17px; padding: 0 5px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--muted); white-space: nowrap; }
a.tag:hover { color: var(--accent); border-color: var(--accent); }
.tag-run, .tag-ok { color: var(--accent); border-color: var(--accent-soft-2); }
.tag-run::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; vertical-align: 1px; animation: pulse 1.4s ease-in-out infinite; }
.tag-warn { color: var(--amber); border-color: var(--amber); }
.tag-bad { color: var(--clay); border-color: var(--clay); }

/* ---- the copy button: Werkator's, ghost until hovered ---- */
.copy-button { appearance: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--ghost); cursor: pointer; }
.copy-button .icon { width: 14px; height: 14px; }
.copy-button:hover { color: var(--accent); border-color: var(--line-2); }
.copy-button.is-copied { color: var(--accent); border-color: var(--accent-soft-2); }

/* ---- footer: Werkator's ---- */
.site-footer { width: min(1180px, calc(100% - 64px)); margin: 48px auto 28px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 13px; }
.site-footer a:hover { color: var(--accent); }
.site-footer .version { color: var(--accent); font-style: normal; font-weight: 500; }
.site-footer-links { margin-left: auto; display: inline-flex; gap: 14px; }

/* ---- narrower screens: the tabs drop their names, the side column goes below ---- */
@media (max-width: 1180px) {
    .tab-label { display: none; }
    .tab { padding: 0 8px; }
    .tab .icon { width: 18px; height: 18px; }
}
@media (max-width: 1000px) {
    .board-pair { grid-template-columns: minmax(0, 1fr); }
    .overview-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "todo" "side" "cards" "lanes"; }
    .side { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
}

/* ---- phones: the tabs become a bar at the bottom ---- */
@media (max-width: 760px) {
    html, body { overflow-x: hidden; }
    body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
    main, .site-header-inner, .site-footer { width: calc(100% - 32px); }
    main { padding-top: 12px; }
    .view { gap: 14px; }
    .brand span { display: none; }
    .tabs { position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; margin: 0; padding: 0 4px env(safe-area-inset-bottom); gap: 0;
        background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -2px 6px rgb(20 22 22 / 0.06); }
    .tab { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 2px; height: 56px; padding: 0 2px; font-size: 10.5px; box-shadow: none; }
    .tab.is-active { box-shadow: inset 0 2px var(--accent); }
    .tab-short { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
    .tab-badge { position: absolute; top: 5px; left: calc(50% + 4px); min-width: 16px; padding: 0 4px; font-size: 10px; line-height: 15px; }
    .header-tools { margin-left: auto; gap: 6px; }
    #live-indicator { padding: 0; border: 0; font-size: 0; gap: 0; }
    #live-indicator::before { width: 10px; height: 10px; }
    /* a late relay names itself: a dot alone does not say that sessions may be missing */
    #live-indicator.status-warn { gap: 5px; font-size: 10px; }
    #token-button, #reload-button { display: none; }
    .connection { padding: 10px 12px; gap: 8px; }
    .connection-head strong { font-size: 15px; }
    .connection-note { flex-basis: 100%; font-size: 12.5px; }
    /* one row: the logos shrink from 34 px towards the width of the logo itself rather than break the row */
    .tiles { position: relative; width: 100%; flex-wrap: nowrap; gap: 6px; }
    /* on a phone the menu spans the bar, below the logos */
    .tile-wrap { position: static; flex: 0 1 34px; min-width: 0; }
    .tile-menu, .tile-menu-end { left: 0; right: 0; max-width: none; min-width: 0; }
    .tile { width: 100%; min-width: 0; padding: 0; justify-content: center; }
    .empty { padding: 14px 12px; }
    .load-reasons { padding: 6px 12px 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .charts { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; padding: 8px 12px 10px; }
    .chart .spark { height: 22px; }
    .todo-row { gap: 10px; padding: 8px 12px; }
    .todo-row .act { display: none; }
    .group-hint { display: none; }
    .lane { grid-template-columns: 16px minmax(0, 1fr); }
    .lane-name { display: none; }
    .lane-axis { grid-template-columns: 16px minmax(0, 1fr); }
    .lane-axis > span:nth-child(2) { display: none; }
    .cells { gap: 2px; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .card .copy-button { display: none; }
    .filters .control-search { margin-left: 0; }
    .journal-entry { grid-template-columns: minmax(0, 1fr); }
    .journal-actions { margin-left: 0; width: 100%; }
    input.control { min-width: 0; flex: 1 1 140px; }
    .combo { flex: 1 1 100%; }
    .combo-input { width: 100%; }
    .row { grid-template-columns: minmax(0, 1fr); }
    .aside { justify-content: flex-start; max-width: none; }
    .row-head .aside { margin-left: 0; }
    .site-footer { margin-top: 28px; }
    .site-footer-links { margin-left: 0; }
}
