:root {
  color-scheme: light;
  --bg: #f4f5f1;
  --surface: #fff;
  --ink: #202a25;
  --muted: #788179;
  --line: #e3e7df;
  --green: #254e3c;
  --green-soft: #eaf0e8;
  --orange: #99662b;
  --red: #ab493f;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 9px;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 13px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #72947a;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 8px 12px;
  color: var(--ink);
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}
button:hover {
  background: #f2f4ef;
  border-color: #c4cfc3;
}
button.primary,
.button.primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
button.primary:hover {
  background: #183e2c;
}
button.quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
button.small {
  font-size: 11px;
  padding: 4px 8px;
}
button.danger {
  color: var(--red);
}
button svg {
  width: 15px;
  height: 15px;
}
input,
select,
textarea {
  border: 1px solid #d8ded4;
  background: #fff;
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--ink);
  min-height: 37px;
  max-width: 100%;
}
input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-height: 0;
  accent-color: var(--green);
}
input[type="file"] {
  padding: 7px;
  width: 100%;
}
textarea {
  resize: vertical;
  min-height: 84px;
}
input::placeholder {
  color: #a0a69e;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 550;
}
label.check {
  flex-direction: row;
  align-items: center;
  font-weight: 400;
}
label small {
  color: var(--muted);
  font-weight: 400;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 25px;
  letter-spacing: -0.8px;
  font-weight: 630;
  line-height: 1.2;
}
h2 {
  font-size: 14px;
  letter-spacing: -0.2px;
  font-weight: 650;
}
h3 {
  font-size: 12px;
  font-weight: 650;
}
small,
.muted {
  color: var(--muted);
}
.mono,
.money,
.number,
time {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.money,
.number {
  text-align: right;
}
.positive {
  color: var(--green);
}
.negative {
  color: var(--red);
}
.shell {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 218px;
  border-right: 1px solid var(--line);
  background: #f9faf7;
  display: flex;
  flex-direction: column;
  padding: 28px 14px 16px;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 30px;
}
.brand-mark {
  width: 30px;
  height: 30px;
}
.brand strong {
  font-size: 17px;
  letter-spacing: -0.5px;
}
.brand span {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--muted);
  margin-top: 1px;
}
.nav-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #949c92;
  padding: 15px 14px 8px;
  font-weight: 650;
  text-transform: uppercase;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #687268;
  margin: 2px 0;
}
.nav-link:hover {
  text-decoration: none;
  background: #f0f3ed;
}
.nav-link.active {
  color: var(--green);
  background: #e8eee5;
  font-weight: 650;
}
.nav-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.nav-link .count {
  margin-left: auto;
  border-radius: 4px;
  padding: 0 5px;
  background: #d9e4d4;
  font-size: 10px;
  font-family: var(--mono);
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 30px;
}
.workspace {
  border-top: 1px solid var(--line);
  padding: 17px 9px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  display: grid;
  place-items: center;
  background: #e9ece3;
  color: #4b5e45;
  border: 1px solid #d7dfd2;
  border-radius: 7px;
  width: 31px;
  height: 31px;
  font-size: 11px;
  font-weight: 650;
}
.workspace-name {
  font-size: 11px;
  font-weight: 650;
  max-width: 135px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workspace small {
  font-size: 9px;
}
.main {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 57px;
  border-bottom: 1px solid var(--line);
  background: #ffffffab;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  gap: 12px;
}
.crumb {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}
.crumb b {
  color: var(--ink);
  font-weight: 500;
}
.top-right {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
}
.status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #729260;
  border-radius: 50%;
  margin-right: 6px;
}
.mobile-menu {
  display: none;
}
.content {
  padding: 31px 32px 45px;
  max-width: 1700px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  gap: 16px;
}
.page-heading p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 7px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.4px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 19px 20px;
  position: relative;
}
.metric-label {
  color: #69756a;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.metric-label svg {
  width: 15px;
  height: 15px;
  color: #a0ae99;
}
.metric-value {
  font-family: var(--mono);
  font-size: 27px;
  letter-spacing: -1px;
  margin: 15px 0 8px;
  font-weight: 500;
  line-height: 1.15;
}
.metric-note {
  color: var(--muted);
  font-size: 10px;
}
.metric-note strong {
  font-weight: 550;
  color: var(--green);
}
.grid-2 {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  margin-bottom: 22px;
}
.grid-equal {
  grid-template-columns: 1fr 1fr;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.panel-head small {
  font-size: 10px;
}
.panel-body {
  padding: 20px;
}
.panel-footer {
  padding: 11px 20px;
  background: #fafbf8;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.section-gap {
  margin-bottom: 22px;
}
.table-wrap {
  width: 100%;
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 12px;
  text-align: left;
}
th {
  font-size: 9px;
  letter-spacing: 0.65px;
  text-transform: uppercase;
  color: #838c80;
  background: #fafbf8;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid #edf0e8;
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fafcf7;
}
td strong {
  font-weight: 550;
}
td small {
  display: block;
  font-size: 10px;
  margin-top: 3px;
}
.col-description {
  white-space: normal;
  min-width: 190px;
  max-width: 340px;
}
.col-date {
  color: #778074;
  font-family: var(--mono);
  font-size: 10px;
}
.table-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.2;
  padding: 4px 7px;
  border-radius: 4px;
  background: #f0f2ec;
  color: #7c8477;
  font-size: 9px;
  font-weight: 550;
  white-space: nowrap;
}
.tag.green {
  background: #ecf3e7;
  color: #537345;
}
.tag.orange {
  background: #faf1df;
  color: #a07934;
}
.tag.red {
  background: #f8e9e5;
  color: #a15c4f;
}
.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  flex-wrap: wrap;
}
.filters input,
.filters select {
  font-size: 11px;
  padding: 7px 9px;
  min-height: 33px;
}
.filters input[type="search"] {
  min-width: 180px;
  flex: 1;
  max-width: 340px;
}
.filters .spacer {
  flex: 1;
}
.filters label {
  font-size: 10px;
  flex-direction: row;
  align-items: center;
  font-weight: 400;
  color: var(--muted);
}
.empty {
  text-align: center;
  padding: 52px 24px;
  color: var(--muted);
}
.empty svg {
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  color: #a7b49f;
}
.empty h3 {
  color: #53634e;
  margin-bottom: 5px;
  font-size: 13px;
}
.empty p {
  font-size: 11px;
  max-width: 340px;
  margin: 0 auto 17px;
}
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 12px;
  border-bottom: 1px solid #edf0e8;
}
.list-row:last-child {
  border-bottom: 0;
}
.list-row .title {
  font-size: 12px;
  font-weight: 550;
}
.list-row small {
  font-size: 10px;
  display: block;
  margin-top: 3px;
}
.list-row .money {
  font-size: 12px;
}
.bank-icon {
  width: 32px;
  height: 32px;
  background: #f0f3eb;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #6a805c;
}
.bank-icon svg {
  width: 16px;
  height: 16px;
}
.inline {
  display: flex;
  align-items: center;
  gap: 12px;
}
.callout {
  background: #edf2e7;
  border: 1px solid #dce7d2;
  padding: 17px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.callout h3 {
  color: #375831;
  margin-bottom: 4px;
}
.callout p {
  color: #738169;
  font-size: 11px;
}
.callout.neutral {
  background: #fafbf8;
  border-color: var(--line);
}
.callout.warning {
  background: #fff8eb;
  border-color: #eddcbd;
}
.timer-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 15px 18px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.timer-bar input {
  flex: 1;
  min-width: 190px;
  border-color: transparent;
  background: #f7f9f4;
}
.timer-bar select {
  max-width: 260px;
  font-size: 11px;
  background: #f7f9f4;
}
.timer-readout {
  font-family: var(--mono);
  font-size: 22px;
  min-width: 118px;
  text-align: center;
  letter-spacing: -0.5px;
}
.timer-bar.running {
  border-color: #9fba8f;
  box-shadow: 0 0 0 2px #ecf1e7;
}
.timer-description {
  flex: 1;
  min-width: 160px;
}
.timer-description strong {
  display: block;
  font-size: 12px;
}
.timer-description small {
  font-size: 10px;
}
.running-dot {
  width: 7px;
  height: 7px;
  background: #71944e;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
.mini-timer {
  display: none;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 11px;
}
.mini-timer.visible {
  display: flex;
}
.keyboard {
  font-family: var(--mono);
  font-size: 9px;
  color: #9ca593;
  padding: 2px 4px;
  border: 1px solid #dfe5d7;
  border-radius: 3px;
  margin-left: auto;
}
.report-total {
  display: flex;
  justify-content: space-between;
  padding: 13px 18px;
  border-top: 1px solid #cbd6c4;
  background: #f4f7ef;
  font-weight: 600;
}
.report-section {
  padding: 12px 18px 7px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}
.report-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 18px;
  font-size: 12px;
}
.report-line.indent {
  padding-left: 30px;
}
.report-line .mono {
  color: #87917f;
  font-size: 10px;
  margin-right: 8px;
}
.report-line.total {
  font-weight: 650;
  border-top: 1px solid var(--line);
  margin-top: 9px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.report-equation {
  padding: 15px 20px;
  background: #fafbf8;
  color: var(--muted);
  font-size: 11px;
  border-top: 1px solid var(--line);
}
.report-equation .positive {
  font-weight: 600;
}
.tabs {
  display: flex;
  gap: 19px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 20px;
}
.tabs button {
  padding: 0 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  font-size: 11px;
  color: var(--muted);
}
.tabs button.active {
  border-color: var(--green);
  color: var(--green);
}
.account-type {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
}
.chart {
  height: 175px;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  padding: 15px 10px 24px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.chart-column {
  flex: 1;
  min-width: 20px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  position: relative;
  height: 100%;
  justify-content: center;
}
.chart-bar {
  width: 24%;
  max-width: 27px;
  background: #416b45;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
}
.chart-bar.expense {
  background: #dbe3d1;
}
.chart-column small {
  position: absolute;
  bottom: -21px;
  font-size: 9px;
  font-family: var(--mono);
  color: #8c9684;
}
.legend {
  display: flex;
  gap: 18px;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 8px;
}
.swatch {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #416b45;
  border-radius: 2px;
  margin-right: 5px;
}
.swatch.light {
  background: #dbe3d1;
}
.setup-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.step {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 17px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.step .step-number {
  font-family: var(--mono);
  font-size: 10px;
  color: #8e9b84;
}
.step p {
  font-size: 11px;
  color: var(--muted);
  flex: 1;
}
.progress {
  height: 4px;
  background: #edf0e8;
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
}
.progress span {
  display: block;
  background: #7e9b63;
  height: 100%;
}
details.journal {
  border-bottom: 1px solid var(--line);
}
details.journal:last-child {
  border: 0;
}
details.journal summary {
  list-style: none;
  display: grid;
  grid-template-columns: 85px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
}
details.journal summary:hover {
  background: #fafcf7;
}
details.journal summary::-webkit-details-marker {
  display: none;
}
details.journal[open] summary {
  background: #f4f7f0;
}
.journal-detail {
  padding: 0 18px 15px;
}
.journal-detail table {
  font-size: 11px;
}
.journal-detail th,
.journal-detail td {
  padding: 8px 10px;
}
.receipt-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.receipt-list a {
  font-size: 11px;
  border: 1px solid var(--line);
  padding: 5px 8px;
  border-radius: 4px;
}
.notice {
  font-size: 11px;
  color: var(--muted);
  padding: 12px 14px;
  background: #f7f9f3;
  border-radius: 5px;
  line-height: 1.7;
}
.notice.error {
  background: #fbefeb;
  color: var(--red);
}
dialog {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 90px #1428152b;
  width: min(520px, calc(100vw - 28px));
  max-height: calc(100dvh - 40px);
  color: var(--ink);
}
dialog.wide {
  width: min(900px, calc(100vw - 28px));
}
dialog::backdrop {
  background: #15261760;
  backdrop-filter: blur(2px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 23px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  font-size: 17px;
}
.modal-body {
  padding: 22px;
  display: grid;
  gap: 16px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.modal-footer {
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: #fafbf8;
}
.modal-footer .muted {
  margin-right: auto;
  align-self: center;
  font-size: 10px;
}
.form-error {
  color: var(--red);
  font-size: 12px;
}
.journal-input-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 7px;
  margin-bottom: 8px;
}
.journal-input-row input,
.journal-input-row select {
  min-width: 0;
  width: 100%;
  font-size: 11px;
}
.import-preview {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.import-preview th {
  position: sticky;
  top: 0;
}
.import-preview td {
  font-size: 10px;
  padding: 9px;
}
.import-summary {
  display: flex;
  gap: 16px;
  font-size: 12px;
}
.split-total {
  display: flex;
  justify-content: flex-end;
  gap: 22px;
  font-size: 11px;
  padding: 8px 0;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.stack {
  display: grid;
  gap: 20px;
}
.settings-form {
  display: grid;
  gap: 15px;
}
.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f7f8f4;
}
.auth-story {
  background: #eaf0e4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 55px 65px;
  border-right: 1px solid #dfe6d7;
}
.auth-story .brand {
  padding: 0;
}
.auth-story h1 {
  font-size: 45px;
  line-height: 1.15;
  max-width: 380px;
  letter-spacing: -1.7px;
}
.auth-story p {
  color: #6d7f60;
  font-size: 14px;
  max-width: 320px;
  margin-top: 22px;
  line-height: 1.8;
}
.auth-story footer {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.7px;
  color: #8d9b81;
}
.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 35px;
}
.auth-form {
  width: 340px;
}
.auth-form h2 {
  font-size: 22px;
  margin-bottom: 8px;
}
.auth-form > p {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 25px;
}
.auth-form form {
  display: grid;
  gap: 16px;
}
.auth-form button {
  margin-top: 5px;
  width: 100%;
}
.auth-form .notice {
  margin-top: 18px;
}
.boot {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  color: var(--muted);
  font-size: 12px;
}
#toasts {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  display: grid;
  gap: 8px;
  max-width: 380px;
}
.toast {
  background: #264b37;
  color: white;
  border: 1px solid #3d6049;
  box-shadow: 0 8px 25px #15271524;
  border-radius: 7px;
  padding: 13px 17px;
  font-size: 12px;
}
.toast.error {
  background: #8e453b;
  border-color: #a5675c;
}
.loading {
  opacity: 0.55;
  pointer-events: none;
}
.footer-note {
  color: #97a08e;
  font-size: 9px;
  margin-top: 25px;
  display: flex;
  justify-content: space-between;
}
.hide {
  display: none !important;
}
.mobile-only {
  display: none;
}
@media (min-width: 1600px) {
  .content {
    padding: 38px 44px;
  }
  .topbar {
    padding: 0 44px;
  }
}
@media (max-width: 1150px) {
  .shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .sidebar {
    width: 190px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .content {
    padding: 25px 22px;
  }
  .topbar {
    padding: 0 22px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 15px;
  }
  .metric-value {
    font-size: 22px;
  }
  .grid-2 {
    grid-template-columns: 1.2fr 1fr;
  }
  .nav-link {
    font-size: 11px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .timer-bar select {
    max-width: 210px;
  }
}
@media (max-width: 850px) {
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .auth-story {
    padding: 40px;
  }
  .auth-story h1 {
    font-size: 33px;
  }
  .setup-steps {
    grid-template-columns: 1fr;
  }
  .step {
    gap: 7px;
  }
  .content {
    padding: 22px 18px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading .actions {
    justify-content: flex-end;
  }
  .timer-bar {
    padding: 12px;
  }
  .timer-bar input {
    min-width: 150px;
  }
  .timer-bar select {
    max-width: none;
    flex: 1;
  }
}
@media (max-width: 620px) {
  .shell {
    display: block;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.16s;
    width: 218px;
    box-shadow: 10px 0 50px #12251025;
  }
  .shell.nav-open .sidebar {
    transform: none;
  }
  .main {
    width: 100%;
  }
  .topbar {
    height: 51px;
    padding: 0 15px;
    position: sticky;
    top: 0;
    z-index: 15;
    backdrop-filter: blur(10px);
  }
  .top-right .server-status {
    display: none;
  }
  .mobile-menu {
    display: inline-flex;
    padding: 5px;
    background: transparent;
    border: 0;
  }
  .crumb {
    gap: 8px;
  }
  .crumb > span {
    display: none;
  }
  .content {
    padding: 23px 14px 30px;
  }
  h1 {
    font-size: 23px;
  }
  .page-heading {
    margin-bottom: 21px;
    gap: 8px;
  }
  .page-heading .actions button {
    font-size: 10px;
    padding: 7px 9px;
  }
  .page-heading p {
    font-size: 11px;
  }
  .metric {
    padding: 13px;
  }
  .metric-value {
    font-size: 23px;
    margin-top: 12px;
  }
  .metric-label {
    font-size: 10px;
  }
  .metric-note {
    font-size: 9px;
  }
  .metrics {
    gap: 9px;
    margin-bottom: 18px;
  }
  .panel-head {
    padding: 14px 15px;
  }
  .filters {
    gap: 6px;
  }
  .filters input[type="search"] {
    max-width: none;
    flex-basis: 100%;
  }
  .filters label {
    flex: 1;
  }
  .filters label input {
    width: 100%;
  }
  .filters select {
    flex: 1;
    max-width: 100%;
  }
  .callout {
    align-items: flex-start;
    padding: 13px 15px;
  }
  .callout button {
    font-size: 10px;
  }
  .timer-bar {
    gap: 8px;
  }
  .timer-bar > input {
    flex-basis: 100%;
    order: 0;
  }
  .timer-bar select {
    max-width: calc(100% - 145px);
    order: 1;
  }
  .timer-readout {
    font-size: 19px;
    min-width: 98px;
    order: 2;
  }
  .timer-bar > button {
    order: 3;
  }
  .timer-description {
    flex-basis: 60%;
  }
  .auth-screen {
    grid-template-columns: 1fr;
  }
  .auth-story {
    padding: 25px;
    border-right: 0;
  }
  .auth-story h1,
  .auth-story p,
  .auth-story footer {
    display: none;
  }
  .auth-form-wrap {
    align-items: flex-start;
    padding: 30px 24px 50px;
  }
  .auth-form {
    width: 100%;
    max-width: 360px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: auto;
  }
  .modal-body {
    padding: 18px;
  }
  .modal-head {
    padding: 17px 18px;
  }
  dialog {
    max-height: calc(100dvh - 20px);
  }
  .journal-input-row {
    grid-template-columns: 1fr 1fr auto;
  }
  .journal-input-row select {
    grid-column: 1/-1;
  }
  .journal summary {
    font-size: 11px;
  }
  details.journal summary {
    grid-template-columns: 65px 1fr auto;
    padding: 12px;
    gap: 8px;
  }
  .settings-grid {
    gap: 16px;
  }
  .mobile-only {
    display: block;
  }
  .footer-note {
    font-size: 8px;
  }
  #toasts {
    left: 14px;
    right: 14px;
    bottom: 14px;
    max-width: none;
  }
}
@media print {
  .sidebar,
  .topbar,
  .page-heading .actions,
  .filters,
  .tabs,
  .footer-note,
  button,
  #toasts,
  .timer-bar {
    display: none !important;
  }
  .shell {
    display: block;
  }
  .content {
    padding: 0;
  }
  .main {
    width: 100%;
  }
  .panel,
  .metric {
    break-inside: avoid;
    border-color: #ccc;
  }
  .grid-2 {
    display: block;
  }
  .grid-2 > .panel {
    margin-bottom: 20px;
  }
  .table-wrap {
    overflow: visible;
  }
  .panel {
    overflow: visible;
  }
  body {
    background: white;
    font-size: 11px;
  }
  .page-heading {
    margin-bottom: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 620px) {
  .sidebar { visibility: hidden; pointer-events: none; }
  .shell.nav-open .sidebar { visibility: visible; pointer-events: auto; }
}
