/* Solidground admin. Colours and type follow solidgroundlabs.cz.
   Theme: light by default, dark from the OS, or forced with
   <html data-theme="light|dark"> (set by /static/theme.js). */

@font-face { font-family: "Bricolage Grotesque"; font-weight: 200 800; font-display: swap; src: url(fonts/bricolage-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 200 800; font-display: swap; src: url(fonts/bricolage-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "DM Sans"; font-weight: 100 1000; font-display: swap; src: url(fonts/dmsans-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Sans"; font-weight: 100 1000; font-display: swap; src: url(fonts/dmsans-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #F6ECE2; --surface: #FFFBF6; --sand: #EADBC8; --field: #FFFFFF;
  --ink: #2B1A1B; --ink2: #5E4A44; --ink3: #8C766C;
  --accent: #C2581E; --btn: #B5501A; --on-btn: #FFFBF6;
  --vein: #A94A17; --rock: #2B1A1B; --on-rock: #F6ECE2;
  --line: rgba(43, 26, 27, .12); --line2: rgba(43, 26, 27, .07);
  --ok: #2F6B45; --ok-bg: #DDEBDD; --warn: #8A4A0E; --warn-bg: #F7DEC4;
  --err: #A3261B; --err-bg: #F6D6CF; --info-bg: #EADBC8;
  --shadow: 0 1px 2px rgba(43, 26, 27, .05), 0 8px 24px rgba(43, 26, 27, .06);
  --disp: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --r: 20px; --r-sm: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1B1314; --surface: #241A1A; --sand: #3A2C26; --field: #1B1314;
    --ink: #F6ECE2; --ink2: #CDBBAE; --ink3: #A08B7F;
    --accent: #E2702F; --btn: #E2702F; --on-btn: #1B1314;
    --vein: #B4521A; --rock: #0E0909; --on-rock: #F6ECE2;
    --line: rgba(246, 236, 226, .14); --line2: rgba(246, 236, 226, .07);
    --ok: #8FD0A0; --ok-bg: rgba(143, 208, 160, .14); --warn: #F2A66B; --warn-bg: rgba(226, 112, 47, .18);
    --err: #F4978B; --err-bg: rgba(244, 151, 139, .15); --info-bg: #3A2C26;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1B1314; --surface: #241A1A; --sand: #3A2C26; --field: #1B1314;
  --ink: #F6ECE2; --ink2: #CDBBAE; --ink3: #A08B7F;
  --accent: #E2702F; --btn: #E2702F; --on-btn: #1B1314;
  --vein: #B4521A; --rock: #0E0909; --on-rock: #F6ECE2;
  --line: rgba(246, 236, 226, .14); --line2: rgba(246, 236, 226, .07);
  --ok: #8FD0A0; --ok-bg: rgba(143, 208, 160, .14); --warn: #F2A66B; --warn-bg: rgba(226, 112, 47, .18);
  --err: #F4978B; --err-bg: rgba(244, 151, 139, .15); --info-bg: #3A2C26;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--disp); font-weight: 700; letter-spacing: -.025em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(28px, 3.2vw, 38px); }
h2 { font-size: 21px; }
h3 { font-size: 17px; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--ink3); }
.error { color: var(--err); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* logo: mark layers take colour from these classes (no inline styles) */
.mark { width: 28px; height: 28px; flex: none; }
.mark .i { fill: var(--ink); }
.mark .c { fill: var(--accent); }

/* app shell: sidebar + content */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--surface) 247px, var(--line) 247px 248px, transparent 248px); }
.shell > div { min-width: 0; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 20px 14px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; text-decoration: none; color: var(--ink); }
.brand b { font: 700 18px/1.1 var(--disp); letter-spacing: -.02em; }
.brand small { display: block; font: 500 12px/1.2 var(--body); color: var(--ink3); letter-spacing: 0; }
.nav { display: grid; gap: 2px; }
.nav h4 { margin: 0 0 6px; padding: 0 10px; font: 600 11px/1 var(--body); letter-spacing: .09em; text-transform: uppercase; color: var(--ink3); }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: 10px; color: var(--ink2); font-weight: 500; text-decoration: none; }
.nav a:hover { background: var(--line2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--sand); color: var(--ink); font-weight: 600; }
.nav a[aria-current="page"]::before { content: ""; width: 3px; height: 16px; margin-left: -6px; border-radius: 2px; background: var(--accent); }
.nav .count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--warn); background: var(--warn-bg); border-radius: 999px; padding: 1px 8px; }
.side-foot { margin-top: auto; display: grid; gap: 12px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--vein); color: #FFFBF6; font: 700 13px/1 var(--disp); }
.who span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.who small { display: block; color: var(--ink3); font-size: 12px; }
.side-foot form { margin: 0; }

.content { min-width: 0; padding: 28px clamp(16px, 3.4vw, 44px) 56px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head p { color: var(--ink2); margin-top: 8px; max-width: 60ch; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font: 600 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.crumbs { display: flex; gap: 6px; margin-bottom: 10px; font-size: 13px; color: var(--ink3); }
.crumbs a { color: var(--ink3); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* mobile: sidebar becomes a top bar with a <details> menu (no JS) */
.mobile-bar { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; background: none; }
  .side { display: none; }
  .mobile-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .mobile-bar details { position: relative; }
  .mobile-bar summary { list-style: none; cursor: pointer; }
  .mobile-bar summary::-webkit-details-marker { display: none; }
  .mobile-bar .menu { position: absolute; right: 0; top: calc(100% + 8px); width: min(300px, calc(100vw - 32px)); display: grid; gap: 18px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow); }
  .content { padding-top: 20px; }
}

/* surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.card > .card-head:last-child { border-bottom: 0; }
.card-head p { color: var(--ink3); font-size: 13px; margin-top: 2px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.stack { display: grid; gap: 20px; }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.stat span { display: block; font-size: 13px; color: var(--ink3); }
.stat b { display: block; margin-top: 4px; font: 700 28px/1.1 var(--disp); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat.hot { background: var(--rock); border-color: var(--rock); color: var(--on-rock); }
.stat.hot span { color: color-mix(in srgb, var(--on-rock) 70%, transparent); }

/* app tiles on home */
.apps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.apps a { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; height: 100%; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.apps a:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); transform: translateY(-1px); color: var(--ink); }
.apps .ico { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--sand); color: var(--accent); font: 700 17px/1 var(--disp); }
.apps b { font: 700 17px/1.2 var(--disp); letter-spacing: -.01em; }
.apps p { color: var(--ink2); font-size: 14px; }
.apps .meta { grid-column: 2; margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
th { font: 600 12px/1.2 var(--body); letter-spacing: .05em; text-transform: uppercase; color: var(--ink3); background: color-mix(in srgb, var(--sand) 35%, transparent); border-bottom-color: var(--line); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 22px; }
th:last-child, td:last-child { padding-right: 22px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--sand) 25%, transparent); }
td .sub { display: block; font-size: 13px; color: var(--ink3); }
td.actions-cell { text-align: right; white-space: nowrap; }
.empty { padding: 36px 22px; text-align: center; color: var(--ink3); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.toolbar input, .toolbar select { width: auto; }
.toolbar .search { flex: 1 1 220px; max-width: 340px; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink3); }

/* badges and chips */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font: 600 12.5px/1.5 var(--body); white-space: nowrap; background: var(--info-bg); color: var(--ink2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.err { background: var(--err-bg); color: var(--err); }
.chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px; font-weight: 500; color: var(--ink2); background: var(--surface); white-space: nowrap; }
.chip.role { background: var(--sand); border-color: transparent; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* alerts */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--r-sm); background: var(--info-bg); color: var(--ink); margin-bottom: 18px; }
.alert::before { content: ""; flex: none; width: 4px; align-self: stretch; border-radius: 2px; background: var(--accent); }
.alert.ok { background: var(--ok-bg); } .alert.ok::before { background: var(--ok); }
.alert.err { background: var(--err-bg); } .alert.err::before { background: var(--err); }

/* buttons: pill, as on the web */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border: 1px solid transparent; border-radius: 999px; background: var(--btn); color: var(--on-btn); font: 600 14.5px/1 var(--body); text-decoration: none; cursor: pointer; transition: filter .15s, background .15s, transform .1s; }
button:hover, .btn:hover { filter: brightness(1.08); color: var(--on-btn); }
button:active, .btn:active { transform: translateY(1px); }
button.ghost, .btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
button.ghost:hover, .btn.ghost:hover { filter: none; background: var(--line2); color: var(--ink); }
button.danger, .btn.danger { background: transparent; color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
button.danger:hover, .btn.danger:hover { filter: none; background: var(--err-bg); }
button.sm, .btn.sm { min-height: 32px; padding: 0 13px; font-size: 13.5px; }
button.block, .btn.block { width: 100%; min-height: 46px; font-size: 15.5px; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* forms */
label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
label .hint { font-weight: 400; color: var(--ink3); font-size: 13px; }
input, select, textarea { width: 100%; padding: 10px 13px; font: 400 15px/1.4 var(--body); color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: var(--r-sm); }
input::placeholder { color: var(--ink3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; padding: 0; accent-color: var(--btn); }
.form { display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.form-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--line); }
fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 4px; }
legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.check { display: grid; grid-template-columns: 18px 1fr; gap: 2px 12px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font-weight: 500; cursor: pointer; }
.check input { margin-top: 2px; }
.check small { grid-column: 2; color: var(--ink3); font-weight: 400; font-size: 13px; }
.conn-row { display: grid; grid-template-columns: 1fr minmax(0, 200px); gap: 8px; }
@media (max-width: 560px) { .conn-row { grid-template-columns: 1fr; } }
.check:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 7%, transparent); }

/* theme switch (segmented) */
.theme { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; }
.theme button { min-height: 26px; padding: 0 10px; font-size: 12px; font-weight: 600; background: transparent; color: var(--ink3); }
.theme button:hover { filter: none; color: var(--ink); }
.theme button[aria-pressed="true"] { background: var(--sand); color: var(--ink); }

/* login: strata panel + form */
.auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 100vh; }
.strata { position: relative; display: flex; flex-direction: column; justify-content: flex-start; gap: clamp(40px, 14vh, 150px); padding: clamp(28px, 4vw, 56px); background: var(--rock); color: var(--on-rock); overflow: hidden; isolation: isolate; }
.strata .mark .i { fill: var(--on-rock); }
.strata .brand { color: var(--on-rock); }
.strata .brand small { color: color-mix(in srgb, var(--on-rock) 65%, transparent); }
.strata h2 { font-size: clamp(34px, 4.4vw, 56px); line-height: .98; letter-spacing: -.04em; max-width: 11ch; }
.strata h2 em { font-style: normal; color: var(--accent); display: block; }
.strata .layers { position: absolute; inset: auto 0 0 0; width: 100%; height: 46%; z-index: -1; }
.strata .layers path:nth-child(1) { fill: var(--sand); opacity: .14; }
.strata .layers path:nth-child(2) { fill: var(--vein); }
.strata .layers path:nth-child(3) { fill: #0E0909; opacity: .55; }
/* waiting: the layers move and a bar runs while something is prepared */
.strata .layers.rising path { transform-box: fill-box; animation: sg-rise 3.6s ease-in-out infinite; }
.strata .layers.rising path:nth-child(2) { animation-delay: -1.2s; }
.strata .layers.rising path:nth-child(3) { animation-delay: -2.4s; }
@keyframes sg-rise { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7%); } }
.progress { position: relative; height: 4px; border-radius: 999px; background: var(--line2); overflow: hidden; }
.progress span { position: absolute; top: 0; bottom: 0; left: -35%; width: 35%; border-radius: inherit; background: var(--accent); animation: sg-progress 1.6s ease-in-out infinite; }
@keyframes sg-progress { to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .strata .layers.rising path, .progress span { animation: none; } .progress span { left: 0; width: 100%; opacity: .5; } }
.strata .foot { font-size: 13px; color: color-mix(in srgb, var(--on-rock) 70%, transparent); }
.auth-main { display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { margin-bottom: 6px; }
.auth-card > p { color: var(--ink2); margin-bottom: 26px; }
.auth-card .form { gap: 18px; }
.auth-card .below { margin-top: 22px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink3); }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .strata { min-height: 200px; gap: 24px; padding-bottom: 88px; }
  .strata .layers { height: 72px; }
  .strata h2 { font-size: 32px; }
  .strata .foot { display: none; }
}

/* audit / timeline */
.log { list-style: none; margin: 0; padding: 6px 22px 14px; }
.log li { display: grid; grid-template-columns: 12px 1fr auto; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line2); }
.log li:last-child { border-bottom: 0; }
.log li::before { content: ""; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--ink3); }
.log li.ok::before { background: var(--ok); }
.log li.warn::before { background: var(--accent); }
.log li.err::before { background: var(--err); }
.log time { font-size: 13px; color: var(--ink3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.log .sub { display: block; font-size: 13px; color: var(--ink3); }
code, .mono { font: 500 13px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
code { padding: 1px 6px; border-radius: 6px; background: var(--line2); }

.htmx-request { opacity: .6; transition: opacity .2s; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* sign-in through the firm's account */
.auth-card .sso { display: grid; gap: 10px; margin-top: 18px; }
.auth-card .email-login { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.auth-card .email-login summary { cursor: pointer; color: var(--ink2); font-size: 14.5px; }
.auth-card .email-login[open] summary { margin-bottom: 8px; }
.actions.inline { flex-wrap: nowrap; }
.actions.inline select { width: auto; min-width: 0; }

/* Laboratoř tab: tiles that filter, changes as cards with their colour */
.filters .stat { display: block; color: var(--ink); text-decoration: none; }
.filters .stat:hover { border-color: var(--accent); }
.filters .stat[aria-current="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); box-shadow: inset 0 0 0 1px var(--accent); }
.changes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.changes li > a, .changes li > div { display: grid; grid-template-columns: 6px 1fr auto; gap: 4px 16px; align-items: center; padding: 14px 18px 14px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-decoration: none; overflow: hidden; }
.changes li > a:hover { border-color: var(--accent); color: var(--ink); }
.changes li > a::before, .changes li > div::before { content: ""; grid-row: 1 / span 2; align-self: stretch; margin: -14px 0; background: var(--line); }
.changes .sev-green::before { background: var(--ok); }
.changes .sev-orange::before { background: var(--accent); }
.changes .sev-red::before { background: var(--err); }
.changes b { font: 700 16px/1.25 var(--disp); min-width: 0; }
.changes .meta { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--ink3); min-width: 0; }
.changes .state { grid-row: 1 / span 2; grid-column: 3; justify-self: end; }
@media (max-width: 560px) {
  .changes li > a, .changes li > div { grid-template-columns: 6px 1fr; }
  .changes .state { grid-row: auto; grid-column: 2; justify-self: start; }
}

/* Laboratoř: changes grouped by app, an app's page, a colleague's approval. */
.app-group { display: grid; gap: 10px; }
.group-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.group-head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.group-head h2 a { color: var(--ink); text-decoration: none; }
.group-head h2 a:hover { color: var(--accent); }
.plain-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* Taking photos: the "capture" template and /static/capture.js. Without
   the script the inputs stay plain file inputs. */
.capture { display: grid; gap: 12px; }
.capture-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.capture-pick label { position: relative; flex: 1 1 200px; min-height: 52px; font-size: 16px; }
html:not(.capture-js) .capture-pick label { display: grid; justify-items: start; min-height: 0; padding: 0; background: none; color: var(--ink); border-color: transparent; }
.capture-js .capture-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.capture-pick label:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.capture-pick label:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.capture-pages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.capture-pages li { display: grid; gap: 6px; justify-items: start; align-content: start; }
.capture-pages img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--sand); }
.capture-file { width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: 13.5px; overflow-wrap: anywhere; }
.capture-progress { width: 100%; height: 8px; accent-color: var(--btn); }
.capture-pages[hidden], .capture-progress[hidden], .capture-status:empty { display: none; }
