:root {
  color-scheme: light;
  --bg: #f5f1e8;
  --surface: #fffdf8;
  --text: #251f18;
  --muted: #6f6659;
  --border: #d9cbb8;
  --accent: #153f2d;
  --accent-contrast: #ffffff;
  --accent-soft: #e8f0e8;
  --oak: #8a5a2b;
  --oak-dark: #5c3518;
  --canopy: #0f2d21;
  --header-text: #f6ecd7;
  --secondary-contrast: #ffffff;
  --danger-bg: #fff1f1;
  --danger-text: #8a1f1f;
  --success-bg: #edf8f0;
  --success-text: #1f6b3a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(21, 63, 45, .06), transparent 220px),
    var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

#components-reconnect-modal {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: auto;
  top: auto;
  z-index: 10000;
  display: none;
  width: min(24rem, calc(100vw - 2rem));
  min-height: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: .9rem;
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
  color: var(--text);
  padding: 1rem 1.1rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(.5rem);
  transition: opacity .16s ease, transform .16s ease;
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
  display: block;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#components-reconnect-modal.components-reconnect-hide {
  display: none;
}

#components-reconnect-modal::before {
  content: "\f1eb";
  display: none;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-right: .7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font: var(--fa-font-solid);
  vertical-align: middle;
}

#components-reconnect-modal .reconnect-card {
  display: grid;
  gap: .25rem;
}

body.coapp-reconnect-blocked .theme-shell,
body:has(#components-reconnect-modal.components-reconnect-show) .theme-shell,
body:has(#components-reconnect-modal.components-reconnect-failed) .theme-shell,
body:has(#components-reconnect-modal.components-reconnect-rejected) .theme-shell {
  pointer-events: none;
  cursor: wait;
}

body.coapp-reconnect-blocked,
body.coapp-reconnect-blocked *,
body:has(#components-reconnect-modal.components-reconnect-show),
body:has(#components-reconnect-modal.components-reconnect-show) *,
body:has(#components-reconnect-modal.components-reconnect-failed),
body:has(#components-reconnect-modal.components-reconnect-failed) *,
body:has(#components-reconnect-modal.components-reconnect-rejected),
body:has(#components-reconnect-modal.components-reconnect-rejected) * {
  cursor: wait !important;
}

#components-reconnect-modal .reconnect-title {
  margin: 0 0 .35rem;
  color: var(--text);
  font-size: 1rem;
}

#components-reconnect-modal p {
  margin: 0;
  color: var(--muted);
}

#components-reconnect-modal .reconnect-title,
#components-reconnect-modal .reconnect-show-message,
#components-reconnect-modal .reconnect-failed-message,
#components-reconnect-modal .reconnect-rejected-message {
  display: none;
}

#components-reconnect-modal.components-reconnect-show .reconnect-show-title,
#components-reconnect-modal.components-reconnect-show .reconnect-show-message,
#components-reconnect-modal.components-reconnect-failed .reconnect-failed-title,
#components-reconnect-modal.components-reconnect-failed .reconnect-failed-message,
#components-reconnect-modal.components-reconnect-rejected .reconnect-rejected-title,
#components-reconnect-modal.components-reconnect-rejected .reconnect-rejected-message {
  display: block;
}

#components-reconnect-modal .components-reconnect-spinner {
  display: none;
}

.theme-shell {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 220px),
    var(--bg);
  color: var(--text);
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 100vh;
}

.theme-dark,
.app-theme-dark {
  color-scheme: dark;
  --bg: #151718;
  --surface: #202426;
  --text: #f3efe7;
  --muted: #b7ada0;
  --border: #3b4245;
  --accent: #7bbf91;
  --accent-contrast: #102017;
  --accent-soft: #26382d;
  --oak: #d6a35f;
  --oak-dark: #8f6430;
  --canopy: #0b1210;
  --header-text: #f6ecd7;
  --danger-bg: #3b1e1e;
  --danger-text: #ffd7d7;
  --success-bg: #1d3625;
  --success-text: #b8f0c7;
}

.theme-high-contrast,
.app-theme-high-contrast {
  color-scheme: dark;
  --bg: #05080a;
  --surface: #101820;
  --text: #ffffff;
  --muted: #d8e5ec;
  --border: #7fd7ff;
  --accent: #00d4ff;
  --accent-contrast: #001018;
  --accent-soft: #062f3b;
  --oak: #ffe45c;
  --oak-dark: #ffe45c;
  --canopy: #000000;
  --header-text: #ffffff;
  --secondary-contrast: #000000;
  --danger-bg: #410000;
  --danger-text: #ffffff;
  --success-bg: #003b1f;
  --success-text: #d7ffe7;
}

.theme-ultra-high-contrast,
.app-theme-ultra-high-contrast {
  color-scheme: dark;
  --bg: #000000;
  --surface: #000000;
  --text: #ffffff;
  --muted: #ffffff;
  --border: #ffffff;
  --accent: #ffff00;
  --accent-contrast: #000000;
  --accent-soft: #1f1f00;
  --oak: #00ffff;
  --oak-dark: #00ffff;
  --canopy: #000000;
  --header-text: #ffffff;
  --secondary-contrast: #000000;
  --danger-bg: #000000;
  --danger-text: #ff8080;
  --success-bg: #000000;
  --success-text: #80ff80;
}

.theme-forest,
.app-theme-forest {
  color-scheme: light;
  --bg: #eef4ea;
  --surface: #fbfff8;
  --text: #1b261d;
  --muted: #60705f;
  --border: #c7d8c0;
  --accent: #256d3f;
  --accent-contrast: #ffffff;
  --accent-soft: #dcebd8;
  --oak: #8a6f2a;
  --oak-dark: #5f4a18;
  --canopy: #19472d;
  --header-text: #f9ffe9;
  --secondary-contrast: #ffffff;
  --danger-bg: #fff0f0;
  --danger-text: #8a1f1f;
  --success-bg: #e0f2e3;
  --success-text: #1d6637;
}

.theme-forest-dark,
.app-theme-forest-dark {
  color-scheme: dark;
  --bg: #07120d;
  --surface: #102019;
  --text: #edf7ee;
  --muted: #b7c8b9;
  --border: #284237;
  --accent: #77c88c;
  --accent-contrast: #07120d;
  --accent-soft: #183323;
  --oak: #d6b15c;
  --oak-dark: #d6b15c;
  --canopy: #050c08;
  --header-text: #edf7ee;
  --secondary-contrast: #111007;
  --danger-bg: #3a171a;
  --danger-text: #ffd7d7;
  --success-bg: #12351f;
  --success-text: #c2f5ce;
}

.theme-ocean,
.app-theme-ocean {
  color-scheme: light;
  --bg: #eef7fb;
  --surface: #fbfdff;
  --text: #172631;
  --muted: #5a6c78;
  --border: #bfd7e5;
  --accent: #176b87;
  --accent-contrast: #ffffff;
  --accent-soft: #dceff7;
  --oak: #2f8c77;
  --oak-dark: #1f6656;
  --canopy: #0f3f57;
  --header-text: #ffffff;
  --secondary-contrast: #ffffff;
  --danger-bg: #fff0f0;
  --danger-text: #8a1f1f;
  --success-bg: #e1f5ef;
  --success-text: #1d6b5a;
}

.theme-ocean-dark,
.app-theme-ocean-dark {
  color-scheme: dark;
  --bg: #07111f;
  --surface: #101d2f;
  --text: #edf6ff;
  --muted: #b6c7d8;
  --border: #28425e;
  --accent: #5db8e8;
  --accent-contrast: #06101a;
  --accent-soft: #12334c;
  --oak: #7fd6c2;
  --oak-dark: #7fd6c2;
  --canopy: #050b14;
  --header-text: #edf6ff;
  --secondary-contrast: #07111f;
  --danger-bg: #3a171a;
  --danger-text: #ffd7d7;
  --success-bg: #103829;
  --success-text: #c4f5df;
}

.theme-rose,
.app-theme-rose {
  color-scheme: light;
  --bg: #fff3f5;
  --surface: #fffafa;
  --text: #321f24;
  --muted: #755d62;
  --border: #e4c2ca;
  --accent: #9f3153;
  --accent-contrast: #ffffff;
  --accent-soft: #f7dde4;
  --oak: #7c6a2d;
  --oak-dark: #5a4b1d;
  --canopy: #6f213b;
  --header-text: #ffffff;
  --secondary-contrast: #ffffff;
  --danger-bg: #ffecee;
  --danger-text: #8a1f1f;
  --success-bg: #eaf5e8;
  --success-text: #2b6835;
}

.theme-rose-dark,
.app-theme-rose-dark {
  color-scheme: dark;
  --bg: #1b0d12;
  --surface: #2a151c;
  --text: #fff0f3;
  --muted: #d7b8c0;
  --border: #55313b;
  --accent: #f08aa8;
  --accent-contrast: #2a0c17;
  --accent-soft: #4a1f2c;
  --oak: #e0c36f;
  --oak-dark: #e0c36f;
  --canopy: #13080c;
  --header-text: #fff0f3;
  --secondary-contrast: #211707;
  --danger-bg: #3a171a;
  --danger-text: #ffd7d7;
  --success-bg: #18351e;
  --success-text: #c9f5ce;
}

.theme-plum,
.app-theme-plum {
  color-scheme: light;
  --bg: #f7f2fb;
  --surface: #fffbff;
  --text: #2a2231;
  --muted: #6d6077;
  --border: #d5c5e2;
  --accent: #6b3fa0;
  --accent-contrast: #ffffff;
  --accent-soft: #eadff4;
  --oak: #4f7f73;
  --oak-dark: #365e55;
  --canopy: #4b2c75;
  --header-text: #ffffff;
  --secondary-contrast: #ffffff;
  --danger-bg: #fff0f0;
  --danger-text: #8a1f1f;
  --success-bg: #e4f3ee;
  --success-text: #276958;
}

.theme-plum-dark,
.app-theme-plum-dark {
  color-scheme: dark;
  --bg: #151020;
  --surface: #21172f;
  --text: #f7f0ff;
  --muted: #c7b9d8;
  --border: #463758;
  --accent: #c49bff;
  --accent-contrast: #1b0f2a;
  --accent-soft: #33224a;
  --oak: #d8b56a;
  --oak-dark: #d8b56a;
  --canopy: #0d0915;
  --header-text: #f7f0ff;
  --secondary-contrast: #181104;
  --danger-bg: #3a171a;
  --danger-text: #ffd7d7;
  --success-bg: #163329;
  --success-text: #c9f5e8;
}

.theme-amber,
.app-theme-amber {
  color-scheme: light;
  --bg: #fff7e8;
  --surface: #fffdf8;
  --text: #2c2418;
  --muted: #776953;
  --border: #e4cf9e;
  --accent: #8a5d12;
  --accent-contrast: #ffffff;
  --accent-soft: #f6ead0;
  --oak: #3f7a5a;
  --oak-dark: #285b3f;
  --canopy: #63420d;
  --header-text: #ffffff;
  --secondary-contrast: #ffffff;
  --danger-bg: #fff0f0;
  --danger-text: #8a1f1f;
  --success-bg: #e3f2e9;
  --success-text: #216842;
}

.theme-amber-dark,
.app-theme-amber-dark {
  color-scheme: dark;
  --bg: #17120b;
  --surface: #251d12;
  --text: #fff4e2;
  --muted: #d2c0a4;
  --border: #4e3b20;
  --accent: #f0b84f;
  --accent-contrast: #251606;
  --accent-soft: #3d2c14;
  --oak: #91c77a;
  --oak-dark: #91c77a;
  --canopy: #0e0a05;
  --header-text: #fff4e2;
  --secondary-contrast: #091205;
  --danger-bg: #3a171a;
  --danger-text: #ffd7d7;
  --success-bg: #17351d;
  --success-text: #d4f5c8;
}

.theme-sky,
.app-theme-sky {
  color-scheme: light;
  --bg: #f0f8ff;
  --surface: #fbfdff;
  --text: #182636;
  --muted: #5d6d7c;
  --border: #c6d9ea;
  --accent: #2267a5;
  --accent-contrast: #ffffff;
  --accent-soft: #dcecf8;
  --oak: #b65b3c;
  --oak-dark: #85402a;
  --canopy: #164873;
  --header-text: #ffffff;
  --secondary-contrast: #ffffff;
  --danger-bg: #fff0f0;
  --danger-text: #8a1f1f;
  --success-bg: #e4f4eb;
  --success-text: #276946;
}

.theme-sky-dark,
.app-theme-sky-dark {
  color-scheme: dark;
  --bg: #071525;
  --surface: #102238;
  --text: #eef7ff;
  --muted: #b8c9da;
  --border: #294760;
  --accent: #72c7ff;
  --accent-contrast: #071525;
  --accent-soft: #173752;
  --oak: #f2a070;
  --oak-dark: #f2a070;
  --canopy: #050d18;
  --header-text: #eef7ff;
  --secondary-contrast: #241104;
  --danger-bg: #3a171a;
  --danger-text: #ffd7d7;
  --success-bg: #143522;
  --success-text: #caf5d8;
}

.theme-slate,
.app-theme-slate {
  color-scheme: light;
  --bg: #f2f5f4;
  --surface: #ffffff;
  --text: #202a2d;
  --muted: #5f6d70;
  --border: #c9d3d2;
  --accent: #476a75;
  --accent-contrast: #ffffff;
  --accent-soft: #e0eaeb;
  --oak: #5f6843;
  --oak-dark: #454d2f;
  --canopy: #324d56;
  --header-text: #ffffff;
  --secondary-contrast: #ffffff;
  --danger-bg: #fff0f0;
  --danger-text: #8a1f1f;
  --success-bg: #e4f0e9;
  --success-text: #2b6646;
}

.theme-slate-dark,
.app-theme-slate-dark {
  color-scheme: dark;
  --bg: #101416;
  --surface: #1d2427;
  --text: #eef4f3;
  --muted: #bdc8c7;
  --border: #38464a;
  --accent: #8cc6bd;
  --accent-contrast: #10201d;
  --accent-soft: #243b39;
  --oak: #c8b06a;
  --oak-dark: #c8b06a;
  --canopy: #0a0d0f;
  --header-text: #eef4f3;
  --secondary-contrast: #171204;
  --danger-bg: #3a171a;
  --danger-text: #ffd7d7;
  --success-bg: #143127;
  --success-text: #c9f5e4;
}

a { color: inherit; }

main {
  flex: 1;
}

.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  padding: .85rem 1rem;
  background: var(--canopy);
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 6px 18px rgba(37, 31, 24, .12);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.brand {
  display: inline-grid;
  grid-template-columns: 2rem auto;
  align-items: center;
  column-gap: .55rem;
  min-height: 42px;
  padding: .35rem .65rem;
  color: var(--header-text);
  font-weight: 800;
  text-decoration: none;
  line-height: 1.05;
  border-radius: .65rem;
  align-self: flex-start;
}

.brand-icon {
  grid-row: 1 / span 2;
  width: 2rem;
  height: 2rem;
  border-radius: .45rem;
  object-fit: contain;
}

.brand-main {
  font-size: 1.5rem;
  letter-spacing: .02em;
  padding-bottom: 4px;
}

.brand-subtitle {
  color: color-mix(in srgb, var(--header-text) 72%, transparent);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.mobile-menu {
  width: 100%;
}

.mobile-menu-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  height: 0;
  margin: 0;
  padding: 0;
}

.mobile-menu-toggle {
  align-items: center;
  background: color-mix(in srgb, var(--header-text) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--header-text) 16%, transparent);
  border-radius: .85rem;
  color: var(--header-text);
  cursor: pointer;
  display: inline-flex;
  gap: .55rem;
  justify-content: center;
  list-style: none;
  min-height: 42px;
  padding: .65rem .8rem;
  text-align: center;
  font-weight: 900;
  white-space: nowrap;
  user-select: none;
  width: 100%;
  margin-top: 0;
}

.mobile-menu-check:checked + .mobile-menu-toggle {
  border-color: color-mix(in srgb, var(--header-text) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 42%, transparent);
}

.mobile-menu-check:not(:checked) ~ .nav-links {
  display: none;
}

.mobile-menu-check:checked ~ .nav-links {
  margin-top: .45rem;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  width: 100%;
  font-size: .9rem;
  overflow: visible;
}

.nav-group {
  display: grid;
  border-radius: .85rem;
  position: relative;
  z-index: 1;
}

.nav-group[open] {
  z-index: 1001;
}

.nav-group summary {
  align-items: center;
  background: color-mix(in srgb, var(--header-text) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--header-text) 16%, transparent);
  border-radius: .85rem;
  color: var(--header-text);
  cursor: pointer;
  display: inline-flex;
  gap: .55rem;
  justify-content: center;
  list-style: none;
  min-height: 42px;
  padding: .65rem .8rem;
  text-align: center;
  font-weight: 900;
  white-space: nowrap;
  user-select: none;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-size: .75rem;
  font-weight: 900;
  opacity: .8;
}

.nav-group summary > i {
  flex: 0 0 auto;
  font-size: .9rem;
}

.nav-group[open] summary {
  border-color: color-mix(in srgb, var(--header-text) 35%, transparent);
  border-bottom-left-radius: .45rem;
  border-bottom-right-radius: .45rem;
  background: color-mix(in srgb, var(--accent) 42%, transparent);
}

.nav-group[open] summary::after {
  transform: rotate(180deg);
}

.nav-group-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: .3rem;
  left: 0;
  margin-top: .3rem;
  min-width: max(100%, 14rem);
  padding: .35rem;
  position: absolute;
  top: 100%;
  width: max-content;
  max-width: min(24rem, calc(100vw - 2rem));
  border: 1px solid color-mix(in srgb, var(--header-text) 18%, transparent);
  border-radius: .45rem .45rem .85rem .85rem;
  background: color-mix(in srgb, var(--canopy) 96%, var(--surface) 4%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .34);
  z-index: 1002;
}

.nav-group-account .nav-group-links {
  left: auto;
  right: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 38px;
  padding: .55rem .65rem;
  text-decoration: none;
  color: var(--header-text);
  background: color-mix(in srgb, var(--header-text) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--header-text) 16%, transparent);
  border-radius: .7rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.nav-group-links a {
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
}

.nav-group-links a span {
  overflow-wrap: anywhere;
  white-space: normal;
}

.nav-badge {
  align-items: center;
  background: var(--accent);
  border: 1px solid color-mix(in srgb, var(--header-text) 55%, transparent);
  border-radius: 999px;
  color: var(--header-text);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: .72rem;
  font-weight: 900;
  justify-content: center;
  line-height: 1;
  min-width: 1.35rem;
  padding: .22rem .4rem;
}

.nav-links a i {
  flex: 0 0 auto;
  font-size: .95rem;
}

.nav-links a span {
  min-width: 0;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--header-text);
  background: color-mix(in srgb, var(--accent) 42%, transparent);
  border-color: color-mix(in srgb, var(--header-text) 35%, transparent);
  outline: none;
}

.demo-banner {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: .75rem;
  padding: .8rem 1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 58%, var(--border));
  background: color-mix(in srgb, var(--surface) 80%, var(--accent) 20%);
  color: var(--text);
  box-shadow: 0 3px 10px rgba(37, 31, 24, .08);
}

.announcement-banner-list {
  display: grid;
  gap: 1px;
  background: color-mix(in srgb, var(--accent) 68%, var(--border));
}

.announcement-banner {
  align-items: center;
  background: color-mix(in srgb, var(--surface) 82%, var(--accent) 18%);
  color: var(--text);
  display: flex;
  gap: .75rem;
  padding: .8rem 1rem;
  text-decoration: none;
  justify-content: center;
  text-align: center;
}

.announcement-banner-item-content {
  align-items: center;
  display: grid;
  gap: .2rem;
  justify-items: center;
  max-width: 72rem;
}

.announcement-banner-item-content > span {
  align-items: center;
  color: var(--accent);
  display: inline-flex;
  font-weight: 900;
  gap: .45rem;
  justify-content: center;
}

.announcement-banner-item-content p {
  margin: 0;
}

.announcement-banner-item-content p > span {
  white-space: pre-line;
}

.announcement-list {
  display: grid;
  gap: 1rem;
}

.announcement-unread {
  border-left: 4px solid var(--accent);
}

.announcement-body {
  white-space: pre-line;
}

.demo-banner > i {
  margin-top: .18rem;
  color: var(--accent);
  font-size: 1.05rem;
}

.demo-banner div {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  max-width: 72rem;
  line-height: 1.4;
}

.demo-banner strong {
  font-size: .95rem;
}

.demo-banner span {
  font-size: .88rem;
}

.site-footer {
  margin-top: 2rem;
  padding: 2rem 1rem 1.25rem;
  background: var(--canopy);
  border-top: 3px solid var(--accent);
  color: var(--header-text);
}

.footer-inner {
  width: min(100%, 1200px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-top {
  display: grid;
  width: 100%;
  gap: 1.5rem;
}

.footer-brand {
  display: grid;
  align-content: start;
  gap: .25rem;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--header-text) 12%, transparent);
  border-radius: .85rem;
  background: color-mix(in srgb, var(--header-text) 4%, transparent);
}

.footer-brand strong {
  color: var(--header-text);
  font-size: 1.4rem;
}

.footer-brand span,
.footer-bottom {
  color: color-mix(in srgb, var(--header-text) 78%, transparent);
  font-size: .9rem;
}

.footer-columns {
  display: grid;
  gap: 1.25rem;
}

.footer-links {
  display: grid;
  justify-items: start;
  gap: .55rem;
  align-content: start;
  width: 100%;
  height: 100%;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--header-text) 12%, transparent);
  border-radius: .85rem;
  background: color-mix(in srgb, var(--header-text) 4%, transparent);
}

.footer-links h2 {
  align-items: center;
  display: inline-flex;
  gap: .45rem;
  width: 100%;
  margin: 0 0 .3rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid color-mix(in srgb, var(--header-text) 14%, transparent);
  color: var(--header-text);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.footer-links a {
  align-items: flex-start;
  color: color-mix(in srgb, var(--header-text) 84%, transparent);
  display: inline-flex;
  gap: .5rem;
  width: 100%;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.35;
}

.footer-links h2 i,
.footer-links a i {
  flex: 0 0 1rem;
  margin-top: .1rem;
  text-align: center;
}

.footer-links a span {
  min-width: 0;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--header-text);
  text-decoration: underline;
  outline: none;
}

.footer-community {
  display: block;
  width: 100%;
  padding-top: 1.25rem;
  border-top: 1px solid color-mix(in srgb, var(--header-text) 16%, transparent);
}

.footer-community section {
  width: 100%;
}

.footer-community section + section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid color-mix(in srgb, var(--header-text) 10%, transparent);
}

.footer-community h2 {
  margin: 0 0 .55rem;
  color: var(--header-text);
  font-size: 1rem;
}

.footer-community h2 i {
  margin-right: .35rem;
  color: var(--accent);
}

.footer-community p,
.footer-community address {
  margin: 0;
  color: color-mix(in srgb, var(--header-text) 82%, transparent);
  font-size: .9rem;
  line-height: 1.6;
}

.footer-organization {
  display: grid;
  gap: .6rem;
}

.footer-organization address {
  font-style: normal;
}

.footer-bottom {
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--header-text) 16%, transparent);
}

.page {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 1rem;
}

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

.narrow { max-width: 460px; }
.info-manage-page {
  max-width: 1200px;
}
.hero { min-height: calc(100vh - 72px); display: grid; place-items: center; }
.hero-card { max-width: 680px; }

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

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

.home-navigation {
  display: grid;
  gap: 1.25rem;
}

.home-navigation-group {
  display: grid;
  gap: .75rem;
}

.home-navigation-group h2 {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.home-tile {
  display: grid;
  place-items: center;
  gap: .8rem;
  min-height: 9rem;
  aspect-ratio: 1 / 1;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  text-align: center;
  font-weight: 900;
  box-shadow: 0 1px 2px rgba(37, 31, 24, .05);
}

.home-tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: .9rem;
  background: var(--accent-soft);
  color: var(--accent);
}

.home-tile-icon i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  font-size: 1.55rem;
  line-height: 1;
}

.home-tile-label {
  overflow-wrap: anywhere;
}

.home-tile:hover,
.home-tile:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface));
  outline: none;
  box-shadow: 0 10px 24px rgba(37, 31, 24, .12);
}

.profile-section-header {
  padding-top: 1.25rem;
}

.section-subtitle {
  margin-top: 1.5rem;
}

h1, h2 { line-height: 1.1; margin: 0 0 .5rem; }
p { line-height: 1.5; }

.page-title-with-icon {
  align-items: center;
  display: flex;
  gap: .65rem;
}

.page-title-with-icon i {
  color: var(--accent);
  font-size: .82em;
  line-height: 1;
}

.home-navigation-group h2 i,
.card h2 > i,
.section-title-row h2 > i,
.section-title-row h3 > i {
  color: var(--accent);
}

.card h3 > i,
.muted i {
  color: var(--accent);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 700;
  font-size: .75rem;
  margin: 0 0 .35rem;
}

.eyebrow-with-icon {
  align-items: center;
  display: inline-flex;
  gap: .4rem;
}

.eyebrow-with-icon i {
  color: var(--accent);
}

.card-grid {
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(37, 31, 24, .05);
}

.card-full {
  padding: 1.5rem;
}

.card-link {
  display: inline-flex;
  color: inherit;
  text-decoration: none;
}

.card-link:hover h2 {
  text-decoration: underline;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

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

.table th,
.table td {
  padding: .85rem 1rem;
  border-top: 1px solid var(--border);
}

.table th {
  text-align: left;
  font-weight: 700;
  color: var(--muted);
}

.table .numeric {
  text-align: right;
}

.history-table td {
  overflow-wrap: anywhere;
}

.plaid-accounts-table td {
  overflow-wrap: normal;
  word-break: normal;
}

.slack-routes-table td,
.slack-channels-table td,
.slack-workspaces-card td {
  overflow-wrap: normal;
  word-break: normal;
}

.plaid-accounts-table .button {
  white-space: nowrap;
}

.slack-routes-table .button,
.slack-channels-table .button,
.slack-workspaces-card .button {
  white-space: nowrap;
}

.slack-channel-form {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: .85rem;
  margin: 1rem 0;
  padding: .85rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: color-mix(in srgb, var(--surface) 90%, var(--accent) 10%);
}

.slack-channel-form > div:not(.actions) {
  display: flex;
  flex: 1 1 13rem;
  flex-direction: column;
  gap: .35rem;
  min-width: min(100%, 13rem);
}

.slack-channel-form .compact-check {
  min-height: 45px;
  border-radius: .8rem;
}

.table-actions {
  justify-content: flex-end;
  gap: .45rem;
}

.table-input {
  min-width: 11rem;
}

.compact-check {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  min-height: 2rem;
  margin: 0;
  padding: .28rem .48rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg) 8%);
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.compact-check:hover,
.compact-check:focus-within {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--surface) 86%, var(--accent) 14%);
}

.compact-check:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 82%, var(--surface) 18%);
}

.compact-check input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--accent);
}

.block {
  display: block;
}

.integration-brand-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  background: currentColor;
  vertical-align: -0.125em;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.integration-brand-icon-plaid {
  mask-image: url("/icons/brands/plaid.svg");
  -webkit-mask-image: url("/icons/brands/plaid.svg");
}

.integration-brand-icon-quickbooks {
  mask-image: url("/icons/brands/quickbooks.svg");
  -webkit-mask-image: url("/icons/brands/quickbooks.svg");
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, var(--accent) 22%);
  color: var(--text);
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.good {
  background: color-mix(in srgb, var(--success-bg) 72%, var(--surface) 28%);
  color: var(--success-text);
}

.status-pill.muted-status {
  background: var(--surface-muted);
  color: var(--muted);
}

.feature-toggle-grid {
  display: grid;
  gap: .75rem;
  margin-top: 1rem;
}

.feature-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  margin: 0;
  padding: .85rem;
  border: 1px solid var(--border);
  border-radius: .65rem;
  background: color-mix(in srgb, var(--surface) 92%, var(--accent) 8%);
  font-weight: 700;
}

.feature-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.feature-toggle:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.feature-toggle-copy {
  display: grid;
  gap: .2rem;
  min-width: 0;
}

.feature-toggle small {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.35;
}

.feature-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 3.1rem;
  height: 1.75rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-muted) 76%, var(--text) 24%);
  border: 1px solid var(--border);
  transition: background-color .15s ease, border-color .15s ease;
}

.feature-switch-knob {
  position: absolute;
  left: .18rem;
  width: 1.28rem;
  height: 1.28rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 2px 8px rgb(0 0 0 / .18);
  transition: transform .15s ease, background-color .15s ease;
}

.feature-toggle input:checked + .feature-switch {
  background: var(--accent);
  border-color: var(--accent);
}

.feature-toggle input:checked + .feature-switch .feature-switch-knob {
  transform: translateX(1.35rem);
}

.test-step-list {
  display: grid;
  gap: .65rem;
  margin-top: 1rem;
}

.test-step {
  display: grid;
  gap: .2rem;
  padding: .75rem;
  border: 1px solid var(--border);
  border-radius: .65rem;
  background: color-mix(in srgb, var(--surface) 92%, var(--accent) 8%);
}

.test-step span {
  color: var(--muted);
}

.info-items-table {
  table-layout: fixed;
  min-width: 0;
}

.info-items-table th:nth-child(1) {
  width: 17%;
}

.info-items-table th:nth-child(2) {
  width: 11%;
}

.info-items-table th:nth-child(3) {
  width: 26%;
}

.info-items-table th:nth-child(4) {
  width: 13%;
}

.info-items-table th:nth-child(5) {
  width: 6%;
}

.info-items-table th:nth-child(6) {
  width: 7%;
}

.info-items-table th:nth-child(7) {
  width: 20%;
}

.info-items-table td[data-label="Sort"],
.info-items-table td[data-label="Status"],
.info-items-table td[data-label="Actions"] {
  white-space: nowrap;
}

.info-items-table .entry-actions-cell {
  overflow-wrap: normal;
  word-break: normal;
}

.info-items-table .entry-actions {
  align-items: stretch;
  flex-direction: column;
  flex-wrap: nowrap;
}

.info-items-table .entry-actions .button {
  justify-content: center;
  width: 100%;
}

.info-item-url-cell {
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
}

.info-item-url-cell a {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-links-table {
  table-layout: fixed;
}

.resource-links-table th:nth-child(1) {
  width: 20%;
}

.resource-links-table th:nth-child(2) {
  width: 30%;
}

.resource-links-table th:nth-child(3) {
  width: 20%;
}

.resource-links-table th:nth-child(4) {
  width: 7%;
}

.resource-links-table th:nth-child(5) {
  width: 8%;
}

.resource-links-table th:nth-child(6) {
  width: 15%;
}

.resource-link-url-cell {
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
}

.resource-link-url-cell a {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-link-icon-cell {
  white-space: nowrap;
}

.resource-links-table td[data-label="Sort"],
.resource-links-table td[data-label="Status"],
.resource-links-table td[data-label="Actions"] {
  white-space: nowrap;
}

.quickbooks-transactions-table td {
  overflow-wrap: normal;
  word-break: normal;
}

.quickbooks-transactions-table td[data-label="Date"],
.quickbooks-transactions-table td[data-label="Type"],
.quickbooks-transactions-table td[data-label="Number"],
.quickbooks-transactions-table td[data-label="Amount"],
.quickbooks-transactions-table td[data-label="Running Total"],
.quickbooks-transactions-table td[data-label="Imported"] {
  white-space: nowrap;
}

.quickbooks-transactions-table td[data-label="Description"] {
  overflow-wrap: break-word;
}

.activity-filter-card {
  padding: 1.15rem 1.25rem;
}

.logs-page .activity-filter-card {
  margin-bottom: .75rem;
}

.activity-filter {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}

.activity-filter > div:first-child {
  width: min(100%, 32rem);
}

.activity-filter label {
  margin-top: 0;
}

.quickbooks-log-filter {
  margin-top: 1rem;
  max-width: 28rem;
}

.log-category-cleanup {
  display: grid;
  gap: .75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.log-category-cleanup p {
  margin: .2rem 0 0;
}

.log-category-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
}

.log-category-actions .input {
  flex: 1 1 22rem;
  min-width: min(100%, 16rem);
}

.log-category-actions .button {
  flex: 0 0 auto;
}

.activity-count {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  color: var(--muted);
  white-space: nowrap;
}

.activity-count strong {
  color: var(--text);
  font-size: 1.5rem;
}

.activity-list-card {
  padding: 0;
  overflow: hidden;
}

.activity-list-card .section-title-row {
  padding: 1.25rem 1.25rem .5rem;
}

.activity-list-card .section-title-row p {
  margin: 0;
}

.activity-table {
  margin-top: .5rem;
  font-size: .92rem;
}

.activity-table th {
  padding-top: .7rem;
  padding-bottom: .7rem;
  background: color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
  color: var(--text);
  font-size: .75rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.activity-table td {
  vertical-align: top;
}

.activity-table tbody tr:hover {
  background: color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
}

.activity-table td strong,
.activity-table td small,
.activity-table td span,
.activity-table td code {
  display: block;
}

.activity-table td small {
  margin-top: .2rem;
  color: var(--muted);
}

.activity-table code {
  width: fit-content;
  max-width: 24rem;
  padding: .12rem .35rem;
  border-radius: .35rem;
  background: color-mix(in srgb, var(--surface) 82%, var(--accent) 18%);
  color: var(--accent);
  font-size: .82rem;
  overflow-wrap: anywhere;
  white-space: normal;
}

.activity-table td code + span {
  margin-top: .35rem;
}

.activity-when {
  width: 12.5rem;
  white-space: nowrap;
}

.activity-action {
  margin-top: .35rem;
}

.activity-badge {
  width: fit-content;
  padding: .2rem .5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 82%, var(--accent) 18%);
  color: var(--muted);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.activity-badge-authentication {
  background: color-mix(in srgb, var(--accent-soft) 78%, var(--surface) 22%);
  color: var(--accent);
}

.activity-badge-navigation {
  background: color-mix(in srgb, var(--surface) 78%, var(--accent) 22%);
  color: var(--accent);
}

.activity-badge-data {
  background: var(--success-bg);
  color: var(--success-text);
}

.activity-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.activity-pagination .button {
  min-height: 40px;
  padding: .55rem .8rem;
  gap: .45rem;
}

.activity-empty {
  display: grid;
  justify-items: center;
  gap: .6rem;
  padding: 3rem 1rem;
  color: var(--muted);
  text-align: center;
}

.activity-empty i {
  font-size: 2rem;
  color: var(--accent);
}

.activity-empty p {
  margin: 0;
}

.logs-list-card {
  padding: 1rem;
}

.logs-table {
  margin-top: 0;
}

.logs-table details,
.log-entry details {
  margin-top: .55rem;
}

.logs-table summary,
.log-entry summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 800;
}

.log-message {
  display: block;
  font-weight: 800;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.log-entry-list {
  display: grid;
  gap: .85rem;
}

.log-entry {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 90%, var(--accent) 10%);
}

.log-entry-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.log-entry-heading > div {
  display: grid;
  gap: .4rem;
}

.log-entry-heading code {
  width: fit-content;
  max-width: 18rem;
  padding: .12rem .35rem;
  border-radius: .35rem;
  background: color-mix(in srgb, var(--surface) 82%, var(--accent) 18%);
  color: var(--accent);
  font-size: .82rem;
  overflow-wrap: anywhere;
}

.log-raw {
  max-height: 24rem;
  margin: .55rem 0 0;
  padding: .85rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #211f1b;
  color: #f6ecd7;
  font-size: .82rem;
  line-height: 1.45;
  white-space: pre;
}

.log-exception-actions {
  margin-top: .55rem;
}

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

.calendar-page-header .button,
.calendar-view-switcher .button {
  gap: .45rem;
}

.calendar-event-form {
  border-color: rgba(138, 90, 43, .45);
}

.calendar-all-day {
  width: fit-content;
  margin-top: 1rem;
}

.calendar-option-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1rem;
}

.calendar-all-day input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
}

.calendar-duplicate-paste {
  display: grid;
  gap: .6rem;
  padding: .75rem 0 0;
  border-top: 1px solid var(--border);
  background: transparent;
}

.calendar-duplicate-paste .button {
  justify-self: start;
}

.calendar-duplicate-list {
  display: grid;
  gap: .35rem;
  margin-top: 1.15rem;
}

.calendar-duplicate-list-heading {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) auto 2.5rem;
  align-items: center;
  gap: .65rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-duplicate-row {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) auto 2.5rem;
  align-items: center;
  gap: .65rem;
  padding: .4rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.calendar-duplicate-date-field {
  min-width: 0;
}

.calendar-duplicate-row .icon-button {
  grid-column: 3;
  justify-self: end;
}

.calendar-duplicate-end {
  display: flex;
  align-items: center;
  min-width: 9rem;
  color: var(--text);
}

.calendar-duplicate-end strong {
  font-size: .95rem;
}

.calendar-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.calendar-view-switcher,
.calendar-month-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.calendar-layout {
  display: grid;
  gap: 1rem;
}

.calendar-month-card {
  padding: 0;
  overflow: hidden;
}

.calendar-month-heading {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.calendar-month-heading h2 {
  margin: 0;
}

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

.calendar-weekdays {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 82%, var(--accent) 18%);
}

.calendar-weekdays span {
  padding: .6rem .35rem;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  min-width: 0;
  min-height: 8.5rem;
  padding: .45rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day-outside {
  background: color-mix(in srgb, var(--bg) 78%, var(--surface) 22%);
  color: var(--muted);
}

.calendar-day-selected {
  background: color-mix(in srgb, var(--accent-soft) 72%, var(--accent) 28%);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.calendar-day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  min-width: 1.8rem;
  min-height: 1.8rem;
  padding: .2rem .35rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.calendar-day-number i {
  display: none;
  flex: 0 0 auto;
  font-size: .78rem;
}

.calendar-day-number:hover,
.calendar-day-number:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.calendar-day-today .calendar-day-number {
  background: var(--accent);
  color: var(--accent-contrast);
}

.calendar-day-long {
  display: none;
}

.calendar-day-events {
  display: grid;
  gap: .3rem;
  margin-top: .3rem;
}

.calendar-event-chip,
.calendar-more-events {
  align-items: center;
  display: inline-flex;
  gap: .3rem;
  width: 100%;
  padding: .32rem .4rem;
  border: 0;
  border-radius: .45rem;
  background: var(--accent-soft);
  color: var(--accent);
  font: inherit;
  font-size: .72rem;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
}

.calendar-more-events i {
  flex: 0 0 auto;
}

.calendar-event-chip:hover,
.calendar-event-chip:focus-visible {
  background: var(--accent);
  color: var(--accent-contrast);
  outline: none;
}

.calendar-event-chip span,
.calendar-event-chip strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event-chip span {
  font-size: .65rem;
  opacity: .8;
}

.calendar-more-events {
  background: transparent;
  color: var(--accent);
  font-weight: 800;
}

.calendar-day-agenda {
  align-self: start;
}

.calendar-agenda-list {
  display: grid;
  gap: .65rem;
  margin-top: 1rem;
}

.calendar-agenda-event {
  display: grid;
  gap: .2rem;
  width: 100%;
  padding: .75rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.calendar-agenda-event:hover,
.calendar-agenda-event:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.calendar-agenda-event > span,
.calendar-agenda-event small {
  color: var(--muted);
  font-size: .82rem;
}

.calendar-agenda-event small i,
.calendar-schedule-event small i {
  margin-right: .25rem;
  color: var(--accent);
}

.calendar-schedule {
  display: grid;
  gap: 0;
}

.calendar-schedule > .section-title-row {
  margin-bottom: .85rem;
}

.calendar-schedule-day {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.calendar-schedule-date {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: .05rem;
  padding: .55rem;
  border-radius: .75rem;
  background: var(--accent-soft);
  color: var(--accent);
}

.calendar-schedule-date span,
.calendar-schedule-date small {
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-schedule-date strong {
  font-size: 1.55rem;
  line-height: 1;
}

.calendar-schedule-events {
  display: grid;
  gap: .55rem;
}

.calendar-schedule-event {
  display: grid;
  grid-template-columns: minmax(8rem, .4fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: .8rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.calendar-schedule-event:hover,
.calendar-schedule-event:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--surface) 82%, var(--accent) 18%);
  outline: none;
}

.calendar-schedule-time {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 800;
}

.calendar-schedule-event > span:nth-child(2) {
  display: grid;
  gap: .2rem;
}

.calendar-schedule-event small {
  color: var(--muted);
}

.calendar-schedule-event > i {
  color: var(--accent);
}

.calendar-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 45, 33, .65);
  backdrop-filter: blur(2px);
}

.calendar-event-detail {
  position: relative;
  width: min(100%, 38rem);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(15, 45, 33, .28);
}

.calendar-event-detail-page {
  width: 100%;
  max-height: none;
  overflow: visible;
}

.calendar-detail-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: #f4efe5;
  color: var(--text);
  cursor: pointer;
}

.calendar-detail-close:hover,
.calendar-detail-close:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.calendar-event-detail h2 {
  padding-right: 2.5rem;
}

.calendar-event-description {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.calendar-event-description p {
  margin-bottom: 0;
  white-space: pre-wrap;
}

.calendar-comments {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.calendar-comments h3,
.calendar-comments > div > p {
  margin: 0;
}

.calendar-comment-list {
  display: grid;
  gap: .7rem;
  max-height: 18rem;
  overflow-y: auto;
  padding-right: .2rem;
}

.calendar-comment {
  padding: .8rem;
  border: 1px solid var(--border);
  border-radius: .8rem;
  background: color-mix(in srgb, var(--surface) 90%, var(--accent) 10%);
}

.calendar-comment-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .35rem 1rem;
}

.calendar-comment-heading time {
  color: var(--muted);
  font-size: .78rem;
}

.calendar-comment p {
  margin: .45rem 0 0;
  line-height: 1.45;
  white-space: pre-wrap;
}

.calendar-comment-form label {
  margin-top: 0;
}

.calendar-comment-form .textarea {
  min-height: 6rem;
}

.calendar-comment-form .button {
  gap: .45rem;
}

.calendar-detail-actions {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.calendar-detail-actions .button {
  gap: .45rem;
}

.entry-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .45rem;
}

.house-table .entry-actions {
  justify-content: flex-start;
}

.house-table .entry-actions .button {
  gap: .45rem;
  white-space: nowrap;
}

label[for="member-house-filter"],
label[for="applicant-house-filter"],
label[for="task-house-filter"] {
  margin: 0 0 .4rem;
}

.details {
  display: grid;
  gap: .75rem;
  margin: 1rem 0 0;
}

.balance-details {
  margin-top: 0;
}

.balance-reconciliation {
  display: grid;
  gap: .85rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: .85rem;
  background: color-mix(in srgb, var(--surface) 90%, var(--accent) 10%);
}

.balance-reconciliation-summary {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.balance-reconciliation-summary div {
  display: grid;
  gap: .25rem;
}

.balance-reconciliation-summary span {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 800;
}

.balance-reconciliation-summary strong {
  font-size: 1.25rem;
}

.balance-reconciliation-status {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin: 0;
  padding-top: .85rem;
  border-top: 1px solid var(--border);
}

.balance-reconciliation-status i {
  margin-top: .18rem;
}

.balance-reconciliation.matched {
  border-color: color-mix(in srgb, var(--success-text) 45%, var(--border));
  background: color-mix(in srgb, var(--success-bg) 78%, var(--surface) 22%);
}

.balance-reconciliation.matched .balance-reconciliation-status {
  color: var(--success-text);
}

.balance-reconciliation.warning {
  border-color: color-mix(in srgb, var(--danger-text) 45%, var(--border));
  background: color-mix(in srgb, var(--danger-bg) 78%, var(--surface) 22%);
}

.balance-reconciliation.warning .balance-reconciliation-status {
  color: var(--danger-text);
}

.details div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--border);
  padding-top: .75rem;
}

dt { color: var(--muted); font-weight: 700; }
dd { margin: 0; text-align: right; }
.note-block { white-space: pre-wrap; }
.muted, .hint { color: var(--muted); }
.hint { font-size: .9rem; }
.alert { background: var(--danger-bg); color: var(--danger-text); padding: .75rem; border-radius: .75rem; }
.toast-region {
  position: fixed;
  inset: 4.75rem 1rem auto 1rem;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  pointer-events: none;
}
.toast-message {
  max-width: min(100% - 2rem, 34rem);
  margin: 0 auto;
  padding: .85rem 1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: .85rem;
  background: color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
  color: var(--text);
  box-shadow: 0 12px 30px rgba(37, 31, 24, .18);
  pointer-events: auto;
  animation: result-toast var(--toast-duration, 2.4s) ease forwards;
}

.toast-success {
  border-color: color-mix(in srgb, var(--success-text) 42%, var(--border));
  background: color-mix(in srgb, var(--surface) 82%, var(--success-bg) 18%);
  color: var(--text);
}

.toast-success::before {
  color: var(--success-text);
  content: "\f058";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: .45rem;
}

.toast-error,
.toast-danger,
.toast-alert {
  border-color: color-mix(in srgb, var(--danger-text) 42%, var(--border));
  background: color-mix(in srgb, var(--surface) 82%, var(--danger-bg) 18%);
  color: var(--text);
}

.toast-error::before,
.toast-danger::before,
.toast-alert::before {
  color: var(--danger-text);
  content: "\f06a";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: .45rem;
}

@keyframes result-toast {
  0% {
    opacity: 0;
    transform: translateY(-.6rem);
  }
  12%,
  72% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-.4rem);
  }
}

.dues-breakdown {
  margin-top: 1.25rem;
  border: 1px solid var(--border);
  border-radius: .9rem;
  background: color-mix(in srgb, var(--surface) 90%, var(--accent) 10%);
  overflow: hidden;
}

.dues-breakdown h3 {
  margin: 0;
  padding: .85rem 1rem;
  font-size: 1rem;
  border-bottom: 1px solid var(--border);
}

.dues-line,
.dues-total {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 1rem;
}

.dues-line strong,
.dues-total strong {
  white-space: nowrap;
}

.dues-total {
  border-top: 2px solid var(--accent);
  background: var(--accent-soft);
  font-weight: 900;
}

.section-title-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: space-between;
}

.sync-actions {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.sync-action {
  display: grid;
  gap: .85rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: .85rem;
  background: color-mix(in srgb, var(--surface) 92%, var(--accent) 8%);
}

.sync-action h3 {
  margin: 0;
  font-size: 1rem;
}

.sync-action p {
  margin: .25rem 0 0;
}

.sync-action .form-grid {
  width: 100%;
}

.quickbooks-customer-list-section,
.quickbooks-ignored-customers,
.quickbooks-recent-transactions-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
}

.quickbooks-sync-progress {
  margin-top: 1rem;
}

.bank-account-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.bank-account-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: .65rem;
  background: color-mix(in srgb, var(--surface) 94%, var(--accent) 6%);
}

.bank-account-card h3 {
  margin: 0;
}

.bank-account-card p {
  margin: .25rem 0 0;
}

.compact-details {
  margin-top: 0;
}

label {
  display: block;
  font-weight: 700;
  margin: 1rem 0 .4rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 44px;
  margin: .65rem 0 0;
  padding: .58rem .7rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: color-mix(in srgb, var(--surface) 94%, var(--bg) 6%);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  line-height: 1.35;
}

.check-row:hover,
.check-row:focus-within {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--surface) 86%, var(--accent) 14%);
}

.check-row:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 82%, var(--surface) 18%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}

.check-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--accent);
}

.check-row:has(input:disabled) {
  cursor: default;
  opacity: .72;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
}

.radio-group .check-row {
  min-height: 40px;
  padding: .45rem .65rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: var(--surface);
  font-weight: 800;
}

.note-list {
  display: grid;
  gap: .75rem;
  margin-top: 1rem;
}

.note-list .note-block {
  margin: 0;
  padding: .85rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: color-mix(in srgb, var(--surface) 90%, var(--accent) 10%);
}

.note-block p {
  margin: .6rem 0 0;
  white-space: pre-wrap;
}

.note-meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .85rem;
  font-size: .9rem;
}

.note-meta strong {
  color: var(--text);
}

.notification-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notification-card {
  border-left: 4px solid transparent;
}

.notification-unread {
  border-left-color: var(--accent);
}

.notification-owner {
  margin: .25rem 0 0;
}

.task-grid {
  align-items: start;
}

.task-status {
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  padding: 0.35rem 0.65rem;
  white-space: nowrap;
}

.task-status.muted-status {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}

.task-description {
  white-space: pre-wrap;
}

.task-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .8rem;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
  margin: .75rem 0;
}

.task-card-meta span {
  align-items: center;
  display: inline-flex;
  gap: .35rem;
}

.task-management {
  border-top: 1px solid var(--border);
  margin-top: 1rem;
  padding-top: 1rem;
}

.task-detail-card {
  margin-bottom: 1rem;
}

.task-photos {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.task-photo-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 14rem));
  justify-content: start;
}

.task-photo {
  border: 1px solid var(--border);
  border-radius: .75rem;
  margin: 0;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface) 90%, var(--accent) 10%);
}

.task-photo img {
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  width: 100%;
}

.task-photo figcaption {
  display: grid;
  gap: .25rem;
  padding: .75rem;
}

.task-photo figcaption span {
  color: var(--muted);
  font-size: .82rem;
}

.task-photo-upload {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.task-type-manager {
  display: grid;
  gap: 1rem;
}

.task-type-add-row {
  align-items: end;
  background: color-mix(in srgb, var(--surface) 90%, var(--accent) 10%);
  border: 1px solid var(--border);
  border-radius: .75rem;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(10rem, .8fr) minmax(14rem, 1.4fr) auto auto;
  padding: .75rem;
}

.task-type-add-field label {
  margin-top: 0;
}

.task-type-check,
.task-type-active-toggle {
  margin: 0;
}

.task-type-list {
  display: grid;
  gap: .45rem;
}

.task-type-row {
  align-items: center;
  background: color-mix(in srgb, var(--surface) 94%, var(--bg) 6%);
  border: 1px solid var(--border);
  border-radius: .75rem;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(12rem, 1fr) auto auto auto;
  padding: .65rem .75rem;
}

.task-type-summary {
  display: grid;
  gap: .15rem;
}

.task-type-summary span {
  color: var(--muted);
  font-size: .85rem;
}

.task-type-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .35rem;
  justify-content: flex-end;
}

.input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: .8rem .9rem;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.app-dropdown {
  display: block;
  position: relative;
  width: 100%;
}

.app-dropdown-native {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  pointer-events: none;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.app-dropdown-button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .75rem;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: .75rem;
  justify-content: space-between;
  min-height: 45px;
  padding: .8rem .9rem;
  text-align: left;
  width: 100%;
}

.app-dropdown-button:hover,
.app-dropdown-button:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.app-dropdown-button:disabled {
  cursor: not-allowed;
  opacity: .65;
}

.app-dropdown-button-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-dropdown-button i {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: .85rem;
}

.app-dropdown-overlay {
  display: none;
  left: 0;
  min-width: 100%;
  padding-top: .25rem;
  position: absolute;
  top: 100%;
  z-index: 4500;
}

.app-dropdown-open .app-dropdown-overlay {
  display: block;
}

.app-dropdown-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .75rem;
  box-shadow: 0 18px 45px rgba(15, 45, 33, .22);
  display: flex;
  flex-direction: column;
  max-height: min(20rem, 60vh);
  min-width: 100%;
  overflow: hidden;
}

.app-dropdown-header {
  display: none;
}

.app-dropdown-menu {
  display: flex;
  flex-direction: column;
  max-height: inherit;
  overflow-y: auto;
  padding: .3rem;
}

.app-dropdown-option {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: .5rem;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font: inherit;
  justify-content: space-between;
  min-height: 40px;
  padding: .6rem .7rem;
  text-align: left;
  width: 100%;
}

.app-dropdown-option:hover,
.app-dropdown-option:focus-visible {
  background: color-mix(in srgb, var(--surface) 72%, var(--accent) 28%);
  outline: none;
}

.app-dropdown-option-selected {
  background: color-mix(in srgb, var(--surface) 78%, var(--bg) 22%);
  font-weight: 800;
}

.app-dropdown-option-selected::after {
  color: var(--accent);
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-left: .75rem;
}

.app-dropdown-option:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.app-dropdown-table .app-dropdown-button {
  min-height: 38px;
  padding: .5rem .65rem;
}

.password-input {
  position: relative;
}

.password-input .input {
  padding-right: 3.25rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: .4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 0;
  border-radius: .6rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.textarea {
  min-height: 110px;
  resize: vertical;
}

.password-export {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  white-space: pre;
}

.form-grid {
  display: grid;
  gap: 0 1rem;
}

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

.field-help {
  margin: .35rem 0 0;
  color: var(--muted);
  font-size: .88rem;
}

.section-summary {
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 900;
}

.section-summary + .muted {
  margin-top: .75rem;
}

.compact-action {
  min-height: 34px;
  padding: .45rem .65rem;
  font-size: .88rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 44px;
  border: 0;
  border-radius: .8rem;
  padding: .75rem 1rem;
  background: var(--accent);
  color: var(--accent-contrast);
  text-decoration: none;
  font-weight: 800;
  line-height: 1.1;
  cursor: pointer;
}

.button i {
  flex: 0 0 auto;
  font-size: .95em;
  line-height: 1;
}

.button:disabled {
  cursor: not-allowed;
  opacity: .52;
}

.button.secondary {
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--accent);
}

:is(.theme-dark, .theme-high-contrast, .theme-ultra-high-contrast, .theme-forest-dark, .theme-ocean-dark, .theme-rose-dark, .theme-plum-dark, .theme-amber-dark, .theme-sky-dark, .theme-slate-dark, .app-theme-dark, .app-theme-high-contrast, .app-theme-ultra-high-contrast, .app-theme-forest-dark, .app-theme-ocean-dark, .app-theme-rose-dark, .app-theme-plum-dark, .app-theme-amber-dark, .app-theme-sky-dark, .app-theme-slate-dark) .button.secondary {
  color: var(--text);
}

:is(.theme-dark, .theme-high-contrast, .theme-ultra-high-contrast, .theme-forest-dark, .theme-ocean-dark, .theme-rose-dark, .theme-plum-dark, .theme-amber-dark, .theme-sky-dark, .theme-slate-dark, .app-theme-dark, .app-theme-high-contrast, .app-theme-ultra-high-contrast, .app-theme-forest-dark, .app-theme-ocean-dark, .app-theme-rose-dark, .app-theme-plum-dark, .app-theme-amber-dark, .app-theme-sky-dark, .app-theme-slate-dark) .announcement-banner {
  background: color-mix(in srgb, var(--surface) 78%, var(--accent) 22%);
  color: var(--text);
}

:is(.theme-dark, .theme-high-contrast, .theme-ultra-high-contrast, .theme-forest-dark, .theme-ocean-dark, .theme-rose-dark, .theme-plum-dark, .theme-amber-dark, .theme-sky-dark, .theme-slate-dark, .app-theme-dark, .app-theme-high-contrast, .app-theme-ultra-high-contrast, .app-theme-forest-dark, .app-theme-ocean-dark, .app-theme-rose-dark, .app-theme-plum-dark, .app-theme-amber-dark, .app-theme-sky-dark, .app-theme-slate-dark) .demo-banner {
  background: color-mix(in srgb, var(--surface) 78%, var(--accent) 22%);
  color: var(--accent);
}

:is(.theme-dark, .theme-high-contrast, .theme-ultra-high-contrast, .theme-forest-dark, .theme-ocean-dark, .theme-rose-dark, .theme-plum-dark, .theme-amber-dark, .theme-sky-dark, .theme-slate-dark, .app-theme-dark, .app-theme-high-contrast, .app-theme-ultra-high-contrast, .app-theme-forest-dark, .app-theme-ocean-dark, .app-theme-rose-dark, .app-theme-plum-dark, .app-theme-amber-dark, .app-theme-sky-dark, .app-theme-slate-dark) .history-table tr,
:is(.theme-dark, .theme-high-contrast, .theme-ultra-high-contrast, .theme-forest-dark, .theme-ocean-dark, .theme-rose-dark, .theme-plum-dark, .theme-amber-dark, .theme-sky-dark, .theme-slate-dark, .app-theme-dark, .app-theme-high-contrast, .app-theme-ultra-high-contrast, .app-theme-forest-dark, .app-theme-ocean-dark, .app-theme-rose-dark, .app-theme-plum-dark, .app-theme-amber-dark, .app-theme-sky-dark, .app-theme-slate-dark) .activity-table tbody tr:hover {
  background: var(--surface);
}

:is(.theme-dark, .theme-high-contrast, .theme-ultra-high-contrast, .theme-forest-dark, .theme-ocean-dark, .theme-rose-dark, .theme-plum-dark, .theme-amber-dark, .theme-sky-dark, .theme-slate-dark, .app-theme-dark, .app-theme-high-contrast, .app-theme-ultra-high-contrast, .app-theme-forest-dark, .app-theme-ocean-dark, .app-theme-rose-dark, .app-theme-plum-dark, .app-theme-amber-dark, .app-theme-sky-dark, .app-theme-slate-dark) .calendar-weekdays {
  background: color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
}

:is(.theme-dark, .theme-high-contrast, .theme-ultra-high-contrast, .theme-forest-dark, .theme-ocean-dark, .theme-rose-dark, .theme-plum-dark, .theme-amber-dark, .theme-sky-dark, .theme-slate-dark, .app-theme-dark, .app-theme-high-contrast, .app-theme-ultra-high-contrast, .app-theme-forest-dark, .app-theme-ocean-dark, .app-theme-rose-dark, .app-theme-plum-dark, .app-theme-amber-dark, .app-theme-sky-dark, .app-theme-slate-dark) .calendar-day-outside {
  background: color-mix(in srgb, var(--bg) 70%, var(--surface) 30%);
}

:is(.theme-dark, .theme-high-contrast, .theme-ultra-high-contrast, .theme-forest-dark, .theme-ocean-dark, .theme-rose-dark, .theme-plum-dark, .theme-amber-dark, .theme-sky-dark, .theme-slate-dark, .app-theme-dark, .app-theme-high-contrast, .app-theme-ultra-high-contrast, .app-theme-forest-dark, .app-theme-ocean-dark, .app-theme-rose-dark, .app-theme-plum-dark, .app-theme-amber-dark, .app-theme-sky-dark, .app-theme-slate-dark) .calendar-day-selected {
  background: color-mix(in srgb, var(--accent-soft) 74%, var(--accent) 26%);
}

:is(.theme-dark, .theme-high-contrast, .theme-ultra-high-contrast, .theme-forest-dark, .theme-ocean-dark, .theme-rose-dark, .theme-plum-dark, .theme-amber-dark, .theme-sky-dark, .theme-slate-dark, .app-theme-dark, .app-theme-high-contrast, .app-theme-ultra-high-contrast, .app-theme-forest-dark, .app-theme-ocean-dark, .app-theme-rose-dark, .app-theme-plum-dark, .app-theme-amber-dark, .app-theme-sky-dark, .app-theme-slate-dark) .calendar-more-events {
  color: var(--accent);
}

:is(.theme-dark, .theme-high-contrast, .theme-ultra-high-contrast, .theme-forest-dark, .theme-ocean-dark, .theme-rose-dark, .theme-plum-dark, .theme-amber-dark, .theme-sky-dark, .theme-slate-dark, .app-theme-dark, .app-theme-high-contrast, .app-theme-ultra-high-contrast, .app-theme-forest-dark, .app-theme-ocean-dark, .app-theme-rose-dark, .app-theme-plum-dark, .app-theme-amber-dark, .app-theme-sky-dark, .app-theme-slate-dark) .calendar-agenda-event,
:is(.theme-dark, .theme-high-contrast, .theme-ultra-high-contrast, .theme-forest-dark, .theme-ocean-dark, .theme-rose-dark, .theme-plum-dark, .theme-amber-dark, .theme-sky-dark, .theme-slate-dark, .app-theme-dark, .app-theme-high-contrast, .app-theme-ultra-high-contrast, .app-theme-forest-dark, .app-theme-ocean-dark, .app-theme-rose-dark, .app-theme-plum-dark, .app-theme-amber-dark, .app-theme-sky-dark, .app-theme-slate-dark) .calendar-schedule-event:hover,
:is(.theme-dark, .theme-high-contrast, .theme-ultra-high-contrast, .theme-forest-dark, .theme-ocean-dark, .theme-rose-dark, .theme-plum-dark, .theme-amber-dark, .theme-sky-dark, .theme-slate-dark, .app-theme-dark, .app-theme-high-contrast, .app-theme-ultra-high-contrast, .app-theme-forest-dark, .app-theme-ocean-dark, .app-theme-rose-dark, .app-theme-plum-dark, .app-theme-amber-dark, .app-theme-sky-dark, .app-theme-slate-dark) .calendar-schedule-event:focus-visible {
  background: color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
}

:is(.theme-dark, .theme-high-contrast, .theme-ultra-high-contrast, .theme-forest-dark, .theme-ocean-dark, .theme-rose-dark, .theme-plum-dark, .theme-amber-dark, .theme-sky-dark, .theme-slate-dark, .app-theme-dark, .app-theme-high-contrast, .app-theme-ultra-high-contrast, .app-theme-forest-dark, .app-theme-ocean-dark, .app-theme-rose-dark, .app-theme-plum-dark, .app-theme-amber-dark, .app-theme-sky-dark, .app-theme-slate-dark) .contribution-breakdown,
:is(.theme-dark, .theme-high-contrast, .theme-ultra-high-contrast, .theme-forest-dark, .theme-ocean-dark, .theme-rose-dark, .theme-plum-dark, .theme-amber-dark, .theme-sky-dark, .theme-slate-dark, .app-theme-dark, .app-theme-high-contrast, .app-theme-ultra-high-contrast, .app-theme-forest-dark, .app-theme-ocean-dark, .app-theme-rose-dark, .app-theme-plum-dark, .app-theme-amber-dark, .app-theme-sky-dark, .app-theme-slate-dark) .quarter-overview-item,
:is(.theme-dark, .theme-high-contrast, .theme-ultra-high-contrast, .theme-forest-dark, .theme-ocean-dark, .theme-rose-dark, .theme-plum-dark, .theme-amber-dark, .theme-sky-dark, .theme-slate-dark, .app-theme-dark, .app-theme-high-contrast, .app-theme-ultra-high-contrast, .app-theme-forest-dark, .app-theme-ocean-dark, .app-theme-rose-dark, .app-theme-plum-dark, .app-theme-amber-dark, .app-theme-sky-dark, .app-theme-slate-dark) .board-entry-list li {
  background: color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
}

.theme-choice-grid {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.theme-choice {
  border: 2px solid var(--border);
  border-radius: 1rem;
  cursor: pointer;
  display: grid;
  gap: .45rem;
  padding: 1rem;
}

.theme-choice.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.theme-choice input {
  justify-self: start;
}

.theme-choice-preview {
  border: 1px solid var(--border);
  border-radius: .7rem;
  display: block;
  height: 3.5rem;
  overflow: hidden;
  position: relative;
}

.theme-choice-preview::before,
.theme-choice-preview::after {
  content: "";
  position: absolute;
}

.theme-choice-preview::before {
  inset: 0 0 auto;
  height: 42%;
}

.theme-choice-preview::after {
  background: var(--preview-secondary);
  border-radius: .3rem;
  bottom: .55rem;
  height: .65rem;
  left: .65rem;
  width: 38%;
}

.theme-preview-default,
.theme-preview-dark,
.theme-preview-high-contrast,
.theme-preview-ultra-high-contrast,
.theme-preview-forest,
.theme-preview-forest-dark,
.theme-preview-ocean,
.theme-preview-ocean-dark,
.theme-preview-rose,
.theme-preview-rose-dark,
.theme-preview-plum,
.theme-preview-plum-dark,
.theme-preview-amber,
.theme-preview-amber-dark,
.theme-preview-sky,
.theme-preview-sky-dark,
.theme-preview-slate,
.theme-preview-slate-dark {
  background: var(--preview-bg);
}

.theme-preview-default::before,
.theme-preview-dark::before,
.theme-preview-high-contrast::before,
.theme-preview-ultra-high-contrast::before,
.theme-preview-forest::before,
.theme-preview-forest-dark::before,
.theme-preview-ocean::before,
.theme-preview-ocean-dark::before,
.theme-preview-rose::before,
.theme-preview-rose-dark::before,
.theme-preview-plum::before,
.theme-preview-plum-dark::before,
.theme-preview-amber::before,
.theme-preview-amber-dark::before,
.theme-preview-sky::before,
.theme-preview-sky-dark::before,
.theme-preview-slate::before,
.theme-preview-slate-dark::before {
  background: var(--preview-primary);
}

.theme-preview-default {
  --preview-bg: #f5f1e8;
  --preview-primary: #153f2d;
  --preview-secondary: #8a5a2b;
}

.theme-preview-dark {
  --preview-bg: #151718;
  --preview-primary: #0b1210;
  --preview-secondary: #d6a35f;
}

.theme-preview-high-contrast {
  --preview-bg: #05080a;
  --preview-primary: #00d4ff;
  --preview-secondary: #ffe45c;
}

.theme-preview-ultra-high-contrast {
  --preview-bg: #000000;
  --preview-primary: #ffff00;
  --preview-secondary: #00ffff;
}

.theme-preview-forest {
  --preview-bg: #eef4ea;
  --preview-primary: #256d3f;
  --preview-secondary: #8a6f2a;
}

.theme-preview-forest-dark {
  --preview-bg: #07120d;
  --preview-primary: #77c88c;
  --preview-secondary: #d6b15c;
}

.theme-preview-ocean {
  --preview-bg: #eef7fb;
  --preview-primary: #176b87;
  --preview-secondary: #2f8c77;
}

.theme-preview-ocean-dark {
  --preview-bg: #07111f;
  --preview-primary: #5db8e8;
  --preview-secondary: #7fd6c2;
}

.theme-preview-rose {
  --preview-bg: #fff3f5;
  --preview-primary: #9f3153;
  --preview-secondary: #7c6a2d;
}

.theme-preview-rose-dark {
  --preview-bg: #1b0d12;
  --preview-primary: #f08aa8;
  --preview-secondary: #e0c36f;
}

.theme-preview-plum {
  --preview-bg: #f7f2fb;
  --preview-primary: #6b3fa0;
  --preview-secondary: #4f7f73;
}

.theme-preview-plum-dark {
  --preview-bg: #151020;
  --preview-primary: #c49bff;
  --preview-secondary: #d8b56a;
}

.theme-preview-amber {
  --preview-bg: #fff7e8;
  --preview-primary: #8a5d12;
  --preview-secondary: #3f7a5a;
}

.theme-preview-amber-dark {
  --preview-bg: #17120b;
  --preview-primary: #f0b84f;
  --preview-secondary: #91c77a;
}

.theme-preview-sky {
  --preview-bg: #f0f8ff;
  --preview-primary: #2267a5;
  --preview-secondary: #b65b3c;
}

.theme-preview-sky-dark {
  --preview-bg: #071525;
  --preview-primary: #72c7ff;
  --preview-secondary: #f2a070;
}

.theme-preview-slate {
  --preview-bg: #f2f5f4;
  --preview-primary: #476a75;
  --preview-secondary: #5f6843;
}

.theme-preview-slate-dark {
  --preview-bg: #101416;
  --preview-primary: #8cc6bd;
  --preview-secondary: #c8b06a;
}

.theme-live-preview {
  background: var(--preview-bg);
  border: 1px solid var(--preview-border);
  border-radius: 1rem;
  color: var(--preview-text);
  margin: 1.5rem 0;
  overflow: hidden;
}

.theme-preview-header {
  align-items: center;
  background: var(--preview-primary);
  color: var(--preview-header-text);
  display: flex;
  justify-content: space-between;
  padding: .8rem 1rem;
}

.theme-preview-content {
  background: var(--preview-surface);
  padding: 1rem;
}

.theme-preview-content .button {
  background: var(--preview-primary);
  color: var(--preview-header-text);
}

.theme-live-preview-default {
  --preview-bg: #f5f1e8;
  --preview-surface: #fffdf8;
  --preview-text: #251f18;
  --preview-border: #d9cbb8;
  --preview-primary: #153f2d;
  --preview-secondary: #8a5a2b;
  --preview-header-text: #ffffff;
}

.theme-live-preview-dark {
  --preview-bg: #151718;
  --preview-surface: #202426;
  --preview-text: #f3efe7;
  --preview-border: #3b4245;
  --preview-primary: #0b1210;
  --preview-secondary: #d6a35f;
  --preview-header-text: #f6ecd7;
}

.theme-live-preview-high-contrast {
  --preview-bg: #05080a;
  --preview-surface: #101820;
  --preview-text: #ffffff;
  --preview-border: #7fd7ff;
  --preview-primary: #00d4ff;
  --preview-secondary: #ffe45c;
  --preview-header-text: #001018;
}

.theme-live-preview-ultra-high-contrast {
  --preview-bg: #000000;
  --preview-surface: #000000;
  --preview-text: #ffffff;
  --preview-border: #ffffff;
  --preview-primary: #ffff00;
  --preview-secondary: #00ffff;
  --preview-header-text: #000000;
}

.theme-live-preview-forest {
  --preview-bg: #eef4ea;
  --preview-surface: #fbfff8;
  --preview-text: #1b261d;
  --preview-border: #c7d8c0;
  --preview-primary: #256d3f;
  --preview-secondary: #8a6f2a;
  --preview-header-text: #ffffff;
}

.theme-live-preview-forest-dark {
  --preview-bg: #07120d;
  --preview-surface: #102019;
  --preview-text: #edf7ee;
  --preview-border: #284237;
  --preview-primary: #77c88c;
  --preview-secondary: #d6b15c;
  --preview-header-text: #07120d;
}

.theme-live-preview-ocean {
  --preview-bg: #eef7fb;
  --preview-surface: #fbfdff;
  --preview-text: #172631;
  --preview-border: #bfd7e5;
  --preview-primary: #176b87;
  --preview-secondary: #2f8c77;
  --preview-header-text: #ffffff;
}

.theme-live-preview-ocean-dark {
  --preview-bg: #07111f;
  --preview-surface: #101d2f;
  --preview-text: #edf6ff;
  --preview-border: #28425e;
  --preview-primary: #5db8e8;
  --preview-secondary: #7fd6c2;
  --preview-header-text: #06101a;
}

.theme-live-preview-rose {
  --preview-bg: #fff3f5;
  --preview-surface: #fffafa;
  --preview-text: #321f24;
  --preview-border: #e4c2ca;
  --preview-primary: #9f3153;
  --preview-secondary: #7c6a2d;
  --preview-header-text: #ffffff;
}

.theme-live-preview-rose-dark {
  --preview-bg: #1b0d12;
  --preview-surface: #2a151c;
  --preview-text: #fff0f3;
  --preview-border: #55313b;
  --preview-primary: #f08aa8;
  --preview-secondary: #e0c36f;
  --preview-header-text: #2a0c17;
}

.theme-live-preview-plum {
  --preview-bg: #f7f2fb;
  --preview-surface: #fffbff;
  --preview-text: #2a2231;
  --preview-border: #d5c5e2;
  --preview-primary: #6b3fa0;
  --preview-secondary: #4f7f73;
  --preview-header-text: #ffffff;
}

.theme-live-preview-plum-dark {
  --preview-bg: #151020;
  --preview-surface: #21172f;
  --preview-text: #f7f0ff;
  --preview-border: #463758;
  --preview-primary: #c49bff;
  --preview-secondary: #d8b56a;
  --preview-header-text: #1b0f2a;
}

.theme-live-preview-amber {
  --preview-bg: #fff7e8;
  --preview-surface: #fffdf8;
  --preview-text: #2c2418;
  --preview-border: #e4cf9e;
  --preview-primary: #8a5d12;
  --preview-secondary: #3f7a5a;
  --preview-header-text: #ffffff;
}

.theme-live-preview-amber-dark {
  --preview-bg: #17120b;
  --preview-surface: #251d12;
  --preview-text: #fff4e2;
  --preview-border: #4e3b20;
  --preview-primary: #f0b84f;
  --preview-secondary: #91c77a;
  --preview-header-text: #251606;
}

.theme-live-preview-sky {
  --preview-bg: #f0f8ff;
  --preview-surface: #fbfdff;
  --preview-text: #182636;
  --preview-border: #c6d9ea;
  --preview-primary: #2267a5;
  --preview-secondary: #b65b3c;
  --preview-header-text: #ffffff;
}

.theme-live-preview-sky-dark {
  --preview-bg: #071525;
  --preview-surface: #102238;
  --preview-text: #eef7ff;
  --preview-border: #294760;
  --preview-primary: #72c7ff;
  --preview-secondary: #f2a070;
  --preview-header-text: #071525;
}

.theme-live-preview-slate {
  --preview-bg: #f2f5f4;
  --preview-surface: #ffffff;
  --preview-text: #202a2d;
  --preview-border: #c9d3d2;
  --preview-primary: #476a75;
  --preview-secondary: #5f6843;
  --preview-header-text: #ffffff;
}

.theme-live-preview-slate-dark {
  --preview-bg: #101416;
  --preview-surface: #1d2427;
  --preview-text: #eef4f3;
  --preview-border: #38464a;
  --preview-primary: #8cc6bd;
  --preview-secondary: #c8b06a;
  --preview-header-text: #10201d;
}

.subscription-preferences-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.subscription-preference-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.subscription-preference-section {
  flex: 1 1 16rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: 1rem;
  background: color-mix(in srgb, var(--surface) 90%, var(--accent) 10%);
}

.subscription-preference-section h3 {
  margin-top: 0;
}

.subscription-preference-section .check-row {
  min-height: 46px;
  margin: .65rem 0 0;
  padding: .65rem .75rem;
}

.subscription-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.subscription-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem;
  border: 1px solid var(--border);
  border-radius: .65rem;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg) 8%);
}

.subscription-row:first-child {
  border-top: 1px solid var(--border);
}

.subscription-row > div:first-child {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  min-width: 0;
}

.subscription-row span {
  color: var(--muted);
  font-size: .85rem;
}

.subscription-filter-control {
  display: flex;
  flex: 0 1 16rem;
  flex-direction: column;
  gap: .35rem;
  min-width: min(100%, 14rem);
}

.subscription-kind-badge {
  align-self: flex-start;
  padding: .16rem .42rem;
  border-radius: .4rem;
  background: color-mix(in srgb, var(--surface) 72%, var(--accent) 28%);
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.2;
}

.subscription-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1rem;
  color: var(--muted);
}

.button.danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid #f1c7c7;
}

.button.compact {
  min-height: 36px;
  padding: .45rem .75rem;
  border-radius: .6rem;
  font-size: .85rem;
  word-wrap: normal;
}

.button.icon-button {
  width: 2.5rem;
  min-width: 2.5rem;
  padding: 0;
}

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

.button.full { width: 100%; margin-top: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.actions.stacked { flex-direction: column; }
.actions.stacked .button.full { margin-top: 0; }

.survey-questions-heading {
  margin-top: 1.5rem;
}

.survey-question-list {
  display: grid;
  gap: .75rem;
}

.survey-question-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
}

.survey-question-number {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--surface);
  font-weight: 800;
}

.survey-question-preview {
  padding-left: 1.25rem;
}

.survey-question-preview li + li {
  margin-top: .5rem;
}

.survey-response-list {
  display: grid;
  gap: 1rem;
}

.survey-answer-field + .survey-answer-field {
  margin-top: 1rem;
}

.survey-answer-history {
  display: grid;
  gap: .85rem;
  margin: 1rem 0 0;
}

.survey-answer-history div {
  padding-top: .85rem;
  border-top: 1px solid var(--border);
}

.survey-answer-history dt {
  font-weight: 800;
}

.survey-answer-history dd {
  margin: .35rem 0 0;
  white-space: pre-wrap;
}

.survey-history-heading {
  margin-top: 2rem;
}

.metric span { font-size: 2.25rem; font-weight: 900; }
.metric p { margin: .25rem 0 0; color: var(--muted); }
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.contribution-summary .metric {
  border-top: 1px solid var(--border);
  padding-top: .85rem;
}

.contribution-breakdown {
  border: 1px solid var(--border);
  border-radius: .9rem;
  background: color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
  overflow: hidden;
}

.contribution-breakdown h2 {
  margin: 0;
  padding: .85rem 1rem;
  font-size: 1rem;
  border-bottom: 1px solid var(--border);
}

.contribution-line,
.contribution-subtotal,
.contribution-total {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 1rem;
}

.contribution-line strong,
.contribution-subtotal strong,
.contribution-total strong {
  white-space: nowrap;
}

.contribution-subtotal {
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-weight: 900;
}

.contribution-total {
  border-top: 2px solid var(--accent);
  background: var(--accent-soft);
  font-weight: 900;
}

.contributions-area > * + * {
  margin-top: 1.5rem;
}

.contribution-entry-row {
  display: grid;
  gap: 0 1rem;
}

.waiver-entry-row {
  display: grid;
  gap: 0 1rem;
}

.contribution-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: end;
  padding-top: 1rem;
}

.waiver-entry-actions {
  display: flex;
  align-items: end;
  padding-top: 1rem;
}

.quarter-overview {
  display: grid;
  gap: .75rem;
  margin-top: 1rem;
}

.quarter-overview-item {
  display: grid;
  gap: .2rem;
  padding: .85rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
}

.quarter-overview-item span,
.quarter-overview-item small {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
}

.quarter-overview-item strong {
  font-size: 1rem;
}

.contribution-board-list {
  display: grid;
  gap: 1rem;
}

.contribution-board-card > * + * {
  margin-top: 1.25rem;
}

.contribution-board-summary {
  grid-template-columns: 1fr;
}

.contribution-board-entries {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.contribution-board-entries h3 {
  margin: 0 0 .75rem;
  font-size: 1rem;
}

.board-entry-list {
  display: grid;
  gap: .5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.board-entry-list li {
  display: grid;
  grid-template-columns: 4rem 7rem minmax(0, 1fr);
  gap: .5rem .75rem;
  align-items: baseline;
  padding: .65rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
}

.board-entry-list small {
  grid-column: 3;
  color: var(--muted);
}

.workflow-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: .55rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.workflow-step {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 42px;
  padding: .55rem .65rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: color-mix(in srgb, var(--surface) 90%, var(--accent) 10%);
  color: var(--muted);
  font-weight: 800;
}

.workflow-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 78%, var(--accent) 22%);
  color: var(--accent);
  font-size: .78rem;
  font-weight: 900;
}

.workflow-step.complete {
  border-color: rgba(31, 107, 58, .3);
  background: var(--success-bg);
  color: var(--success-text);
}

.workflow-step.complete .workflow-marker {
  background: var(--success-text);
  color: var(--bg);
}

.workflow-step.current {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--surface) 72%, var(--accent) 28%);
  color: var(--text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

.workflow-step.current .workflow-marker {
  background: var(--accent);
  color: var(--bg);
}

.workflow-steps.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem;
}

.workflow-steps.compact .workflow-step {
  min-height: 34px;
  padding: .4rem .45rem;
  gap: .4rem;
  font-size: .78rem;
}

.workflow-steps.compact .workflow-marker {
  flex-basis: 1.35rem;
  width: 1.35rem;
  height: 1.35rem;
  font-size: .68rem;
}

.workflow-admin-list {
  display: grid;
  gap: .85rem;
  margin-top: 1rem;
}

.workflow-admin-row {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: .85rem;
  align-items: end;
  padding: .85rem;
  border: 1px solid var(--border);
  border-radius: .85rem;
  background: color-mix(in srgb, var(--surface) 90%, var(--accent) 10%);
}

.workflow-admin-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 900;
}

.workflow-admin-row label {
  margin-top: 0;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

.workflow-admin-actions {
  grid-column: 2;
  display: flex;
  justify-content: stretch;
}

.workflow-admin-actions .button {
  width: 100%;
}

.role-admin-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.role-admin-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.role-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .85rem;
}

.role-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: .35rem .55rem;
  border: 1px solid var(--border);
  border-radius: .6rem;
  background: color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
  color: var(--accent);
  font-size: .82rem;
  font-weight: 800;
}

.role-subtab-summary {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.role-subtab-summary p {
  margin: 0;
}

.role-display-options {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
}

.role-display-options .compact-check {
  border-radius: .35rem;
}

.role-actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.role-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 44px;
  padding: .55rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: color-mix(in srgb, var(--surface) 90%, var(--accent) 10%);
}

.role-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 44px;
  padding: .55rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: color-mix(in srgb, var(--surface) 94%, var(--bg) 6%);
}

.role-toggle-row:hover,
.role-toggle-row:focus-within {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--surface) 86%, var(--accent) 14%);
}

.role-toggle-row > span {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
  text-align: left;
}

.role-toggle-row strong {
  overflow-wrap: anywhere;
}

.role-toggle-row input {
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
  accent-color: var(--accent);
}

.role-account-actions,
.role-group-actions {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  width: 100%;
}

.role-category-column {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  min-width: 0;
}

.role-category-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: .35rem;
  min-width: 0;
  padding: .65rem;
  border: 1px solid var(--border);
  border-radius: .5rem;
  background: color-mix(in srgb, var(--surface) 94%, var(--bg) 6%);
}

.role-category-group-role-groups {
  border-width: 8px;
}

.role-category-list {
  display: flex;
  flex-direction: column;
  gap: .22rem;
}

.role-account-toggle-row {
  margin: 0;
  min-height: 0;
  padding: .28rem .42rem;
  border: 0;
  border-radius: .48rem;
  background: color-mix(in srgb, var(--surface) 42%, var(--bg) 58%);
  gap: .45rem;
  line-height: 1.12;
  cursor: pointer;
}

.role-account-toggle-row:hover,
.role-account-toggle-row:focus-within {
  background: color-mix(in srgb, var(--surface) 48%, var(--accent) 52%);
}

.role-account-toggle-row:has(input:disabled) {
  cursor: default;
}

.role-account-section-title {
  margin: 0 0 .05rem;
  color: var(--muted);
  font-size: .84rem;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}

.role-toggle-row .role-row-title {
  align-items: baseline;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: .35rem;
  min-width: 0;
  text-align: left;
}

.role-row-title code {
  padding: .08rem .28rem;
  border-radius: .28rem;
  background: color-mix(in srgb, var(--surface) 84%, var(--bg) 16%);
  color: var(--muted);
  font-size: .68rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.role-row-description {
  font-size: .78rem;
  line-height: 1.25;
}

.role-row-note {
  font-size: .78rem;
  line-height: 1.25;
}

.role-group-admin-card {
  gap: .75rem;
}

.role-group-toggle-row {
  margin: 0;
  min-height: 0;
  padding: .28rem .42rem;
  border: 0;
  border-radius: .48rem;
  background: color-mix(in srgb, var(--surface) 42%, var(--bg) 58%);
  gap: .45rem;
  line-height: 1.12;
  cursor: pointer;
}

.role-group-toggle-row:hover,
.role-group-toggle-row:focus-within {
  background: color-mix(in srgb, var(--surface) 48%, var(--accent) 52%);
}

.role-group-toggle-row:has(input:disabled) {
  cursor: default;
}

.role-group-toggle-row input {
  width: 1.2rem;
  height: 1.2rem;
}

.role-account-toggle-row.role-toggle-row-inherited {
  color: inherit;
  cursor: default;
}

.role-lock-indicator {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.05rem;
  height: 1.2rem;
  justify-content: center;
  width: 1.2rem;
}

.confirmation-backdrop {
  align-items: center;
  background: color-mix(in srgb, color-mix(in srgb, var(--bg) 68%, var(--canopy) 32%) 70%, transparent);
  backdrop-filter: blur(2px);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: fixed;
  z-index: 5000;
}

.confirmation-dialog {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 30rem;
  width: 100%;
  box-shadow: 0 20px 60px color-mix(in srgb, var(--accent) 28%, transparent);
}

.confirmation-heading {
  align-items: center;
  display: flex;
  gap: .85rem;
}

.confirmation-icon {
  align-items: center;
  background: color-mix(in srgb, var(--surface) 78%, var(--accent) 22%);
  border-radius: .55rem;
  color: var(--accent);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.15rem;
  height: 2.5rem;
  justify-content: center;
  width: 2.5rem;
}

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

.confirmation-message {
  line-height: 1.45;
}

.confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  justify-content: flex-end;
}

.role-action-row strong {
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .app-dropdown-open .app-dropdown-overlay {
    align-items: flex-end;
    background: color-mix(in srgb, color-mix(in srgb, var(--bg) 68%, var(--canopy) 32%) 68%, transparent);
    backdrop-filter: blur(2px);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 1rem;
    position: fixed;
    z-index: 5000;
  }

  .app-dropdown-panel {
    border-radius: .85rem;
    max-height: min(80vh, 34rem);
    min-width: 0;
    width: 100%;
  }

  .app-dropdown-header {
    align-items: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    padding: .85rem .9rem;
  }

  .app-dropdown-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-dropdown-close {
    align-items: center;
    background: color-mix(in srgb, var(--surface) 78%, var(--bg) 22%);
    border: 1px solid var(--border);
    border-radius: .5rem;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.4rem;
    justify-content: center;
    width: 2.4rem;
  }

  .app-dropdown-menu {
    max-height: 70vh;
    padding: .45rem;
  }

  .app-dropdown-option {
    min-height: 46px;
    padding: .75rem .8rem;
  }

  .subscription-row {
    align-items: stretch;
    flex-direction: column;
  }

  .subscription-row .actions {
    justify-content: flex-start;
  }

  .calendar-page-header {
    align-items: stretch;
  }

  .calendar-page-header .button {
    width: 100%;
  }

  .calendar-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-view-switcher,
  .calendar-month-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-month-controls {
    grid-template-columns: auto 1fr auto;
  }

  .calendar-weekdays {
    display: none;
  }

  .calendar-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .65rem;
    padding: .75rem;
  }

  .calendar-day {
    min-height: 0;
    padding: .7rem;
    border: 1px solid var(--border);
    border-radius: .75rem;
  }

  .calendar-day-outside:not(.calendar-day-selected) {
    display: none;
  }

  .calendar-day-number {
    justify-content: flex-start;
    width: 100%;
    border-radius: .5rem;
  }

  .calendar-day-number i {
    display: inline-block;
  }

  .calendar-day-long {
    display: inline;
  }

  .calendar-day-short {
    display: none;
  }

  .calendar-event-chip {
    font-size: .82rem;
  }

  .calendar-event-chip span,
  .calendar-event-chip strong {
    white-space: normal;
  }

  .calendar-schedule-day {
    grid-template-columns: 3.8rem minmax(0, 1fr);
    gap: .65rem;
  }

  .calendar-schedule-event {
    grid-template-columns: 1fr auto;
    gap: .35rem .75rem;
  }

  .calendar-schedule-time {
    grid-column: 1 / -1;
  }

  .calendar-duplicate-row {
    grid-template-columns: minmax(0, 1fr);
    gap: .45rem;
  }

  .calendar-duplicate-list-heading {
    grid-template-columns: minmax(0, 1fr);
  }

  .calendar-duplicate-list-heading span:not(:first-child) {
    display: none;
  }

  .calendar-duplicate-row .icon-button {
    grid-column: auto;
    justify-self: stretch;
  }

  .calendar-duplicate-row .button,
  .calendar-duplicate-paste .button {
    width: 100%;
  }

  .task-type-add-row,
  .task-type-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .task-type-badges {
    justify-content: flex-start;
  }

  .activity-filter {
    align-items: stretch;
    flex-direction: column;
    gap: .75rem;
  }

  .activity-count {
    justify-content: flex-end;
  }

  .activity-list-card {
    padding: 1rem;
  }

  .activity-list-card .section-title-row {
    padding: 0 0 .5rem;
  }

  .activity-table {
    margin-top: .5rem;
  }

  .activity-table tbody tr:hover {
    background: var(--surface);
  }

  .activity-when {
    width: auto;
    white-space: normal;
  }

  .activity-table td strong,
  .activity-table td small,
  .activity-table td span,
  .activity-table td code {
    justify-self: end;
    text-align: right;
  }

  .activity-pagination {
    padding: 1rem 0 0;
  }

  .activity-pagination .button {
    padding-inline: .7rem;
  }

  .survey-question-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .survey-question-row .button {
    grid-column: 2;
    justify-self: start;
  }

  .mobile-hidden {
    display: none !important;
  }

  .history-table {
    display: block;
    border-collapse: separate;
    border-spacing: 0;
  }

  .info-items-table {
    min-width: 0;
    table-layout: auto;
  }

  .info-items-table .entry-actions {
    flex-wrap: wrap;
  }

  .history-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .history-table tbody {
    display: grid;
    gap: .85rem;
  }

  .history-table tr {
    display: grid;
    gap: .55rem;
    padding: .85rem;
    border: 1px solid var(--border);
    border-radius: .85rem;
    background: var(--surface);
  }

  .history-table td {
    display: grid;
    grid-template-columns: minmax(7.5rem, 45%) minmax(0, 1fr);
    gap: .75rem;
    align-items: baseline;
    padding: 0;
    border-top: 0;
    text-align: right;
  }

  .history-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 800;
    text-align: left;
  }

  .history-table .numeric {
    text-align: right;
  }

  .resource-link-icon-cell {
    align-items: center;
  }

  .resource-link-icon-cell i {
    justify-self: end;
  }

  .contribution-entries-table .entry-actions-cell {
    align-items: center;
  }

  .contribution-entries-table .entry-actions {
    justify-content: flex-end;
  }

  .board-entry-list li {
    grid-template-columns: 4rem minmax(0, 1fr);
  }

  .board-entry-list li > span:nth-of-type(2),
  .board-entry-list small {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .subscription-filter-control {
    flex: 0 1 7rem;
    min-width: min(100%, 7rem);
  }
}

@media (min-width: 768px) {
  .theme-choice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-header {
    flex-direction: row;
    align-items: center;
    padding-inline: 2rem;
  }
  .mobile-menu {
    width: auto;
  }
  .mobile-menu-toggle {
    display: none;
  }
  .mobile-menu-check:not(:checked) ~ .nav-links {
    display: flex;
  }
  .mobile-menu-check:checked ~ .nav-links {
    margin-top: 0;
  }
  .page { padding: 2rem; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contribution-board-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .contribution-entry-row {
    grid-template-columns: 11rem 8rem minmax(18rem, 1fr) auto;
    align-items: end;
  }
  .waiver-entry-row {
    grid-template-columns: 8rem minmax(18rem, 1fr) auto;
    align-items: end;
  }
  .contribution-entry-actions {
    flex-wrap: nowrap;
    padding-top: 0;
  }
  .waiver-entry-actions {
    padding-top: 0;
  }
  .summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .quarter-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .section-title-row {
    flex-direction: row;
    align-items: center;
  }
  .subscription-section-title-row {
    margin-bottom: 1rem;
  }
  .toast-region {
    inset: 5rem 1.25rem auto auto;
    align-items: flex-end;
  }
  .toast-message {
    margin: 0;
    max-width: min(34rem, calc(100vw - 2.5rem));
    min-width: min(24rem, calc(100vw - 2.5rem));
  }
  .workflow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links {
    align-items: center;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    width: auto;
  }
  .nav-group {
    align-content: start;
  }
  .nav-group summary {
    min-height: 36px;
    padding-block: .55rem;
  }
  .nav-links a {
    min-height: 36px;
    padding-inline: .8rem;
  }
  .workflow-admin-row {
    grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  }
  .workflow-admin-actions {
    grid-column: auto;
    justify-content: flex-end;
  }
  .workflow-admin-actions .button {
    width: auto;
  }
  .footer-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .role-admin-card {
    flex-direction: column;
  }
  .role-group-admin-card {
    gap: .85rem;
  }
  .role-account-actions,
  .role-group-actions {
    align-items: flex-start;
    flex-direction: row;
  }
  .role-category-column {
    flex: 1 1 0;
  }
}

@media (min-width: 1100px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .workflow-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .calendar-layout {
    grid-template-columns: minmax(0, 1fr) minmax(17rem, .28fr);
    align-items: start;
  }
  .footer-top {
    grid-template-columns: minmax(12rem, .3fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 1rem;
  }
  .footer-columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
  .footer-brand,
  .footer-links {
    min-width: 0;
  }
}
