/* Budget: the look of the old app (Tailwind yellow-900 bar, red and green
   amounts, grey borders and shadows) in plain CSS with role-named tokens. */

:root {
  --bar: #733e0a;
  --bar-hover: #a65f00;
  --on-bar: #ffffff;
  --on-bar-muted: #e7d8c9;
  --text: #18181b;
  --text-muted: #636b78;
  --surface: #ffffff;
  --surface-sunken: #f9fafb;
  --surface-selected: #f3f4f6;
  --surface-secondary: #f4f4f5;
  --surface-secondary-hover: #e4e4e7;
  --border: #d1d5dc;
  --border-input: #8a8f99;
  --expense: #d70009;
  --income: #00813a;
  --primary: #00813a;
  --primary-hover: #006b30;
  --on-primary: #ffffff;
  --danger: #d70009;
  --danger-hover: #b20007;
  --on-danger: #ffffff;
  --focus: #a65f00;
  --chart-income: #00a63e;
  --chart-expense: #e7000b;
  --chart-total: #733e0a;
  --chart-grid: #e5e7eb;
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-bar: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --radius: 0.5rem;
  --font: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-2xl: 1.5rem;
  --text-4xl: 2.25rem;
  --bar-height: 4rem;
}

*, *::before, *::after { box-sizing: border-box; }

/* Keep a focused or scrolled-to row clear of the fixed top bar and the
   sticky month bar. */
html { -webkit-text-size-adjust: 100%; scroll-padding: 5rem 0 5.5rem; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text);
  background: var(--surface);
}

body.signed-in { padding-top: 5rem; }

h1, h2, h3, p, ul, fieldset { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.icon { width: 1rem; height: 1rem; flex: none; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Top bar */

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem;
  min-height: var(--bar-height);
  background: var(--bar); color: var(--on-bar);
  box-shadow: var(--shadow-bar);
}
.topbar :focus-visible { outline-color: var(--on-bar); }
.bar-start { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.brand {
  display: flex; align-items: center; gap: 0.5rem; flex: none;
  font-size: var(--text-2xl); font-weight: 700; text-decoration: none;
}
.brand .icon { width: 1.75rem; height: 1.75rem; }
.brand-word { display: none; }
.page-title {
  margin: 0; min-width: 0;
  font-size: var(--text-base); font-weight: 600; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bar-status { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; font-size: var(--text-xs); }
.bar-status > span { display: inline-flex; align-items: center; gap: 0.25rem; white-space: nowrap; }
.bar-status .icon { width: 0.875rem; height: 0.875rem; }
.refused-count { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 0.25rem; }
.offline, .waiting-count, .refused-count { padding: 0.125rem 0.375rem; border: 1px solid var(--on-bar-muted); border-radius: var(--radius); }
.bar-end { display: flex; align-items: center; gap: 0.25rem; flex: none; }
.bar-link {
  display: flex; align-items: center; gap: 0.25rem;
  min-height: 2.5rem; padding: 0.5rem;
  font-size: var(--text-sm); text-decoration: none;
  background: none; border: 0; cursor: pointer; color: var(--on-bar);
}
.bar-link:hover { background: var(--bar-hover); }
.bar-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ledger-switch { min-width: 0; }
.ledger-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 8rem; }

@media (min-width: 640px) {
  .topbar { padding: 0.5rem 1.5rem; }
  .brand-word { display: inline; }
  .page-title { padding-left: 0.75rem; border-left: 1px solid var(--on-bar-muted); font-size: 1.125rem; }
  .bar-end { gap: 0.75rem; }
  .bar-link { padding: 0.75rem; }
}
@media (min-width: 768px) {
  .bar-label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}
@media (max-width: 400px) {
  .topbar { padding: 0.5rem; gap: 0.25rem; }
  .bar-link { padding: 0.5rem 0.375rem; }
  .ledger-name { max-width: 4.5rem; }
}

/* Update notice: in the page flow under the top bar, never over content */

.update-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem;
  margin: 0 1rem 1rem; padding: 0.75rem 1rem;
  border: 1px solid var(--primary); border-radius: var(--radius);
  font-size: var(--text-sm);
}
.update-banner span { flex: 1 1 12rem; }

/* Pages and cards */

.page { padding: 0 1rem 1rem; }
.page.narrow { max-width: 32rem; margin: 0 auto; }
.split { display: flex; flex-direction: column; gap: 1rem; }
.form-col, .list-col { min-width: 0; }
.list-col { position: relative; }
@media (min-width: 768px) {
  .split { flex-direction: row; align-items: flex-start; }
  .form-col { flex: 0 0 calc(20% - 0.5rem); position: sticky; top: 5rem; }
  .list-col { flex: 1 1 0; }
}

.card { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.form-card { padding: 1.5rem; }
.card-title {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.5rem; font-size: var(--text-base); font-weight: 700; text-align: center;
}
.card-title .icon { width: 1.5rem; height: 1.5rem; }
.empty { padding: 0.5rem 1rem; border-top: 1px solid var(--border); color: var(--text-muted); text-align: center; }

/* Buttons */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.25rem; padding: 0.25rem 1rem;
  border: 1px solid transparent; border-radius: calc(var(--radius) - 2px);
  background: none; color: inherit;
  font-size: var(--text-sm); font-weight: 500; white-space: nowrap; text-decoration: none;
  cursor: pointer;
}
.button.primary { background: var(--primary); color: var(--on-primary); }
.button.primary:hover { background: var(--primary-hover); }
.button.secondary { background: var(--surface-secondary); color: var(--text); }
.button.secondary:hover { background: var(--surface-secondary-hover); }
.button.danger { background: var(--danger); color: var(--on-danger); }
.button.danger:hover { background: var(--danger-hover); }
.button.outline { background: var(--surface); border-color: var(--border-input); box-shadow: 0 1px 2px rgb(0 0 0 / 0.05); }
.button.outline:hover, .button.ghost:hover { background: var(--surface-secondary); }
.button.ghost-danger { background: none; color: var(--danger); min-width: 2.25rem; padding: 0.25rem 0.5rem; }
.button.ghost-danger:hover { background: var(--surface-secondary); }
.button.ghost-danger.armed { background: var(--danger); color: var(--on-danger); }
.button.icon-only { min-width: 2.25rem; padding: 0.25rem; }
.button.small { min-height: 2rem; padding: 0.25rem 0.75rem; font-size: var(--text-xs); }
.button.small.icon-only { min-width: 2rem; padding: 0.25rem; }
.button.wide { width: 100%; }
.button.expense { color: var(--expense); }
.button.income { color: var(--income); }
.button .icon { width: 1.25rem; height: 1.25rem; }
.button.small .icon { width: 0.875rem; height: 0.875rem; }

/* Forms */

.form { display: grid; gap: 0.75rem; }
.field { display: grid; gap: 0.375rem; }
.field label { font-size: var(--text-sm); font-weight: 500; }
input:not([type="radio"], [type="checkbox"]), select {
  width: 100%; min-height: 2.25rem; padding: 0.25rem 0.75rem;
  border: 1px solid var(--border-input); border-radius: calc(var(--radius) - 2px);
  background: var(--surface); font-size: var(--text-base);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}
input[type="radio"], input[type="checkbox"] { width: 1rem; height: 1rem; margin: 0; accent-color: var(--bar); }
input[aria-invalid="true"] { border-color: var(--danger); }
.amount-wrap { position: relative; }
.amount-wrap input { padding-right: 5rem; }
.calc {
  position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
  font-size: var(--text-sm); color: var(--text-muted); pointer-events: none;
}
.error { font-size: var(--text-sm); font-style: italic; color: var(--danger); }
.types { display: grid; grid-template-columns: 1fr 1fr; place-items: center; gap: 0.5rem; padding: 0; border: 0; }
.radio { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.25rem; cursor: pointer; }
.radio.expense span { color: var(--expense); }
.radio.income span { color: var(--income); }
.check { display: inline-flex; align-items: center; gap: 0.375rem; font-size: var(--text-sm); cursor: pointer; white-space: nowrap; }
.template-chips { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.75rem; }
.actions.single { display: grid; justify-content: stretch; }
.saved-note { min-height: 1.25rem; font-size: var(--text-sm); color: var(--income); text-align: center; }
.saved-note:empty { min-height: 0; }

/* Lists: month, templates */

.list-card { margin-bottom: 1rem; }
.list-card.stale .row, .list-card.stale .day { opacity: 0.5; }
.search-box { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); background: var(--surface-sunken); }
.search { position: relative; display: flex; align-items: center; }
.search input { padding-left: 2.25rem; padding-right: 5rem; font-size: var(--text-sm); border-color: var(--border-input); }
.search-icon { position: absolute; left: 0.75rem; display: flex; color: var(--text-muted); pointer-events: none; }
.search-icon .icon { width: 1.25rem; height: 1.25rem; }
.search .button { position: absolute; color: var(--text-muted); }
.search .button:hover { color: var(--text); }
.search #search-clear { right: 2.5rem; }
.search [type="submit"] { right: 0.25rem; }
.search .button.icon-only { min-width: 2rem; min-height: 2rem; }
.result-count { margin-top: 0.25rem; font-size: var(--text-xs); color: var(--text-muted); }
.month-title { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); font-size: var(--text-base); font-weight: 700; text-align: center; }
.day { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); font-size: var(--text-base); font-weight: 600; }
.list-card .empty { border-top: 0; border-bottom: 1px solid var(--border); }

.row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.row:last-child { border-bottom: 0; }
a.row:hover, .row.selected { background: var(--surface-selected); }
.row.expense { color: var(--expense); }
.row.income { color: var(--income); }
.what { min-width: 0; overflow-wrap: anywhere; }
.what { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.75rem; }
month-list .what { display: inline; }
.note { font-size: var(--text-xs); color: var(--text-muted); }
.amount { flex: none; margin-left: auto; font-family: var(--mono); text-align: right; white-space: nowrap; }
.row.waiting { background: var(--surface-sunken); }
.row.refused { flex-wrap: wrap; background: var(--surface-sunken); border-left: 3px solid var(--expense); }
.refused-reason { flex-basis: 100%; margin: 0; font-size: var(--text-xs); color: var(--text); }
.refused-actions { display: flex; gap: 0.5rem; flex-basis: 100%; }
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem; flex: none;
  padding: 0 0.375rem; border: 1px solid var(--border-input); border-radius: calc(var(--radius) - 2px);
  font-size: var(--text-xs); color: var(--text-muted);
}
.badge .icon { width: 0.75rem; height: 0.75rem; }
.day-badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.125rem 0.5rem; border: 1px solid var(--border); border-radius: calc(var(--radius) - 2px);
  font-size: var(--text-xs); font-weight: 500; color: var(--text);
}
.day-badge .icon { width: 0.75rem; height: 0.75rem; }

.month-bar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 1rem; background: var(--surface); border-top: 1px solid var(--border);
}
@media (max-width: 639px) {
  .month-bar { padding: 0.75rem 0; }
  .month-bar .button { gap: 0.25rem; padding: 0.25rem 0.5rem; }
  .month-bar .icon { width: 1rem; height: 1rem; }
  .month-total { font-size: var(--text-sm); }
}
.month-total { font-family: var(--mono); text-align: right; }
.month-total.expense { color: var(--expense); }
.month-total.income { color: var(--income); }

/* Ledger choice */

.ledger-list { display: grid; }
.ledger-choice {
  display: flex; align-items: center; gap: 0.75rem; width: 100%;
  min-height: 3rem; padding: 0.5rem 1rem;
  border: 0; border-top: 1px solid var(--border); background: none;
  font-size: var(--text-base); text-align: left; cursor: pointer;
}
.ledger-choice:hover, .ledger-choice[aria-current="true"] { background: var(--surface-selected); }
.ledger-choice .icon { width: 1.25rem; height: 1.25rem; color: var(--bar); }

/* Categories */

.cat-list { margin: 0; }
.cat-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.5rem;
  padding-right: 0.5rem; border-bottom: 1px solid var(--border);
}
.cat-row:last-child { border-bottom: 0; }
.cat-link {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.5rem 0.75rem; color: inherit; text-decoration: none;
}
.cat-link .icon { flex: none; width: 1rem; height: 1rem; color: var(--text-muted); }
.cat-row:has(.cat-link:hover), .cat-row.selected { background: var(--surface-selected); }
.cat-name { min-width: 0; overflow-wrap: anywhere; }
.hint { font-size: var(--text-xs); color: var(--text-muted); }
.row-error { flex-basis: 100%; padding: 0 0.75rem 0.25rem; }
.app-version { margin: 0 0 1rem; font-family: var(--mono); font-size: var(--text-xs); color: var(--text-muted); text-align: center; }

/* Login */

.login {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;
  min-height: 100vh; min-height: 100dvh; padding: 1rem;
}
.login-title {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: var(--text-4xl); font-weight: 700; color: var(--bar);
}
.login-title .icon { width: 2.5rem; height: 2.5rem; }
.login-button { width: min(20rem, 100%); min-height: 2.75rem; font-size: var(--text-base); }

/* Review */

.period-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.seg-item { padding: 0.375rem 0.875rem; font-size: var(--text-sm); color: var(--text); text-decoration: none; }
.seg-item + .seg-item { border-left: 1px solid var(--border); }
.seg-item:hover { background: var(--surface-selected); }
.seg-item.active { background: var(--bar); color: var(--on-bar); }
.boxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
@media (min-width: 768px) { .boxes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.box { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; padding: 0.625rem 0.75rem; border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.box-label { font-size: var(--text-xs); color: var(--text-muted); }
.box-value { font-family: var(--mono); font-size: var(--text-base); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 768px) { .box-value { font-size: 1.125rem; } }
.box-value.income { color: var(--income); }
.box-value.expense { color: var(--expense); }
.box-note { min-height: 1rem; font-size: var(--text-xs); color: var(--text-muted); }
.card-subtitle { margin: 0 0 0.5rem; font-size: var(--text-sm); font-weight: 600; }
.bars-card, .heat-card { margin-bottom: 1rem; padding: 0.75rem; }
.xbars { margin: 0; }
.xbar { display: grid; grid-template-columns: minmax(5rem, 9rem) minmax(0, 1fr) auto; align-items: center; gap: 0.5rem; padding: 0.25rem 0.25rem; color: inherit; text-decoration: none; font-size: var(--text-sm); }
.xbar:hover { background: var(--surface-selected); }
.xname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xtrack { width: 100%; height: 0.875rem; }
.xtrack rect { fill: var(--bar); } /* size only, like the heatmap; red would read as negative */
.xamount { font-family: var(--mono); text-align: right; white-space: nowrap; }
.heatmap { display: grid; gap: 2px; overflow-x: auto; }
.heat-row { display: flex; gap: 2px; align-items: center; }
.heat-row > .heat, .heat-row > .heat-col { flex: 1 1 0; min-width: 0; }
.heat-name { flex: 0 0 clamp(5rem, 28%, 9rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-xs); padding-right: 0.25rem; }
.heat-col { font-size: var(--text-xs); color: var(--text-muted); text-align: center; }
.heat-col.open { color: var(--text); font-weight: 700; }
.heat { display: block; height: 1.25rem; border-radius: 2px; background: var(--surface-sunken); }
.heat.l1 { background: color-mix(in oklab, var(--bar) 15%, white); }
.heat.l2 { background: color-mix(in oklab, var(--bar) 32%, white); }
.heat.l3 { background: color-mix(in oklab, var(--bar) 50%, white); }
.heat.l4 { background: color-mix(in oklab, var(--bar) 70%, white); }
.heat.l5 { background: var(--bar); }
.heat.odd { outline: 2px solid var(--expense); outline-offset: -2px; }
.heat.open { box-shadow: 0 0 0 2px var(--text); }
.heat:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.heat-card .note { margin-top: 0.5rem; font-size: var(--text-xs); color: var(--text-muted); }
.table-card > summary { padding: 0.5rem 0.75rem; cursor: pointer; font-size: var(--text-sm); font-weight: 600; }
.review-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 1rem; }
.review-title { flex: 1; font-size: 1.25rem; font-weight: 700; text-align: center; }
@media (max-width: 639px) {
  .review-nav .button { gap: 0.25rem; padding: 0.25rem 0.5rem; }
  .review-title { font-size: var(--text-base); }
}
.filter { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; }
.filter-row { display: flex; gap: 0.5rem; }
.filter-row select { flex: 1; width: auto; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.125rem 0.125rem 0.125rem 0.5rem;
  border-radius: calc(var(--radius) - 2px); background: var(--surface-secondary);
  font-size: var(--text-xs); font-weight: 500;
}
.chip-remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; padding: 0;
  border: 0; border-radius: 999px; background: none; cursor: pointer;
}
.chip-remove:hover { background: var(--surface-secondary-hover); }
.chip-remove .icon { width: 0.75rem; height: 0.75rem; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (min-width: 1280px) {
  .review-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .review-grid:has(> review-chart:empty) { grid-template-columns: minmax(0, 1fr); }
}
review-chart, review-table { display: block; min-width: 0; }
.chart-card { margin: 0 0 1rem; padding: 0.75rem; }
.chart-box { width: 100%; min-height: 300px; }
.chart { display: block; }
.chart .grid { stroke: var(--chart-grid); stroke-dasharray: 3 3; }
.chart .axis { stroke: var(--text-muted); }
.chart .tick { font-size: 12px; fill: var(--text-muted); }
.chart .bar-income { fill: var(--chart-income); }
.chart .bar-expense { fill: var(--chart-expense); }
.chart .line-accumulated { fill: none; stroke: var(--chart-total); stroke-width: 3; stroke-linejoin: round; }
.chart .dot-accumulated { fill: var(--surface); stroke: var(--chart-total); stroke-width: 2; }
.legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: var(--text-sm); }
.legend li { display: inline-flex; align-items: center; gap: 0.375rem; }
.legend .income { color: var(--income); }
.legend .expense { color: var(--expense); }
.legend .accumulated { color: var(--chart-total); }
.swatch { width: 0.75rem; height: 0.75rem; border-radius: 2px; }
.legend .income .swatch { background: var(--chart-income); }
.legend .expense .swatch { background: var(--chart-expense); }
.swatch.line { height: 3px; background: var(--chart-total); }
.accumulated-toggle { display: flex; justify-content: flex-end; margin-top: 0.5rem; }
.table-card { margin-bottom: 1rem; }
.table-wrap { position: relative; overflow-x: auto; }
.cur-head { display: none; }
.review-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.review-table th, .review-table td { padding: 0.5rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.review-table thead th { font-weight: 600; text-align: right; }
.review-table .first { text-align: center; }
.review-table td:first-child { text-align: center; white-space: normal; }
.review-table .num { font-family: var(--mono); text-align: right; }
.review-table thead .num { font-family: var(--font); }
.review-table td.income { color: var(--income); }
.review-table td.expense { color: var(--expense); }
.review-table.striped tbody tr:nth-child(odd) { background: var(--surface-selected); }
/* A phone fits all columns: the currency is named once in the head, the
   cells keep the number, the row buttons lose their chart icon. */
@media (max-width: 639px) {
  .review-table { font-size: var(--text-xs); }
  .review-table th, .review-table td { padding: 0.5rem 0.25rem; }
  .review-table .button.small { padding: 0.25rem 0.5rem; min-width: 2rem; }
  .review-table .cur, .review-table .cell-icon { display: none; }
  .cur-head { display: inline; }
  .review-table thead th { white-space: normal; }
}
@media (max-width: 389px) {
  .page.review { padding-inline: 0.5rem; }
  .review-table th, .review-table td { padding-inline: 0.125rem; }
  .review-table .button.small { padding-inline: 0.375rem; min-width: 1.75rem; }
}
.review-table tfoot th, .review-table tfoot td { font-weight: 700; border-top: 2px solid var(--border); border-bottom: 0; background: var(--surface-sunken); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
