/* Critter Chaos report server – dark by default, light via [data-theme="light"]. No external fonts. */
:root {
  --bg: #1a1613;
  --surface: #241f1a;
  --surface-2: #2e2721;
  --surface-3: #3a3129;
  --border: #3d342b;
  --text: #f3eadf;
  --muted: #a8998a;
  --accent: #f29a45;
  --accent-strong: #ff8a1f;
  --accent-soft: rgba(242, 154, 69, .16);
  --accent-text: #1a1613;
  --link: #ffc27d;
  --ok: #7cc47f;
  --ok-soft: rgba(124, 196, 127, .16);
  --warn: #f2c94c;
  --warn-soft: rgba(242, 201, 76, .16);
  --bad: #ef6a5a;
  --bad-soft: rgba(239, 106, 90, .18);
  --info: #7fb2f0;
  --info-soft: rgba(127, 178, 240, .16);
  --violet: #b79cf2;
  --violet-soft: rgba(183, 156, 242, .16);
  --grey-soft: rgba(168, 153, 138, .16);
  --code-bg: #15120f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .18);
  --radius: 10px;
  --mono: ui-monospace, "Cascadia Mono", "Cascadia Code", Consolas, "DejaVu Sans Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Noto Sans", sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #faf5ec;
  --surface: #ffffff;
  --surface-2: #f5ede1;
  --surface-3: #eadfcf;
  --border: #e3d7c5;
  --text: #2b231b;
  --muted: #7b6b5a;
  --accent: #d9731f;
  --accent-strong: #c25f0c;
  --accent-soft: rgba(217, 115, 31, .13);
  --accent-text: #ffffff;
  --link: #b4560a;
  --ok: #2f8a3a;
  --ok-soft: rgba(47, 138, 58, .12);
  --warn: #a87a00;
  --warn-soft: rgba(214, 160, 0, .16);
  --bad: #c8382a;
  --bad-soft: rgba(200, 56, 42, .12);
  --info: #2c6cb8;
  --info-soft: rgba(44, 108, 184, .12);
  --violet: #6f4cc4;
  --violet-soft: rgba(111, 76, 196, .12);
  --grey-soft: rgba(123, 107, 90, .14);
  --code-bg: #f7f1e7;
  --shadow: 0 1px 2px rgba(80, 60, 30, .08), 0 4px 16px rgba(80, 60, 30, .06);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: .2em 0 .6em; }
h2 { font-size: 1.1rem; margin: 0 0 .6em; }
h3 { font-size: .95rem; margin: 1.1em 0 .4em; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
code, kbd, pre { font-family: var(--mono); font-size: .88em; }
code { background: var(--code-bg); padding: .1em .35em; border-radius: 5px; border: 1px solid var(--border); }
kbd { border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 .3em; }
pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; padding: .8em 1em; overflow: auto; max-height: 34em; margin: .4em 0; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.inline { display: inline; margin: 0; }
.spacer { flex: 1; }

/* ---------------------------------------------------------------- layout */
.topbar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .6rem 1.2rem; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; color: var(--text); font-size: 1.05rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); }
.brand-sub { color: var(--accent); font-weight: 500; }
.topnav { display: flex; gap: .25rem; }
.topnav a { padding: .35rem .7rem; border-radius: 8px; color: var(--muted); }
.topnav a.active, .topnav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.topbar-right { margin-left: auto; display: flex; gap: .4rem; align-items: center; }
.container { max-width: 1100px; margin: 0 auto; padding: 1rem 1.2rem 3rem; }
.container.wide { max-width: 1500px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.flash { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 8px; padding: .55rem .9rem; margin-bottom: 1rem; }
.flash.error { background: var(--bad-soft); border-color: var(--bad); }
.hint { background: var(--surface-2); border-left: 3px solid var(--accent); padding: .5rem .8rem; border-radius: 0 8px 8px 0; font-size: .9rem; }

/* ---------------------------------------------------------------- buttons & forms */
.btn {
  display: inline-flex; align-items: center; gap: .35em; font: inherit; font-weight: 600; cursor: pointer;
  padding: .45rem .9rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); white-space: nowrap;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { background: var(--accent-strong); }
.btn.ghost { background: transparent; }
.btn.small { padding: .25rem .6rem; font-size: .85rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
input[type=text], input[type=search], input[type=password], select, textarea {
  font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: .4rem .6rem; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; color: var(--muted); }
label.check, label.inline-label { flex-direction: row; align-items: center; gap: .35rem; color: var(--text); }
.stack { display: flex; flex-direction: column; gap: .7rem; }
.stack .btn { align-self: flex-start; }

.login-card { max-width: 380px; margin: 4rem auto; }
.login-card form { display: flex; flex-direction: column; gap: .7rem; }

/* ---------------------------------------------------------------- list page */
.counters { display: flex; gap: .7rem; flex-wrap: wrap; margin-bottom: .8rem; }
.counter {
  flex: 1 1 140px; display: flex; flex-direction: column; padding: .7rem 1rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow);
}
.counter:hover { text-decoration: none; border-color: var(--accent); }
.counter-n { font-size: 1.7rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.counter-l { color: var(--muted); font-size: .85rem; }
.counter.accent .counter-n { color: var(--accent); }
.counter.danger .counter-n { color: var(--bad); }
.counter.ok .counter-n { color: var(--ok); }
.counter.muted-c .counter-n { color: var(--muted); }

.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.chip {
  display: inline-flex; align-items: center; gap: .3em; padding: .2rem .7rem; border-radius: 999px; font: inherit; font-size: .85rem;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); cursor: pointer; white-space: nowrap;
}
.chip:hover { border-color: var(--accent); text-decoration: none; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); }

.filters { padding: .8rem 1rem; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.filter-grid .grow { grid-column: span 2; }
.filter-actions { display: flex; gap: .6rem; align-items: center; margin-top: .7rem; flex-wrap: wrap; }

.bulk-bar {
  display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; padding: .5rem .8rem; margin-bottom: .6rem;
  border-radius: 8px; background: var(--surface-2); border: 1px dashed var(--border); font-size: .9rem;
}
.bulk-bar.active { border-color: var(--accent); border-style: solid; }
.bulk-bar select { width: auto; }

table { border-collapse: collapse; width: 100%; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.table-wrap .reports { box-shadow: none; }
.reports { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.reports th, .reports td { padding: .5rem .55rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.reports th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.reports th a { color: inherit; }
.reports tbody tr { cursor: pointer; }
.reports tbody tr:hover { background: var(--surface-2); }
.reports tbody tr.is-new td:nth-child(2) { box-shadow: inset 3px 0 0 var(--accent); }
.reports tr.checked { background: var(--accent-soft); }
.reports .sel { width: 2rem; }
.reports .title-cell { min-width: 14rem; }
.reports .title-cell a { color: var(--text); font-weight: 600; }
.code { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.tags { color: var(--muted); }
.crash-mark { margin-left: .2em; color: var(--bad); font-weight: 700; font-family: var(--mono); }
.empty { text-align: center; padding: 2.5rem; color: var(--muted); }
.pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1rem; }

/* badges */
.badge {
  display: inline-block; padding: .08rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap;
  background: var(--grey-soft); color: var(--text); border: 1px solid transparent;
}
.st-new { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.st-confirmed { background: var(--info-soft); color: var(--info); }
.st-in_progress { background: var(--violet-soft); color: var(--violet); }
.st-fixed { background: var(--ok-soft); color: var(--ok); }
.st-wontfix, .st-duplicate, .st-cannot_reproduce { background: var(--grey-soft); color: var(--muted); }
.st-need_info { background: var(--warn-soft); color: var(--warn); }
.sev-minor { background: var(--grey-soft); color: var(--muted); }
.sev-annoying { background: var(--warn-soft); color: var(--warn); }
.sev-serious { background: var(--bad-soft); color: var(--bad); }
.sev-blocker { background: var(--bad); color: #fff; }
.prio-P1 { background: var(--bad); color: #fff; }
.prio-P2 { background: var(--accent-soft); color: var(--accent); }
.prio-P3 { background: var(--info-soft); color: var(--info); }
.prio-P4 { background: var(--grey-soft); color: var(--muted); }
.badge.tag { background: transparent; border-color: var(--border); color: var(--muted); }
.badge.cat, .badge.freq { background: var(--surface-2); border-color: var(--border); }
.kind-b-crash { background: var(--bad-soft); color: var(--bad); }
.kind-b-abnormal_exit { background: var(--warn-soft); color: var(--warn); }
.kind { display: inline-block; width: 1.3em; text-align: center; font-weight: 700; }
.kind-manual { color: var(--muted); }
.kind-crash { color: var(--bad); }
.kind-abnormal_exit { color: var(--warn); }

/* ---------------------------------------------------------------- detail page */
.detail-nav { display: flex; gap: .5rem; align-items: center; margin-bottom: .7rem; }
.report-head { position: relative; }
.report-code { font-family: var(--mono); color: var(--accent); font-weight: 700; }
.report-title { margin: .1em 0 .4em; font-size: 1.45rem; overflow-wrap: anywhere; }
.badges { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; }
.meta { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-size: .9rem; }
.head-actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .8rem; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.detail-side { position: sticky; top: 4.2rem; max-height: calc(100vh - 5rem); overflow: auto; }
.detail-side .card h2 { margin-bottom: .5rem; }
.detail-side h3 { margin-top: .8rem; }

.section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .8rem; box-shadow: var(--shadow); }
.section > summary {
  cursor: pointer; padding: .7rem 1.1rem; font-weight: 700; list-style: none; display: flex; align-items: center; gap: .5rem;
  border-radius: var(--radius); user-select: none;
}
.section > summary::-webkit-details-marker { display: none; }
.section > summary::before { content: "▸"; color: var(--accent); transition: transform .15s; display: inline-block; }
.section[open] > summary::before { transform: rotate(90deg); }
.section[open] > summary { border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.section-body { padding: .8rem 1.1rem 1rem; overflow-wrap: anywhere; }
.section.crash > summary { color: var(--bad); }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 1.5rem; }

.user-text { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border-radius: 8px; padding: .6rem .8rem; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .35rem 1rem; margin: .6rem 0 0; }
.kv { display: flex; flex-direction: column; min-width: 0; }
.kv dt { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.kv dd { margin: 0; overflow-wrap: anywhere; }

.shots { display: flex; flex-wrap: wrap; gap: .6rem; }
.shots img { max-width: 100%; max-height: 520px; border-radius: 8px; border: 1px solid var(--border); display: block; }

.field-label { margin: .2rem 0 .1rem; }
.copy-row { display: flex; gap: .5rem; align-items: stretch; margin: .2rem 0 .7rem; }
.copy-row code { flex: 1; padding: .45rem .7rem; font-size: .9rem; overflow-x: auto; white-space: nowrap; display: flex; align-items: center; }
.btn.copied { background: var(--ok); border-color: var(--ok); color: #fff; }
.save-list { padding-left: 1.2rem; }
.save-list li { margin: .2rem 0; }

.error-line { color: var(--bad); white-space: pre-wrap; }
.callstack { font-size: .8rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.data td.title-col { min-width: 16rem; }
.filters-box > summary { display: none; list-style: none; margin-bottom: .6rem; }
.filters-box > summary::-webkit-details-marker { display: none; }
.small-pre { font-size: .8rem; max-height: 24em; }

.stat-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .6rem; }
.stat { flex: 1 1 130px; background: var(--surface-2); border-radius: 8px; padding: .5rem .8rem; display: flex; flex-direction: column; }
.stat-n { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-l { font-size: .78rem; color: var(--muted); }

.chart { margin: .4rem 0 0; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 11px var(--sans); }
.chart .axis.ms { fill: var(--muted); opacity: .8; }
.chart .legend-fps { fill: var(--accent); font-weight: 700; }
.chart .axis-line { stroke: var(--muted); stroke-width: 1; }
.chart .bar { fill: var(--surface-3); }
.chart .bar.warn { fill: var(--warn); opacity: .55; }
.chart .bar.bad { fill: var(--bad); opacity: .75; }
.chart .hitch { stroke: var(--violet); stroke-width: 1.5; stroke-dasharray: 3 3; }
.chart .ref60 { stroke: var(--ok); stroke-width: 1; stroke-dasharray: 2 4; opacity: .7; }
.chart .ref30 { stroke: var(--bad); stroke-width: 1; stroke-dasharray: 2 4; opacity: .7; }
.chart .fps { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.hitch-list { columns: 2 220px; padding-left: 1.1rem; margin: .3rem 0; }

.tl-controls { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; margin-bottom: .5rem; }
.tl-controls input[type=search] { flex: 1 1 200px; width: auto; }
.tl-cats { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .6rem; }
.cat-chip { font-size: .72rem; padding: .05rem .5rem; }
.cat-chip:not(.on) { opacity: .4; }
.timeline .cat-chip { cursor: default; }
.chip.cat-chip.cat-0 { background: rgba(242, 154, 69, .2); border-color: rgba(242, 154, 69, .5); }
.chip.cat-chip.cat-1 { background: rgba(127, 178, 240, .2); border-color: rgba(127, 178, 240, .5); }
.chip.cat-chip.cat-2 { background: rgba(124, 196, 127, .2); border-color: rgba(124, 196, 127, .5); }
.chip.cat-chip.cat-3 { background: rgba(183, 156, 242, .2); border-color: rgba(183, 156, 242, .5); }
.chip.cat-chip.cat-4 { background: rgba(239, 106, 90, .2); border-color: rgba(239, 106, 90, .5); }
.chip.cat-chip.cat-5 { background: rgba(242, 201, 76, .2); border-color: rgba(242, 201, 76, .5); }
.chip.cat-chip.cat-6 { background: rgba(90, 200, 200, .2); border-color: rgba(90, 200, 200, .5); }
.chip.cat-chip.cat-7 { background: rgba(230, 130, 190, .2); border-color: rgba(230, 130, 190, .5); }
.chip.cat-chip.cat-in { background: var(--grey-soft); border-color: var(--border); }
.timeline { list-style: none; margin: 0; padding: 0; max-height: 32em; overflow: auto; border: 1px solid var(--border); border-radius: 8px; font-size: .85rem; }
.tl-row { display: grid; grid-template-columns: 5.5em auto 1fr; gap: .6rem; align-items: baseline; padding: .18rem .6rem; border-bottom: 1px solid var(--border); }
.tl-row:last-child { border-bottom: 0; }
.tl-row.tl-in { color: var(--muted); }
.tl-row.recent { background: var(--accent-soft); }
.tl-t { font-family: var(--mono); font-size: .8rem; text-align: right; color: var(--muted); }
.tl-msg { overflow-wrap: anywhere; font-family: var(--mono); font-size: .82rem; }

.track-wrap { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.track { width: 100%; max-width: 440px; height: auto; }
.track-bg { fill: var(--surface-2); stroke: var(--border); }
.track-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; opacity: .9; }
.track-dot { fill: var(--accent); }
.track-dot.old { opacity: .4; }
.track-start { fill: var(--surface); stroke: var(--muted); stroke-width: 2; }
.track-end { fill: var(--bad); stroke: var(--surface); stroke-width: 2; }
.track-aim { stroke: var(--bad); stroke-width: 3; stroke-linecap: round; }
.critter-dot { fill: var(--info); opacity: .85; }
.scale-bar { stroke: var(--text); stroke-width: 2; }
.track text.axis { fill: var(--muted); font: 11px var(--sans); }
.legend { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .3rem; }
.lg { display: inline-block; width: .8em; height: .8em; border-radius: 50%; vertical-align: middle; margin-right: .2em; }
.lg-start { border: 2px solid var(--muted); }
.lg-end { background: var(--bad); }
.lg-critter { background: var(--info); }

.data { font-size: .88rem; margin: .3rem 0; }
.data th, .data td { padding: .3rem .55rem; border-bottom: 1px solid var(--border); text-align: left; }
.data thead th { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.data td.num, .data th.num { text-align: right; }
.sortable th[data-sort] { cursor: pointer; user-select: none; }
.sortable th.sorted-asc::after { content: " ▲"; }
.sortable th.sorted-desc::after { content: " ▼"; }
.table-scroll { overflow-x: auto; }
.bar-cell { width: 45%; min-width: 80px; }
.progress { width: 100%; height: 8px; display: block; }
.pg-bg { fill: var(--surface-3); }
.pg-fg { fill: var(--accent); }
.pill-row { display: flex; flex-wrap: wrap; gap: .35rem; }
.pill { background: var(--surface-2); border: 1px solid var(--border); padding: .1rem .55rem; border-radius: 999px; font-size: .85rem; }

.log-tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .5rem; }
.log-controls { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; margin-bottom: .5rem; }
.log-controls input[type=search] { flex: 1 1 200px; width: auto; }
.log-body {
  font-family: var(--mono); font-size: .78rem; line-height: 1.4; background: var(--code-bg); border: 1px solid var(--border);
  border-radius: 8px; max-height: 38em; overflow: auto; padding: .3rem 0;
}
.log-line { display: grid; grid-template-columns: 4.5em 1fr; gap: .8em; padding: 0 .6em; white-space: pre-wrap; overflow-wrap: anywhere; }
.log-line .ln { color: var(--muted); text-align: right; user-select: none; opacity: .7; }
.log-line.lv-error { background: var(--bad-soft); color: var(--bad); }
.log-line.lv-warning { background: var(--warn-soft); color: var(--warn); }
.log-line mark { background: var(--accent); color: var(--accent-text); border-radius: 2px; }
.log-gap { text-align: center; color: var(--muted); padding: .4rem; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); margin: .3rem 0; font-family: var(--sans); }

.json { font-size: .78rem; }
.actions-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }

.note { border-bottom: 1px solid var(--border); padding: .4rem 0 .6rem; margin-bottom: .5rem; }
.note .user-text { padding: .4rem .6rem; font-size: .9rem; }
.mini-list { list-style: none; padding: 0; margin: .2rem 0; font-size: .86rem; }
.mini-list li { padding: .25rem 0; border-bottom: 1px solid var(--border); }
.mini-title { overflow-wrap: anywhere; }
.history { list-style: none; padding: 0; margin: 0; font-size: .85rem; }
.history li { padding: .25rem 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 1rem; }
.matrix th, .matrix td { text-align: center; }
.matrix th:first-child { text-align: left; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-side { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  .topbar { padding: .5rem .8rem; gap: .5rem; }
  .brand-sub { display: none; }
  .container { padding: .8rem .7rem 2.5rem; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .filters-box > summary { display: inline-flex; }
  .filter-grid .grow { grid-column: span 2; }
  /* the report table turns into cards */
  table.responsive, table.responsive tbody, table.responsive tr, table.responsive td { display: block; width: 100%; }
  table.responsive thead { display: none; }
  table.responsive { background: transparent; border: 0; box-shadow: none; }
  .table-wrap { overflow: visible; box-shadow: none; }
  table.responsive tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .6rem; padding: .5rem .7rem; position: relative; box-shadow: var(--shadow); }
  table.responsive td { border: 0; padding: .12rem 0; display: flex; gap: .6rem; }
  table.responsive td::before { content: attr(data-label); flex: 0 0 6.5rem; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
  table.responsive td.sel { position: absolute; right: .6rem; top: .5rem; width: auto; }
  table.responsive td.sel::before { content: none; }
  table.responsive td.num { text-align: left; }
  table.responsive td[data-label="Mellékletek"]:empty { display: none; }
  .reports .title-cell { min-width: 0; }
  .tl-row { grid-template-columns: 4.5em 1fr; }
  .tl-row .cat-chip { display: none; }
  .log-line { grid-template-columns: 3em 1fr; }
}
.hidden-copy { position: fixed; left: -9999px; top: 0; opacity: 0; }
