/* ============================================================ tokens ==== */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --text: #1a1f26;
  --text-dim: #5b6672;
  --text-faint: #8b95a1;
  --border: #dfe4ea;
  --border-strong: #c6ced8;
  --accent: #146c43;
  --danger: #b42318;
  --mark: #ffe58a;
  --mark-text: #4a3a00;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 18px -8px rgba(16, 24, 40, .16);
  --radius: 14px;
  --tap: 44px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1116;
    --surface: #161b22;
    --surface-2: #1b212a;
    --text: #e6edf3;
    --text-dim: #9aa7b4;
    --text-faint: #6e7b89;
    --border: #262e39;
    --border-strong: #37414e;
    --accent: #46c88a;
    --danger: #f4776a;
    --mark: #6b5300;
    --mark-text: #ffeaa0;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -10px rgba(0, 0, 0, .6);
  }
}

:root[data-theme="dark"] {
  --bg: #0e1116;
  --surface: #161b22;
  --surface-2: #1b212a;
  --text: #e6edf3;
  --text-dim: #9aa7b4;
  --text-faint: #6e7b89;
  --border: #262e39;
  --border-strong: #37414e;
  --accent: #46c88a;
  --danger: #f4776a;
  --mark: #6b5300;
  --mark-text: #ffeaa0;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -10px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  padding-bottom: env(safe-area-inset-bottom);
  overscroll-behavior-y: none;
}

button, input { font: inherit; color: inherit; }

/* ---------------------------------------------------------- no zoom-on-tap
   iOS Safari zooms the whole viewport when you focus a field whose font-size
   is under 16px, which then shoves the sticky header off screen. Every
   focusable text surface therefore stays at 16px on touch devices. Do not
   lower these without checking on a real phone; `user-scalable=no` is the
   other way to stop it, but that also kills pinch-zoom, which is worse. */
#search,
.dlg input { font-size: 16px; }

@media (pointer: coarse) {
  [contenteditable] { font-size: 16px; }
  /* These carry their own font-size later in the file, so they need the
     higher-specificity [contenteditable] form to be overridden. */
  .c-en[contenteditable],
  .c-note[contenteditable],
  .extra-val[contenteditable],
  .cat-title[contenteditable] { font-size: 16px; }
}

/* =========================================================== top bar ==== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-row-main { justify-content: space-between; }

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-text { min-width: 0; }
/* Full-colour illustration, not a stroke icon — it carries its own fills, so
   it must NOT get the .ico class (which sets fill:none/stroke:currentColor). */
.brand-ico {
  width: 36px; height: 36px;
  flex: none;
}
@media (max-width: 380px) {
  .brand-ico { width: 30px; height: 30px; }
}

.brand h1 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.2;
}
.brand p {
  margin: 1px 0 0;
  font-size: .72rem;
  color: var(--text-faint);
  letter-spacing: .02em;
}

.bar-right { display: flex; align-items: center; gap: 8px; flex: none; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  font-size: 1.05rem;
  cursor: pointer;
}
.icon-btn:active { transform: scale(.94); }

.lock-btn {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 1.05rem;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.lock-btn:active { transform: scale(.96); }
body.editing .lock-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.editing .lock-btn { color: #06231a; }
}
:root[data-theme="dark"] body.editing .lock-btn { color: #06231a; }

.bar-row-tools { flex-wrap: wrap; gap: 8px; }

.search-wrap {
  position: relative;
  flex: 1 1 220px;
  min-width: 0;
  display: flex;
  align-items: center;
}
.search-ico {
  position: absolute; left: 11px;
  color: var(--text-faint);
}
#search {
  width: 100%;
  height: 40px;
  padding: 0 38px 0 32px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  -webkit-appearance: none;
  appearance: none;
}
#search::-webkit-search-cancel-button { display: none; }
#search:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
/* `display` in a class rule beats the UA rule for [hidden], so restore it. */
.clear-btn[hidden] { display: none; }
.clear-btn {
  position: absolute; right: 4px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 0; background: none;
  color: var(--text-dim);
  border-radius: 8px;
  cursor: pointer;
}

.col-toggles {
  display: flex; align-items: center; gap: 6px;
  flex: 0 0 auto;
}
.toggles-label {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-faint);
  font-weight: 700;
}
.chip {
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-dim);
  font-size: .76rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .14s, color .14s, border-color .14s, opacity .14s;
}
.chip[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--surface);
}
.chip[aria-pressed="false"] { opacity: .65; text-decoration: line-through; }
.chip:active { transform: scale(.95); }

.chip-short { display: none; }

/* ---------------------------------------------------------------- icons -- */
.ico {
  width: 20px; height: 20px;
  flex: none;
  stroke: currentColor;
  fill: none;
  pointer-events: none;
}
.ico-sm { width: 16px; height: 16px; }
.ico-xs { width: 13px; height: 13px; }

.mini-btn {
  height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: .76rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.mini-btn:hover { border-color: var(--border-strong); color: var(--text); }
.mini-btn:active { transform: scale(.96); }

.primary-btn {
  height: 38px; padding: 0 16px;
  border-radius: 9px; border: 1px solid var(--accent);
  background: var(--accent); color: #fff;
  font-weight: 600; cursor: pointer;
}
.danger-btn {
  height: 38px; padding: 0 16px;
  border-radius: 9px; border: 1px solid var(--danger);
  background: var(--danger); color: #fff;
  font-weight: 600; cursor: pointer;
}

.edit-only { display: none; }
body.editing .edit-only { display: inline-flex; align-items: center; }

/* Per-category colour ramp. These MUST be declared on the element that carries
   --h (the .cat itself): a var() inside a custom property is substituted where
   that property is declared, so declaring them on :root would resolve --h as
   undefined and make every one of them invalid. */
.cat {
  --cat-line: hsl(var(--h) 64% 44%);
  --cat-text: hsl(var(--h) 62% 25%);
  --cat-bg: hsl(var(--h) 66% 89%);
  --cat-bg-2: hsl(var(--h) 62% 96%);
  --cat-edge: hsl(var(--h) 48% 78%);
  --cat-chip: hsl(var(--h) 60% 33%);
  --cat-hover: color-mix(in srgb, var(--cat-line) 9%, var(--surface));
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cat {
    --cat-line: hsl(var(--h) 58% 55%);
    --cat-text: hsl(var(--h) 72% 76%);
    --cat-bg: hsl(var(--h) 42% 21%);
    --cat-bg-2: hsl(var(--h) 34% 15%);
    --cat-edge: hsl(var(--h) 34% 32%);
    --cat-chip: hsl(var(--h) 64% 64%);
    --cat-hover: color-mix(in srgb, var(--cat-line) 14%, var(--surface));
  }
}

:root[data-theme="dark"] .cat {
  --cat-line: hsl(var(--h) 58% 55%);
  --cat-text: hsl(var(--h) 72% 76%);
  --cat-bg: hsl(var(--h) 42% 21%);
  --cat-bg-2: hsl(var(--h) 34% 15%);
  --cat-edge: hsl(var(--h) 34% 32%);
  --cat-chip: hsl(var(--h) 64% 64%);
  --cat-hover: color-mix(in srgb, var(--cat-line) 14%, var(--surface));
}

/* ======================================================== categories ==== */
.cats {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 12px 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--cat-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  scroll-margin-top: calc(var(--topbar-h, 92px) + 10px);
}

.r { scroll-margin-top: calc(var(--topbar-h, 92px) + 10px); }

.cat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  background: var(--cat-bg);
  border: 0;
  border-bottom: 1px solid transparent;
  text-align: left;
  cursor: pointer;
  min-height: var(--tap);
}
.cat[data-open="true"] .cat-head { border-bottom-color: var(--cat-edge); }

.cat-caret {
  flex: none;
  display: grid; place-items: center;
  color: var(--cat-line);
  transition: transform .18s ease;
  transform: rotate(-90deg);
}
.cat[data-open="true"] .cat-caret { transform: rotate(0deg); }

.cat-title {
  flex: 1;
  min-width: 0;
  font-size: .93rem;
  font-weight: 700;
  color: var(--cat-text);
  letter-spacing: -.005em;
  overflow-wrap: anywhere;
}
.cat-count {
  flex: none;
  font-size: .7rem;
  font-weight: 700;
  color: var(--cat-chip);
  background: color-mix(in srgb, var(--cat-line) 14%, transparent);
  border-radius: 999px;
  padding: 2px 8px;
}

.peek-btn {
  flex: none;
  display: inline-flex; align-items: center; gap: 4px;
  height: 26px;
  padding: 0 9px 0 7px;
  border-radius: 999px;
  border: 1px dashed var(--cat-edge);
  background: none;
  color: var(--cat-chip);
  font-size: .7rem;
  font-weight: 700;
  cursor: pointer;
}
.peek-btn:hover { background: var(--cat-hover); border-style: solid; }
.peek-btn[aria-pressed="true"] {
  border-style: solid;
  background: var(--cat-line);
  color: var(--surface);
}
.peek-btn:active { transform: scale(.95); }

.cat-body { display: none; }
.cat[data-open="true"] .cat-body { display: block; }

/* ============================================================= table ==== */
.tbl { --cols: 1.15fr 1fr 1.3fr; }

.r {
  display: grid;
  grid-template-columns: var(--cols);
  gap: 0 10px;
  align-items: start;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  /* Vertical scrolling stays native; horizontal is ours (swipe to hide). */
  touch-action: pan-y;
  transition: transform .2s ease, background-color .15s ease;
}
/* No easing while the finger is down - the row must track the pointer. */
.r.dragging { transition: none; user-select: none; cursor: grabbing; }
.r.will-hide { background: color-mix(in srgb, var(--accent) 22%, var(--surface)) !important; }


.thead {
  background: var(--cat-bg-2);
  border-bottom: 1px solid var(--cat-edge);
  padding-top: 6px;
  padding-bottom: 6px;
}
.th {
  display: flex; align-items: center; gap: 4px;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cat-text);
  min-width: 0;
}
.th-x {
  display: grid; place-items: center;
  border: 0; background: none; cursor: pointer;
  color: inherit; opacity: .55;
  padding: 3px; border-radius: 4px;
}
.th-x:hover { opacity: 1; }

.rows .r { background: var(--surface); }
.rows .r-slot:nth-child(even) .r { background: var(--surface-2); }
.rows .r:hover { background: var(--cat-hover); }

/* ------------------------------------------------- swipe reveal layer --- */
.r-slot {
  position: relative;
  --swipe: 0;               /* 0..1, set from JS as the row is dragged */
  overflow: hidden;
}
.r-slot:last-child .r { border-bottom: 0; }

/* Sits under the row. The row is opaque, so this only becomes visible where
   the row has slid away from it. */
.r-reveal {
  position: absolute;
  top: 0; bottom: 0;
  display: flex;
  align-items: center;
  padding: 0 20px;
  pointer-events: none;
  opacity: calc(var(--swipe) * 1.15);
}
.r-reveal .ico {
  width: 22px; height: 22px;
  transform: scale(calc(.65 + var(--swipe) * .35));
  transition: transform .12s ease;
}
.r-reveal-right { right: 0; color: var(--text-faint); }
.r-reveal-left  { left: 0;  color: var(--accent); }

.r-slot.will-commit .r-reveal-right { color: var(--danger); }
.r-slot.will-commit .r-reveal .ico { transform: scale(1.15); }

/* -------------------------------------------------- hidden (learned) ---- */
.r.is-hidden .c-de,
.r.is-hidden .c-en,
.r.is-hidden .c-note,
.r.is-hidden .extra-val { color: var(--text-faint); }
.r.is-hidden .c-de { font-weight: 500; }
.rows .r.is-hidden { background: var(--surface-2); }
.rows .r-slot:nth-child(even) .r.is-hidden { background: var(--surface); }
.hidden-mark { display: grid; place-items: center; color: var(--text-faint); padding: 4px 2px; }

.c { min-width: 0; overflow-wrap: break-word; }
/* German compounds get long; let them hyphenate rather than blow out the grid */
.c-de { font-weight: 650; color: var(--text); hyphens: auto; -webkit-hyphens: auto; }
.c-en { color: var(--text-dim); font-size: .93em; }
.c-note { color: var(--text-faint); font-size: .86em; line-height: 1.4; }

.c:empty::before { content: "—"; color: var(--text-faint); opacity: .5; }

.gutter {
  display: flex; align-items: flex-start; justify-content: flex-end;
  gap: 2px;
  margin-top: -2px;
}
.row-caret {
  display: grid; place-items: center;
  border: 0; background: none; cursor: pointer;
  color: var(--text-faint);
  padding: 4px; border-radius: 6px;
  transition: transform .18s ease;
  transform: rotate(-90deg);
}
.row-caret .ico { width: 15px; height: 15px; }
.r[data-open="true"] .row-caret { transform: rotate(0deg); }

.del-btn {
  display: grid; place-items: center;
  border: 1px solid transparent; background: none; cursor: pointer;
  color: var(--danger);
  padding: 5px; border-radius: 7px;
}
.del-btn:hover { border-color: var(--danger); }

.extra {
  grid-column: 1 / -1;
  margin-top: 7px;
  padding: 8px 10px;
  border-left: 3px solid var(--cat-edge);
  background: color-mix(in srgb, var(--cat-line) 6%, transparent);
  border-radius: 0 8px 8px 0;
  display: flex; flex-direction: column; gap: 6px;
}
.extra-item { min-width: 0; }
.extra-label {
  display: block;
  font-size: .6rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--cat-chip);
  margin-bottom: 1px;
}
.extra-val { overflow-wrap: anywhere; font-size: .9em; color: var(--text-dim); }

mark { background: var(--mark); color: var(--mark-text); border-radius: 3px; padding: 0 1px; }

/* ====================================================== edit affordances */
body.editing [contenteditable] {
  outline: 1px dashed var(--border-strong);
  outline-offset: 3px;
  border-radius: 3px;
  min-height: 1.3em;
  cursor: text;
}
body.editing [contenteditable]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
[contenteditable]:empty::before {
  content: attr(data-placeholder);
  color: var(--text-faint);
  opacity: .6;
}

.cat-tools { display: none; align-items: center; gap: 4px; flex: none; }
body.editing .cat-tools { display: flex; }

.hue-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--cat-edge);
  background: var(--cat-line);
  cursor: pointer;
  padding: 0;
}
.hue-pop {
  display: flex; flex-wrap: wrap; gap: 7px;
  padding: 10px 12px;
  background: var(--cat-bg-2);
  border-bottom: 1px solid var(--cat-edge);
}
.hue-swatch {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer; padding: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}
.hue-swatch[aria-pressed="true"] { border-color: var(--text); }

/* Full-width dashed card at the end of the category list, in edit mode. */
.add-cat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 20px 16px;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  background: none;
  color: var(--text-dim);
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.add-cat:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.add-cat:active { transform: scale(.99); }

.peek-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  background: color-mix(in srgb, var(--cat-line) 8%, transparent);
  border-bottom: 1px solid var(--cat-edge);
  font-size: .72rem;
  color: var(--cat-chip);
  font-weight: 600;
}
.peek-all {
  flex: none;
  border: 1px solid var(--cat-edge);
  background: var(--surface);
  color: var(--cat-chip);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
}
.peek-all:active { transform: scale(.96); }

.add-row {
  display: none;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-top: 1px dashed var(--border-strong);
  background: none;
  color: var(--cat-chip);
  font-size: .8rem; font-weight: 700;
  cursor: pointer;
  text-align: left;
}
body.editing .add-row { display: flex; }
.add-row:hover { background: var(--cat-hover); }

.r.is-new { animation: pop .45s ease; }
@keyframes pop {
  from { background: color-mix(in srgb, var(--accent) 22%, transparent); }
}

/* ============================================================= misc ===== */
.empty-state {
  max-width: 1180px;
  margin: 8px auto;
  padding: 30px 16px;
  text-align: center;
}
.muted { color: var(--text-dim); font-size: .88rem; }

.foot {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 12px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: .74rem;
  color: var(--text-faint);
}
.foot-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap;
}
.foot-actions { display: flex; gap: 8px; }

.credit {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: .72rem;
  letter-spacing: .03em;
  color: var(--text-faint);
}
.foot-actions .mini-btn { gap: 5px; }

.icon-btn-sm { width: 36px; height: 36px; border-radius: 9px; }
.icon-btn-sm .ico { width: 18px; height: 18px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 90;
  max-width: min(92vw, 420px);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: .8rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  text-align: center;
}
.toast[data-kind="error"] { background: var(--danger); color: #fff; }

.toast-action {
  margin-left: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: none;
  color: inherit;
  font-size: .76rem;
  font-weight: 700;
  cursor: pointer;
}
.toast-action:active { transform: scale(.95); }

.dlg {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 20px;
  width: min(92vw, 380px);
  box-shadow: var(--shadow);
}
.dlg::backdrop { background: rgba(8, 12, 18, .55); backdrop-filter: blur(2px); }
.dlg h2 { margin: 0 0 4px; font-size: 1.05rem; }
.dlg input {
  width: 100%; height: 42px; margin-top: 14px;
  padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
}
.dlg menu {
  display: flex; justify-content: flex-end; gap: 8px;
  margin: 18px 0 0; padding: 0;
}
.dlg menu .mini-btn { height: 38px; padding: 0 14px; }
.dlg-error { color: var(--danger); font-size: .8rem; margin: 8px 0 0; }

/* ========================================================= responsive === */
@media (max-width: 620px) {
  body { font-size: 14.5px; }
  .brand h1 { font-size: .95rem; }
  .brand p { font-size: .68rem; }
  .toggles-label { display: none; }
  .chip-long { display: none; }
  .chip-short { display: inline; }
  .search-wrap { flex: 1 1 130px; }
  #search { height: 36px; }
  .chip { height: 36px; padding: 0 10px; }
  .r { padding: 9px 10px; gap: 0 8px; }
  .cats { padding: 10px 8px 4px; }
  .cat { border-radius: 12px; }
  .topbar-inner { gap: 7px; padding: 7px 10px 8px; }
}

/* very narrow phones: drop the subtitle so the sticky bar stays two rows */
@media (max-width: 380px) {
  .brand p { display: none; }
  .bar-right { gap: 6px; }
}

@media (min-width: 900px) {
  body { font-size: 15.5px; }
  .topbar-inner { padding: 10px 20px 12px; }
  .cats { padding: 18px 20px 4px; }
  .r { padding: 11px 16px; gap: 0 16px; }
  .thead { padding-top: 8px; padding-bottom: 8px; }
  .cat-head { padding: 13px 16px; }
  .cat-title { font-size: 1rem; }
  .add-row { padding: 12px 16px; }
}

@media (hover: none) {
  .rows .r:hover { background: inherit; }
  .rows .r:nth-child(even):hover { background: var(--surface-2); }
}

@media print {
  .topbar, .foot, .toast, .gutter, .add-row { display: none !important; }
  .cat, .cat-body { display: block !important; }
  body { background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
