/* Matter Intelligence
   Hand-written, no framework. Restrained on purpose: this is a working tool for five
   people who need to read it quickly, not a marketing surface. Adapts to the reader's
   light/dark preference. */

:root {
  --bg:            #f6f6f4;
  --surface:       #ffffff;
  --surface-2:     #fafaf8;
  --border:        #e2e1dc;
  --border-strong: #cfcec7;
  --text:          #1c1c1a;
  --text-2:        #5c5b55;
  --text-3:        #8a8981;
  --accent:        #7a2e2e;   /* oxblood: legal, not corporate blue */
  --accent-soft:   #f3e9e9;
  --link:          #35566e;
  --ok:            #2f6b46;
  --ok-soft:       #e6f0e9;
  --warn:          #8a5a10;
  --warn-soft:     #f7eeda;
  --crit:          #99301f;
  --crit-soft:     #f8e6e2;
  --radius:        7px;
  --shadow:        0 1px 2px rgba(28, 28, 26, .05), 0 1px 3px rgba(28, 28, 26, .04);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #16161a;
    --surface:       #1e1e23;
    --surface-2:     #24242a;
    --border:        #32323a;
    --border-strong: #43434d;
    --text:          #e8e8e4;
    --text-2:        #a9a9a2;
    --text-3:        #7c7c76;
    --accent:        #d98d8d;
    --accent-soft:   #35262a;
    --link:          #8fb4cd;
    --ok:            #7cc39a;
    --ok-soft:       #1e2f26;
    --warn:          #d9ad63;
    --warn-soft:     #322a1a;
    --crit:          #e2897a;
    --crit-soft:     #35211f;
    --shadow:        0 1px 2px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 14px; }
p { margin: 0; }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--text-3); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ top bar */
.topbar {
  display: flex; align-items: center; gap: 28px;
  padding: 0 24px; height: 54px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  font-weight: 700; font-size: 11px; letter-spacing: .09em;
  background: var(--accent); color: #fff;
  padding: 4px 6px; border-radius: 4px;
}
@media (prefers-color-scheme: dark) { .brand-mark { color: #1e1e23; } }
.brand-name { font-weight: 600; font-size: 14px; }

.nav { display: flex; gap: 2px; }
.nav-link {
  padding: 6px 11px; border-radius: var(--radius);
  color: var(--text-2); font-weight: 500;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link.is-active { background: var(--accent-soft); color: var(--accent); }
.badge {
  display: inline-block; margin-left: 6px; padding: 1px 6px;
  background: var(--accent); color: #fff;
  border-radius: 9px; font-size: 11px; font-weight: 600;
}
@media (prefers-color-scheme: dark) { .badge { color: #1e1e23; } }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.search input, .filter-form input[type=search] {
  padding: 6px 10px; width: 200px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font-size: 13px; font-family: inherit;
}
.search input:focus, .filter-form input:focus, textarea:focus {
  outline: 2px solid var(--accent); outline-offset: -1px;
}
.user { color: var(--text-3); font-size: 13px; }

/* ------------------------------------------------------------------- banner */
.banner {
  background: var(--warn-soft);
  border-bottom: 1px solid var(--border);
  padding: 9px 24px;
  font-size: 12.5px; color: var(--warn);
  display: flex; flex-wrap: wrap; gap: 4px 26px;
}
.banner strong { font-weight: 650; }

/* --------------------------------------------------------------------- page */
.main { max-width: 1220px; margin: 0 auto; padding: 26px 24px 60px; }

.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 20px; margin-bottom: 22px;
}
.page-subtitle { color: var(--text-2); margin-top: 3px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 11px; }
.meta { font-size: 13px; }
.meta-label { color: var(--text-3); margin-right: 6px; }

.layout-split { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 940px) { .layout-split { grid-template-columns: 1fr; } }
.col-main, .col-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* --------------------------------------------------------------------- card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}
.col-main .card, .col-side .card { margin-bottom: 0; }
.card.is-inactive { background: var(--surface-2); box-shadow: none; }
.card-head { padding: 13px 16px; border-bottom: 1px solid var(--border); }
.card-head h2 { text-transform: uppercase; letter-spacing: .07em; font-size: 11.5px; color: var(--text-2); }
.card-count { color: var(--text-3); font-weight: 500; }
.card-subtitle { margin-top: 5px; font-size: 12.5px; color: var(--text-3); line-height: 1.45; }
.card-body { padding: 16px; }

.note { margin-top: 11px; font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.prose { line-height: 1.62; }

.empty { padding: 8px 0; }
.empty p { color: var(--text-2); }
.empty-hint { margin-top: 5px !important; font-size: 12.5px; color: var(--text-3); }

/* -------------------------------------------------------------------- stats */
.stat-row { display: flex; flex-wrap: wrap; gap: 12px; }
.stat {
  flex: 1 1 150px; min-width: 130px;
  padding: 13px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: block; color: inherit;
}
a.stat:hover { border-color: var(--border-strong); text-decoration: none; }
.stat-value { display: block; font-size: 25px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat-label { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-2); line-height: 1.35; }
.stat.is-inactive .stat-value { color: var(--text-3); }
.stat.is-warn .stat-value { color: var(--warn); }

/* -------------------------------------------------------------------- lists */
.list { list-style: none; margin: 0; padding: 0; }
.list-item {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.list-item:first-child { padding-top: 0; }
.list-compact .list-item { padding: 9px 0; }
.list-main { min-width: 0; }
.list-title { font-weight: 550; }
.list-detail { margin-top: 2px; font-size: 12.5px; color: var(--text-2); }
.list-side { text-align: right; white-space: nowrap; display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.date { font-variant-numeric: tabular-nums; font-size: 12.5px; }
.quote { margin-top: 5px; font-size: 12.5px; color: var(--text-3); font-style: italic; }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: 0; }
.check { color: var(--text-3); }
.check-title { font-weight: 500; }

.summary-status {
  display: inline-block; margin-bottom: 10px; padding: 2px 9px;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 3px; font-size: 11.5px; font-weight: 650;
  text-transform: uppercase; letter-spacing: .05em;
}
.summary-caveat {
  margin-bottom: 11px; padding: 8px 11px;
  background: var(--warn-soft); color: var(--warn);
  border-radius: var(--radius); font-size: 12.5px; line-height: 1.5;
}
.summary-block { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--border); }

/* How a date was arrived at, shown so a person can check the arithmetic rather than
   trust it. This is the whole point of confirming a deadline. */
.deadline-derivation {
  margin-top: 5px; padding: 6px 9px;
  background: var(--surface-2); border-left: 2px solid var(--warn);
  border-radius: 0 4px 4px 0; font-size: 12px; color: var(--text-2); line-height: 1.5;
}
.deadline-actions, .task-actions { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.deadline-status, .task-status { font-size: 12px; color: var(--text-3); }
.btn-sm { padding: 3px 9px; font-size: 12px; }

.add-deadline { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--border); }
.add-deadline summary {
  cursor: pointer; font-size: 12.5px; color: var(--text-2);
  list-style: none; display: inline-flex; align-items: center; gap: 5px;
}
.add-deadline summary::before { content: "+"; font-weight: 600; color: var(--text-3); }
.add-deadline summary::-webkit-details-marker { display: none; }
.add-deadline summary:hover { color: var(--text); }
.add-deadline-form { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.add-deadline-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-3); }
.add-deadline-form input, .add-deadline-form select {
  padding: 6px 9px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font-size: 13px;
}
.add-deadline-form button { align-self: flex-start; }
.add-deadline-status { font-size: 12px; color: var(--text-3); }
.doc-basis { font-size: 10.5px; color: var(--text-3); margin-left: 4px; font-style: italic; }

.citations { margin-top: 4px; font-size: 11.5px; color: var(--text-3); line-height: 1.45; }

.sources { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.sources-label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); }
.sources ul { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--text-2); }

/* -------------------------------------------------------------------- table */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.table th {
  text-align: left; padding: 9px 14px;
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 600;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.table th.num { text-align: right; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.cell-title { font-weight: 550; }

/* ------------------------------------------------------------------ toolbar */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 2px; }
.tab { padding: 5px 13px; border-radius: 5px; color: var(--text-2); font-weight: 500; font-size: 13px; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.filter-form { display: flex; gap: 7px; align-items: center; }
.clear { font-size: 12.5px; color: var(--text-3); }

/* -------------------------------------------------------------------- chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chip {
  padding: 4px 11px; border-radius: 13px;
  border: 1px solid var(--border-strong);
  color: var(--text-2); font-size: 12.5px; background: var(--surface);
}
.chip:hover { color: var(--text); border-color: var(--text-3); text-decoration: none; }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .chip.is-active { color: #1e1e23; } }
.chip.is-disabled { opacity: .42; cursor: not-allowed; border-style: dashed; }
.chip.is-disabled:hover { color: var(--text-2); border-color: var(--border-strong); }
.chip-count { color: inherit; opacity: .65; margin-left: 3px; }

/* ----------------------------------------------------------------- timeline */
.timeline { display: flex; flex-direction: column; gap: 18px; }
.tl-day { display: grid; grid-template-columns: 152px minmax(0, 1fr); gap: 16px; }
@media (max-width: 640px) { .tl-day { grid-template-columns: 1fr; gap: 6px; } }
.tl-date {
  font-size: 12px; font-weight: 600; color: var(--text-2);
  text-transform: uppercase; letter-spacing: .05em;
  padding-top: 2px; position: sticky; top: 66px; align-self: start;
}
.tl-events { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.tl-event { display: grid; grid-template-columns: 62px 84px minmax(0, 1fr); gap: 10px; padding: 7px 0 7px 14px; position: relative; }
@media (max-width: 640px) { .tl-event { grid-template-columns: 58px minmax(0, 1fr); } .tl-kind { grid-row: 1; } }
.tl-event::before {
  content: ""; position: absolute; left: -5px; top: 13px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border-strong); border: 2px solid var(--bg);
}
.tl-event:hover::before { background: var(--accent); }
.tl-time { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; padding-top: 1px; }
.tl-kind {
  font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-3); padding-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tl-kind-email { color: var(--link); }
.tl-kind-document { color: var(--ok); }
.tl-kind-deadline { color: var(--crit); }
.tl-kind-task, .tl-kind-calendar { color: var(--warn); }
.tl-kind-time_entry { color: var(--text-2); }
.tl-kind-portal_message { color: var(--link); }
.activity-lines { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.activity-lines li { margin: 3px 0; }
.activity-lines strong { color: var(--text); font-weight: 600; }
.tl-body { min-width: 0; }
.tl-title { font-weight: 500; }
.tl-actor { margin-left: 8px; font-size: 12.5px; color: var(--text-3); }
.tl-detail { margin-top: 3px; font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.tl-flag {
  display: inline-block; margin-top: 4px; font-size: 10.5px;
  color: var(--text-3); border: 1px dashed var(--border-strong);
  border-radius: 3px; padding: 0 5px;
}

/* --------------------------------------------------------------------- tags */
.tag {
  display: inline-block; padding: 1px 7px; border-radius: 3px;
  font-size: 10.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase;
  vertical-align: middle; margin-left: 6px;
}
.tag-confirmed   { background: var(--ok-soft);   color: var(--ok); }
.tag-unconfirmed { background: var(--warn-soft); color: var(--warn); }
.tag-suggested   { background: var(--accent-soft); color: var(--accent); }
.tag-muted       { background: var(--surface-2); color: var(--text-3); }
.tag-critical    { background: var(--crit-soft); color: var(--crit); }
.tag-warning     { background: var(--warn-soft); color: var(--warn); }
.tag-notice, .tag-info { background: var(--surface-2); color: var(--text-2); }
.tag-type        { background: var(--surface-2); color: var(--text-2); margin-left: 0; }

/* Section 17's summary: a count, then what the count is made of. "12 items" alone does
   not tell anyone whether their morning starts with deadlines or with duplicate files. */
.review-summary .card-body { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.summary-count { min-width: 130px; }
.summary-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 26px; }
.summary-lines a { color: var(--text-2); font-size: 13px; }
.summary-lines a:hover { color: var(--text); }
.summary-lines strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------- review */
.review-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.review-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 15px 16px;
}
.review-item.is-resolved { opacity: .45; }
.review-head { display: flex; align-items: center; gap: 11px; margin-bottom: 8px; }
.review-matter { font-weight: 550; }
.review-age { margin-left: auto; font-size: 12.5px; color: var(--text-3); }
.review-title { font-size: 15px; font-weight: 550; margin-bottom: 11px; }
.review-facts { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 12px; margin: 0 0 14px; font-size: 13px; }
.review-facts dt { color: var(--text-3); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; padding-top: 2px; }
.review-facts dd { margin: 0; color: var(--text-2); }
.conf { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.review-actions { display: flex; gap: 8px; align-items: center; }
.review-status { font-size: 12.5px; color: var(--text-3); }
.correct-form { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.correct-form label { font-size: 12.5px; color: var(--text-3); }
.correct-form input {
  padding: 5px 9px; border: 1px solid var(--border-strong); border-radius: 6px;
  background: var(--surface); color: var(--text); font-size: 13px;
}
.correct-form input[name=matter_id] { width: 130px; margin-left: 6px; }
.correct-form input[name=reason] { flex: 1; min-width: 200px; }

/* ------------------------------------------------------------------ buttons */
.btn {
  padding: 6px 13px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font-size: 13px; font-family: inherit; font-weight: 500;
  cursor: pointer;
}
.btn:hover:not(:disabled) { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary { color: #1e1e23; } }
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); background: var(--accent); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-quiet:hover { background: var(--surface-2); }
button, input, textarea { font-family: inherit; }
.filter-form button { padding: 6px 13px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; font-size: 13px; }

.ask-form { display: flex; flex-direction: column; gap: 8px; }
.ask-form textarea {
  width: 100%; padding: 9px 11px; resize: vertical;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font-size: 13px;
}
.ask-form textarea:disabled { background: var(--surface-2); color: var(--text-3); }
.ask-form button { align-self: flex-start; }
.ask-status { font-size: 12.5px; color: var(--text-3); }
.ask-answer { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--border); }
.ask-text { line-height: 1.6; white-space: pre-wrap; }
.ask-caveat {
  margin-bottom: 10px; padding: 8px 11px;
  background: var(--warn-soft); color: var(--warn);
  border-radius: var(--radius); font-size: 12.5px; line-height: 1.5;
}
.ask-meta { margin-top: 8px; font-size: 11.5px; color: var(--text-3); }
.ask-feedback { display: flex; gap: 6px; align-items: center; margin-top: 10px; }

/* -------------------------------------------------------------------- pager */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; font-size: 13px; }
.pager-link { padding: 5px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius); color: var(--text-2); background: var(--surface); }
.pager-link:hover { color: var(--text); text-decoration: none; }
.pager-link.is-disabled { opacity: .35; }
.pager-status { color: var(--text-3); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------- auth */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.auth-card {
  width: 100%; max-width: 400px; padding: 32px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-title { font-weight: 600; font-size: 16px; }
.auth-lead { margin-bottom: 18px; color: var(--text-2); }
.auth-submit { width: 100%; padding: 10px; font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.auth-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-top: 6px; }
.auth-input { width: 100%; box-sizing: border-box; padding: 9px 10px; font: inherit; font-size: 14px;
  border: 1px solid var(--border, #d9d8d2); border-radius: 6px; background: #fff; color: var(--text); }
.auth-input:focus { outline: 2px solid var(--link); outline-offset: 1px; }
.auth-form .auth-submit { margin-top: 12px; }
.auth-note { margin-top: 18px; font-size: 12.5px; color: var(--text-3); line-height: 1.55; }
.auth-foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-3); }
.auth-error {
  padding: 10px 12px; margin-bottom: 18px;
  background: var(--crit-soft); color: var(--crit);
  border: 1px solid var(--crit); border-radius: var(--radius);
  font-size: 13px; line-height: 1.5;
}

.user-menu { display: flex; align-items: center; gap: 10px; }
.user-role {
  font-size: 10.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-3); border: 1px solid var(--border-strong);
  border-radius: 3px; padding: 1px 5px;
}
.logout-form { display: inline; }
.logout-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--text-3); font-size: 12.5px; text-decoration: underline;
}
.logout-btn:hover { color: var(--text); }

/* -------------------------------------------------------------------- error */
.error-page { text-align: center; padding: 40px 20px; }
.error-code { font-size: 44px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.error-message { margin: 8px 0 16px; color: var(--text-2); }
.error-ref { margin-bottom: 20px; font-size: 12.5px; color: var(--text-3); }

/* ------------------------------------------------------------------- footer */
.footer {
  max-width: 1220px; margin: 0 auto; padding: 18px 24px 34px;
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 12px; color: var(--text-3); border-top: 1px solid var(--border);
}

@media print {
  .topbar, .banner, .footer, .chips, .toolbar, .review-actions, .pager { display: none; }
  .card { break-inside: avoid; box-shadow: none; }
}
