@view-transition {
  navigation: auto;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/inter-variable.woff2") format("woff2-variations");
}

:root {
  color-scheme: light;
  --canvas: #f6f5f1;
  --surface: #fffefc;
  --surface-subtle: #f1f0ea;
  --surface-raised: #fffefb;
  --text: #2b2925;
  --text-normal: #46443d;
  --muted: #6e6a61;
  --faint: #847f74;
  --border: #e1dfd5;
  --border-strong: #c6c3b4;
  --brand-50: #e0e7ff;
  --brand-100: #c7d2fe;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --link: var(--brand-600);
  --link-hover: var(--brand-700);
  --danger: #b3261e;
  --success: #2563eb;
  --warning: #2563eb;
  --radius-xs: 5px;
  --radius-sm: 7px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgb(52 46 36 / .06), 0 2px 8px rgb(52 46 36 / .05);
  --shadow-md: 0 6px 18px rgb(52 46 36 / .11);
  --shadow-lg: 0 20px 44px rgb(52 46 36 / .19);
  --shadow: var(--shadow-sm);
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.28, .64, 1);
  --font-sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --page-title-size: clamp(1.55rem, 1.35rem + .55vw, 1.9rem);
  --record-title-size: clamp(1.35rem, 1.25rem + .35vw, 1.55rem);
  --hero-title-size: clamp(1.7rem, 1.5rem + .7vw, 2.15rem);
  font-family: var(--font-sans);
  font-size: 16px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #1b1a16;
  --surface: #25241e;
  --surface-subtle: #2e2c25;
  --surface-raised: #323029;
  --text: #f3ecdc;
  --text-normal: #e0d8c8;
  --muted: #bbb2a1;
  --faint: #9d9587;
  --border: #4a473d;
  --border-strong: #6a6455;
  --brand-50: #1e3a8a;
  --brand-100: #3b82f6;
  --brand-500: #60a5fa;
  --brand-600: #60a5fa;
  --brand-700: #93c5fd;
  --link: var(--brand-500);
  --link-hover: var(--brand-700);
  --danger: #3b82f6;
  --success: #82c19e;
  --warning: #e8b65c;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .3), 0 2px 8px rgb(0 0 0 / .22);
  --shadow-md: 0 6px 18px rgb(0 0 0 / .36);
  --shadow-lg: 0 20px 44px rgb(0 0 0 / .48);
  --shadow: var(--shadow-sm);
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text-normal);
  font-family: var(--font-sans);
  font-size: .875rem;
  line-height: 1.45;
}

body[data-area="board"],
body[data-area="orientation"] {
  --brand-50: #e0e7ff;
  --brand-100: #c7d2fe;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
}

body[data-area="maintenance"] {
  --brand-50: #e0e7ff;
  --brand-100: #c7d2fe;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
}

body[data-area="reports"] {
  --brand-50: #e0e7ff;
  --brand-100: #c7d2fe;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #175c3a;
}

body[data-area="settings"],
body[data-area="audit"],
body[data-area="staff"],
body[data-area="contractors"] {
  --brand-50: #e0e7ff;
  --brand-100: #c7d2fe;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #5e2f65;
}

:root[data-theme="dark"] body[data-area="board"],
:root[data-theme="dark"] body[data-area="orientation"] {
  --brand-50: #273350;
  --brand-100: #334a75;
  --brand-500: #8cabf0;
  --brand-600: #8cabf0;
  --brand-700: #bccff8;
}

:root[data-theme="dark"] body[data-area="maintenance"] {
  --brand-50: #443720;
  --brand-100: #5f4c2b;
  --brand-500: #e8b65c;
  --brand-600: #e8b65c;
  --brand-700: #f3d496;
}

:root[data-theme="dark"] body[data-area="reports"] {
  --brand-50: #253c2e;
  --brand-100: #325544;
  --brand-500: #82c19e;
  --brand-600: #82c19e;
  --brand-700: #b3ddc6;
}

:root[data-theme="dark"] body[data-area="settings"],
:root[data-theme="dark"] body[data-area="audit"],
:root[data-theme="dark"] body[data-area="staff"],
:root[data-theme="dark"] body[data-area="contractors"] {
  --brand-50: #1e3a8a;
  --brand-100: #3b82f6;
  --brand-500: #60a5fa;
  --brand-600: #60a5fa;
  --brand-700: #93c5fd;
}

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

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: .16em;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-sans);
  font-weight: 650;
}

h1 {
  margin-bottom: .3rem;
  color: var(--text);
  font-size: var(--page-title-size);
  line-height: 1.14;
  letter-spacing: -.01em;
}

h2 {
  margin-bottom: .2rem;
  color: var(--text);
  font-size: 1.12rem;
  line-height: 1.2;
}

small {
  color: var(--muted);
}

.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--canvas);
}

.sidebar {
  view-transition-name: app-sidebar;
}

.mobile-header {
  view-transition-name: app-mobile-header;
}

.main-content {
  view-transition-name: page-content;
}

@keyframes page-content-out {
  to {
    opacity: 0;
  }
}

@keyframes page-content-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

::view-transition-old(root),
::view-transition-new(root),
::view-transition-old(app-sidebar),
::view-transition-new(app-sidebar),
::view-transition-old(app-mobile-header),
::view-transition-new(app-mobile-header) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(page-content) {
  animation: 100ms ease-in both page-content-out;
}

::view-transition-new(page-content) {
  animation: 200ms var(--ease-out) 40ms both page-content-in;
}

.skip-link {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 200;
  padding: .55rem .75rem;
  border: 2px solid var(--text);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-md);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sidebar {
  z-index: 60;
  display: flex;
  width: 16.25rem;
  flex: 0 0 16.25rem;
  flex-direction: column;
  background: var(--surface-subtle);
  border-right: 1px solid var(--border-strong);
  box-shadow: none;
}

.brand-block {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: 1.4rem 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border-strong);
}

.brand {
  display: block;
  min-width: 0;
  flex: 1;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.brand-lockup {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .7rem;
}

.logo-plate {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

:root[data-theme="dark"] .logo-plate {
  padding: .18rem .28rem;
  border: 1px solid #77736b;
  border-radius: var(--radius-xs);
  background: #e7e3da;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .24);
}

.brand-logo {
  display: block;
  width: auto;
  max-width: 4.25rem;
  height: 2.1rem;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-copy {
  display: block;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1;
}

.brand strong {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 680;
  letter-spacing: -.015em;
}

.brand small {
  margin-top: .28rem;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: .67rem;
  font-weight: 550;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav-list {
  flex: 1;
  overflow-y: auto;
  padding: .9rem .75rem 1rem;
}

.nav-section {
  margin: 1.5rem .7rem .45rem;
  padding-bottom: .32rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: .63rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.nav-section-first {
  margin-top: .25rem;
}

/* Each nav link mirrors the header bubble: thin outline + thicker left accent. */
.nav-link {
  --nav-accent: var(--muted);
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  gap: .72rem;
  margin-bottom: .45rem;
  padding: .58rem .65rem .58rem .62rem;
  border: 1px solid color-mix(in srgb, var(--nav-accent) 18%, var(--border));
  border-left: 4px solid var(--nav-accent);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-normal);
  font-family: var(--font-sans);
  font-size: .84rem;
  font-weight: 540;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color 150ms, border-color 150ms, color 150ms, box-shadow 150ms, transform 150ms var(--ease-out);
}

.nav-link[data-nav-area="board"] {
  --nav-accent: #3157a3;
}

.nav-link[data-nav-area="work-orders"] {
  --nav-accent: #8b343b;
}

.nav-link[data-nav-area="maintenance"] {
  --nav-accent: #986315;
}

.nav-link[data-nav-area="reports"] {
  --nav-accent: #2f6b4f;
}

.nav-link[data-nav-area="administration"] {
  --nav-accent: #6b4c6f;
}

.nav-link:not(.active) .nav-icon {
  color: color-mix(in srgb, var(--nav-accent) 82%, var(--text-normal));
}

.nav-link:hover {
  background: color-mix(in srgb, var(--nav-accent) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--nav-accent) 22%, var(--border));
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.nav-link:hover .nav-icon {
  transform: translateX(2px);
}

.nav-link.active {
  background: color-mix(in srgb, var(--nav-accent) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--nav-accent) 22%, var(--border));
  color: var(--text);
  box-shadow: none;
}

.nav-link.active .nav-icon {
  color: var(--nav-accent);
}

:root[data-theme="dark"] .nav-link.active {
  color: var(--text);
}

:root[data-theme="dark"] .nav-link[data-nav-area="board"] {
  --nav-accent: #7f9ed9;
}

:root[data-theme="dark"] .nav-link[data-nav-area="work-orders"] {
  --nav-accent: #d98286;
}

:root[data-theme="dark"] .nav-link[data-nav-area="maintenance"] {
  --nav-accent: #d6a64f;
}

:root[data-theme="dark"] .nav-link[data-nav-area="reports"] {
  --nav-accent: #72a98b;
}

:root[data-theme="dark"] .nav-link[data-nav-area="administration"] {
  --nav-accent: #a98aae;
}

.nav-icon {
  width: 1.02rem;
  height: 1.02rem;
  flex: 0 0 1.02rem;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 150ms var(--ease-out);
}

.nav-link.compact {
  padding: .45rem .6rem;
  font-size: .75rem;
}

.button-reset {
  border: 0;
}

.sidebar-footer {
  padding: .72rem;
  border-top: 1px solid var(--border-strong);
  background: var(--surface-subtle);
}

.btn.btn-sign-out,
:root[data-theme="dark"] .btn.btn-sign-out {
  border-color: #dc2626;
  background: #dc2626;
  color: #ffffff;
}

.btn.btn-sign-out:hover,
:root[data-theme="dark"] .btn.btn-sign-out:hover {
  border-color: #b91c1c;
  background: #b91c1c;
  color: #ffffff;
}

.btn.btn-sign-out {
  min-height: 2.6rem;
  padding: .6rem 1.4rem;
  font-size: .86rem;
}

.public-language-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  color: var(--muted);
}

.public-language-switch button {
  border: 0;
  padding: .25rem .35rem;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.public-language-switch button[aria-current="true"] {
  color: var(--brand-600);
  text-decoration: underline;
  text-underline-offset: .2rem;
}

.account-settings-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .62rem .62rem .62rem .58rem;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, #2563eb 18%, var(--border));
  border-left: 4px solid #2563eb;
  border-radius: var(--radius-md);
  color: var(--text-normal);
  box-shadow: var(--shadow-sm);
  transition: background-color 150ms, border-color 150ms, color 150ms, box-shadow 150ms, transform 150ms var(--ease-out);
}

.account-settings-link:hover {
  background: color-mix(in srgb, #e0e7ff 38%, var(--surface));
  border-color: color-mix(in srgb, #3b82f6 18%, var(--border));
  border-left-color: #2563eb;
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.account-settings-link.active {
  background: color-mix(in srgb, #e0e7ff 42%, var(--surface));
  border-color: color-mix(in srgb, #3b82f6 20%, var(--border));
  border-left-color: #2563eb;
  color: var(--text);
  box-shadow: none;
}

:root[data-theme="dark"] .account-settings-link {
  border-left-color: #60a5fa;
  border-color: color-mix(in srgb, #60a5fa 18%, var(--border));
}

:root[data-theme="dark"] .account-settings-link:hover {
  background: color-mix(in srgb, #1e3a8a 38%, var(--surface));
  border-color: color-mix(in srgb, #60a5fa 18%, var(--border));
  border-left-color: #60a5fa;
}

:root[data-theme="dark"] .account-settings-link.active {
  background: color-mix(in srgb, #1e3a8a 42%, var(--surface));
  border-color: color-mix(in srgb, #60a5fa 20%, var(--border));
  border-left-color: #60a5fa;
}

.account-settings-copy {
  min-width: 0;
  flex: 1;
}

.account-settings-copy strong,
.account-settings-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-settings-copy strong {
  color: var(--text);
  font-size: .78rem;
}

.account-settings-copy small {
  margin-top: .1rem;
  font-size: .66rem;
  text-transform: capitalize;
}

.account-settings-icon {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--faint);
}

.account-settings-icon .nav-icon {
  width: .95rem;
  height: .95rem;
}

.account-settings-link:hover .account-settings-icon,
.account-settings-link.active .account-settings-icon {
  color: #2563eb;
}

:root[data-theme="dark"] .account-settings-link:hover .account-settings-icon,
:root[data-theme="dark"] .account-settings-link.active .account-settings-icon {
  color: #60a5fa;
}

.avatar {
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  border: 1px solid color-mix(in srgb, #2563eb 42%, var(--border));
  border-radius: var(--radius-full);
  background: color-mix(in srgb, #2563eb 13%, var(--surface));
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 700;
}

.main-column {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: clamp(1.25rem, 2.5vw, 2.25rem);
}

.mobile-header {
  display: none;
}

.mobile-header-spacer {
  width: 2.25rem;
  height: 2.25rem;
}

.mobile-backdrop {
  display: none;
}

.sidebar-reveal-rail {
  display: none;
}

.page-layout {
  width: 100%;
  margin: 0 auto;
}

.page-layout>*+* {
  margin-top: 1.25rem;
}

.page-wide {
  max-width: 100rem;
}

.page-narrow {
  max-width: 48rem;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.page-header p {
  margin-bottom: 0;
  color: var(--muted);
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
}

.record-title {
  margin-top: .25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--record-title-size);
}

.back-link {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 600;
}

.auth-page {
  padding-top: clamp(2rem, 10vh, 7rem);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.card-header h2,
.card-header h3,
.card-header p {
  margin-bottom: 0;
}

.card-header p {
  color: var(--muted);
  font-size: .78rem;
}

.card-body {
  padding: 1.25rem;
}

.form-card {
  padding: 1.25rem;
}

.form-section>*+* {
  margin-top: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem;
  padding-top: .25rem;
}

.label {
  display: block;
  margin-bottom: .3rem;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.input,
.select {
  width: 100%;
  min-height: 2.35rem;
  padding: .5rem .7rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color 150ms, box-shadow 150ms;
}

.input:focus,
.select:focus {
  outline: 0;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 20%, transparent);
}

textarea.input {
  resize: vertical;
}

.compact-select {
  width: auto;
  min-width: 6.5rem;
  min-height: 1.95rem;
  padding: .28rem .45rem;
}

.field-help {
  display: block;
  margin-top: .25rem;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contractor-options-toggle {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .75rem .85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  cursor: pointer;
}

.contractor-options-toggle input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--brand-600);
}

.contractor-options-copy {
  min-width: 0;
  flex: 1;
}

.contractor-options-copy strong,
.contractor-options-copy small {
  display: block;
}

.contractor-options-copy strong {
  color: var(--text);
  font-size: .76rem;
}

.contractor-options-copy small {
  margin-top: .08rem;
  color: var(--muted);
  font-size: .67rem;
  font-weight: 500;
}

.contractor-options-chevron {
  width: .48rem;
  height: .48rem;
  margin: -.2rem .12rem 0 .4rem;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 150ms;
}

.contractor-options-toggle:has(input:checked) {
  border-color: color-mix(in srgb, var(--brand-500) 45%, var(--border));
  background: var(--brand-50);
}

.contractor-options-toggle:has(input:checked) .contractor-options-chevron {
  margin-top: .2rem;
  transform: rotate(225deg);
}

.contractor-options-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface-subtle) 65%, var(--surface));
}

.contractor-options-fields[hidden] {
  display: none;
}

.settings-page {
  max-width: 76rem;
}

.settings-header {
  max-width: 44rem;
  padding: .2rem 0 .35rem;
}

.settings-header h1 {
  margin-top: .16rem;
  letter-spacing: -.01em;
}

.settings-section>*+* {
  margin-top: .55rem;
}

.settings-section-header {
  padding: 0 0 .45rem;
  border-bottom: 1px solid var(--border-strong);
}

.settings-section-header h2 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.settings-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand-600);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.settings-panel>*+* {
  border-top: 1px solid var(--border);
}

.settings-setting-row {
  display: grid;
  grid-template-columns: minmax(13rem, .72fr) minmax(0, 1.28fr);
  gap: 2rem;
  align-items: center;
  min-height: 4.7rem;
  padding: .9rem 1rem;
}

.settings-setting-copy h3,
.settings-setting-copy p {
  margin: 0;
}

.settings-setting-copy h3 {
  color: var(--text);
  font-family: var(--font-sans);
  font-size: .86rem;
  font-weight: 680;
  letter-spacing: 0;
}

.settings-setting-copy p {
  max-width: 34rem;
  margin-top: .16rem;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.45;
}

.settings-setting-control {
  min-width: 0;
  justify-self: end;
}

.settings-inline-control {
  display: flex;
  width: min(27rem, 100%);
  align-items: center;
  justify-content: flex-end;
  gap: .55rem;
}

.settings-inline-control label {
  min-width: 10rem;
  flex: 1;
}

.settings-inline-control .select {
  width: 100%;
}

.page-kicker,
.section-kicker {
  display: block;
  color: var(--brand-600);
  font-size: .62rem;
  font-weight: 780;
  letter-spacing: .105em;
  text-transform: uppercase;
}

.section-kicker {
  margin-bottom: .18rem;
}

.theme-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.theme-options {
  display: grid;
  width: min(27rem, 100%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

.theme-option {
  position: relative;
  display: flex;
  min-height: 3.2rem;
  align-items: center;
  gap: .6rem;
  padding: .5rem .65rem;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--text-normal);
  cursor: pointer;
  transition: background-color 150ms, box-shadow 150ms;
}

.theme-option+.theme-option {
  border-left: 1px solid var(--border-strong);
}

.theme-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.theme-option:has(input:focus-visible) {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}

.theme-option:has(input:checked) {
  background: var(--brand-50);
  box-shadow: inset 0 -3px var(--brand-600);
}

.theme-option-icon {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 1.8rem;
  place-items: center;
  color: var(--muted);
}

.theme-option:has(input:checked) .theme-option-icon {
  color: var(--brand-600);
}

.theme-icon {
  width: 1.05rem;
  height: 1.05rem;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-option strong {
  color: var(--text);
  font-family: var(--font-sans);
  font-size: .8rem;
}

.account-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .75rem;
}

.account-identity h3,
.account-identity p {
  margin: 0;
}

.account-identity h3 {
  color: var(--text);
  font-family: var(--font-sans);
  font-size: .86rem;
  font-weight: 680;
}

.account-identity p {
  margin-top: .1rem;
  color: var(--muted);
  font-size: .76rem;
}

.avatar-large {
  width: 2.6rem;
  height: 2.6rem;
  flex: 0 0 2.6rem;
  font-size: .95rem;
}

.account-inline-meta {
  display: flex;
  justify-self: end;
  gap: 1.25rem;
  margin: 0;
}

.account-inline-meta>div {
  display: flex;
  align-items: center;
  gap: .45rem;
}

.account-inline-meta dt {
  color: var(--muted);
  font-size: .7rem;
}

.account-inline-meta dd {
  margin: 0;
}

.settings-role {
  text-transform: capitalize;
}

.password-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem 1rem;
}

.password-current,
.password-actions {
  grid-column: 1 / -1;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
}

.password-actions {
  align-self: end;
}

.settings-disclosure>summary {
  list-style: none;
  cursor: pointer;
}

.settings-disclosure>summary::-webkit-details-marker {
  display: none;
}

.settings-disclosure-chevron {
  width: .55rem;
  height: .55rem;
  justify-self: end;
  margin-right: .35rem;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 150ms;
}

.settings-disclosure[open] .settings-disclosure-chevron {
  transform: rotate(225deg);
}

.settings-disclosure-body {
  padding: 1rem;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-subtle) 48%, var(--surface));
}

.settings-disclosure-intro {
  max-width: 46rem;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.45;
}

.settings-users-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
}

.settings-users-header h3 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: .86rem;
  font-weight: 700;
}

.settings-users-panel th {
  font-size: .68rem;
}

.settings-users-panel td {
  font-size: .78rem;
}

.settings-users-panel td small {
  font-size: .7rem;
}

.settings-users-panel .table-scroll {
  border-top: 1px solid var(--border);
}

.settings-users-panel .table-footer {
  border-top: 1px solid var(--border);
}

.settings-administration-section>*+* {
  margin-top: .55rem;
}

.organization-branding-body {
  display: grid;
  grid-template-columns: minmax(14rem, .8fr) minmax(18rem, 1.2fr);
  gap: 1.25rem;
  align-items: start;
}

.orientation-settings-card {
  border-top-color: var(--border-strong);
}

.orientation-page {
  max-width: 76rem;
  padding: clamp(.25rem, 1.5vh, 1.25rem) 0;
}

.orientation-heading {
  max-width: 42rem;
  margin: 0 auto 1.15rem;
  text-align: center;
}

.orientation-heading h1 {
  margin-top: .18rem;
  letter-spacing: -.012em;
}

.orientation-heading p {
  margin: .3rem 0 0;
  color: var(--muted);
}

.orientation-card {
  overflow: hidden;
  border-color: color-mix(in srgb, var(--brand-500) 25%, var(--border));
  box-shadow: var(--shadow-md);
}

.orientation-progress {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: .75rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-subtle) 78%, var(--surface));
}

.orientation-progress>div {
  display: flex;
  min-width: 11rem;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
}

.orientation-progress span {
  color: var(--text);
  font-size: .72rem;
  font-weight: 760;
}

.orientation-progress small {
  font-size: .65rem;
}

.orientation-progress progress {
  width: 100%;
  height: .42rem;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--border);
  color: var(--brand-600);
}

.orientation-progress progress::-webkit-progress-bar {
  border-radius: var(--radius-full);
  background: var(--border);
}

.orientation-progress progress::-webkit-progress-value {
  border-radius: var(--radius-full);
  background: var(--brand-600);
}

.orientation-progress progress::-moz-progress-bar {
  border-radius: var(--radius-full);
  background: var(--brand-600);
}

.orientation-stage {
  min-height: 31rem;
}

.orientation-step {
  display: grid;
  min-height: 31rem;
  grid-template-columns: minmax(0, 1fr) minmax(22rem, .92fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(2rem, 5vw, 4.2rem);
}

.orientation-step[hidden],
[data-orientation-finish][hidden],
[data-orientation-next][hidden] {
  display: none;
}

.orientation-copy h2 {
  max-width: 33rem;
  margin: .28rem 0 .75rem;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.18;
  letter-spacing: -.025em;
}

.orientation-copy h2:focus {
  outline: none;
}

.orientation-copy>p {
  max-width: 36rem;
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-size: .9rem;
}

.orientation-step-label {
  color: var(--brand-600);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.orientation-points,
.orientation-checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.orientation-points {
  display: grid;
  gap: .8rem;
}

.orientation-points li {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.orientation-points li>span {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 1.8rem;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-100);
  color: var(--brand-700);
  font-size: .68rem;
  font-weight: 800;
}

.orientation-points strong,
.orientation-points small {
  display: block;
}

.orientation-points strong {
  color: var(--text);
  font-size: .78rem;
}

.orientation-points small {
  margin-top: .06rem;
}

.orientation-checklist {
  display: grid;
  gap: .72rem;
}

.orientation-checklist li {
  position: relative;
  padding-left: 1.55rem;
  color: var(--text-normal);
  font-size: .8rem;
}

.orientation-checklist li::before {
  position: absolute;
  top: .08rem;
  left: 0;
  display: grid;
  width: 1rem;
  height: 1rem;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-100);
  color: var(--brand-700);
  content: "✓";
  font-size: .62rem;
  font-weight: 850;
}

.orientation-preview-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: .72rem;
  font-weight: 700;
}

.orientation-ready-note {
  margin-top: 1.25rem;
  padding: .8rem .9rem;
  border: 1px solid color-mix(in srgb, var(--brand-500) 25%, var(--border));
  border-radius: var(--radius-md);
  background: var(--brand-50);
}

.orientation-ready-note strong,
.orientation-ready-note span {
  display: block;
}

.orientation-ready-note strong {
  color: var(--text);
  font-size: .78rem;
}

.orientation-ready-note span {
  margin-top: .08rem;
  color: var(--muted);
  font-size: .7rem;
}

.orientation-visual {
  position: relative;
  min-height: 20rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--brand-500) 24%, var(--border));
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.orientation-flow-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .65rem;
  padding: 3.2rem 2rem 2rem;
}

.orientation-app-mark {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--brand-600);
  color: white;
  font-size: .62rem;
  font-weight: 850;
}

.orientation-flow-line {
  position: absolute;
  top: 4.8rem;
  bottom: 3rem;
  left: 3rem;
  width: 2px;
  background: color-mix(in srgb, var(--brand-500) 35%, var(--border));
}

.orientation-flow-card {
  z-index: 1;
  margin-left: 1.75rem;
  padding: .7rem .85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.orientation-flow-card::before {
  position: absolute;
  left: 2.61rem;
  width: .65rem;
  height: .65rem;
  margin-top: .1rem;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--faint);
  content: "";
  box-shadow: 0 0 0 1px var(--border);
}

.orientation-flow-card.active::before {
  background: var(--brand-600);
}

.orientation-flow-card.complete::before {
  background: var(--success);
}

.orientation-flow-card span,
.orientation-flow-card strong,
.orientation-flow-card small {
  display: block;
}

.orientation-flow-card span {
  color: var(--brand-600);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.orientation-flow-card strong {
  margin-top: .08rem;
  color: var(--text);
  font-size: .75rem;
}

.orientation-flow-card small {
  margin-top: .06rem;
  font-size: .62rem;
}

.orientation-board-visual {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .55rem;
  padding: 2rem 1rem;
}

.orientation-mini-column {
  padding: .65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.orientation-mini-column strong {
  display: flex;
  justify-content: space-between;
  margin-bottom: .65rem;
  color: var(--text);
  font-size: .58rem;
}

.orientation-mini-column strong span {
  color: var(--muted);
}

.orientation-mini-column i {
  display: block;
  height: 3.2rem;
  margin-top: .45rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--faint);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.orientation-mini-column.active i {
  border-left-color: var(--brand-600);
}

.orientation-mini-column.complete i {
  border-left-color: var(--success);
}

.orientation-detail-visual {
  padding: 1.5rem;
}

.orientation-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.orientation-detail-header span {
  color: var(--brand-600);
  font-family: ui-monospace, monospace;
  font-size: .7rem;
  font-weight: 750;
}

.orientation-detail-header b {
  padding: .2rem .42rem;
  border: 1px solid color-mix(in srgb, var(--brand-500) 35%, var(--border));
  border-radius: var(--radius-xs);
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: .58rem;
  font-weight: 750;
}

.orientation-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .6rem;
  margin: 1rem 0;
}

.orientation-detail-grid i {
  height: 2.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
}

.orientation-activity-preview {
  padding: .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.orientation-activity-preview strong {
  display: block;
  margin-bottom: .55rem;
  color: var(--text);
  font-size: .68rem;
}

.orientation-activity-preview span {
  display: block;
  width: 82%;
  height: .42rem;
  margin-top: .5rem;
  border-radius: var(--radius-full);
  background: var(--border);
}

.orientation-activity-preview span:nth-child(3) {
  width: 64%;
}

.orientation-activity-preview span:nth-child(4) {
  width: 72%;
}

.orientation-calendar-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.3rem;
}

.orientation-calendar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: .85rem;
}

.orientation-calendar-title strong {
  color: var(--text);
  font-size: .75rem;
}

.orientation-calendar-title span {
  color: var(--muted);
  font-size: .6rem;
}

.orientation-calendar-days {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
}

.orientation-calendar-days i {
  height: 3rem;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.orientation-calendar-days i:nth-child(-n+7) {
  border-top: 0;
}

.orientation-calendar-days i:nth-child(7n+1) {
  border-left: 0;
}

.orientation-calendar-days b {
  position: absolute;
  right: .45rem;
  bottom: .45rem;
  max-width: 40%;
  overflow: hidden;
  padding: .2rem .35rem;
  border-radius: var(--radius-xs);
  background: var(--brand-100);
  color: var(--brand-700);
  font-size: .5rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 0 0 2px var(--surface);
}

.orientation-ready-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.orientation-ready-check {
  display: grid;
  width: 4rem;
  height: 4rem;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--brand-600);
  color: white;
  font-size: 1.8rem;
  box-shadow: 0 0 0 .65rem var(--brand-100);
}

.orientation-ready-visual>strong {
  color: var(--text);
  font-size: 1rem;
}

.orientation-ready-visual>span {
  margin-top: .15rem;
  color: var(--muted);
  font-size: .7rem;
}

.orientation-ready-visual>div:last-child {
  display: flex;
  gap: .35rem;
  margin-top: 1rem;
}

.orientation-ready-visual i {
  width: 1.6rem;
  height: .3rem;
  border-radius: var(--radius-full);
  background: var(--brand-500);
  opacity: .35;
}

.orientation-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .6rem;
  padding: .85rem 1.1rem;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-subtle) 70%, var(--surface));
}

.orientation-actions>.btn:first-child {
  margin-right: auto;
}

.orientation-actions form {
  margin: 0;
}

:root[data-theme="dark"] .orientation-card,
:root[data-theme="dark"] .orientation-visual {
  box-shadow: var(--shadow-md);
}

:root[data-theme="dark"] .orientation-detail-header b {
  color: var(--brand-500);
}

.btn {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .48rem .82rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: .76rem;
  font-weight: 650;
  letter-spacing: .015em;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 140ms, border-color 140ms, color 140ms, transform 110ms var(--ease-out), box-shadow 140ms;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px) scale(.98);
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.btn-primary {
  border-color: var(--brand-600);
  background: var(--brand-600);
  color: #ffffff;
}

.btn-primary:hover {
  border-color: var(--brand-700);
  background: var(--brand-700);
  color: #ffffff;
}

:root[data-theme="dark"] .btn-primary,
:root[data-theme="dark"] .btn-primary:hover {
  color: #1b1a16;
}

.btn-secondary {
  border-color: var(--border-strong);
  background: transparent;
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--text-normal);
  background: var(--surface-subtle);
  color: var(--text);
}

.btn-danger {
  border-color: #dc2626;
  background: #dc2626;
  color: white;
}

.btn-danger:hover {
  border-color: #b91c1c;
  background: #b91c1c;
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--text-normal);
}

.btn-ghost:hover {
  background: var(--surface-subtle);
  color: var(--text);
}

.btn-sm {
  min-height: 1.9rem;
  padding: .32rem .58rem;
  font-size: .7rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.btn-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-600);
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-link.danger {
  color: var(--danger);
}

.icon-button {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.sidebar-visibility-button {
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
}

.sidebar-visibility-button:hover {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.sidebar-hide-button {
  margin: -.35rem -.35rem 0 0;
}

.sidebar-visibility-button .nav-icon {
  width: 1rem;
  height: 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: .16rem .46rem;
  border-radius: var(--radius-xs);
  font-size: .65rem;
  font-weight: 750;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-status-todo,
.btn-status-todo {
  background: #f3f4f6;
  color: #374151;
}

.badge-status-in-progress,
.btn-status-in-progress {
  background: #dbeafe;
  color: #1e40af;
}

.badge-status-completed,
.btn-status-completed,
.badge-success {
  background: #dcfce7;
  color: #166534;
}

.badge-urgency-low {
  background: #dcfce7;
  color: #166534;
}

.badge-urgency-medium,
.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-urgency-high {
  background: #dbeafe;
  color: #1e40af;
}

.badge-neutral {
  background: #f3f4f6;
  color: #6b7280;
}

:root[data-theme="dark"] .badge-status-todo,
:root[data-theme="dark"] .btn-status-todo,
:root[data-theme="dark"] .badge-neutral {
  background: #263244;
  color: #d1d5db;
}

:root[data-theme="dark"] .badge-status-in-progress,
:root[data-theme="dark"] .btn-status-in-progress {
  background: #172554;
  color: #bfdbfe;
}

:root[data-theme="dark"] .badge-status-completed,
:root[data-theme="dark"] .btn-status-completed,
:root[data-theme="dark"] .badge-success,
:root[data-theme="dark"] .badge-urgency-low {
  background: #052e16;
  color: #bbf7d0;
}

:root[data-theme="dark"] .badge-warning,
:root[data-theme="dark"] .badge-urgency-medium {
  background: #451a03;
  color: #fef3c7;
}

:root[data-theme="dark"] .badge-urgency-high {
  background: #450a0a;
  color: #bfdbfe;
}

.alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: .75rem 1rem;
  border: 1px solid;
  border-radius: var(--radius-md);
}

.alert p {
  margin: .15rem 0 0;
  font-size: .75rem;
}

.alert-error {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
}

.alert-warning {
  border-color: #fef3c7;
  background: #fffbeb;
  color: #78350f;
}

:root[data-theme="dark"] .alert-error {
  border-color: #1e3a8a;
  background: #2b1010;
  color: #bfdbfe;
}

:root[data-theme="dark"] .alert-warning {
  border-color: #78350f;
  background: #2b1d09;
  color: #fef3c7;
}

.temporary-password {
  padding: .45rem .65rem;
  border: 1px dashed currentColor;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  user-select: all;
}

.board-help {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .65rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: .74rem;
}

.board-help[hidden],
html[data-board-help-dismissed="true"] .board-help {
  display: none;
}

.board-help-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
  gap: .45rem 1.25rem;
}

.board-help-dismiss {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 1.8rem;
  place-items: center;
  margin: -.32rem -.45rem 0 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}

.board-help-dismiss:hover {
  background: var(--surface-subtle);
  color: var(--text);
}

.kanban-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(18rem, 1fr));
  gap: 1rem;
  align-items: start;
  overflow-x: auto;
  padding-bottom: .5rem;
}

.kanban-column {
  min-height: 22rem;
  padding: .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface-subtle) 88%, var(--brand-50));
  transition: border-color 150ms, background 150ms;
}

.kanban-column.drop-active {
  border-color: var(--brand-500);
  background: var(--brand-50);
}

.kanban-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .15rem .2rem .7rem;
}

.kanban-header h2 {
  margin: 0;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.count-badge {
  display: inline-grid;
  min-width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--muted);
  font-size: .67rem;
  font-weight: 700;
}

.kanban-list>*+* {
  margin-top: .7rem;
}

.column-empty {
  display: grid;
  min-height: 8rem;
  place-items: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--faint);
  font-size: .75rem;
}

.kanban-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  margin-top: .75rem;
  padding: .7rem .2rem .05rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .68rem;
}

.kanban-footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .55rem;
}

.column-table-link {
  color: var(--muted);
  font-weight: 650;
  white-space: nowrap;
}

.column-table-link:hover {
  color: var(--brand-600);
}

.work-card {
  padding: .9rem;
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: grab;
  transition: box-shadow 150ms, opacity 150ms, transform 150ms var(--ease-out), border-color 150ms;
}

.work-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.kanban-list .work-card.dragging,
.work-card.dragging {
  opacity: .55;
  transform: rotate(1.2deg) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.urgency-border-low {
  border-left-color: #22c55e;
}

.urgency-border-medium {
  border-left-color: #f59e0b;
}

.urgency-border-high {
  border-left-color: #3b82f6;
}

.work-card-heading,
.work-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.record-number {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .75rem;
  font-weight: 750;
}

.work-card-status {
  margin-top: .55rem;
}

.card-details {
  margin: .65rem 0 0;
}

.card-details div {
  display: grid;
  grid-template-columns: 4.1rem 1fr;
  gap: .5rem;
  margin-top: .25rem;
}

.card-details dt {
  color: var(--muted);
  font-size: .68rem;
}

.card-details dd {
  margin: 0;
  color: var(--text);
  font-size: .73rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.card-description {
  display: -webkit-box;
  margin: .7rem 0;
  overflow: hidden;
  color: var(--text-normal);
  font-size: .76rem;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.assignment-line {
  padding: .4rem .5rem;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: .68rem;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .38rem;
  margin-top: .7rem;
}

.status-actions form {
  margin: 0;
}

.work-card-footer {
  margin-top: .75rem;
  padding-top: .6rem;
  border-top: 1px solid var(--border);
  font-size: .72rem;
}

.work-card-footer form {
  margin: 0;
}

.work-card-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
}

.card-action {
  display: inline-flex;
  min-height: 1.9rem;
  align-items: center;
  justify-content: center;
  gap: .32rem;
  padding: .3rem .5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .68rem;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
}

.card-action-details {
  border-color: color-mix(in srgb, var(--brand-500) 35%, var(--border));
  background: var(--brand-50);
  color: var(--brand-700);
}

.card-action-details:hover {
  border-color: var(--brand-500);
  background: var(--brand-100);
  color: var(--brand-700);
}

:root[data-theme="dark"] .card-action-details,
:root[data-theme="dark"] .card-action-details:hover {
  color: var(--link);
}

.card-action-details>span:first-child {
  font-size: .78rem;
}

.card-action-notes {
  background: var(--surface);
  color: var(--text-normal);
}

.card-action-notes:hover {
  border-color: var(--border-strong);
  background: var(--surface-subtle);
  color: var(--text);
}

.sticky-note-mark {
  font-size: .76rem;
  line-height: 1;
}

.note-count {
  display: inline-grid;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 .25rem;
  place-items: center;
  border-radius: var(--radius-xs);
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: .6rem;
  font-weight: 800;
}

.card-action-notes:hover .note-count {
  background: var(--brand-50);
  color: var(--brand-700);
}

/* Density changes vertical rhythm only; card width, type size, and controls stay consistent. */
.density-compact .kanban-list>*+* {
  margin-top: .55rem;
}

.density-compact .work-card {
  padding: .72rem .9rem;
}

.density-compact .work-card-status {
  margin-top: .42rem;
}

.density-compact .card-details {
  margin-top: .48rem;
}

.density-compact .card-details div {
  margin-top: .16rem;
}

.density-compact .card-description {
  margin: .5rem 0;
  -webkit-line-clamp: 2;
}

.density-compact .assignment-line {
  padding-top: .3rem;
  padding-bottom: .3rem;
}

.density-compact .status-actions {
  margin-top: .5rem;
}

.density-compact .work-card-footer {
  margin-top: .55rem;
  padding-top: .48rem;
}

.density-condensed .kanban-list>*+* {
  margin-top: .42rem;
}

.density-condensed .work-card {
  padding: .56rem .9rem;
}

.density-condensed .work-card-status {
  margin-top: .3rem;
}

.density-condensed .card-details {
  margin-top: .34rem;
}

.density-condensed .card-details div {
  margin-top: .1rem;
}

.density-condensed .card-description {
  margin: .38rem 0;
  -webkit-line-clamp: 1;
}

.density-condensed .assignment-line {
  padding-top: .22rem;
  padding-bottom: .22rem;
}

.density-condensed .status-actions {
  margin-top: .38rem;
}

.density-condensed .work-card-footer {
  margin-top: .42rem;
  padding-top: .38rem;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(14rem, 2fr) repeat(3, minmax(8rem, 1fr)) auto;
  gap: .75rem;
  align-items: end;
  padding: .9rem;
}

.mobile-sort-field {
  display: none;
}

.filter-actions {
  display: flex;
  gap: .4rem;
}

.audit-filter-bar {
  display: grid;
  grid-template-columns: minmax(14rem, 2fr) repeat(3, minmax(10rem, 1fr));
  gap: .75rem;
  align-items: end;
  padding: .9rem;
}

.audit-filter-bar .filter-actions {
  justify-content: flex-end;
}

.audit-time {
  min-width: 10.5rem;
  white-space: nowrap;
}

.audit-changes {
  min-width: 13rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.audit-changes li+li {
  margin-top: .2rem;
}

.audit-changes strong {
  display: inline;
  margin-right: .2rem;
  font-size: .68rem;
}

.audit-changes span {
  color: var(--muted);
}

.audit-no-changes {
  color: var(--faint);
}

.table-card {
  overflow: hidden;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--surface-subtle);
}

th {
  padding: .68rem .8rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: .65rem;
  font-weight: 750;
  letter-spacing: .06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.table-sort-link {
  display: flex;
  width: calc(100% + 1.6rem);
  min-height: 2.75rem;
  align-items: center;
  gap: .35rem;
  margin: -.68rem -.8rem;
  padding: .68rem .8rem;
  color: inherit;
}

.table-sort-link:hover {
  background: color-mix(in srgb, var(--brand-500) 7%, transparent);
  color: var(--text);
  text-decoration: none;
}

.table-sort-link:focus-visible {
  position: relative;
  z-index: 1;
}

th.numeric .table-sort-link {
  justify-content: flex-end;
}

.sort-indicator {
  color: var(--faint);
  font-size: .75rem;
  letter-spacing: 0;
}

th[aria-sort] .sort-indicator {
  color: var(--brand-600);
}

td {
  padding: .72rem .8rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
  color: var(--text-normal);
  font-size: .76rem;
  vertical-align: middle;
}

tbody tr:hover {
  background: var(--surface-subtle);
}

td strong,
td small {
  display: block;
}

td small {
  margin-top: .12rem;
  font-size: .67rem;
}

.numeric {
  text-align: right;
  white-space: nowrap;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .7rem;
}

.actions-column {
  width: 1%;
  text-align: right;
}

.row-actions,
.inline-form,
.inline-create {
  display: flex;
  align-items: center;
  gap: .45rem;
}

.row-actions {
  justify-content: flex-end;
  white-space: nowrap;
}

.inline-create {
  align-items: end;
}

.inline-create label {
  flex: 1;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem .9rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .7rem;
}

.pagination {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.status-panel {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 1rem;
}

.status-panel .status-actions {
  margin-top: .3rem;
}

.metadata {
  margin: 0;
  color: var(--muted);
  font-size: .72rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr);
  gap: 1rem;
  align-items: start;
}

.detail-sidebar>*+* {
  margin-top: 1rem;
}

.summary-card {
  padding: 1rem;
}

.summary-card h2 {
  margin-bottom: .75rem;
}

.summary-card dl {
  margin: 0;
}

.summary-card dl div {
  display: flex;
  justify-content: space-between;
  padding: .42rem 0;
  border-bottom: 1px solid var(--border);
}

.summary-card dt {
  color: var(--muted);
}

.summary-card dd {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
}

.summary-card .summary-total {
  padding-top: .65rem;
  border: 0;
  color: var(--text);
}

.note-form {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.note-form .btn {
  margin-top: .55rem;
}

.notes-list {
  max-height: 28rem;
  overflow-y: auto;
}

.notes-list article {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.notes-list article p {
  margin-bottom: .45rem;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notes-list article footer,
.small-empty {
  color: var(--muted);
  font-size: .67rem;
}

.small-empty {
  padding: 1.25rem;
  text-align: center;
}

.activity-list {
  position: relative;
  max-height: 36rem;
  overflow-y: auto;
}

.activity-list::before {
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: 1.27rem;
  width: 1px;
  background: var(--border);
  content: "";
}

.activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 1.15rem minmax(0, 1fr);
  gap: .65rem;
  padding: .85rem 1rem;
}

.activity-item+.activity-item {
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.activity-marker {
  z-index: 1;
  display: grid;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: .06rem;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand-600);
  font-size: .66rem;
  font-weight: 800;
}

.activity-note .activity-marker {
  border-color: color-mix(in srgb, var(--brand-500) 45%, var(--border));
  background: var(--brand-50);
}

.activity-content>strong {
  display: block;
  color: var(--text);
  font-size: .75rem;
}

.activity-content>p {
  margin: .42rem 0;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.activity-content footer {
  margin-top: .38rem;
  color: var(--muted);
  font-size: .65rem;
}

.activity-changes {
  margin: .45rem 0 0;
  padding: .45rem .55rem;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  list-style: none;
}

.activity-changes li {
  color: var(--text-normal);
  font-size: .66rem;
  overflow-wrap: anywhere;
}

.activity-changes li+li {
  margin-top: .2rem;
}

.activity-changes li>span {
  color: var(--muted);
  font-weight: 650;
}

.activity-changes s {
  color: var(--faint);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  text-align: center;
}

.empty-state p {
  margin: .15rem 0 0;
  color: var(--muted);
}

.empty-icon {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  margin-bottom: .65rem;
  border-radius: 50%;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 1.15rem;
}

.error-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem;
  text-align: center;
}

.error-card p {
  color: var(--muted);
}

.dialog {
  width: min(32rem, calc(100% - 2rem));
  max-height: 90vh;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text-normal);
  box-shadow: var(--shadow-lg);
}

.dialog[open] {
  animation: overlay-in 200ms var(--ease-spring) both;
}

.dialog::backdrop {
  background: rgb(30 25 18 / .5);
  backdrop-filter: blur(3px);
}

.dialog[open]::backdrop {
  animation: backdrop-in 160ms ease-out both;
}

@keyframes overlay-in {
  from {
    opacity: 0;
    transform: translateY(.45rem) scale(.965);
  }
}

@keyframes backdrop-in {
  from {
    opacity: 0;
  }
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.dialog-header h2,
.dialog-header p {
  margin-bottom: 0;
}

.dialog-header p {
  color: var(--muted);
  font-size: .75rem;
}

.dialog-body {
  padding: 1.15rem 1.25rem;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  padding: .85rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface-subtle);
}

.board-notes-dialog {
  position: relative;
  width: min(38rem, calc(100% - 2rem));
}

.board-notes-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  visibility: hidden;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text);
  font-size: .75rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms, visibility 0s linear 120ms;
}

.board-notes-loading.htmx-request {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.loading-dot {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--brand-500);
  animation: loading-pulse 800ms ease-in-out infinite alternate;
}

@keyframes loading-pulse {
  to {
    opacity: .35;
    transform: scale(.72);
  }
}

.board-notes-placeholder {
  padding: 3rem 1.25rem;
  color: var(--muted);
  text-align: center;
}

.board-notes-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: .68rem;
}

.board-notes-overview strong {
  color: var(--text);
}

.board-notes-overview a {
  font-weight: 700;
}

.board-notes-error {
  margin: .8rem 1rem 0;
}

.board-note-form {
  padding: 1rem;
}

.board-note-form textarea {
  min-height: 5.5rem;
}

.board-note-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .6rem;
}

.board-note-form .board-note-actions .btn {
  margin-top: 0;
}

.board-notes-list {
  max-height: min(36vh, 20rem);
  overflow-y: auto;
}

.board-notes-list article:first-child {
  box-shadow: inset 3px 0 var(--brand-500);
}

.toast-region {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 100;
  display: flex;
  width: min(22rem, calc(100% - 2rem));
  flex-direction: column;
  gap: .5rem;
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem .85rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand-500);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: var(--shadow-md);
  animation: toast-in 220ms var(--ease-spring);
}

.toast.toast-leaving {
  pointer-events: none;
  animation: toast-out 140ms ease-in both;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast button {
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

@keyframes toast-in {
  from {
    transform: translateY(.65rem) scale(.96);
    opacity: 0;
  }
}

@keyframes toast-out {
  to {
    transform: translateY(.35rem);
    opacity: 0;
  }
}

.export-menu {
  position: relative;
  flex: 0 0 auto;
}

.export-menu>summary {
  list-style: none;
  user-select: none;
}

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

.export-menu[open]>summary {
  background: var(--brand-700);
}

.export-chevron {
  width: .45rem;
  height: .45rem;
  margin: -.2rem .05rem 0 .15rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 150ms;
}

.export-menu[open] .export-chevron {
  margin-top: .2rem;
  transform: rotate(225deg);
}

.export-menu-panel {
  position: absolute;
  top: calc(100% + .45rem);
  right: 0;
  z-index: 40;
  width: 17rem;
  padding: .35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
  transform-origin: top right;
}

.export-menu[open] .export-menu-panel {
  animation: overlay-in 160ms var(--ease-out) both;
}

.export-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: .7rem;
  padding: .65rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-normal);
  text-align: left;
  cursor: pointer;
}

.export-option:hover {
  background: var(--surface-subtle);
  color: var(--text);
}

.export-option+.export-option {
  margin-top: .12rem;
}

.export-option>span:last-child {
  min-width: 0;
}

.export-option strong,
.export-option small {
  display: block;
}

.export-option strong {
  color: var(--text);
  font-size: .76rem;
}

.export-option small {
  margin-top: .08rem;
  font-size: .64rem;
  line-height: 1.35;
}

.export-format-badge {
  display: grid;
  width: 2rem;
  height: 1.55rem;
  flex: 0 0 2rem;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--brand-500) 35%, var(--border));
  border-radius: var(--radius-xs);
  background: var(--brand-50);
  color: var(--brand-700);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .025em;
}

.report-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid #bfdbfe;
  border-bottom: 4px solid #eab308;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: #eff6ff;
  color: #172554;
}

.report-header h1 {
  margin: 0;
  color: #172554;
  font-size: 1.35rem;
}

.report-header p {
  margin-bottom: 0;
  color: #475569;
}

.report-kicker {
  color: #1d4ed8 !important;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.report-count {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.report-count strong {
  font-size: 1.6rem;
  line-height: 1;
}

.report-count span {
  color: #64748b;
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
}

.report-table-wrap {
  overflow-x: auto;
  border-right: 1px solid var(--border);
  border-left: 1px solid var(--border);
  background: white;
}

.report-table {
  color: #1f2937;
}

.report-table thead {
  background: #334155;
  color: white;
}

.report-table th {
  border-color: #475569;
  color: #f8fafc;
  font-size: .58rem;
}

.report-table td {
  padding: .5rem .55rem;
  border-color: #e5e7eb;
  color: #1f2937;
  font-size: .65rem;
}

.report-table tbody tr:nth-child(even) {
  background: #fffbeb;
}

.report-table tbody tr:hover {
  background: inherit;
}

.report-table .report-urgency-high {
  box-shadow: inset 3px 0 #3b82f6;
}

.report-table .report-urgency-medium {
  box-shadow: inset 3px 0 #f59e0b;
}

.report-description {
  min-width: 13rem;
  max-width: 22rem;
}

.report-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .5rem .75rem;
  border: 1px solid #fde047;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: #fefce8;
  color: #64748b;
  font-size: .6rem;
}

.report-footer img {
  height: 2rem;
  width: auto;
}

.report-mobile-summary {
  display: none;
}

.report-summary-card {
  padding: .8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.report-summary-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.report-summary-card p {
  margin: .35rem 0;
  color: var(--text-normal);
}

.report-summary-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem .75rem;
  margin: 0;
}

.report-summary-card dl div:first-child {
  grid-column: 1 / -1;
}

.report-summary-card dt {
  color: var(--muted);
  font-size: .6rem;
  font-weight: 650;
  text-transform: uppercase;
}

.report-summary-card dd {
  margin: .08rem 0 0;
  color: var(--text);
  font-size: .72rem;
}

.badge-scheduled {
  border: 1px solid color-mix(in srgb, var(--brand-500) 35%, var(--border));
  background: var(--brand-50);
  color: var(--brand-700);
}

:root[data-theme="dark"] .badge-scheduled {
  color: var(--link);
}

.work-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .3rem;
}

.urgency-cycle-form {
  display: inline-flex;
  margin: 0;
}

.urgency-cycle {
  cursor: pointer;
  transition: box-shadow 120ms, transform 120ms var(--ease-out);
}

.urgency-cycle:hover {
  box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 28%, transparent);
  transform: translateY(-1px);
}

.urgency-cycle:active {
  transform: translateY(0);
}

.scheduled-due-line {
  margin-top: .55rem;
  padding: .38rem .5rem;
  border-radius: var(--radius-sm);
  background: var(--brand-50);
  color: var(--text-normal);
  font-size: .67rem;
}

.mobile-board-tabs {
  display: none;
}

.schedule-origin-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  border-color: color-mix(in srgb, var(--brand-500) 32%, var(--border));
  background: var(--surface);
}

.schedule-origin-card strong,
.schedule-origin-card p {
  display: block;
  margin: 0;
}

.schedule-origin-card p {
  margin-top: .12rem;
  color: var(--muted);
  font-size: .72rem;
}

.photo-card {
  overflow: hidden;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: .8rem;
  padding: 1rem 1.25rem;
}

.photo-item {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.photo-open {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #111827;
  cursor: zoom-in;
}

.photo-open img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-item footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .12rem .5rem;
  align-items: center;
  padding: .55rem .65rem;
  font-size: .65rem;
}

.photo-item footer>span {
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-item footer time {
  color: var(--muted);
}

.photo-item footer form {
  grid-column: 1 / -1;
  margin-top: .2rem;
}

.photo-upload-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
  padding: .8rem 1.25rem;
  border-top: 1px solid var(--border);
}

.photo-upload-form>span {
  color: var(--muted);
  font-size: .68rem;
}

.photo-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .9rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.photo-picker p {
  margin: 0;
  color: var(--muted);
  font-size: .72rem;
}

.optional-label {
  color: var(--faint);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.photo-picker-button {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.photo-picker-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.photo-picker-button:has(input:focus-visible) .btn {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}

.photo-preview-list {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  gap: .5rem;
}

.photo-preview {
  width: 5.25rem;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.photo-preview img {
  display: block;
  width: 100%;
  height: 4rem;
  object-fit: cover;
}

.photo-preview figcaption {
  padding: .25rem;
  color: var(--muted);
  font-size: .6rem;
  text-align: center;
}

.photo-preview-warning {
  width: 100%;
  margin: 0;
  color: var(--danger);
  font-size: .72rem;
  font-weight: 700;
}

.photo-limit-message {
  margin: 0;
  padding: .8rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .72rem;
}

.photo-lightbox {
  width: min(72rem, calc(100% - 2rem));
}

.photo-lightbox-body {
  display: grid;
  min-height: 12rem;
  max-height: calc(90vh - 4rem);
  place-items: center;
  padding: 1rem;
  background: #020617;
}

.photo-lightbox-body img {
  display: block;
  max-width: 100%;
  max-height: calc(90vh - 7rem);
  object-fit: contain;
}

.maintenance-page>*+*,
.maintenance-schedule-page>*+* {
  margin-top: 1rem;
}

.maintenance-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .75rem;
}

.summary-stat {
  padding: .85rem 1rem;
}

.summary-stat span,
.summary-stat strong {
  display: block;
}

.summary-stat span {
  color: var(--muted);
  font-size: .67rem;
  font-weight: 600;
  text-transform: uppercase;
}

.summary-stat strong {
  margin-top: .22rem;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
}

.summary-stat-danger {
  border-color: color-mix(in srgb, #3b82f6 38%, var(--border));
}

.summary-stat-danger strong {
  color: var(--danger);
}

.maintenance-primary {
  display: grid;
  grid-template-columns: minmax(19rem, .7fr) minmax(32rem, 1.3fr);
  gap: 1rem;
  align-items: start;
}

.maintenance-attention-card,
.maintenance-calendar-card {
  overflow: hidden;
}

.maintenance-agenda-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--border);
  box-shadow: inset 3px 0 var(--border-strong);
}

.maintenance-agenda-item.state-overdue {
  box-shadow: inset 3px 0 #3b82f6;
}

.maintenance-agenda-item.state-due {
  box-shadow: inset 3px 0 #f59e0b;
}

.maintenance-agenda-item strong,
.maintenance-agenda-item small {
  display: block;
}

.maintenance-agenda-item>div:first-child>strong {
  margin-top: .15rem;
  color: var(--text);
  font-size: .76rem;
}

.maintenance-agenda-item small {
  margin-top: .12rem;
}

.agenda-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .4rem;
}

.badge-maintenance-overdue {
  background: #dbeafe;
  color: #1e40af;
}

.badge-maintenance-due {
  background: #fef3c7;
  color: #92400e;
}

.badge-maintenance-upcoming,
.badge-maintenance-open {
  background: var(--brand-50);
  color: var(--brand-700);
}

.badge-maintenance-completed {
  background: #dcfce7;
  color: #166534;
}

.badge-maintenance-skipped {
  background: #f3f4f6;
  color: #4b5563;
}

:root[data-theme="dark"] .badge-maintenance-overdue {
  background: #1e3a8a;
  color: #bfdbfe;
}

:root[data-theme="dark"] .badge-maintenance-due {
  background: #422006;
  color: #fcd34d;
}

:root[data-theme="dark"] .badge-maintenance-completed {
  background: #052e16;
  color: #86efac;
}

:root[data-theme="dark"] .badge-maintenance-skipped {
  background: #1f2937;
  color: #d1d5db;
}

.calendar-header {
  align-items: center;
}

.calendar-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .35rem;
}

.mobile-calendar-toggle {
  display: none;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}

.calendar-weekdays span {
  padding: .42rem;
  color: var(--muted);
  font-size: .6rem;
  font-weight: 650;
  text-align: center;
  text-transform: uppercase;
}

.calendar-grid {
  background: var(--border);
  gap: 1px;
}

.calendar-day {
  display: flex;
  min-width: 0;
  min-height: 5rem;
  flex-direction: column;
  gap: .25rem;
  padding: .4rem;
  background: var(--surface);
  color: var(--text-normal);
}

.calendar-day:hover {
  background: var(--surface-subtle);
  color: var(--text);
}

.calendar-day.outside-month {
  background: color-mix(in srgb, var(--surface-subtle) 65%, var(--surface));
  color: var(--faint);
}

.calendar-day.today .calendar-day-number {
  display: grid;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-600);
  color: white;
}

.calendar-day.selected {
  outline: 2px solid var(--brand-500);
  outline-offset: -2px;
}

.calendar-day-number {
  font-size: .65rem;
  font-weight: 750;
}

.calendar-events {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: .18rem;
}

.calendar-event {
  overflow: hidden;
  padding: .15rem .25rem;
  border-radius: var(--radius-xs);
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: .62rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event.state-overdue {
  background: #dbeafe;
  color: #1e40af;
}

.calendar-event.state-completed {
  background: #dcfce7;
  color: #166534;
}

.calendar-event.state-skipped {
  background: #f3f4f6;
  color: #6b7280;
}

.calendar-agenda {
  border-top: 1px solid var(--border);
}

.calendar-agenda-header,
.calendar-agenda-row {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  padding: .55rem .75rem;
}

.calendar-agenda-header {
  display: flex;
  justify-content: space-between;
  background: var(--surface-subtle);
  font-size: .68rem;
}

.calendar-agenda-row+.calendar-agenda-row {
  border-top: 1px solid var(--border);
}

.calendar-agenda-row time {
  color: var(--muted);
  font-size: .68rem;
}

.calendar-agenda-row a {
  min-width: 0;
  overflow: hidden;
  color: var(--text-normal);
  font-size: .7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(18rem, .75fr);
  gap: 1rem;
  align-items: start;
}

.schedule-sidebar>*+* {
  margin-top: 1rem;
}

.schedule-workflow-card {
  padding: 1rem;
  border-color: color-mix(in srgb, var(--brand-500) 42%, var(--border));
}

.schedule-workflow-card h2 {
  margin: .2rem 0 .45rem;
}

.schedule-workflow-card p {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
}

.maintenance-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1rem;
}

.maintenance-status-actions form {
  flex: 1 1 8rem;
}

.maintenance-status-actions .btn {
  width: 100%;
  min-height: 2.75rem;
}

.schedule-admin-card {
  padding: 1rem;
}

.schedule-admin-card h2 {
  margin-bottom: .75rem;
}

.schedule-admin-card .btn {
  margin-top: .75rem;
}

.form-grid-fieldset {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-grid-fieldset .full {
  grid-column: 1 / -1;
}

.recurrence-fields {
  display: grid;
  grid-template-columns: minmax(5rem, .6fr) minmax(7rem, 1fr);
  gap: .45rem;
}

/* Product theming layer */
.page-layout>*+* {
  margin-top: 1.35rem;
}

.page-header {
  min-height: 3.8rem;
  padding: .9rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--brand-500) 20%, var(--border));
  border-left: 4px solid var(--brand-600);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--brand-50) 55%, var(--surface));
}

.page-header p {
  max-width: 52rem;
  margin-top: .25rem;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: .84rem;
  line-height: 1.45;
}

.record-title {
  font-family: var(--font-mono);
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  letter-spacing: -.035em;
}

.back-link {
  font-family: var(--font-sans);
  font-size: .72rem;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: color-mix(in srgb, var(--brand-50) 60%, var(--surface));
}

.card-header h2,
.card-header h3 {
  font-size: 1.08rem;
}

.card-header p {
  margin-top: .12rem;
  font-family: var(--font-sans);
  font-size: .78rem;
}

.card-body {
  padding: 1.1rem;
}

.form-card {
  padding: 1.2rem;
  border-top: 1px solid var(--border);
  border-left: 4px solid var(--brand-600);
}

.label {
  margin-bottom: .32rem;
  color: var(--text-normal);
  font-size: .71rem;
  font-weight: 650;
  letter-spacing: .025em;
  text-transform: none;
}

.input,
.select {
  min-height: 2.45rem;
  padding: .5rem .65rem;
  border-color: var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
}

.input:focus,
.select:focus {
  border-color: var(--brand-600);
  outline: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 22%, transparent);
}

.field-help {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: .71rem;
}

.contractor-options-toggle,
.contractor-options-fields,
.photo-picker {
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.contractor-options-toggle:has(input:checked) {
  background: var(--brand-50);
}

.btn {
  min-height: 2.3rem;
  padding: .48rem .82rem;
  border-radius: var(--radius-sm);
  font-size: .74rem;
  font-weight: 650;
  letter-spacing: .015em;
  transition: background-color 140ms, border-color 140ms, color 140ms, transform 110ms var(--ease-out), box-shadow 140ms;
}

.btn:active {
  transform: translateY(1px) scale(.98);
}

.btn-primary {
  border-color: var(--brand-600);
  background: var(--brand-600);
  color: #ffffff;
}

.btn-primary:hover {
  border-color: var(--brand-700);
  background: var(--brand-700);
  color: #ffffff;
  text-decoration: none;
}

:root[data-theme="dark"] .btn-primary,
:root[data-theme="dark"] .btn-primary:hover {
  color: #1b1a16;
}

.btn-secondary {
  border-color: var(--border-strong);
  background: transparent;
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--text-normal);
  background: var(--surface-subtle);
  color: var(--text);
  text-decoration: none;
}

.btn-ghost {
  color: var(--text-normal);
}

.btn-ghost:hover {
  background: var(--surface-subtle);
  text-decoration: none;
}

.btn-danger {
  background: var(--danger);
}

.btn-link {
  font-weight: 650;
  text-underline-offset: .16em;
}

.icon-button {
  border-radius: var(--radius-sm);
  background: transparent;
}

.badge,
.count-badge,
.note-count {
  border: 1px solid color-mix(in srgb, currentColor 34%, transparent);
  border-radius: var(--radius-xs);
  font-weight: 650;
  letter-spacing: .015em;
}

.badge-status-todo,
.btn-status-todo,
.badge-neutral,
.badge-urgency-low {
  background: #e9e6de;
  color: #4f4a3f;
}

.badge-status-in-progress,
.btn-status-in-progress {
  background: #dde8fb;
  color: #1d3f9e;
}

.badge-status-completed,
.btn-status-completed,
.badge-success,
.badge-maintenance-completed {
  background: #daf1e3;
  color: #155c37;
}

.badge-urgency-medium,
.badge-warning,
.badge-maintenance-due {
  background: #fef3c7;
  color: #92400e;
}

.badge-urgency-high,
.badge-maintenance-overdue {
  background: #dbeafe;
  color: #1e40af;
}

:root[data-theme="dark"] .badge-status-todo,
:root[data-theme="dark"] .btn-status-todo,
:root[data-theme="dark"] .badge-neutral,
:root[data-theme="dark"] .badge-urgency-low {
  background: #37362f;
  color: #d8d4c8;
}

:root[data-theme="dark"] .badge-status-in-progress,
:root[data-theme="dark"] .btn-status-in-progress {
  background: #22355c;
  color: #bcd0f8;
}

:root[data-theme="dark"] .badge-status-completed,
:root[data-theme="dark"] .btn-status-completed,
:root[data-theme="dark"] .badge-success,
:root[data-theme="dark"] .badge-maintenance-completed {
  background: #1d3d2c;
  color: #a9dfc0;
}

:root[data-theme="dark"] .badge-warning,
:root[data-theme="dark"] .badge-urgency-medium,
:root[data-theme="dark"] .badge-maintenance-due {
  background: #422006;
  color: #fcd34d;
}

:root[data-theme="dark"] .badge-urgency-high,
:root[data-theme="dark"] .badge-maintenance-overdue {
  background: #1e3a8a;
  color: #bfdbfe;
}

.alert,
.temporary-password {
  border-radius: var(--radius-md);
}

.page-kicker,
.section-kicker {
  color: var(--brand-600);
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .08em;
}

.organization-branding-preview {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  gap: .85rem;
  margin-top: .35rem;
  padding: .75rem;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
}

.organization-branding-preview img {
  display: block;
  width: auto;
  max-width: 6rem;
  height: 3.5rem;
  object-fit: contain;
}

.organization-branding-copy strong,
.organization-branding-copy small {
  display: block;
  line-height: 1;
}

.organization-branding-copy strong {
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 680;
}

.organization-branding-copy small {
  margin-top: .3rem;
  color: var(--muted);
  font-size: .65rem;
  font-weight: 550;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.organization-branding-controls {
  display: flex;
  align-items: flex-end;
  gap: .65rem;
}

.organization-logo-form {
  min-width: 0;
  flex: 1;
}

.organization-logo-form .input {
  margin-top: .35rem;
}

.organization-branding-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: .75rem;
}

.organization-branding-controls>form:last-child {
  padding-bottom: .02rem;
}

.board-help {
  gap: .75rem;
  padding: .55rem .8rem;
  border: 1px solid color-mix(in srgb, var(--brand-500) 18%, var(--border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--brand-50) 55%, var(--surface));
  font-family: var(--font-sans);
  font-size: .72rem;
}

.board-help-copy {
  gap: .35rem 1.5rem;
}

.board-help-copy>span::before {
  margin-right: .45rem;
  color: var(--brand-600);
  content: "—";
}

.kanban-grid {
  gap: 1rem;
  align-items: stretch;
  padding: 0;
  background: transparent;
}

.kanban-column {
  min-height: 22rem;
  padding: .75rem;
  border: 1px solid var(--border);
  border-top: 4px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface-subtle) 82%, var(--brand-50));
  box-shadow: none;
}

.kanban-column[data-drop-status="Todo"] {
  border-top-color: #d18f0f;
}

.kanban-column[data-drop-status="In Progress"] {
  border-top-color: #2563eb;
}

.kanban-column[data-drop-status="Completed"] {
  border-top-color: #2563eb;
}

:root[data-theme="dark"] .kanban-column[data-drop-status="Todo"] {
  border-top-color: #e8b65c;
}

:root[data-theme="dark"] .kanban-column[data-drop-status="In Progress"] {
  border-top-color: #8cabf0;
}

:root[data-theme="dark"] .kanban-column[data-drop-status="Completed"] {
  border-top-color: #82c19e;
}

.kanban-column.drop-active {
  border-color: var(--brand-500);
  border-top-color: var(--brand-600);
  background: var(--brand-50);
}

.kanban-header {
  padding: .3rem .1rem .8rem;
  border-bottom: 1px solid var(--border);
}

.kanban-header h2 {
  font-size: .92rem;
  font-weight: 620;
  letter-spacing: .01em;
  text-transform: none;
}

.count-badge {
  min-width: 1.5rem;
  background: color-mix(in srgb, var(--brand-500) 10%, var(--surface));
  color: var(--text-normal);
}

.column-empty {
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 45%, transparent);
}

.work-card {
  padding: .85rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 140ms, background-color 140ms, opacity 140ms, transform 140ms var(--ease-out), box-shadow 140ms;
  animation: card-in 220ms var(--ease-out) both;
}

.kanban-list>.work-card:nth-child(2) {
  animation-delay: 35ms;
}

.kanban-list>.work-card:nth-child(3) {
  animation-delay: 70ms;
}

.kanban-list>.work-card:nth-child(4) {
  animation-delay: 105ms;
}

.kanban-list>.work-card:nth-child(5) {
  animation-delay: 140ms;
}

.kanban-list>.work-card:nth-child(n+6) {
  animation-delay: 175ms;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
}

/* htmx swaps re-render every card on the board; replaying the entrance animation for each swap stutters, so it only runs on the initial page load. */
:root[data-board-swapped] .work-card {
  animation: none;
}

.work-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.urgency-border-low {
  border-left-color: #2f9e4f;
}

.urgency-border-medium {
  border-left-color: #d18f0f;
}

.urgency-border-high {
  border-left-color: #d9382b;
}

.record-number {
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 650;
  letter-spacing: -.02em;
}

.card-details dd {
  font-weight: 540;
}

.card-description {
  color: var(--text);
  font-family: var(--font-sans);
  font-size: .84rem;
  line-height: 1.45;
}

.assignment-line,
.scheduled-due-line {
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
}

.card-action {
  border-radius: var(--radius-sm);
  font-weight: 650;
}

.card-action:hover {
  text-decoration: none;
}

.filter-bar,
.audit-filter-bar {
  padding: .9rem 1rem;
  border: 1px solid color-mix(in srgb, var(--brand-500) 18%, var(--border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--brand-50) 45%, var(--surface));
}

.table-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

thead {
  background: var(--brand-700);
}

th {
  border-color: rgb(255 255 255 / .16);
  color: #ffffff;
  font-weight: 600;
  letter-spacing: .045em;
}

th .sort-indicator {
  color: inherit;
  opacity: .6;
}

.table-sort-link:hover {
  background: rgb(255 255 255 / .12);
  color: #ffffff;
}

th[aria-sort] .sort-indicator {
  color: inherit;
  opacity: 1;
}

:root[data-theme="dark"] thead {
  background: var(--brand-100);
}

:root[data-theme="dark"] th {
  border-color: var(--border);
  color: var(--text);
}

:root[data-theme="dark"] .table-sort-link:hover {
  background: rgb(255 255 255 / .07);
  color: var(--text);
}

td {
  border-bottom-color: var(--border);
}

tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--surface-subtle) 58%, transparent);
}

tbody tr:hover {
  background: var(--brand-50);
}

.mono {
  font-family: var(--font-mono);
}

.table-footer {
  border-top: 1px solid var(--border-strong);
}

.status-panel {
  border-left: 4px solid var(--brand-600);
  border-radius: var(--radius-md);
}

.detail-grid,
.schedule-detail-grid {
  gap: 1rem;
  padding: 0;
  background: transparent;
}

.summary-card {
  border-top: 3px solid var(--brand-600);
}

.summary-card dd {
  font-family: var(--font-mono);
}

.notes-list article p,
.activity-content>p {
  font-family: var(--font-sans);
  font-size: .83rem;
  line-height: 1.5;
}

.activity-marker {
  border-radius: var(--radius-full);
}

.activity-changes {
  border-radius: var(--radius-sm);
}

.empty-state {
  font-family: var(--font-sans);
}

.empty-icon {
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--brand-50);
  color: var(--brand-600);
}

.photo-item {
  border-radius: var(--radius-md);
}

.photo-preview {
  border-radius: var(--radius-sm);
}

.photo-picker {
  border-style: solid;
  border-left: 4px solid var(--brand-600);
}

.schedule-origin-card {
  border-left: 4px solid var(--brand-600);
  background: var(--surface);
}

.summary-stat {
  border-top: 3px solid var(--border-strong);
}

.summary-stat strong {
  font-family: var(--font-sans);
  font-weight: 680;
}

.summary-stat-danger {
  border-top-color: var(--danger);
}

.maintenance-attention-card {
  border-top: 3px solid var(--warning);
}

.maintenance-calendar-card {
  border-top: 3px solid var(--brand-600);
}

.maintenance-agenda-item {
  box-shadow: inset 3px 0 var(--border-strong);
}

.calendar-weekdays {
  background: var(--brand-700);
}

.calendar-weekdays span {
  color: #ffffff;
}

:root[data-theme="dark"] .calendar-weekdays {
  background: var(--brand-100);
}

:root[data-theme="dark"] .calendar-weekdays span {
  color: var(--text);
}

.calendar-day {
  background: var(--surface);
}

.calendar-day.today .calendar-day-number {
  border-radius: var(--radius-full);
  background: var(--brand-600);
}

.calendar-event {
  border-radius: var(--radius-xs);
}

.schedule-workflow-card {
  border-left: 4px solid var(--brand-600);
}

.dialog {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.dialog::backdrop {
  background: rgb(30 25 18 / .55);
  backdrop-filter: blur(3px);
}

.dialog-header,
.dialog-footer {
  background: color-mix(in srgb, var(--brand-50) 45%, var(--surface));
}

.dialog-header {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.dialog-footer {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.toast {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.export-menu-panel {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.export-option {
  border-radius: var(--radius-sm);
}

.export-format-badge {
  border-radius: var(--radius-xs);
}

.report-header {
  border-color: #2563eb;
  border-bottom-color: #2563eb;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: #e2f4e9;
  color: #173f2c;
}

.report-header h1 {
  color: #173f2c;
  font-family: var(--font-sans);
}

.report-header p {
  color: #3f6550;
}

.report-kicker {
  color: #2563eb !important;
}

.report-count strong {
  font-family: var(--font-sans);
  font-weight: 700;
}

.report-table thead {
  background: #175c3a;
}

.report-table tbody tr:nth-child(even) {
  background: #f0f8f3;
}

.report-footer {
  border-color: #9cc4ad;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: #e2f4e9;
  color: #3f6550;
}

.report-footer img {
  height: 2rem;
  width: auto;
}

.report-summary-card {
  border-radius: var(--radius-md);
}

.auth-page {
  display: grid;
  max-width: 64rem;
  grid-template-columns: minmax(16rem, .8fr) minmax(20rem, 1.1fr);
  align-items: stretch;
  padding-top: clamp(2rem, 9vh, 6rem);
  gap: 0;
}

.auth-page>*+* {
  margin-top: 0;
}

.auth-page .page-header {
  min-height: 22rem;
  align-content: end;
  padding: 2rem;
  border: 0;
  border-top: 5px solid var(--brand-600);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background: color-mix(in srgb, var(--brand-50) 55%, var(--surface));
}

.auth-page .form-card {
  display: grid;
  align-content: center;
  border: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.orientation-heading {
  max-width: 48rem;
  text-align: left;
}

.orientation-heading h1 {
  font-size: var(--hero-title-size);
}

.orientation-heading p {
  font-family: var(--font-sans);
  font-size: .9rem;
}

.orientation-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.orientation-progress {
  background: color-mix(in srgb, var(--brand-50) 50%, var(--surface));
}

.orientation-progress progress,
.orientation-progress progress::-webkit-progress-bar,
.orientation-progress progress::-webkit-progress-value,
.orientation-progress progress::-moz-progress-bar {
  border-radius: var(--radius-full);
}

.orientation-progress progress::-webkit-progress-value,
.orientation-progress progress::-moz-progress-bar {
  background: var(--brand-600);
}

.orientation-copy h2 {
  font-size: clamp(1.5rem, 2.7vw, 2.15rem);
}

.orientation-copy>p {
  font-family: var(--font-sans);
  font-size: .96rem;
}

.orientation-step:not([hidden]) {
  animation: orientation-step-in 200ms var(--ease-out) both;
}

@keyframes orientation-step-in {
  from {
    opacity: 0;
    transform: translateY(.4rem);
  }
}

.orientation-points li {
  border-bottom: 1px solid var(--border);
  padding-bottom: .65rem;
}

.orientation-points li>span,
.orientation-checklist li::before {
  border: 1px solid var(--brand-600);
  border-radius: var(--radius-full);
  background: var(--brand-50);
}

.orientation-visual {
  border: 1px solid color-mix(in srgb, var(--brand-500) 24%, var(--border));
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.orientation-app-mark {
  border-radius: var(--radius-sm);
}

.orientation-flow-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.orientation-flow-card::before {
  border-radius: var(--radius-full);
}

.orientation-mini-column {
  border: 1px solid var(--border);
  border-top: 4px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface-subtle) 70%, transparent);
}

.orientation-mini-column.active {
  border-top-color: #2563eb;
}

.orientation-mini-column.complete {
  border-top-color: #2563eb;
}

.orientation-mini-column i {
  display: grid;
  height: 2.6rem;
  place-items: center start;
  padding: .45rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--faint);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .56rem;
  font-style: normal;
}

.orientation-detail-grid {
  margin: 1rem 0;
}

.orientation-detail-grid>div {
  min-height: 3.25rem;
  padding: .55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
}

.orientation-detail-grid dt {
  color: var(--muted);
  font-size: .55rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.orientation-detail-grid dd {
  margin: .18rem 0 0;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: .68rem;
}

.orientation-activity-preview {
  border-radius: var(--radius-sm);
}

.orientation-activity-preview span {
  height: .35rem;
  border-radius: var(--radius-full);
}

.orientation-calendar-days i {
  display: block;
  padding: .28rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .52rem;
  font-style: normal;
}

.orientation-calendar-days b {
  border-radius: var(--radius-xs);
}

.orientation-ready-index {
  display: grid !important;
  width: min(21rem, 80%);
  gap: 0 !important;
  margin-top: 1.25rem !important;
  border-top: 1px solid var(--border);
}

.orientation-ready-index span {
  display: block;
  padding: .35rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: .65rem;
  text-align: left;
}

.orientation-actions {
  background: color-mix(in srgb, var(--brand-50) 45%, var(--surface));
}

@media (max-width: 72rem) {
  .maintenance-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .maintenance-primary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 78rem) {
  .filter-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .filter-bar .search-field {
    grid-column: span 2;
  }

  .filter-actions {
    grid-column: span 2;
    justify-content: flex-end;
  }

  .audit-filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .audit-search {
    grid-column: span 2;
  }
}

@media (min-width: 52.001rem) {
  .sidebar {
    overflow: hidden;
    visibility: visible;
    opacity: 1;
    transition: width 180ms ease, flex-basis 180ms ease, border-color 180ms ease, opacity 120ms ease, visibility 0s;
  }

  .sidebar>* {
    width: 16.25rem;
  }

  .sidebar-reveal-rail {
    display: flex;
    width: 0;
    flex: 0 0 0;
    justify-content: center;
    overflow: hidden;
    visibility: hidden;
    border-right: 0 solid transparent;
    background: var(--surface-subtle);
    opacity: 0;
    transition: width 180ms ease, flex-basis 180ms ease, border-color 180ms ease, opacity 120ms ease, visibility 0s linear 180ms;
  }

  .sidebar-show-button {
    margin-top: 1rem;
    visibility: hidden;
    pointer-events: none;
  }

  :root[data-sidebar-hidden="true"] .sidebar {
    width: 0;
    flex-basis: 0;
    visibility: hidden;
    border-right-width: 0;
    border-color: transparent;
    opacity: 0;
    pointer-events: none;
    transition: width 180ms ease, flex-basis 180ms ease, border-color 180ms ease, opacity 120ms ease, visibility 0s linear 180ms;
  }

  :root[data-sidebar-hidden="true"] .sidebar-reveal-rail {
    width: 3.25rem;
    flex-basis: 3.25rem;
    visibility: visible;
    border-right-width: 1px;
    border-color: var(--border-strong);
    opacity: 1;
    transition-delay: 0s;
  }

  :root[data-sidebar-hidden="true"] .sidebar-hide-button {
    visibility: hidden;
    pointer-events: none;
  }

  :root[data-sidebar-hidden="true"] .sidebar-show-button {
    visibility: visible;
    pointer-events: auto;
  }
}

@media (max-width: 52rem) {

  .sidebar-reveal-rail,
  .sidebar-hide-button {
    display: none;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    visibility: hidden;
    transform: translateX(-105%);
    transition: transform 180ms ease, visibility 0s linear 180ms;
    box-shadow: 12px 0 30px rgb(52 46 36 / .2);
  }

  body.nav-open .sidebar {
    visibility: visible;
    transform: translateX(0);
    transition-delay: 0s;
  }

  .mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: block;
    visibility: hidden;
    padding: 0;
    border: 0;
    background: rgb(30 25 18 / .5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 0s linear 180ms;
  }

  body.nav-open .mobile-backdrop {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
  }

  .mobile-header {
    display: flex;
    height: 3.5rem;
    flex: 0 0 3.5rem;
    align-items: center;
    justify-content: space-between;
    padding: 0 .8rem;
    border-bottom: 1px solid var(--border-strong);
    background: var(--surface-subtle);
  }

  .mobile-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .45rem;
  }

  .mobile-brand img {
    display: block;
    width: auto;
    max-width: 2.75rem;
    height: 1.55rem;
    object-fit: contain;
  }

  .mobile-header strong {
    font-family: var(--font-sans);
    font-size: .92rem;
    font-weight: 680;
  }

  .main-content {
    padding: 1rem;
  }

  .page-header {
    flex-direction: column;
  }

  .page-actions {
    justify-content: flex-start;
  }

  .auth-page {
    display: grid;
    grid-template-columns: 1fr;
    padding-top: 1rem;
  }

  .auth-page .page-header {
    min-height: 10rem;
    padding: 1.25rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }

  .auth-page .form-card {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .kanban-grid {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .kanban-column {
    min-height: auto;
  }

  .kanban-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .kanban-footer-actions {
    width: 100%;
    justify-content: space-between;
  }

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

  .audit-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-search {
    grid-column: 1 / -1;
  }

  .filter-bar .search-field {
    grid-column: 1 / -1;
  }

  .status-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .settings-setting-row {
    grid-template-columns: 1fr;
    gap: .75rem;
  }

  .settings-setting-control,
  .account-inline-meta {
    justify-self: start;
  }

  .settings-setting-control,
  .settings-inline-control,
  .theme-fieldset,
  .theme-options {
    width: 100%;
  }

  .account-inline-meta {
    flex-wrap: wrap;
  }

  .organization-branding-body {
    grid-template-columns: 1fr;
  }

  .orientation-step {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .orientation-stage {
    min-height: 0;
  }

  .orientation-visual {
    min-height: 15rem;
  }

  .orientation-board-visual {
    min-height: 18rem;
  }

  .orientation-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
  }

  .mobile-board-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--border-strong);
    border-radius: 0;
    background: transparent;
  }

  .mobile-board-tabs button {
    min-height: 2.75rem;
    padding: .45rem;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font-size: .7rem;
    font-weight: 650;
    cursor: pointer;
  }

  .mobile-board-tabs button.active {
    border-bottom-color: var(--brand-600);
    background: transparent;
    color: var(--text);
    box-shadow: none;
  }

  .kanban-column[hidden] {
    display: none;
  }

  .board-help {
    display: none;
  }

  .work-card {
    padding: .8rem;
  }

  .work-card .card-description {
    -webkit-line-clamp: 2;
  }

  .schedule-origin-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .photo-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: .8rem;
  }

  .photo-upload-form {
    align-items: stretch;
    flex-direction: column;
  }

  .photo-upload-form .btn {
    width: 100%;
    min-height: 2.75rem;
  }

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

  .maintenance-primary {
    display: flex;
    flex-direction: column;
  }

  .maintenance-attention-card {
    order: 1;
    width: 100%;
  }

  .maintenance-calendar-card {
    order: 2;
    width: 100%;
  }

  .mobile-calendar-toggle {
    display: inline-flex;
  }

  .maintenance-calendar-card:has([data-calendar-toggle][aria-expanded="false"]) [data-calendar-body] {
    display: none;
  }

  .calendar-day {
    min-height: 4rem;
  }

  .calendar-event {
    width: .45rem;
    height: .45rem;
    padding: 0;
    border-radius: 50%;
    color: transparent;
  }

  .calendar-agenda-row {
    grid-template-columns: 6.5rem minmax(0, 1fr);
  }

  .calendar-agenda-row .badge {
    grid-column: 2;
    justify-self: start;
  }

  .schedule-detail-grid {
    grid-template-columns: 1fr;
  }

  .responsive-table {
    display: block;
  }

  .mobile-sort-field {
    display: block;
  }

  .responsive-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .responsive-table tbody {
    display: block;
  }

  .responsive-table tbody tr {
    display: grid;
    grid-template-columns: 1fr;
    padding: .65rem .8rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
  }

  .responsive-table tbody tr:hover {
    background: transparent;
  }

  .responsive-table tbody td {
    display: grid;
    grid-template-columns: minmax(6.5rem, .38fr) minmax(0, 1fr);
    align-items: start;
    gap: .65rem;
    padding: .42rem 0;
    border: 0;
    text-align: left;
    white-space: normal;
  }

  .responsive-table tbody td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: .62rem;
    font-weight: 650;
    letter-spacing: .03em;
    text-transform: uppercase;
  }

  .responsive-table tbody td[colspan] {
    display: block;
  }

  .responsive-table tbody td[colspan]::before {
    display: none;
  }

  .responsive-table .row-actions,
  .responsive-table .inline-form {
    align-items: stretch;
    flex-direction: column;
  }

  .responsive-table .row-actions .btn,
  .responsive-table .inline-form .btn,
  .responsive-table .compact-select {
    width: 100%;
    min-height: 2.75rem;
  }

  .report-mobile-summary {
    display: grid;
    gap: .65rem;
    padding: .75rem 0;
  }

  .report-table-wrap {
    display: none;
  }

  .btn,
  .input,
  .select,
  .icon-button,
  .card-action,
  .btn-link {
    min-height: 2.75rem;
  }

  .urgency-cycle {
    min-height: 2rem;
    padding-inline: .65rem;
  }

  .btn-sm {
    min-height: 2.75rem;
  }

  .main-content {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .dialog {
    width: calc(100% - 1rem);
    max-height: calc(100dvh - 1rem);
  }
}

@media (max-width: 36rem) {

  .form-grid,
  .filter-bar,
  .audit-filter-bar {
    grid-template-columns: 1fr;
  }

  .form-grid .full,
  .filter-bar .search-field,
  .filter-actions {
    grid-column: auto;
  }

  .filter-actions {
    justify-content: stretch;
  }

  .filter-actions>* {
    flex: 1;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions .btn {
    flex: 1;
  }

  .alert {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .theme-options,
  .password-grid {
    grid-template-columns: 1fr;
  }

  .theme-option+.theme-option {
    border-top: 1px solid var(--border-strong);
    border-left: 0;
  }

  .settings-setting-row {
    padding: .8rem;
  }

  .settings-inline-control {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-inline-control label,
  .settings-inline-control .btn {
    width: 100%;
  }

  .settings-users-header {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-users-header .btn {
    width: 100%;
  }

  .organization-branding-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .organization-branding-controls .btn {
    width: 100%;
    min-height: 2.75rem;
  }

  .password-current,
  .password-actions {
    grid-column: auto;
  }

  .orientation-settings-action .btn {
    width: 100%;
  }

  .orientation-heading {
    text-align: left;
  }

  .orientation-progress {
    align-items: stretch;
    flex-direction: column;
    gap: .45rem;
  }

  .orientation-progress>div {
    width: 100%;
    min-width: 0;
  }

  .orientation-step {
    padding: 1.2rem;
  }

  .orientation-visual {
    min-height: 13rem;
  }

  .orientation-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .orientation-actions>.btn:first-child {
    width: 100%;
    margin-right: 0;
  }

  .orientation-actions form,
  .orientation-actions form .btn,
  .orientation-actions>.btn {
    width: 100%;
  }

  .export-menu,
  .export-menu>summary {
    width: 100%;
  }

  .export-menu-panel {
    right: auto;
    left: 0;
    width: min(17rem, 100%);
  }

  .board-notes-overview,
  .board-note-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .board-note-actions .btn {
    width: 100%;
  }

  .contractor-options-fields {
    grid-template-columns: 1fr;
  }

  .audit-search {
    grid-column: auto;
  }

  .maintenance-summary {
    grid-template-columns: 1fr 1fr;
  }

  .maintenance-summary .summary-stat:last-child {
    grid-column: 1 / -1;
  }

  .maintenance-agenda-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .agenda-actions {
    width: 100%;
    align-items: stretch;
  }

  .agenda-actions .btn {
    width: 100%;
  }

  .calendar-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .calendar-day {
    min-height: 3.1rem;
    padding: .3rem;
  }

  .calendar-weekdays span {
    padding-inline: .1rem;
  }

  .calendar-agenda-row {
    grid-template-columns: 1fr;
    gap: .25rem;
  }

  .calendar-agenda-row .badge {
    grid-column: auto;
  }

  .form-grid-fieldset {
    grid-template-columns: 1fr;
  }

  .form-grid-fieldset .full {
    grid-column: auto;
  }

  .maintenance-status-actions {
    flex-direction: column;
  }

  .maintenance-status-actions form {
    flex-basis: auto;
  }

  .photo-gallery {
    grid-template-columns: 1fr;
  }

  .photo-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .photo-picker-button .btn {
    width: 100%;
    min-height: 2.75rem;
  }
}

@page {
  size: landscape;
  margin: .35in;
}

@media print {
  :root {
    color-scheme: light;
  }

  body {
    background: white !important;
    color: #111827 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .sidebar,
  .mobile-header,
  .no-print,
  .toast-region {
    display: none !important;
  }

  .app-shell,
  .main-column,
  .main-content {
    display: block;
    height: auto;
    overflow: visible;
    padding: 0;
    background: white;
  }

  .page-layout>*+* {
    margin-top: 0;
  }

  .print-report {
    width: 100%;
  }

  .report-header {
    break-after: avoid;
  }

  .report-table-wrap {
    display: block;
    overflow: visible;
  }

  .report-table {
    table-layout: auto;
  }

  .report-table thead {
    display: table-header-group;
  }

  .report-table tr {
    break-inside: avoid;
  }

  .report-table th,
  .report-table td {
    padding: .28rem .32rem;
    font-size: 6.5pt;
  }

  .report-description {
    min-width: 0;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }

  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
  }
}