:root {
  color-scheme: light;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: var(--canvas);
  color: var(--ink);
  --canvas: #f5f2e9;
  --ink: #20342f;
  --paper: #fffdf8;
  --line: #d9d4c6;
  --line-soft: #e8e3d8;
  --red: #9d3428;
  --red-strong: #6e211b;
  --on-red: #ffffff;
  --primary: var(--red);
  --primary-hover: var(--red-strong);
  --on-primary: var(--on-red);
  --blue: #285a70;
  --muted: #5f6e67;
  --soft: #eef5f1;
  --control: #ffffff;
  --control-line: #aaa598;
  --hover: #f3eee1;
  --focus: #d7aa51;
  --positive: #286241;
  --warning: #76520c;
  --danger: #8a2d25;
  --header: #fffdf8ed;
  --shadow: #20342f30;
  --shadow-soft: #20342f24;
  --card-shadow: #3c352518;
  --notice-line: #b9c9c3;
  --toast-line: #cfbda3;
  --toast: #fff8dc;
  --error-line: #cf8e87;
  --error-surface: #fff0ee;
  --warning-line: #e8c779;
  --warning-surface: #fff3d9;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #181818;
  --ink: #f0f0f0;
  --paper: #222222;
  --line: #484848;
  --line-soft: #353535;
  --red: #f08a7c;
  --red-strong: #ffafa4;
  --on-red: #17110f;
  --blue: #80bad2;
  --muted: #b3b3b3;
  --soft: #2b2b2b;
  --control: #1c1c1c;
  --control-line: #666666;
  --hover: #303030;
  --focus: #e5b85d;
  --positive: #7fd3a1;
  --warning: #e7c16c;
  --danger: #ff9a8e;
  --header: #222222ed;
  --shadow: #00000066;
  --shadow-soft: #0000004d;
  --card-shadow: #00000052;
  --notice-line: #555555;
  --toast-line: #746842;
  --toast: #332e1e;
  --error-line: #82514b;
  --error-surface: #382321;
  --warning-line: #806d3e;
  --warning-surface: #342d1c;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --canvas: #181818;
    --ink: #f0f0f0;
    --paper: #222222;
    --line: #484848;
    --line-soft: #353535;
    --red: #f08a7c;
    --red-strong: #ffafa4;
    --on-red: #17110f;
    --blue: #80bad2;
    --muted: #b3b3b3;
    --soft: #2b2b2b;
    --control: #1c1c1c;
    --control-line: #666666;
    --hover: #303030;
    --focus: #e5b85d;
    --positive: #7fd3a1;
    --warning: #e7c16c;
    --danger: #ff9a8e;
    --header: #222222ed;
    --shadow: #00000066;
    --shadow-soft: #0000004d;
    --card-shadow: #00000052;
    --notice-line: #555555;
    --toast-line: #746842;
    --toast: #332e1e;
    --error-line: #82514b;
    --error-surface: #382321;
    --warning-line: #806d3e;
    --warning-surface: #342d1c;
  }
}

* { box-sizing: border-box; }

/* Overlay-style scrollbars keep scrollable app surfaces visually light while
   preserving a usable native scrollbar in Firefox and WebKit browsers. */
* {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--ink) 28%, transparent) transparent;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 9999px;
  background-clip: padding-box;
  background-color: color-mix(in srgb, var(--ink) 28%, transparent);
}
::-webkit-scrollbar-thumb:hover {
  background-color: color-mix(in srgb, var(--ink) 45%, transparent);
}
::-webkit-scrollbar-corner { background: transparent; }

body { min-height: 100vh; margin: 0; }
a { color: var(--red); text-underline-offset: .2em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .5rem; font-size: clamp(1.7rem, 2.5vw, 2.15rem); line-height: 1.2; font-weight: 650; letter-spacing: -.035em; }
h2 { font-size: 1.125rem; line-height: 1.35; font-weight: 650; letter-spacing: -.02em; }
h3 { font-size: 1rem; line-height: 1.4; font-weight: 600; }
p, li { line-height: 1.5; }

.skip-link {
  position: fixed;
  z-index: 60;
  top: -5rem;
  left: 1rem;
  padding: .75rem 1rem;
  border-radius: .3rem;
  background: var(--paper);
  color: var(--ink);
}
.skip-link:focus { top: 1rem; }

main:not(.app-main) { max-width: 46rem; margin: 8vh auto; padding: 2rem; }
form { display: grid; gap: .8rem; }
label { display: grid; gap: .45rem; font-size: .875rem; font-weight: 550; }
input, select, textarea, button, .button {
  min-height: 2.75rem;
  padding: .68rem .8rem;
  border-radius: .5rem;
  font: inherit;
  font-size: .9375rem;
}
input, select, textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--control-line);
  background: var(--control);
  color: var(--ink);
  font-weight: 400;
}
/* Single-line controls keep the same height even when adjacent labels wrap. */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="range"]):not([type="color"]),
select:not([multiple]):not([size]) {
  height: calc(1.4em + 1.36rem + 2px);
  line-height: 1.4;
  align-self: start;
}
input[type="checkbox"], input[type="radio"] {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  min-height: 0;
  padding: 0;
  accent-color: var(--red);
}
textarea { min-height: 5rem; resize: vertical; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button:hover { border-color: var(--primary-hover); background: var(--primary-hover); }
.button-secondary, .button.secondary, button.secondary {
  border-color: var(--control-line);
  background: var(--paper);
  color: var(--ink);
}
.button-secondary:hover, .button.secondary:hover, button.secondary:hover {
  border-color: var(--control-line);
  background: var(--hover);
  color: var(--ink);
}
.button-quiet { border-color: transparent; background: transparent; color: var(--muted); }
.button-quiet:hover { border-color: transparent; background: var(--hover); color: var(--ink); }
.button-confirm { border-color: var(--positive); background: var(--positive); color: var(--paper); }
.button-confirm:hover { border-color: var(--positive); background: color-mix(in srgb, var(--positive) 85%, var(--ink)); color: var(--paper); }
.button-danger, button.danger { border-color: var(--danger); background: var(--danger); color: var(--paper); }
.button-danger:hover, button.danger:hover { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 85%, var(--ink)); color: var(--paper); }
.button-link { min-height: 0; padding: 0; gap: .35rem; border: 0; background: transparent; color: var(--red); }
.button-link:hover { border: 0; background: transparent; color: var(--red-strong); }
button:focus-visible, .button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.eyebrow, .label {
  display: block;
  margin-bottom: .45rem;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.hint, small { display: block; color: var(--muted); font-size: .84rem; font-weight: 400; }
.muted { color: var(--muted); }
.empty { padding: 1rem 0; color: var(--muted); }

.biab-field { align-content: start; }
.biab-field-label { display: block; }
.biab-field-hint { font-weight: 400; }
.biab-field-errors {
  display: grid;
  gap: .2rem;
  margin: 0;
  padding: 0;
  color: var(--danger);
  font-size: .84rem;
  font-weight: 650;
  list-style: none;
}
.biab-field [aria-invalid="true"] { border-color: var(--red); }
.biab-choice {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  align-items: start;
  gap: .6rem;
}
.biab-choice > input[type="checkbox"], .biab-choice > input[type="radio"] { margin-top: .14rem; }
.biab-choice > label { display: block; font-weight: 600; cursor: pointer; }
.biab-choice > label small { margin-top: .2rem; font-weight: 400; }
button[disabled], .button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.status-neutral { color: var(--blue); }
.status-positive { color: var(--positive); }
.status-warning { color: var(--warning); }
.status-danger { color: var(--danger); }
.biab-panel-heading { margin-bottom: 1rem; }
.biab-panel-heading .eyebrow { margin-bottom: .35rem; }
.biab-panel-subtitle { margin: .35rem 0 0; color: var(--muted); }
.biab-panel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.biab-panel-body > :last-child { margin-bottom: 0; }
.empty-state {
  display: grid;
  justify-items: start;
  gap: .35rem;
  padding: 1.25rem;
  border: 1px dashed var(--line);
  border-radius: .4rem;
  color: var(--muted);
}
.empty-state strong { color: var(--ink); }
.empty-state p { margin: 0; }
.empty-state-action { margin-top: .45rem; }

.toast-region {
  position: fixed;
  z-index: 50;
  inset: 1rem 1rem auto auto;
  display: grid;
  gap: .6rem;
  width: min(25rem, calc(100vw - 2rem));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem;
  border: 1px solid var(--toast-line);
  border-radius: .4rem;
  background: var(--toast);
  box-shadow: 0 .8rem 2rem var(--shadow-soft);
  pointer-events: auto;
}
.toast-error { border-color: var(--error-line); background: var(--error-surface); }
.toast-dismiss, .toast button {
  flex: 0 0 auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: currentColor;
  font-size: 1.25rem;
  line-height: 1;
}

.biab-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  stroke-width: 2;
}
.dismiss-icon { width: 1.15rem; height: 1.15rem; }

.install-banner {
  position: fixed;
  z-index: 40;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(34rem, calc(100vw - 2rem));
  padding: 1rem;
  border: 1px solid var(--red);
  border-radius: .5rem;
  background: var(--paper);
  box-shadow: 0 1rem 3rem var(--shadow);
}
.install-banner[hidden] { display: none; }
.install-banner > div:first-child { display: grid; flex: 1; gap: .2rem; }
.install-banner span { color: var(--muted); font-size: .86rem; }
.install-actions { display: flex; gap: .5rem; }
.install-actions button { white-space: nowrap; }

.auth-card, .receipt-page {
  max-width: 34rem !important;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 1rem 3rem var(--card-shadow);
}
.demo-login { margin: 1.5rem 0; padding: 1rem; border: 1px solid var(--notice-line); border-radius: .4rem; background: var(--soft); }
.demo-login h2 { margin: .25rem 0 .35rem; }
.demo-login p { margin-bottom: .8rem; }

.app-frame {
  --app-header-height: 4rem;
  --app-sidebar-width: 13.5rem;
  min-height: 100vh;
}
.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: var(--app-header-height);
  padding: .625rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--header);
  backdrop-filter: blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: .35rem; color: var(--ink); font-weight: 650; letter-spacing: -.025em; text-decoration: none; white-space: nowrap; }
.app-header .brand { font-size: 1.15rem; font-weight: 500; }
.app-header .brand-icon { width: 18px; height: 18px; color: var(--muted); }
.app-header-actions { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.app-theme-switcher {
  display: inline-flex; flex: 0 0 auto; gap: 0; padding: 3px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--canvas);
}
.app-theme-option {
  display: grid; place-items: center; width: 36px; min-height: 36px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted);
}
.app-theme-option:hover { border: 0; background: var(--hover); color: var(--ink); }
.app-theme-option[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px var(--card-shadow); }
.theme-icon { width: 17px; height: 17px; flex-shrink: 0; }
.page-tools { position: relative; flex: 0 0 auto; }
.page-tools > summary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .6rem .75rem; border: 1px solid var(--control-line);
  border-radius: .5rem; background: var(--paper); color: var(--ink); font-size: .875rem;
  font-weight: 500; list-style: none; cursor: pointer;
}
.page-tools > summary::-webkit-details-marker { display: none; }
main .page-tools > summary::before { display: none; }
.page-tools > summary:hover { background: var(--hover); }
.page-tools > summary .biab-icon { width: 1rem; height: 1rem; }
.page-tools-menu {
  position: absolute; z-index: 30; inset: calc(100% + .5rem) 0 auto auto;
  display: grid; gap: .2rem; width: 17rem; max-width: calc(100vw - 2rem); padding: .4rem;
  border: 1px solid var(--line); border-radius: .7rem; background: var(--paper); box-shadow: 0 .5rem 2rem var(--shadow-soft);
}
.page-tools-menu a {
  display: flex; align-items: center; justify-content: flex-start; gap: .65rem;
  width: 100%; min-height: 44px; padding: .65rem .75rem; border: 0; border-radius: .35rem;
  background: transparent; color: var(--ink); font-size: .875rem; font-weight: 400; text-align: left; text-decoration: none;
}
.page-tools-menu a:hover { border: 0; background: var(--hover); color: var(--ink); }
.sidebar-toggle {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.sidebar-toggle:hover { border-color: transparent; background: var(--hover); color: var(--ink); }
.sidebar-toggle-icon { width: 20px; height: 20px; }
.sidebar-expand-icon { display: none; }
.app-workspace { display: flex; min-height: calc(100vh - var(--app-header-height)); }
.app-sidebar {
  position: sticky;
  top: var(--app-header-height);
  display: flex;
  flex: 0 0 var(--app-sidebar-width);
  flex-direction: column;
  align-self: flex-start;
  width: var(--app-sidebar-width);
  height: calc(100vh - var(--app-header-height));
  padding: 1rem .75rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--line-soft);
  background: var(--canvas);
  transition: width 160ms ease, flex-basis 160ms ease;
}
.app-nav { display: grid; flex: 1; align-content: start; gap: 1.25rem; }
.app-nav-section, .app-menu-section { display: grid; gap: .2rem; }
.app-nav-section-label {
  margin: 0;
  padding: .25rem .7rem;
  overflow: hidden;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 550;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
.app-nav-link {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 2.75rem;
  padding: .55rem .7rem;
  overflow: hidden;
  border-radius: .5rem;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.app-nav-link:hover { background: var(--hover); color: var(--ink); }
.app-nav-link[aria-current="page"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px var(--card-shadow); font-weight: 600; }
.app-nav-link[aria-current="page"] .app-nav-icon { color: var(--ink); }
.app-nav-icon { width: 18px; height: 18px; }
.app-nav-label { overflow: hidden; text-overflow: ellipsis; }
.desktop-sign-out { display: block; margin: 1rem .7rem 0; }
.desktop-sign-out .button-link { min-height: 44px; gap: .7rem; white-space: nowrap; color: var(--muted); font-size: .875rem; font-weight: 500; }
.app-main { min-width: 0; width: 100%; max-width: 74rem; margin: 0 auto; padding: 2.5rem clamp(1.25rem, 3vw, 2.5rem) 5rem; }
.page-heading { margin-bottom: 2rem; }
.page-heading h1 { margin-bottom: 0; }
.preserve-lines { white-space: pre-line; overflow-wrap: anywhere; }
.page-subtitle { font-size: .9375rem; max-width: 48rem; margin: .55rem 0 0; color: var(--muted); }

:root[data-app-sidebar-collapsed="true"] .app-frame,
.app-frame[data-sidebar-collapsed="true"] { --app-sidebar-width: 4.5rem; }
:is(
  :root[data-app-sidebar-collapsed="true"] .app-frame,
  .app-frame[data-sidebar-collapsed="true"]
) .app-sidebar { padding-inline: .65rem; }
:is(
  :root[data-app-sidebar-collapsed="true"] .app-frame,
  .app-frame[data-sidebar-collapsed="true"]
) .app-sidebar .app-nav-section-label,
:is(
  :root[data-app-sidebar-collapsed="true"] .app-frame,
  .app-frame[data-sidebar-collapsed="true"]
) .app-sidebar .app-nav-label,
:is(
  :root[data-app-sidebar-collapsed="true"] .app-frame,
  .app-frame[data-sidebar-collapsed="true"]
) .app-sidebar .desktop-sign-out span { display: none; }
:is(
  :root[data-app-sidebar-collapsed="true"] .app-frame,
  .app-frame[data-sidebar-collapsed="true"]
) .app-sidebar .app-nav { gap: .3rem; }
:is(
  :root[data-app-sidebar-collapsed="true"] .app-frame,
  .app-frame[data-sidebar-collapsed="true"]
) .app-sidebar .app-nav-link { justify-content: center; padding-inline: .55rem; }
:is(
  :root[data-app-sidebar-collapsed="true"] .app-frame,
  .app-frame[data-sidebar-collapsed="true"]
) .app-sidebar .desktop-sign-out { margin-inline: .55rem; }
:is(
  :root[data-app-sidebar-collapsed="true"] .app-frame,
  .app-frame[data-sidebar-collapsed="true"]
) .app-sidebar .desktop-sign-out .button-link { width: 100%; justify-content: center; }
:is(
  :root[data-app-sidebar-collapsed="true"] .app-frame,
  .app-frame[data-sidebar-collapsed="true"]
) .sidebar-collapse-icon { display: none; }
:is(
  :root[data-app-sidebar-collapsed="true"] .app-frame,
  .app-frame[data-sidebar-collapsed="true"]
) .sidebar-expand-icon { display: block; }

.notification-drawer { position: relative; flex: 0 0 auto; margin: 0; }
.notification-drawer > summary {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.notification-drawer > summary::-webkit-details-marker { display: none; }
.notification-drawer > summary:hover { background: var(--hover); }
.app-header .notification-icon { width: 20px; height: 20px; }
.notification-drawer > summary i {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--paper);
  border-radius: 999px;
  background: var(--red);
}
.notification-drawer-panel {
  position: absolute;
  top: calc(100% + .65rem);
  right: 0;
  width: min(24rem, calc(100vw - 1.5rem));
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--paper);
  box-shadow: 0 1rem 3rem var(--shadow);
}
.notification-drawer-heading { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem .25rem .65rem; }
.notification-drawer-row { display: block; padding: .7rem .55rem; border-top: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.notification-drawer-row:hover { background: var(--hover); }
.notification-drawer-row small { margin-top: .15rem; }

.app-menu { display: none; margin: 0; }
.app-menu > summary {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .4rem .55rem;
  border: 1px solid var(--line);
  border-radius: .3rem;
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}
.app-menu > summary::-webkit-details-marker { display: none; }
.app-menu:not([open]) > .app-menu-panel { display: none; }
.app-header .menu-icon { width: 20px; height: 20px; }
.sign-out-icon { width: 18px; height: 18px; }
.app-menu-panel {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  display: grid;
  gap: .7rem;
  max-height: calc(100dvh - 100%);
  overscroll-behavior-y: contain;
  padding: .65rem .75rem 1rem;
  overflow-y: auto;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 1rem 2rem var(--shadow-soft);
}
.app-menu-panel a { white-space: normal; }
.app-menu-panel form { display: block; margin: 0; padding: .45rem .7rem; }
.app-menu-panel form .button-link { min-height: 44px; gap: .7rem; }

.panel, .surface {
  margin-bottom: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: var(--paper);
}
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.panel-heading h2 { margin: 0; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.summary-card {
  display: grid;
  gap: .2rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: .4rem;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}
.summary-card strong { font-size: 1.5rem; }
.summary-card span { color: var(--muted); font-size: .84rem; }
.split-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.row-link, .record, .check-row, .invoice-line, .invoice-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.row-link { color: var(--ink); text-decoration: none; }
.row-link:hover strong { color: var(--red); }
.row-link > span:last-child { text-align: right; }
.record:last-child, .row-link:last-child { border-bottom: 0; }
.record > span { display: grid; gap: .25rem; }
.record.stacked { display: grid; }
.status {
  display: inline-block;
  color: var(--blue);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.detail-grid, .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid > * { min-width: 0; overflow-wrap: anywhere; }
/* Keep labels and controls together beside taller fields such as textareas. */
.form-grid > label:has(> :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select)):not(:has(> :is(small, p, ul))):not(.checkbox):not(.biab-choice) {
  grid-template-rows: auto auto;
  align-content: start;
}

.full { grid-column: 1 / -1; }
.action-row, .toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .7rem; margin: 1rem 0; }
.action-row form { margin: 0; }
.toolbar label { max-width: 10rem; }
.panel > form + form, .panel > form + details, .panel > details + form,
.panel > form + p, details > form { margin-top: .8rem; }
main form + :is(h2, h3, h4) { margin-block-start: 1.5rem; }
main details > summary {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  overflow-wrap: anywhere;
  list-style: none;
  cursor: pointer;
}
main details > summary::-webkit-details-marker { display: none; }
main details > summary::before {
  content: "";
  flex: 0 0 .45em;
  width: .45em;
  height: .45em;
  border-right: .12em solid currentColor;
  border-bottom: .12em solid currentColor;
  transform: rotate(-45deg);
}
main details[open] > summary::before { transform: rotate(45deg); }
main details[open] > summary { margin-block-end: .75rem; }
.checkbox { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.checkbox input { width: auto; }
fieldset { min-width: 0; padding: .8rem; border: 1px solid var(--line); }
legend { padding: 0 .35rem; font-weight: 750; }
.invoice-paper { max-width: 46rem; }
.invoice-total { border-bottom: 0; font-size: 1.05rem; }
.invoice-total + .invoice-total { border-top: 2px solid var(--ink); }
.notice { padding: 1rem; border: 1px solid var(--notice-line); background: var(--soft); }
.notice.warning { border-color: var(--warning-line); background: var(--warning-surface); }

@media (max-width: 760px) {
  .app-header { gap: .65rem; padding-block: .65rem; }
  .brand { flex: 1; align-self: center; overflow: hidden; text-overflow: ellipsis; }
  .sidebar-toggle, .app-sidebar { display: none; }
  .app-menu { display: block; }
  .app-main { padding-top: 1.25rem; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-panels, .detail-grid, .form-grid { grid-template-columns: 1fr; }
  .full { grid-column: auto; }
  .record.mobile-stack { align-items: flex-start; flex-direction: column; }
  .install-banner { align-items: stretch; flex-direction: column; }
}

@media (max-width: 430px) {
  main:not(.app-main) { margin: 0; padding: 1.25rem; }
  .app-header, .app-main { padding-inline: .75rem; }
  .brand span { overflow: hidden; text-overflow: ellipsis; }
}

.app-workspace-menu { min-width: 0; }
.page-heading:has(.page-heading-actions) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.page-heading-copy { min-width: 0; overflow-wrap: anywhere; }
.page-heading:has(.page-heading-actions) .page-heading-copy { flex: 1 1 18rem; }
.page-heading-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  gap: .65rem 1rem;
  overflow-wrap: anywhere;
}
.page-heading-actions > * { max-width: 100%; }

.biab-error-summary { border: 2px solid var(--danger); padding: 1rem; margin-block: 1rem; }
.biab-error-summary h2 { font-size: 1rem; margin: 0 0 .5rem; }
.biab-error-summary ul { margin: 0; padding-left: 1.25rem; }
.biab-error-summary:focus { outline: 3px solid var(--focus); outline-offset: 3px; }

[data-message-history][hidden], [data-notification-empty][hidden] { display: none !important; }
[data-message-history] { margin-top: .75rem; }
[data-message-history] .notification-drawer-row { overflow-wrap: anywhere; }

.biab-fuzzy-search { margin-bottom: 1.5rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--paper); }
.biab-fuzzy-search-controls { display: flex; align-items: center; gap: .75rem; margin-top: .5rem; }
.biab-fuzzy-search-controls input { min-width: 0; flex: 1; }
.biab-fuzzy-search-controls button { flex: none; }
.biab-fuzzy-search [data-fuzzy-status] { margin: .75rem 0 0; }
.biab-fuzzy-search [data-fuzzy-status]:empty { display: none; }
.biab-fuzzy-search ul { list-style: none; padding: 0; margin: .75rem 0 0; }
.biab-fuzzy-search li + li { border-top: 1px solid var(--line); }
.biab-fuzzy-search li a { display: block; padding: .85rem .5rem; text-decoration: none; overflow-wrap: anywhere; }
.biab-fuzzy-search li a:hover { background: var(--hover); }
.biab-fuzzy-search li strong { display: block; text-decoration: underline; text-underline-offset: .2em; }
.biab-fuzzy-search li span { display: block; color: var(--muted); margin-top: .3rem; font-size: .9rem; }
[data-fuzzy-search] [hidden], [data-fuzzy-search][hidden] { display: none !important; }

.setup-guide { padding: clamp(1.25rem, 3vw, 2rem); }
.setup-guide .setup-progress { display: block; width: 100%; height: .25rem; margin: .75rem 0 1.75rem; border: 0; border-radius: 1rem; overflow: hidden; background: var(--line-soft); accent-color: var(--positive); }
.setup-progress::-webkit-progress-bar { background: var(--line-soft); }
.setup-progress::-webkit-progress-value { background: var(--positive); border-radius: 1rem; }
.setup-progress::-moz-progress-bar { background: var(--positive); }
.setup-guide-copy { max-width: 42rem; }
.setup-guide-copy h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
.setup-guide-copy p { color: var(--muted); margin-bottom: 0; }
.setup-guide .setup-guide-navigation { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin: 1.75rem 0 0; }
.setup-guide-navigation > a:first-child { color: var(--muted); }
.setup-guide-navigation > :last-child { margin-inline-start: auto; }
.setup-guide-navigation form { margin: 0; }
.setup-guide-navigation .button-link { font-size: .875rem; color: var(--muted); min-height: 2.75rem; }

.app-main .page-heading-actions > a:not(.button) { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .6rem .75rem; border-radius: .5rem; color: var(--muted); text-decoration: none; }
.app-main .page-heading-actions > a:not(.button):hover { background: var(--hover); color: var(--ink); }
.app-main .page-heading-actions > .page-tools { margin: 0; }
.app-main h1 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -.04em;
}
.app-main > .page-heading { padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.page-heading-actions > a:not(.button) { font-size: .875rem; }
.app-main p { max-width: 65ch; }
.ui-section-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-bottom: 2rem; }
.ui-section-nav a { padding-block: .5rem; color: var(--muted); font-size: .875rem; text-decoration: none; }
.ui-section-nav a:hover { color: var(--ink); text-decoration: underline; }
.ui-record-page { display: grid; gap: 1.5rem; }
.ui-record-page > .ui-section-nav { margin: -1rem 0 0; }
.ui-record-contact { padding-bottom: 1.75rem; border-bottom: 1px solid var(--line); }
.ui-record-contact strong { font-size: .9375rem; font-weight: 500; overflow-wrap: anywhere; }
.ui-record-contact .label { text-transform: none; letter-spacing: 0; font-size: .8125rem; font-weight: 500; }
.ui-contact-edit > summary { font-size: .875rem; color: var(--muted); }
.ui-contact-edit[open] > summary { margin-bottom: 1rem; }
.ui-contact-edit form { max-width: 42rem; }
.ui-record-contact p { margin-bottom: 0; white-space: pre-line; }
.ui-record-columns { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 2rem; }
.ui-record-columns > .panel { min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; }
.ui-record-columns h2, .ui-record-page > .ui-record-activity h2 { margin-bottom: 1rem; }
.ui-record-columns .record.stacked { padding: 1.25rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--paper); margin-bottom: .75rem; }
.ui-record-columns .record p { margin-block: 0; font-size: .9375rem; }
.ui-record-columns .record summary { font-size: .875rem; color: var(--muted); }
.ui-record-columns .ui-record-name { font-size: 1.125rem; font-weight: 650; }
.ui-record-columns details[open] > summary { margin-bottom: 1rem; color: var(--ink); }
.ui-record-page > .ui-record-activity { padding: 1.5rem 0; border: 0; border-block: 1px solid var(--line); border-radius: 0; background: transparent; margin: 0; }
.ui-record-page > .ui-record-activity .record { flex-wrap: wrap; }
.ui-record-settings { padding-top: .5rem; }
.ui-record-settings > h2 { font-size: 1rem; color: var(--muted); margin-bottom: .75rem; }
.ui-record-settings > .panel, .ui-record-page > details.panel { padding: 1rem 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; margin: 0; }
.ui-record-settings > details > summary, .ui-record-page > details > summary { font-size: .9375rem; font-weight: 500; }
.ui-record-settings details[open] > summary, .ui-record-page > details[open] > summary { margin-bottom: 1rem; }
.ui-record-settings form { max-width: 42rem; }
@media (max-width: 760px) {
  .ui-record-columns { grid-template-columns: 1fr; }
  .ui-section-nav { gap: .25rem 1rem; }
}

/* Sections organize a page; paper surfaces identify a document or focused task. */
.app-main [hidden] { display: none !important; }
.app-main > .panel:not(.invoice-paper):not(.ui-paper):not(.setup-guide) {
  padding: 1.5rem 0;
  margin: 0 0 1rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.app-main > details.panel > summary { min-height: 2.75rem; align-items: center; font-size: 1rem; font-weight: 550; }
.app-main > details.panel[open] > summary { margin-bottom: 1.5rem; }
.app-main > .panel > h2, .app-main .panel-heading { margin-bottom: 1.25rem; }
.app-main .panel-heading { align-items: center; flex-wrap: wrap; }
.app-main .panel-heading h2 { margin: 0; }
.app-main .label { font-size: .8125rem; font-weight: 500; text-transform: none; letter-spacing: 0; }
.app-main .detail-grid { gap: 1.5rem 2rem; }
.app-main .detail-grid strong { font-weight: 550; }
.app-main .row-link { padding: 1.15rem .25rem; border-radius: .35rem; }
.app-main .row-link:hover { background: var(--hover); }
.app-main .row-link > :first-child { min-width: 0; overflow-wrap: anywhere; }
.app-main .row-link small { margin-top: .3rem; }
.app-main .row-link strong { font-size: 1rem; font-weight: 600; }
.app-main .status { font-size: .8125rem; font-weight: 550; text-transform: none; letter-spacing: 0; }
.app-main .empty { padding: 1.25rem 0; font-size: .9375rem; }
.app-main .stacked { display: grid; gap: 1rem; }
.app-main .stacked > p { margin-block: 0; }
.app-main fieldset { padding: 1.25rem; border-radius: .6rem; }
.app-main legend { font-size: .9375rem; font-weight: 600; }
.app-main > details > form, .app-main > details > .form-grid { max-width: 48rem; }
.app-main .ui-paper, .app-main .invoice-paper { padding: clamp(1.25rem, 3vw, 2.5rem); background: var(--paper); box-shadow: 0 4px 20px var(--card-shadow); }
.app-main .invoice-paper { max-width: 52rem; margin-bottom: 2rem; }
.app-main .invoice-paper .panel-heading h2 { font-size: 1.75rem; font-weight: 500; }
.app-main .invoice-paper .invoice-line { padding-block: 1rem; }
.app-main .invoice-total { padding-block: 1rem; }
.app-main .invoice-total strong { font-variant-numeric: tabular-nums; }
.app-main .invoice-editor { max-width: 60rem; }
.app-main .invoice-editor > h2 { font-size: 1.25rem; }
.app-main [data-invoice-row] { background: var(--canvas); }
.app-main .summary-grid { gap: 0; padding-block: 1.25rem; margin-block: 1.5rem; border-block: 1px solid var(--line); }
.app-main .summary-card { min-width: 0; padding: .5rem 1rem; border: 0; border-inline-start: 1px solid var(--line); border-radius: 0; background: transparent; overflow-wrap: anywhere; }
.app-main .summary-card:first-child { border-inline-start: 0; padding-inline-start: 0; }
.app-main .summary-card strong { font-size: clamp(1.2rem, 2vw, 1.75rem); font-weight: 500; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.app-main .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.ui-view-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.5rem; border-bottom: 1px solid var(--line); margin: 0 0 1.5rem; padding: 0; }
.ui-view-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .75rem .1rem; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font-size: .9375rem; font-weight: 500; text-decoration: none; }
.ui-view-nav a:hover { color: var(--ink); background: transparent; }
.ui-view-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--primary); font-weight: 650; }
.ui-subview-nav { border: 0; gap: .5rem 1rem; margin-top: -.5rem; }
.ui-subview-nav a { min-height: 2.75rem; padding: .5rem .75rem; font-size: .8125rem; }
.ui-subview-nav a[aria-current="page"] { background: var(--soft); border-color: transparent; border-radius: .4rem; }
.ui-list-search { display: grid; grid-template-columns: minmax(0, 2fr) minmax(9rem, 1fr) auto; align-items: end; gap: 1rem; margin-bottom: 1.5rem; }
.ui-list-search .action-row { margin: 0; align-items: center; }
.ui-list-search .action-row a { font-size: .875rem; }
.ui-settings-directory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin: 2rem 0; padding-block: 1.5rem; border-block: 1px solid var(--line); }
.ui-settings-directory h2 { display: flex; align-items: center; gap: .65rem; margin-bottom: .75rem; font-size: 1rem; }
.ui-settings-directory h2 svg { flex-shrink: 0; width: 1.125rem; height: 1.125rem; color: var(--muted); }
.ui-settings-directory a { display: block; padding: .65rem 0; color: var(--muted); font-size: .875rem; text-decoration: none; overflow-wrap: anywhere; }
.ui-settings-directory a:hover { color: var(--primary); text-decoration: underline; }
.app-main .biab-fuzzy-search { max-width: 34rem; padding: 0; border: 0; background: transparent; }
.app-main .biab-fuzzy-search label { margin-bottom: .5rem; }
.app-main .biab-fuzzy-search p:empty { display: none; }
.app-main .payment-status-card { background: var(--paper); border-radius: .75rem; }
.app-main .payment-status-card h3 { font-size: .875rem; font-weight: 500; color: var(--muted); }
.app-main .payment-status-card .payment-indicator { font-size: 1rem; font-weight: 600; }

.auth-card h1, main:not(.app-main) > h1 { font-weight: 500; font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -.035em; }
.auth-card { border-radius: .85rem; }
.auth-card > section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
@media (max-width: 850px) {
  .ui-settings-directory { grid-template-columns: 1fr; gap: 1.5rem; }
  .ui-settings-directory section + section { border-top: 1px solid var(--line-soft); padding-top: 1.5rem; }
  .ui-list-search { grid-template-columns: minmax(0, 1fr) minmax(8rem, .7fr); }
  .ui-list-search .action-row { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .app-main .row-link { flex-wrap: wrap; gap: .5rem 1rem; }
  .app-main .row-link > span:last-child { text-align: left; }
  .app-main .summary-grid { gap: 1rem 0; }
  .app-main .summary-card:nth-child(odd) { border-inline-start: 0; padding-inline-start: 0; }
  .ui-view-nav { gap: .25rem 1rem; }
}
.app-main > .install-banner { position: static; max-width: 100%; flex-wrap: wrap; width: 100%; margin: 2.5rem 0 0; padding: 1.25rem 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.app-main > .install-banner strong { font-size: .875rem; font-weight: 550; }
.app-main .install-actions button { background: var(--paper); border-color: var(--control-line); color: var(--ink); font-size: .8125rem; }
.app-main .install-actions [data-install-action="dismiss"] { border-color: transparent; background: transparent; color: var(--muted); }
.app-main form > button, .app-main [data-invoice-row] > button { justify-self: start; max-width: 100%; }
.ui-help > summary { font-size: .875rem; color: var(--muted); min-height: 2.75rem; align-items: center; }
.ui-help[open] > summary { margin-bottom: .75rem; color: var(--ink); }
.ui-help > form { margin-top: 1rem; }
.ui-help > p { font-size: .9375rem; color: var(--muted); }
@media (max-width: 600px) {
  .app-main .page-heading-actions { width: 100%; justify-content: flex-end; }
  .app-main .page-heading-actions > .page-tools { margin-inline-start: auto; }
}

/* Dashboard and calendar composition. */
.ui-dashboard { display: grid; gap: 1.75rem; }
.ui-dashboard .panel { margin: 0; }
.ui-work-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); padding-bottom: 1.5rem; }
.ui-work-summary a { display: grid; gap: .25rem; color: var(--ink); text-decoration: none; padding: .25rem 1.25rem; border-inline-start: 1px solid var(--line); }
.ui-work-summary a:first-child { padding-inline-start: 0; border: 0; }
.ui-work-summary strong { font-size: 1.75rem; font-weight: 500; line-height: 1.2; letter-spacing: -.04em; }
.ui-work-summary span { color: var(--muted); font-size: .8125rem; }
.ui-work-summary a:hover span { color: var(--primary); text-decoration: underline; }
.ui-work-summary a:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.ui-dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.ui-dashboard-agenda, .ui-dashboard-queues { display: grid; min-width: 0; gap: 1.75rem; }
.ui-dashboard .panel-heading { align-items: center; gap: .75rem; margin-bottom: 1rem; }
.ui-dashboard .panel-heading h2 { font-size: 1.05rem; margin: 0; }
.ui-dashboard .panel-heading > a { flex-shrink: 0; font-size: .8125rem; color: var(--muted); }
.ui-dashboard .panel-heading > svg { color: var(--muted); width: 1.125rem; height: 1.125rem; }
.ui-next { box-shadow: 0 4px 20px var(--card-shadow); }
.ui-next > p { color: var(--muted); font-size: .9375rem; }
.ui-next > a:last-child { display: inline-block; margin-top: 1rem; font-size: .875rem; }
.ui-next-details { padding: 1.25rem 0 1.5rem; }
.ui-next-time { color: var(--blue); font-size: .9375rem; font-weight: 600; margin-bottom: .75rem; }
.ui-next-details h3, .ui-empty h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 500; letter-spacing: -.025em; margin: 0; overflow-wrap: anywhere; }
.ui-next-service { color: var(--muted); font-size: .9375rem; margin: .5rem 0 1.5rem; }
.ui-item-action { gap: .65rem; }
.ui-item-action svg { width: 1rem; height: 1rem; }
.ui-dashboard .row-link { gap: 1rem; min-height: 4.25rem; }
.ui-dashboard .row-link > :first-child { min-width: 0; overflow-wrap: anywhere; }
.ui-dashboard .row-link > :last-child { flex-shrink: 0; font-size: .8125rem; }
.ui-dashboard .row-link strong { font-size: .9375rem; font-weight: 600; }
.ui-dashboard .row-link small { font-size: .8125rem; margin-top: .2rem; }
.ui-dashboard .row-link time { text-align: right; }
.ui-dashboard-queues > .panel { padding: 0 0 1.5rem; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.ui-dashboard-queues > .panel:last-child { border-bottom: 0; padding-bottom: 0; }
.ui-dashboard-queues .empty { font-size: .875rem; margin-bottom: 0; padding: .25rem 0; }
.ui-dashboard-queues h3 { font-size: .8125rem; color: var(--muted); font-weight: 500; margin-bottom: .5rem; }
.ui-dashboard-queues details { font-size: .875rem; margin-top: 1rem; }
.ui-active { border-inline-start: 3px solid var(--positive); }
.ui-empty { padding-block: 1rem; }
.ui-empty p { color: var(--muted); font-size: .9375rem; margin-top: .75rem; }
.app-frame:has(.ui-setup-callout) .install-banner { display: none; }
.ui-setup-callout { background: var(--soft); }
.ui-setup-callout h2 { font-size: 1.6rem; font-weight: 500; letter-spacing: -.025em; }
@media (max-width: 900px) {
  .ui-dashboard-columns { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .ui-dashboard { gap: 1.25rem; }
  .ui-work-summary a { padding-inline: .75rem; }
  .ui-work-summary strong { font-size: 1.5rem; }
  .ui-work-summary span { font-size: .75rem; }
  .ui-dashboard .row-link { flex-wrap: wrap; gap: .35rem .75rem; }
  .ui-dashboard .row-link time { text-align: left; }
}

.ui-date-nav { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin-bottom: 1.5rem; }
.ui-week { display: grid; gap: 1rem; margin-top: 1.5rem; }
.ui-week > section { min-width: 0; }
.ui-calendar-entry { gap: .75rem; overflow-wrap: anywhere; }
.ui-calendar-entry small { display: block; }
@media (min-width: 1100px) {
  .ui-week { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .ui-calendar-entry { display: flex; flex-direction: column; align-items: flex-start; }
  .ui-calendar-entry > span { text-align: left; }
}

.ui-calendar .calendar-filter { align-items: center; }
.ui-calendar .calendar-filter label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  max-width: 100%;
}
.ui-calendar .calendar-filter select { width: auto; max-width: 100%; }
@media (max-width: 1099px) {
  .ui-week .ui-empty-day { display: none; }
}

.app-main .ui-calendar { margin-top: 0; padding: 0; border: 0; background: transparent; }
.ui-date-nav a { font-size: .8125rem; }
.ui-calendar > h2 { font-size: 1.5rem; font-weight: 500; letter-spacing: -.025em; }
.ui-week > section { border-top: 1px solid var(--line); padding-top: 1rem; }
.ui-week h3 { margin-bottom: 1rem; font-size: .875rem; font-weight: 550; color: var(--muted); }
.ui-week [data-today="true"] h3 { color: var(--primary); font-weight: 700; }
.app-main .ui-calendar-entry { display: flex; padding: 1rem; margin-bottom: .75rem; border: 1px solid var(--line); border-inline-start: 3px solid var(--blue); border-radius: .6rem; background: var(--paper); }
.app-main .ui-calendar-entry[data-tone="positive"] { border-inline-start-color: var(--positive); }
.app-main .ui-calendar-entry[data-tone="warning"] { border-inline-start-color: var(--warning); }
.app-main .ui-calendar-entry[data-tone="muted"] { border-inline-start-color: var(--muted); }
.app-main .ui-calendar-entry strong { font-size: .9375rem; }
.app-main .ui-calendar-entry time { font-size: .875rem; font-weight: 600; }
.app-main .ui-calendar-entry small { font-size: .75rem; }
@media (min-width: 1100px) {
  .ui-week { gap: .65rem; }
  .app-main .ui-calendar-entry { padding: .75rem .6rem; }
}

.ui-calendar-options { margin-block: 1rem; }
.ui-calendar-options > summary { color: var(--muted); font-size: .875rem; }
.ui-date-jump { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin-block: 1rem; }
.ui-date-jump label { flex: 1 1 12rem; }
@media (max-width: 600px) {
  .ui-calendar .ui-date-nav { flex-wrap: nowrap; gap: .35rem; margin-bottom: .75rem; }
  .ui-calendar .ui-date-nav a { flex: 1; padding-inline: .5rem; text-align: center; }
  .ui-calendar-options { margin-block: .75rem; }
  .ui-week { margin-top: 1rem; }
}

.auth-card .toast-region { position: static; width: 100%; margin-block: 1rem; }
.auth-card .toast { box-shadow: none; }
.app-main:has(> .setup-guide) > .page-heading { padding-bottom: 0; border: 0; margin-bottom: 1.25rem; }
.app-main:has(> .setup-guide) > .page-heading h1 { font-size: 1rem; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.app-main > .setup-guide { max-width: 52rem; border: 0; background: transparent; padding: 0; margin-bottom: 2rem; }
.app-main > .setup-guide .setup-guide-copy h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); letter-spacing: -.035em; }

@media (max-width: 430px) {
  .app-menu > summary { width: 44px; padding: 0; justify-content: center; }
  .app-menu > summary > span { display: none; }
}
