/*
 * drenzeOS styles. Plan: docs/active/ui-redesign-plan.md
 * The brand lives in the top bar (deep brown, gold wordmark, gold active line).
 * The work surface stays quiet: white, warm hairlines, one accent for actions.
 * Every text/background pair here was checked for >= 4.5:1 contrast.
 */

:root {
  --bar: #2c1a0e;
  --bar-ink: #efe6d6;
  --bar-muted: #bfae96;
  --gold: #cfb896;
  --accent: #934a1c;
  --accent-hover: #7a3d17;
  --surface: #ffffff;
  --surface-2: #faf8f5;
  --line: #ebe5db;
  --line-strong: #d9cfc1;
  --ink: #24170e;
  --ink-2: #6b5d52;

  --success-ink: #1f6b3a;
  --success-bg: #e6f2ea;
  --warning-ink: #8a5a00;
  --warning-bg: #fbf0d9;
  --critical-ink: #a1260d;
  --critical-bg: #fbe9e4;
  --neutral-ink: #6b5d52;
  --neutral-bg: #f2eee8;

  --font: "Jost", system-ui, sans-serif;
  --radius: 6px;
  --content-width: 1200px;
  --bar-height: 56px;
}

/* Base */

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.25;
}

h1 {
  font-size: 1.375rem;
}

h2 {
  font-size: 1.0625rem;
  margin: 2rem 0 0.75rem;
}

p {
  margin: 0 0 0.75rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 20;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 0.5rem;
}

.muted {
  color: var(--ink-2);
}

/* Controls */

button,
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 36px;
  padding: 0.4rem 0.9rem;
  font: 500 0.875rem/1.2 var(--font);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
}

button:hover,
.btn:hover {
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
}

.btn-primary,
button[type="submit"]:not(.btn-plain) {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover,
button[type="submit"]:not(.btn-plain):hover {
  color: #fff;
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

input[type="text"],
input[type="search"],
input[type="password"],
input[type="email"],
input[type="date"],
select {
  min-height: 36px;
  padding: 0.4rem 0.65rem;
  font: 400 0.875rem/1.2 var(--font);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

input::placeholder {
  color: var(--ink-2);
}

/* Top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bar);
  color: var(--bar-ink);
}

.topbar-inner {
  display: flex;
  align-items: stretch;
  gap: 1.75rem;
  max-width: var(--content-width);
  height: var(--bar-height);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.topbar-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.topbar-brand img {
  display: block;
  height: 20px;
  width: auto;
}

.topbar-nav {
  display: flex;
  align-items: stretch;
  gap: 0.25rem;
}

.topbar-nav a {
  display: flex;
  align-items: center;
  padding: 0 0.65rem;
  font-size: 0.9375rem;
  color: var(--bar-muted);
  white-space: nowrap;
}

.topbar-nav a:hover {
  color: var(--bar-ink);
  text-decoration: none;
}

.topbar-nav a[aria-current="page"] {
  color: var(--bar-ink);
  font-weight: 500;
  box-shadow: inset 0 -2px 0 var(--gold);
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.topbar-search input {
  width: 17rem;
  color: var(--bar-ink);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.topbar-search input::placeholder {
  color: var(--bar-muted);
}

.topbar-search-link {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--bar-ink);
}

.topbar-search-link:hover {
  color: #fff;
}

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--bar-muted);
  white-space: nowrap;
}

.sync-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7fb88f;
}

.sync-status.is-stale {
  color: #f0c060;
}

.sync-status.is-stale::before {
  background: #f0c060;
}

.sync-status.is-failed {
  color: #ff9a85;
}

.sync-status.is-failed::before {
  background: #ff9a85;
}

.sync-control {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.sync-control form {
  display: flex;
}

.sync-button {
  justify-content: center;
  width: 36px;
  min-height: 36px;
  padding: 0;
  color: var(--bar-muted);
  background: none;
  border: 0;
}

.sync-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.sync-button:disabled {
  cursor: default;
  opacity: 0.5;
}

.sync-status.is-running::before {
  background: var(--gold);
}

/* The icon turns while the request runs or a sync is in progress. */
.htmx-request .sync-button svg,
.sync-button:disabled svg {
  animation: sync-spin 1s linear infinite;
}

@keyframes sync-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .htmx-request .sync-button svg,
  .sync-button:disabled svg {
    animation: none;
  }
}

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

.user-menu {
  position: relative;
}

.user-menu summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bar);
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  list-style: none;
}

.user-menu summary::-webkit-details-marker {
  display: none;
}

.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 13rem;
  padding: 0.5rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(44, 26, 14, 0.14);
}

.user-menu-name {
  padding: 0.4rem 0.6rem 0.6rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.35rem;
}

.user-menu-panel a,
.user-menu-panel button {
  display: flex;
  width: 100%;
  min-height: 36px;
  padding: 0.4rem 0.6rem;
  font: 400 0.875rem/1.2 var(--font);
  color: var(--ink);
  background: none;
  border: 0;
  border-radius: var(--radius);
  text-align: left;
}

.user-menu-version {
  padding: 0.5rem 0.6rem 0.2rem;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--ink-2);
  border-top: 1px solid var(--line);
}

.user-menu-panel a:hover,
.user-menu-panel button:hover {
  background: var(--surface-2);
  text-decoration: none;
}

/* Page structure */

main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1.75rem 1.5rem 3rem;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.25rem;
}

.page-header input[type="search"] {
  width: 15rem;
}

.page-title {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.page-count {
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.back-link {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.messages {
  max-width: var(--content-width);
  margin: 1rem auto 0;
  padding: 0 1.5rem;
  list-style: none;
}

/* Badges */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.05rem 0.55rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
  border-radius: 999px;
}

.badge + .badge {
  margin-left: 0.3rem;
}

.badge-success {
  color: var(--success-ink);
  background: var(--success-bg);
}

.badge-warning {
  color: var(--warning-ink);
  background: var(--warning-bg);
}

.badge-critical {
  color: var(--critical-ink);
  background: var(--critical-bg);
}

.badge-neutral {
  color: var(--neutral-ink);
  background: var(--neutral-bg);
}

/* Tables */

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.data-table th {
  padding: 0.55rem 0.75rem;
  font-weight: 500;
  color: var(--ink-2);
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line-strong);
}

.data-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table tbody tr:hover td {
  background: var(--surface-2);
}

.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.data-table .nowrap {
  white-space: nowrap;
}

.data-table .row-title {
  font-weight: 500;
}

.data-table .empty {
  padding: 2rem 0.75rem;
  color: var(--ink-2);
  text-align: center;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.875rem;
}

/* Detail pages */

.detail-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.45rem 1.5rem;
  margin: 0;
  font-size: 0.9375rem;
}

.detail-list dt {
  color: var(--ink-2);
}

.detail-list dd {
  margin: 0;
}

.totals {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 0;
  max-width: 22rem;
  margin: 1rem 0 0 auto;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.totals dt {
  color: var(--ink-2);
}

.totals dd {
  margin: 0;
  padding-left: 2rem;
  text-align: right;
}

.totals .grand {
  padding-top: 0.5rem;
  font-weight: 600;
  color: var(--ink);
  border-top: 1px solid var(--line-strong);
}

/* Detail pages: facts panel on the right (desktop), first (phone). */

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-areas: "main facts";
  gap: 0 2.5rem;
  align-items: start;
}

.detail-main {
  grid-area: main;
  min-width: 0;
}

.detail-main > h2:first-child {
  margin-top: 0;
}

.facts {
  grid-area: facts;
  padding: 1rem 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.facts .detail-list {
  grid-template-columns: 1fr;
  gap: 0;
}

.facts .detail-list dt {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
}

.facts .detail-list dt:first-child {
  margin-top: 0;
}

.facts-note {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.stock-line {
  display: block;
  font-size: 0.8125rem;
}

.sort-link {
  color: inherit;
}

.sort-link:hover {
  color: var(--ink);
}

th[aria-sort="ascending"],
th[aria-sort="descending"] {
  color: var(--ink);
}

.how-we-count {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.how-we-count summary {
  cursor: pointer;
  color: var(--accent);
}

.how-we-count ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

/* Forms and errors */

.form-errors {
  color: var(--critical-ink);
}

div.form-errors {
  padding: 0.6rem 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid var(--critical-ink);
  border-radius: var(--radius);
  background: var(--critical-bg);
}

div.form-errors p,
ul.form-errors {
  margin: 0;
}

ul.form-errors {
  padding: 0.6rem 0.8rem 0.6rem 2rem;
  border: 1px solid var(--critical-ink);
  border-radius: var(--radius);
  background: var(--critical-bg);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

/* From/To only matter for a custom range. */
.filter-row:not(:has(option[value="custom"]:checked)) .custom-date {
  display: none;
}

.filter-row label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
}

/* Login */

main.auth-page {
  max-width: none;
  margin: 0;
}

.auth-page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  padding: 12vh 1rem 2rem;
  background: var(--surface-2);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.auth-card-head {
  padding: 1.75rem;
  text-align: center;
  background: var(--bar);
}

.auth-card-head img {
  display: inline-block;
  height: 26px;
  width: auto;
}

.auth-card-body {
  padding: 1.5rem 1.75rem 1.75rem;
}

.auth-card-body h1 {
  margin-bottom: 1.25rem;
  font-size: 1.125rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.field input {
  width: 100%;
}

.auth-card-body button[type="submit"] {
  width: 100%;
  justify-content: center;
  min-height: 40px;
}

.dev-login {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.75rem;
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
}

.dev-login button {
  justify-content: center;
}

.dev-login span {
  font-size: 0.8125rem;
  color: var(--ink-2);
}

/* Reports. Chart colours: one series in the brand accent (validated >= 3:1 on white). */

:root {
  --chart-mark: var(--accent);
  --chart-grid: #ece6dc;
  --chart-axis: #cfc5b6;
}

.report-body.htmx-request {
  opacity: 0.5;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0.5rem;
}

.stat-tile {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat-label,
.stat-delta {
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.stat-value {
  margin: 0.2rem 0;
  font-size: 1.625rem;
  font-weight: 600;
}

.chart {
  position: relative;
  margin: 0;
}

.chart-scroll {
  overflow-x: auto;
}

/* Below this width the axis text gets too small; the chart scrolls inside its box instead. */
.chart svg {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
}

.chart-grid {
  stroke: var(--chart-grid);
  stroke-width: 1;
}

.chart-axis {
  stroke: var(--chart-axis);
  stroke-width: 1;
}

.chart-tick {
  font-family: var(--font);
  font-size: 12px;
  fill: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.chart-mark {
  fill: var(--chart-mark);
}

.chart-hit {
  fill: transparent;
}

.chart-column {
  outline: none;
}

.chart-column:focus-visible .chart-hit,
.chart-column.is-active .chart-hit {
  fill: rgba(147, 74, 28, 0.06);
}

.chart-column.is-active .chart-mark {
  opacity: 0.85;
}

.chart-tooltip[hidden] {
  display: none;
}

.chart-tooltip {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  padding: 0.4rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--chart-axis);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(44, 26, 14, 0.12);
  font-size: 0.8125rem;
  pointer-events: none;
  white-space: nowrap;
}

.chart-tooltip span {
  color: var(--ink-2);
}

.table-view {
  margin: 0.5rem 0 1rem;
  font-size: 0.875rem;
}

.report-totals {
  max-width: none;
  margin: 0;
}

.report-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0 2rem;
}

/* Filter chips (list views) */

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: -0.25rem 0 1rem;
}

.filter-chips a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 34px;
  padding: 0.25rem 0.85rem;
  font-size: 0.875rem;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.filter-chips a:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.filter-chips a[aria-current="page"] {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.filter-chips .chip-count {
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}

.filter-chips .chip-toggle {
  margin-left: auto;
  border-color: transparent;
  color: var(--accent);
}

/* Overview */

.attention-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.attention-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  padding: 0.75rem 1rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius);
}

.attention-item:hover {
  color: var(--ink);
  background: var(--surface-2);
  text-decoration: none;
}

.attention-item.tone-critical {
  border-left-color: var(--critical-ink);
}

.attention-item.tone-warning {
  border-left-color: #c98a12;
}

.attention-item.tone-neutral {
  border-left-color: var(--line-strong);
}

.attention-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.attention-title {
  font-weight: 500;
}

.attention-detail {
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.all-clear {
  padding: 0.75rem 1rem;
  color: var(--success-ink);
  background: var(--success-bg);
  border-radius: var(--radius);
}

.overview-columns {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 0 2.5rem;
}

.issue-list {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
}

.issue-list li {
  margin-bottom: 0.5rem;
}

.section-link {
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

.show-mobile {
  display: none;
}

/* Narrow screens: the menu stays in the top bar as a second row that scrolls sideways. */

@media (max-width: 860px) {
  .topbar-inner {
    flex-wrap: wrap;
    height: auto;
    gap: 0 1rem;
    padding: 0 1rem;
  }

  .topbar-brand {
    height: 52px;
  }

  .topbar-brand img {
    height: 15px;
  }

  .topbar-tools {
    height: 52px;
    gap: 0.6rem;
  }

  .topbar-search {
    display: none;
  }

  .topbar-search-link {
    display: inline-flex;
  }

  .topbar-nav {
    order: 3;
    width: calc(100% + 2rem);
    height: 44px;
    margin: 0 -1rem;
    padding: 0 0.5rem;
    overflow-x: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    scrollbar-width: none;
  }

  main {
    padding: 1.25rem 1rem 2.5rem;
  }

  .report-columns,
  .overview-columns {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "facts" "main";
  }

  .facts {
    margin-bottom: 0.5rem;
  }

  .detail-main > h2:first-child {
    margin-top: 1.75rem;
  }
}

/* Phones: list tables marked .stack-mobile become two-line rows.
   Line 1: title (left) and amount (right). Line 2: badges, then details with labels. */

@media (max-width: 640px) {
  .page-header form,
  .page-header input[type="search"] {
    width: 100%;
  }

  .kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-value {
    font-size: 1.375rem;
  }

  .filter-chips a {
    min-height: 40px;
  }

  .stack-mobile thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .stack-mobile,
  .stack-mobile tbody {
    display: block;
  }

  .stack-mobile tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--line);
  }

  .stack-mobile tbody tr::after {
    content: "";
    order: 2;
    flex-basis: 100%;
    height: 0;
  }

  .stack-mobile td {
    display: block;
    padding: 0;
    border: 0;
    text-align: left;
  }

  .stack-mobile tbody tr:hover td {
    background: none;
  }

  .stack-mobile td.row-title {
    order: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.9375rem;
  }

  .stack-mobile td.row-title a {
    display: inline-block;
    padding: 0.35rem 0;
  }

  .stack-mobile td.cell-amount {
    order: 1;
    margin-left: auto;
    font-weight: 500;
  }

  .stack-mobile td.cell-badges {
    order: 4;
  }

  .stack-mobile td.cell-meta {
    order: 5;
    font-size: 0.8125rem;
    color: var(--ink-2);
    white-space: normal;
  }

  /* After .cell-meta, so a full-width detail (an email) sits above the badges. */
  .stack-mobile td.cell-full {
    order: 3;
    flex-basis: 100%;
    overflow-wrap: anywhere;
  }

  .stack-mobile td[data-label]::before {
    content: attr(data-label) " ";
  }

  .stack-mobile td.hide-mobile,
  .stack-mobile td:empty {
    display: none;
  }

  .stack-mobile td.empty {
    flex-basis: 100%;
    padding: 1.5rem 0;
  }

  .show-mobile {
    display: inline-flex;
  }

  .totals {
    max-width: none;
  }
}

/* Smallest phones: drop the word "Synced" so the top bar stays one row. */

@media (max-width: 380px) {
  .sync-word {
    display: none;
  }

  .topbar-tools {
    gap: 0.4rem;
  }
}
