/* Regie: what is its own, after ui.css (shared/ui, HQ's design), on the same
   tokens. Regie's readers are a client's editors who open it twice a month, so
   it has more air than HQ: larger fields, one action per row, the words in
   full. */

.rg-staging { position: fixed; inset: 0 0 auto 0; z-index: 30; background: var(--warn); color: var(--panel); font-size: 12.5px; font-weight: 650; text-align: center; padding: 3px 8px; }
body:has(.rg-staging) { padding-top: 24px; }
body:has(.rg-staging) .hq-side { top: 24px; height: calc(100vh - 24px); }

/* the frame: the app's name where HQ has its own, the sections as a row on a phone */
.rg-brand { min-width: 0; }
.rg-brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-brand-chip { padding: 0 8px 14px 48px; margin-top: -14px; }
.hq-nav a span, .hq-side-foot a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-row { display: none; }
@media (max-width: 860px) {
  .hq-top .hq-chip { margin: 0 auto 0 10px; }
  .hq-top .rg-brand:has(+ .hq-chip) { margin-right: 0; }
  /* the top bar and the row of sections stay together at the top */
  .rg-head { position: sticky; top: 0; z-index: 6; background: color-mix(in srgb, var(--sheet) 82%, transparent);
    -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line-soft); }
  .rg-head .hq-top { position: static; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .rg-row { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 2px 14px 8px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 28px), transparent); }
  .rg-row::-webkit-scrollbar { display: none; }
  .rg-row a { flex: none; font-size: 13.5px; font-weight: 550; padding: 6px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; transition: background-color .12s, color .12s; }
  .rg-row a.on { background: var(--ink); color: var(--ink-on); }
  .rg-head .hq-top { border-bottom: 0; }
  .hq-content { padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
}

/* a page's head, as HQ's */
.hq-content > h1, .rg-narrow > h1 { font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; margin: 2px 0 6px; font-weight: 650; }
@media (max-width: 860px) { .hq-content > h1 { font-size: 24px; } }
.lead { color: var(--muted); max-width: 64ch; margin: 0 0 20px; }
.hq-card h2 small { font-weight: 400; color: var(--muted); }
.hq-card h3 { font-size: 14px; margin: 18px 0 8px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; }
.bad, .err { color: var(--bad); }
.note { background: var(--accent-soft); color: var(--text); border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; }
.rg-narrow { max-width: 460px; }
.hq-login .rg-narrow { max-width: none; display: grid; gap: 12px; }
.hq-login .hq-mark.is-big { margin-bottom: 4px; }
.hq-login .form { text-align: left; }


.hq-card.is-demo { display: flex; gap: 22px; align-items: center; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.demo-qr { flex: 0 0 168px; }
.demo-qr svg { width: 168px; height: 168px; display: block; border-radius: 8px; }
@media (max-width: 600px) { .hq-card.is-demo { flex-direction: column; align-items: flex-start; } }

/* rows of notices, corrections, entries: text that wraps, the actions at its end */
.rows { list-style: none; margin: 0 -10px; padding: 0; }
.row { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 13px 10px; border-radius: 12px; transition: background-color .15s; }
.row + .row::before { content: ''; position: absolute; top: 0; left: 10px; right: 10px; border-top: 1px solid var(--line-soft); }
.row:hover { background: color-mix(in srgb, var(--hover) 60%, transparent); }
.row:hover::before, .row:hover + .row::before { opacity: 0; }
.row.is-past, .is-past .row { opacity: .6; }
.row p { margin: 3px 0; }
.row > .hq-chip { margin-top: 2px; }
.grow { flex: 1; min-width: 0; }
.grow > strong, .grow > small { display: block; }
.grow > small { margin-top: 3px; color: var(--muted); font-size: 13px; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.rec-c { color: var(--muted); font-size: 13px; }
@media (max-width: 600px) {
  .row { flex-wrap: wrap; }
  .row .acts { width: 100%; justify-content: flex-start; }
}

/* forms: each field on its own line, its words above it */
form.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
form.inline input { width: auto; }
/* a form fills its card, and the column is narrow enough that a field never
   gets absurdly wide; its buttons sit at its start, at their own width */
.is-regie .hq-content { max-width: 880px; }
.form { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.hq-content .form > .hq-btn { align-self: flex-start; }
.rg-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 2px; }
.rg-short input { max-width: 120px; }
.two { align-items: end; }
/* the part of a form that belongs to one choice above it, set in under it */
.rg-sub { display: flex; flex-direction: column; gap: 14px; padding-left: 14px; border-left: 2px solid var(--line-soft); }
.hq-card > p:only-child { margin: 0; }
.form label, label.form { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.form label small { font-weight: 400; color: var(--muted); }
.form input, .form textarea, .form select, label.form input { width: 100%; }
/* date and search stay here: the stats dashboard HQ mounts has its own. */
input[type=date], input[type=search] {
  font: inherit; font-size: 14.5px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text);
}
input[type=file] { font: inherit; font-size: 14px; }
textarea { resize: vertical; line-height: 1.45; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 8px; width: 100%; }
.form label.check, .pills label { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.pills input[type=datetime-local] { width: auto; }
.check input, .pills input[type=radio], .check input[type=checkbox] { width: auto; accent-color: var(--accent); }
.keys { display: flex; flex-direction: column; gap: 6px; padding-left: 26px; max-height: 260px; overflow-y: auto; width: 100%; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-form { flex-direction: row; flex-wrap: wrap; align-items: flex-end; max-width: none; }
.row-form label { flex: 1 1 200px; }
@media (max-width: 600px) { .two { grid-template-columns: 1fr; } }
.picker { display: flex; flex-direction: column; gap: 3px; font-weight: 400; }
.picker small { color: var(--muted); }
.source { background: var(--bg); border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 14px; margin: 16px 0; }
.was { background: var(--bg); border-left: 3px solid var(--line); border-radius: 0 8px 8px 0; padding: 7px 11px; margin: 0 0 6px; font-weight: 400; }
.thumb { max-width: 160px; border-radius: 8px; }
.hq-btn.is-busy { pointer-events: none; }
/* a select draws its own caret, in the field's padding: the browser's, once a
   select has a border, sits on that border and pushes the text inward */
:root {
  --rg-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' fill='none' stroke='%236a6d74' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --rg-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' fill='none' stroke='%23959ba5' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --rg-caret: var(--rg-caret-light);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --rg-caret: var(--rg-caret-dark); } }
:root[data-theme="dark"] { --rg-caret: var(--rg-caret-dark); }
select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 38px;
  background-image: var(--rg-caret); background-position: right 14px center; background-size: 12px 8px; background-repeat: no-repeat;
}
select:hover { border-color: var(--accent); }

/* the push and its preview on a phone */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } .phone { display: none; } }
.phone { position: sticky; top: 24px; border: 10px solid #1d1f23; border-radius: 38px; background: linear-gradient(160deg, #6d8aa3, #2b4256); height: 520px; padding: 54px 12px; }
.phone-note { background: rgba(255, 255, 255, .88); color: #1d1f23; border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; backdrop-filter: blur(8px); }
.phone-note b { font-size: 14px; }
.phone-note span { overflow-wrap: anywhere; }
.phone-app { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #555; }
/* a notice in the app: a light app screen, whatever Regie's own look, with the band on top */
.phone.is-app { background: #f4f3ef; padding: 0; overflow: hidden; color: #1d1f23; }
.app-bar { padding: 34px 16px 12px; background: #fff; border-bottom: 1px solid #e7e5df; font-weight: 650; font-size: 15px; }
.app-band { margin: 10px 10px 0; padding: 10px 8px 10px 12px; border-radius: 12px; display: grid; grid-template-columns: 18px minmax(0, 1fr) 14px; gap: 9px; font-size: 13px; line-height: 1.35; }
.app-band b { display: block; font-size: 13.5px; font-weight: 650; overflow-wrap: anywhere; }
.app-band [data-preview-out="n-body"] { display: block; margin-top: 2px; white-space: pre-line; overflow-wrap: anywhere; }
.app-band svg { display: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.app-band[data-preview-level="info"] .is-info, .app-band[data-preview-level="changed"] .is-changed, .app-band[data-preview-level="closed"] .is-closed { display: block; }
.app-band[data-preview-level="info"] { background: #dbe7f0; color: #163f57; }
.app-band[data-preview-level="changed"] { background: #f3e6c6; color: #5a4100; }
.app-band[data-preview-level="closed"] { background: #f5dad6; color: #7d2115; }
.app-x { font-size: 17px; line-height: 1; opacity: .7; }
.app-skel { padding: 14px; display: grid; gap: 9px; }
.app-skel i { display: block; height: 9px; border-radius: 5px; background: #e2e0da; }
.app-skel i:nth-child(2), .app-skel i:nth-child(5) { width: 78%; }
.app-skel i:nth-child(3), .app-skel i:nth-child(6) { width: 56%; }
.app-skel i.is-card { height: 96px; border-radius: 12px; margin: 6px 0; }

/* numbers */
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) 120px 40px; gap: 10px; align-items: center; }
.bars meter { width: 100%; }
.bars b { text-align: right; font-variant-numeric: tabular-nums; }

/* sources: a dot and two lines a row; what can be set waits behind "Einstellen" */
.rg-summary { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-weight: 600; }
.rg-summary.is-bad { color: var(--bad); }
.rg-summary + .hq-quiet { margin: -4px 0 12px; }
.rg-src .hq-dot-s { flex: none; margin-top: 8px; }
.rg-src small.bad { color: var(--bad); }
.rg-src > details { flex: 1; min-width: 0; }
.rg-more > summary { display: flex; gap: 12px; align-items: flex-start; list-style: none; cursor: pointer; border-radius: 8px; }
.rg-more > summary::-webkit-details-marker { display: none; }
.rg-more > summary:hover strong { color: var(--accent); }
.rg-more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.rg-chev { flex: none; width: 8px; height: 8px; margin: 7px 4px 0 0; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.rg-more[open] .rg-chev { transform: rotate(-135deg); margin-top: 11px; }
.rg-panel { margin: 8px 0 2px; padding: 14px 16px; background: var(--bg); border: 1px solid var(--line-soft); border-radius: 12px; display: grid; gap: 14px; }
.rg-panel form { display: grid; gap: 8px; margin: 0; justify-items: start; }
.rg-panel p { margin: 0; }
.rg-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.rg-seg legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.rg-seg label { position: relative; }
.rg-seg input { position: absolute; opacity: 0; pointer-events: none; }
.rg-seg label span { display: inline-block; font-size: 13.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.rg-seg label span:hover { border-color: var(--accent); }
.rg-seg input:checked + span { background: var(--text); border-color: var(--text); color: var(--bg); }
.rg-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
/* options with what each one means, as cards: the roles */
.rg-seg.is-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; align-items: stretch; }
.rg-seg.is-cards label { display: flex; }
.rg-seg.is-cards label span { display: grid; align-content: start; gap: 3px; width: 100%; flex: 1; padding: 10px 12px; border-radius: 12px; }
.rg-seg.is-cards label span b { font-size: 14px; font-weight: 650; }
.rg-seg.is-cards label span small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.rg-seg.is-cards input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.rg-seg.is-cards input:checked + span small { color: var(--text); }
/* chips in a list's row, saved on a tap: their question is the row itself */
.rg-seg.is-row { flex-wrap: nowrap; gap: 4px; }
.rg-seg.is-row legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rg-seg.is-row label span { font-size: 13px; padding: 5px 10px; }
.rg-unused { margin-top: 6px; border-top: 1px solid var(--line-soft); }
.rg-unused > summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 12px 0 4px; }
.rg-unused > .hq-quiet { margin: 0 0 6px; }
.rg-src small.warn { color: var(--warn); }
.rg-status { font-weight: 400; font-size: 13px; color: var(--good); margin-left: 6px; }
.rg-status.is-bad { color: var(--bad); }
.rg-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 13.5px; }
.rg-facts dt { color: var(--muted); }
.rg-facts dd { margin: 0; min-width: 0; }
.rg-fails ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.rg-fails li { display: grid; gap: 1px; }
.rg-fails li .mono { color: var(--muted); font-size: 12px; }
.rg-fails p { margin: 0; }
@media (max-width: 600px) { .rg-facts { grid-template-columns: 1fr; } .rg-facts dd { margin-bottom: 6px; } }

/* htmx: a part of the page waiting for its answer (htmx's own style is off,
   so the CSP allows no inline style). */
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
.htmx-indicator { opacity: 0; transition: opacity 0.2s; }
.htmx-request:is(form, li, section) { opacity: 0.6; transition: opacity 0.15s; }

/* Web Awesome's controls in a form: as wide as the fields beside them, their
   label in the weight the form's own labels have. */
wa-select.rg-select { width: 100%; }
wa-select.rg-select::part(form-control-label) { font-size: 14px; }
.form wa-switch { font-size: 14.5px; }
.form wa-switch [slot="hint"] { color: var(--muted); }

/* A notice's templates: one row of small buttons above the form. */
.rg-fills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: -4px; }
.rg-fills .hq-quiet { margin-right: 4px; }
.rg-fill { font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px dashed var(--line); background: transparent; color: var(--text); cursor: pointer; }
.rg-fill:hover { border-color: var(--accent); border-style: solid; }

/* Numbers: a day's bars, and lists of the most of something side by side. */
.rg-days { margin: 16px 0 0; }
.rg-days svg { width: 100%; height: 96px; display: block; }
.rg-days rect { fill: var(--accent); }
.rg-days rect:hover { fill: var(--text); }
.rg-days figcaption { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.rg-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 24px; }
.rg-cols h3 { margin-top: 6px; }
.rg-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 14px; }
.rg-top li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; padding: 4px 0; border-top: 1px solid var(--line-soft); }
.rg-top li:first-child { border-top: 0; }
.rg-top li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-top li b { font-variant-numeric: tabular-nums; }
.rg-top li small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }

/* The poster: an A4 page in the app's colours whatever the console's look,
   shown small beside its form and alone, full size, when printed. Sizes are
   in hundredths of the page's width (cqw of .rg-poster), so the preview
   and the print are the same page. --brand, --on and --ink come from the
   app's manifest (console.js); "is-color" fills the page with the colour,
   "is-light" keeps it white for the printer's sake. */
.rg-poster-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .rg-poster-split { grid-template-columns: 1fr; } }
.rg-poster-split > #poster { position: sticky; top: 16px; }
.rg-poster-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rg-poster-note { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; font-size: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
.rg-poster { --brand: #16181c; --on: #fff; --ink: #16181c;
  container-type: inline-size; position: relative; overflow: hidden; isolation: isolate; aspect-ratio: 210 / 297;
  display: flex; flex-direction: column; border-radius: 8px; box-shadow: var(--shadow), 0 0 0 1px var(--line);
  background: #fff; color: #16181c; text-align: left; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rg-poster.is-color { background: var(--brand); color: var(--on); }
/* Two quiet circles behind it all: a lighter veil of the text colour on the
   filled page, a tint of the colour on the white one. */
.rg-poster::before, .rg-poster::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.rg-poster::before { width: 92cqw; height: 92cqw; top: -36cqw; right: -32cqw; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.rg-poster::after { width: 60cqw; height: 60cqw; bottom: -22cqw; left: -24cqw; border: 2.4cqw solid color-mix(in srgb, var(--ink) 6%, transparent); }
.rg-poster.is-color::before { background: color-mix(in srgb, var(--on) 9%, transparent); }
.rg-poster.is-color::after { border-color: color-mix(in srgb, var(--on) 9%, transparent); }

/* The words take what the code leaves; console.js shrinks them by --fit
   until they do, and the code never moves. */
.rg-poster-words { --fit: 1; flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 7cqw 9cqw 0; }
.rg-poster-app { display: flex; align-items: center; gap: 3.4cqw; margin: 0 0 calc(6cqw * var(--fit)); font-size: 4.4cqw; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.rg-poster.is-light .rg-poster-app { color: var(--ink); }
.rg-poster-app img { flex: none; width: 12cqw; height: 12cqw; border-radius: 2.8cqw; display: block; box-shadow: 0 .8cqw 2.4cqw rgb(0 0 0 / .16); }
.rg-poster.is-color .rg-poster-app img { box-shadow: 0 0 0 .7cqw color-mix(in srgb, var(--on) 85%, transparent), 0 1cqw 3cqw rgb(0 0 0 / .22); }
.rg-poster-title { margin: 0; font-size: calc(12cqw * var(--fit)); line-height: 1; font-weight: 800; letter-spacing: -0.04em; overflow-wrap: break-word; hyphens: auto; text-wrap: balance; }
.rg-poster:not(:has(.rg-poster-app)) .rg-poster-title { margin-top: 6cqw; }
.rg-poster.is-mid .rg-poster-title { font-size: calc(9.6cqw * var(--fit)); letter-spacing: -0.03em; }
.rg-poster.is-long .rg-poster-title { font-size: calc(7.4cqw * var(--fit)); line-height: 1.06; letter-spacing: -0.02em; }
.rg-poster-sub { margin: 3cqw 0 0; font-size: calc(4cqw * var(--fit)); line-height: 1.3; font-weight: 450; opacity: .84; text-wrap: pretty;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.rg-poster.is-wordy .rg-poster-sub { font-size: calc(3.2cqw * var(--fit)); }
.rg-poster-code { flex: none; align-self: center; width: 82cqw; margin: 4cqw 0 6cqw; text-align: center; }
.rg-poster-tile { width: 54cqw; margin: 0 auto; padding: 3cqw; box-sizing: border-box; background: #fff; border-radius: 5.4cqw; box-shadow: 0 2cqw 7cqw rgb(0 0 0 / .24); }
.rg-poster.is-light .rg-poster-tile { box-shadow: 0 0 0 .45cqw color-mix(in srgb, var(--ink) 16%, #fff), 0 2cqw 7cqw rgb(0 0 0 / .07); }
.rg-poster-tile > svg { display: block; width: 100%; height: auto; }
.rg-poster-code figcaption { margin-top: 4.4cqw; }
.rg-poster-code figcaption span { display: inline-flex; align-items: center; gap: 1.8cqw; font-size: 3.7cqw; line-height: 1.2; font-weight: 650; letter-spacing: -0.005em; }
.rg-poster.is-light .rg-poster-code figcaption span { color: #16181c; }
.rg-poster-code figcaption svg { flex: none; width: 5.6cqw; height: 5.6cqw; }
.rg-poster.is-light .rg-poster-code figcaption svg { color: var(--ink); }
.rg-poster-code figcaption small { display: block; margin-top: 1.2cqw; font-size: 2.8cqw; font-weight: 500; letter-spacing: .01em; opacity: .75; overflow-wrap: anywhere; }
@media print {
  @page { size: A4; margin: 0; }
  body, body.hq { background: #fff; padding: 0; }
  body:has(.rg-poster) .hq-side, body:has(.rg-poster) .hq-top, body:has(.rg-poster) .rg-row, body:has(.rg-poster) .rg-staging,
  body:has(.rg-poster) .hq-content > :not(.rg-poster-split), .rg-poster-split > .hq-card, .rg-poster-acts, .rg-poster-note { display: none !important; }
  body:has(.rg-poster) .hq-content { padding: 0; max-width: none; }
  .rg-poster-split { display: block; }
  .rg-poster-split > #poster { position: static; }
  .rg-poster { width: 210mm; height: 297mm; aspect-ratio: auto; border-radius: 0; box-shadow: none; break-inside: avoid; }
}

/* "Rückgängig" in the message after a change. */
.rg-flash .rg-undo { margin-left: 10px; }
.rg-undo-btn { font: inherit; font-size: 14px; font-weight: 600; background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; }

/* Links that show one part of a list: the chips' look. */
.rg-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.rg-filter a { font-size: 13.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-decoration: none; }
.rg-filter a:hover { border-color: var(--accent); }
.rg-filter a[aria-current] { background: var(--text); border-color: var(--text); color: var(--bg); }
.rg-filter small { opacity: .7; margin-left: 2px; }

/* ---- the console's own look, over HQ's ---- */

/* The app's colour: /look/<app>.css sets --app from the app's own manifest
   (lib/brand.php), and the frame marks the app with it; an app without one
   keeps the console's accent. --app-text is the same colour where it is text
   or a thin mark on the page, lighter in the dark. */
:root { --app: var(--accent); --app-on: var(--accent-ink); --app-ink: var(--accent); --app-text: var(--app-ink);
  --card-shadow: 0 1px 2px rgba(20, 22, 26, .04), 0 12px 32px -20px rgba(20, 22, 26, .22); --pop-shadow: 0 18px 40px -12px rgba(20, 22, 26, .28), 0 2px 6px rgba(20, 22, 26, .08); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --app-text: color-mix(in srgb, var(--app) 52%, #fff);
    --card-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 12px 32px -20px rgba(0, 0, 0, .7); --pop-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .04); }
}
:root[data-theme="dark"] { --app-text: color-mix(in srgb, var(--app) 52%, #fff);
  --card-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 12px 32px -20px rgba(0, 0, 0, .7); --pop-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .04); }

.rg-appicon { width: 30px; height: 30px; border-radius: 9px; flex: none; display: block; object-fit: cover;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 10%, transparent), 0 3px 8px -2px rgba(0, 0, 0, .18); }
.hq-top .rg-appicon { width: 28px; height: 28px; border-radius: 8px; }
.is-regie .hq-nav a { position: relative; transition: background-color .15s, color .15s; }
.is-regie .hq-nav a.on .hq-i { color: var(--app-text); }

/* a page's head and its cards */
.is-regie .hq-content > h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.028em; line-height: 1.15; margin: 4px 0 8px; }
@media (max-width: 860px) { .is-regie .hq-content > h1 { font-size: 25px; } }
.is-regie .lead { font-size: 15.5px; line-height: 1.55; margin-bottom: 24px; }
.is-regie .hq-card > h2 { font-size: 16px; letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.is-regie .hq-card > h2 > a { margin-left: auto; font-size: 13.5px; font-weight: 550; text-decoration: none; white-space: nowrap; }
.is-regie .hq-card > h2 > a:hover { text-decoration: underline; }
@media (max-width: 600px) { .is-regie .hq-card { padding: 16px 16px 14px; border-radius: 14px; } }

/* a small button for a row */
.hq-btn.is-sm, .acts .hq-btn { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.hq-btn.is-ghost { background: transparent; border-color: transparent; color: var(--text); }
.hq-btn.is-ghost:hover { background: var(--hover); border-color: transparent; }
.hq-btn.is-danger:not(.is-primary) { color: var(--bad); }
.hq-btn.is-danger:not(.is-primary):hover { border-color: var(--bad); }

/* a row's other actions, behind its "…": a native popover (light dismiss,
   Esc), placed under its button by console.js */
.rg-dots { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.rg-dots:hover, .rg-dots:has(+ .rg-pop:popover-open) { background: var(--hover); color: var(--text); }
.rg-dots svg { width: 18px; height: 18px; }
.rg-pop[popover] { position: fixed; inset: auto; margin: 0; min-width: 210px; max-width: min(320px, calc(100vw - 24px)); padding: 6px; border: 1px solid var(--line); border-radius: 13px;
  background: var(--panel); color: var(--text); box-shadow: var(--pop-shadow); }
.rg-pop:popover-open { display: grid; gap: 1px; animation: rg-pop .14s cubic-bezier(.2, .8, .2, 1); }
.rg-pop form.inline { display: block; }
.rg-pop a, .rg-pop .hq-btn { display: flex; width: 100%; justify-content: flex-start; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; box-shadow: none;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--text); text-decoration: none; text-align: left; cursor: pointer; }
.rg-pop a:hover, .rg-pop .hq-btn:hover, .rg-pop a:focus-visible, .rg-pop .hq-btn:focus-visible { background: var(--hover); outline: none; }
.rg-pop .is-danger, .rg-pop .is-danger:hover { color: var(--bad); }
.rg-pop hr { border: 0; border-top: 1px solid var(--line-soft); margin: 4px 6px; }
@keyframes rg-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* the message after a change, with its "Rückgängig" */
.rg-flash { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 18px; padding: 11px 14px 11px 44px; position: relative; border-radius: 12px;
  background: var(--good-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--good) 28%, transparent); font-weight: 550; animation: rg-drop .32s cubic-bezier(.2, .8, .2, 1); }
.rg-flash::before { content: ''; position: absolute; left: 13px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; background: var(--good) center / 12px no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6l4.6-5' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.rg-flash.is-bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.rg-flash.is-bad::before { background: var(--bad) center / 12px no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 3v3.6M6 8.8v.1' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.rg-flash .rg-undo { margin-left: auto; }
.rg-flash .rg-undo-btn { padding: 5px 11px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; font-size: 13px; }
.rg-flash .rg-undo-btn:hover { border-color: var(--accent); }
@keyframes rg-drop { from { opacity: 0; transform: translateY(-6px); } }

/* nothing (yet) in a list */
.rg-empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 22px 16px 18px; color: var(--muted); font-size: 14.5px; }
.rg-empty > .hq-i { width: 22px; height: 22px; padding: 12px; box-sizing: content-box; border-radius: 50%; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }
.rg-empty b { color: var(--text); font-weight: 600; font-size: 15px; }
.rg-empty p { margin: 0; max-width: 46ch; }
.rg-empty .hq-btn { margin-top: 8px; }

/* a state in a row: a dot and a word */
.rg-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--muted); }
.rg-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.rg-state.is-good { color: var(--good); }
.rg-state.is-wait { color: var(--accent); }
.rg-state.is-bad { color: var(--bad); }
/* how much of something: a thin track and its fill */
.rg-meter { display: inline-block; width: 64px; height: 6px; border-radius: 3px; background: var(--accent-soft); overflow: hidden; vertical-align: middle; }
.rg-meter > i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }

/* moving between pages and parts of them: the content fades in, the sidebar
   stays put; nothing moves for whoever asked for less motion */
@view-transition { navigation: auto; }
.is-regie .hq-side { view-transition-name: rg-side; }
.is-regie .hq-content { view-transition-name: rg-main; }
::view-transition-group(rg-side) { animation: none; }
::view-transition-old(rg-main) { animation: rg-fade-out .12s ease-in both; }
::view-transition-new(rg-main) { animation: rg-rise .24s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rg-fade-out { to { opacity: 0; } }
@keyframes rg-rise { from { opacity: 0; transform: translateY(6px); } }
.ls-rows > *, .rows > * { transition: opacity .25s ease; }
.ls-rows > .htmx-added, .rows > .htmx-added { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .rg-flash, .rg-pop:popover-open { animation: none; }
}

/* the search (⌘K, lib/sections/find.php): a field at the top of the
   sidebar, a dialog with what fits, an entry with what can be done to it */
.rg-find-open { display: flex; align-items: center; gap: 9px; width: 100%; margin: 0 0 14px; padding: 7px 8px 7px 10px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel); color: var(--faint); font: inherit; font-size: 13.5px; cursor: pointer; box-shadow: var(--shadow-sm); transition: border-color .12s, color .12s; }
.rg-find-open .hq-i { width: 16px; height: 16px; }
.rg-find-open span { flex: 1; text-align: left; }
.rg-find-open:hover { color: var(--muted); border-color: color-mix(in srgb, var(--line) 55%, var(--text) 22%); }
.rg-find-open kbd, .rg-find-q kbd { font: 600 11px/1 var(--font); color: var(--faint); padding: 3px 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--sheet); }
dialog.rg-find { width: min(640px, calc(100vw - 24px)); max-height: min(580px, 76vh); margin: 12vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden; flex-direction: column; }
dialog.rg-find[open] { display: flex; animation: rg-pop .16s cubic-bezier(.2, .8, .2, 1); }
dialog.rg-find::backdrop { background: rgba(10, 12, 16, .36); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.rg-find-q { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.rg-find-q > .hq-i { color: var(--faint); }
.rg-find-q input { flex: 1; min-width: 0; border: 0; padding: 0; font: inherit; font-size: 16px; background: transparent; color: var(--text); outline: none; }
.rg-find-q input::placeholder { color: var(--faint); }
.rg-find-q input:focus-visible { outline: none; }
.rg-find-q input::-webkit-search-cancel-button { display: none; }
.rg-find-out { overflow-y: auto; padding: 4px 6px 8px; overscroll-behavior: contain; }
.rg-find-out:empty { display: none; }
.rg-find-group h3 { margin: 10px 10px 4px; font-size: 11.5px; font-weight: 600; color: var(--faint); }
.rg-find-item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: var(--text); text-decoration: none; }
.rg-find-item > .hq-i { width: 17px; height: 17px; color: var(--muted); }
.rg-find-item > span { display: grid; min-width: 0; }
.rg-find-item b { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-find-item small { color: var(--muted); font-size: 12.5px; }
.rg-find-item:hover, .rg-find-item:focus-visible { background: var(--hover); outline: none; }
.rg-find-item:focus-visible > .hq-i { color: var(--text); }
.rg-find-rec { display: flex; align-items: center; gap: 8px; }
.rg-find-rec .rg-find-item { flex: 1; min-width: 0; }
.rg-find-do { display: flex; gap: 4px; flex: none; padding-right: 4px; }
.rg-find-do a { font-size: 12.5px; font-weight: 550; padding: 4px 9px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-decoration: none; }
.rg-find-do a:hover, .rg-find-do a:focus-visible { border-color: var(--accent); outline: none; color: var(--accent); }
.rg-find-none { margin: 0; padding: 22px 18px; color: var(--muted); text-align: center; font-size: 14px; }
@media (max-width: 600px) {
  dialog.rg-find { margin-top: 8px; max-height: calc(100vh - 16px); }
  .rg-find-rec { flex-wrap: wrap; gap: 0; padding-bottom: 6px; }
  .rg-find-do { padding: 0 0 0 38px; }
}
@media (prefers-reduced-motion: reduce) { dialog.rg-find[open] { animation: none; } }

/* the sidebar's head: the app, and light or dark as a switch beside it */
.rg-side-head { display: flex; align-items: center; gap: 6px; padding: 0 2px 18px 0; }
.rg-side-head .hq-brand { flex: 1; min-width: 0; padding-bottom: 0; padding-right: 0; }
/* a long name takes a second line rather than losing its end */
.rg-side-head .rg-brand-name { white-space: normal; line-height: 1.2; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.rg-theme { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: space-between; width: 44px; height: 24px; padding: 0 4px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--side); color: var(--faint); cursor: pointer; }
.rg-theme .hq-i { position: relative; z-index: 1; width: 13px; height: 13px; transition: color .2s; }
.rg-theme-knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--panel);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
.rg-theme[aria-checked="true"] .rg-theme-knob { transform: translateX(20px); }
.rg-theme[aria-checked="false"] .is-sun, .rg-theme[aria-checked="true"] .is-moon { color: var(--text); }
.rg-theme:hover { border-color: color-mix(in srgb, var(--line) 55%, var(--text) 22%); }
@media (prefers-reduced-motion: reduce) { .rg-theme-knob, .rg-theme .hq-i { transition: none; } }
