.console-shell {
  --cm-bg: #f5f7f6; --cm-paper: #fff; --cm-ink: #172c29; --cm-text: #475e56;
  --cm-border: #dce5e0; --cm-wash: #f2f6f3; --cm-brand: #174944; --cm-accent: #23645a;
  --cm-radius: 1rem; --cm-desk-gap: clamp(1rem, 3.3vw, 2.5rem);
  min-height: 100vh; min-height: 100dvh; background: var(--cm-bg); color: var(--cm-ink);
}
.console-shell .cm-frame { width: min(72rem, calc(100% - var(--cm-desk-gap) * 2)); margin-inline: auto; min-width: 0; }
.console-shell .cm-main { padding-block: clamp(1.65rem, 4vw, 3.2rem) 4rem; }
.console-shell .cm-icon { width: 1.1rem; height: 1.1rem; flex: none; vertical-align: middle; }
.console-shell :where(a, button, summary, input, select):focus-visible { outline: 2px solid #287a68; outline-offset: 3px; }
.console-shell .button { gap: .42rem; min-height: 2.7rem; padding: .6rem .9rem; line-height: 1.2; font-size: .87rem; border-radius: .58rem; }
.console-shell .button.primary { background: var(--cm-brand); box-shadow: 0 1px 2px #142e2920; }
.console-shell .button.primary:hover { background: var(--cm-accent); }
.console-shell .button.secondary { border-color: #cddbd4; color: var(--cm-brand); }
.console-shell .button.secondary:hover { background: #edf5f0; }
.console-shell :where(h1,h2,h3) { overflow-wrap: anywhere; }
.console-shell h1 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.13; letter-spacing: -.048em; }
.console-shell h2 { font-size: 1.1rem; line-height: 1.28; letter-spacing: -.026em; }
.console-shell h3 { font-size: .98rem; line-height: 1.38; letter-spacing: -.017em; }
.console-shell :where(p, label, small) { line-height: 1.48; }
.console-shell .cm-muted,
.console-shell .cm-lead,
.console-shell .cm-section-head p,
.console-shell .cm-setting p { color: var(--cm-text); }
.console-shell .cm-lead { max-width: 66ch; margin-top: .55rem; font-size: clamp(.92rem, 1.35vw, 1.03rem); }
.console-shell .cm-overline, .console-shell .kicker {
  color: var(--cm-accent); font-size: .7rem; letter-spacing: .12em;
  font-weight: 800; text-transform: uppercase; line-height: 1.4;
}
.console-shell .kicker span { background: var(--cm-accent); }
.console-shell .cm-overline + h1, .console-shell .kicker + h1 { margin-top: .4rem; }
.console-shell .cm-heading { margin-bottom: 1.45rem; }
.console-shell .cm-heading--action {
  display: flex; justify-content: space-between; align-items: flex-end; gap: .8rem 1.5rem; flex-wrap: wrap;
}
.console-shell .cm-heading--action > div { min-width: 0; }
.console-shell .cm-heading .button { flex: none; }
.console-shell .cm-route { color: var(--cm-text); margin-top: .45rem; font-size: .9rem; overflow-wrap: anywhere; }
.console-shell .cm-breadcrumb,
.console-shell .breadcrumb { margin-bottom: .82rem; font-size: .84rem; color: var(--cm-text); }
.console-shell .cm-breadcrumb { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.console-shell .cm-breadcrumb .cm-icon { width: .82rem; height: .82rem; }
.console-shell .cm-breadcrumb a, .console-shell .breadcrumb a { color: var(--cm-accent); font-weight: 700; text-decoration: none; }
.console-shell .cm-breadcrumb a:hover, .console-shell .breadcrumb a:hover { text-decoration: underline; }
.console-shell .cm-surface, .console-shell .panel {
  min-width: 0; border: 1px solid var(--cm-border); border-radius: var(--cm-radius);
  background: var(--cm-paper); box-shadow: 0 1px 2px #0f342609;
}
.console-shell .cm-alert {
  color: #842e28; background: #fcf0ec; border: 1px solid #ecc8bf;
  padding: .75rem 1rem; border-radius: .7rem; margin-block: 0 1rem;
}
.console-shell .cm-topbar {
  z-index: 20; position: sticky; top: 0; background: var(--cm-paper); border-bottom: 1px solid var(--cm-border);
}
.console-shell .cm-topbar-inner {
  position: relative; min-height: 4.1rem; display: flex; align-items: center;
  justify-content: space-between; gap: .65rem; padding-block: .5rem;
}
.console-shell .cm-brand {
  display: flex; align-items: center; gap: .62rem; text-decoration: none; min-width: 0; flex: none;
}
.console-shell .cm-brand .mark { color: #27665b; width: 2.2rem; height: 2.2rem; flex: none; }
.console-shell .cm-brand strong, .console-shell .cm-brand small { display: block; }
.console-shell .cm-brand strong { font-family: Manrope, system-ui, sans-serif; font-weight: 800; font-size: .96rem; letter-spacing: -.035em; line-height: 1.14; }
.console-shell .cm-brand small { color: var(--cm-text); font-size: .68rem; margin-top: .11rem; }
.console-shell .cm-topbar-actions { display: flex; align-items: center; gap: .48rem; min-width: 0; }
.console-shell .cm-topbar-link,
.console-shell .cm-control {
  display: inline-flex; align-items: center; justify-content: center; gap: .38rem; min-height: 2.55rem;
  text-decoration: none; padding: .4rem .65rem; white-space: nowrap; border-radius: .56rem;
  font-size: .87rem; line-height: 1.15; font-weight: 750; color: var(--cm-brand);
}
.console-shell [data-pwa-login-site-link][hidden] { display: none; }
@media (display-mode: standalone) {
  .console-shell [data-pwa-login-site-link] { display: none; }
}
.console-shell .cm-topbar-link:hover, .console-shell .cm-topbar-link[aria-current] { background: var(--cm-wash); }
.console-shell .cm-control { border: 1px solid var(--cm-border); background: var(--cm-paper); cursor: pointer; list-style: none; }
.console-shell .cm-control::-webkit-details-marker { display: none; }
.console-shell .cm-control::marker { content: ""; }
.console-shell .cm-control:hover, .console-shell .cm-disclosure[open] > .cm-control { background: #eef5f1; border-color: #c4d8cd; }
.console-shell .cm-control > .cm-icon:last-child { width: .87rem; height: .87rem; }
.console-shell .cm-disclosure[open] > .cm-control > .cm-icon:last-child { transform: rotate(180deg); }
.console-shell .cm-disclosure { position: relative; }
.console-shell .cm-account .cm-control { gap: .28rem; padding: .25rem .45rem; }
.console-shell .cm-avatar {
  display: inline-grid; place-items: center; font-size: .76rem; font-weight: 800;
  color: var(--cm-brand); background: #e4efe9; width: 1.78rem; height: 1.78rem; border-radius: 50%;
}
.console-shell .cm-mobile-label { display: none; }
.console-shell .cm-popover {
  position: absolute; inset-block-start: calc(100% + .55rem); inset-inline-end: 0; z-index: 3;
  width: min(24rem, calc(100vw - 2rem)); border-radius: .8rem; border: 1px solid #d2e0d8;
  background: var(--cm-paper); box-shadow: 0 16px 45px #182c2330, 0 2px 6px #182c230e;
  overflow: hidden;
}
.console-shell .cm-popover-heading {
  display: grid; gap: .1rem; padding: .78rem .87rem; border-bottom: 1px solid var(--cm-border);
  font-size: .9rem; overflow-wrap: anywhere;
}
.console-shell .cm-popover-heading span { color: var(--cm-text); font-size: .78rem; }
.console-shell .cm-popover-scroll { max-height: min(65vh, 25rem); max-height: min(65dvh, 25rem); overflow: auto; overscroll-behavior: contain; }
.console-shell .cm-popover-footer { padding: .67rem .85rem; background: #f8faf9; border-top: 1px solid var(--cm-border); }
.console-shell .cm-popover-footer a, .console-shell .cm-launcher-footer a, .console-shell .cm-text-link {
  display: inline-flex; align-items: center; gap: .34rem; text-decoration: none; color: var(--cm-accent); font-weight: 750; font-size: .82rem;
}
.console-shell .cm-popover-footer a:hover, .console-shell .cm-launcher-footer a:hover, .console-shell .cm-text-link:hover { text-decoration: underline; }
.console-shell .cm-account-popover { width: min(17rem, calc(100vw - 2rem)); }
.console-shell .cm-account-links { padding: .35rem; }
.console-shell .cm-account-links a, .console-shell .cm-account-links button {
  display: flex; width: 100%; align-items: center; min-height: 2.45rem; padding: .38rem .55rem; gap: .48rem;
  background: transparent; border: 0; border-radius: .45rem; text-decoration: none; color: var(--cm-ink); font-size: .88rem; cursor: pointer;
}
.console-shell .cm-account-links a:hover, .console-shell .cm-account-links button:hover { background: var(--cm-wash); }
.console-shell .cm-launcher-main { display: grid; justify-items: center; padding-top: clamp(1.45rem, 6vw, 4.25rem); }
.console-shell .cm-launcher { width: min(29rem, 100%); overflow: hidden; box-shadow: 0 10px 28px #16382b10, 0 1px 3px #16382b0b; }
.console-shell .cm-launcher-header {
  display: flex; align-items: flex-start; gap: .78rem; padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--cm-border); background: linear-gradient(126deg, #f4f8f6 0%, #fff 85%);
}
.console-shell .cm-launcher-header h1 { font-size: clamp(1.45rem, 5.35vw, 1.85rem); }
.console-shell .cm-launcher-header .cm-lead { font-size: .88rem; margin-top: .25rem; }
.console-shell .cm-launcher-header .cm-overline + h1 { margin-top: .23rem; }
.console-shell .cm-launcher-list { max-height: min(58vh, 26rem); max-height: min(58dvh, 26rem); min-height: 3.5rem; overflow: auto; overscroll-behavior: contain; }
.console-shell .cm-launcher-footer {
  display: flex; flex-wrap: wrap; gap: .5rem .85rem; justify-content: space-between;
  border-top: 1px solid var(--cm-border); padding: .75rem 1rem; background: #f9fbfa;
}
.console-shell .cm-launcher-footer a { min-height: 1.6rem; }
.console-shell .cm-module-group { padding: .55rem .52rem .45rem; }
.console-shell .cm-module-group + .cm-module-group { border-top: 1px solid var(--cm-border); }
.console-shell .cm-module-church {
  display: flex; align-items: flex-start; gap: .35rem; padding: .22rem .44rem .4rem;
  color: var(--cm-text); font-size: .78rem; font-weight: 750; line-height: 1.4; overflow-wrap: anywhere;
}
.console-shell .cm-module-church .cm-icon { width: .92rem; height: .92rem; margin-top: .08rem; color: var(--cm-accent); }
.console-shell .cm-module-list,
.console-shell .cm-directory-list,
.console-shell .cm-config-list,
.console-shell .cm-people,
.console-shell .cm-history-list { list-style: none; padding: 0; margin: 0; }
.console-shell .cm-module-link {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .64rem;
  min-height: 3.15rem; border-radius: .55rem; padding: .3rem .45rem; text-decoration: none;
}
.console-shell .cm-module-link:hover { background: #edf5ef; }
.console-shell .cm-module-link:focus-visible { outline-offset: -2px; }
.console-shell .cm-module-copy { display: grid; gap: .06rem; overflow-wrap: anywhere; }
.console-shell .cm-module-copy strong { font-size: .88rem; font-weight: 800; }
.console-shell .cm-module-copy small { font-size: .77rem; color: var(--cm-text); }
.console-shell .cm-module-arrow { color: var(--cm-accent); }
.console-shell .cm-module-arrow .cm-icon { width: .91rem; height: .91rem; }
.console-shell .cm-tile {
  width: 2.23rem; height: 2.23rem; display: inline-grid; place-items: center; flex: none;
  background: #e7f0ea; color: #27665b; border-radius: .56rem;
}
.console-shell .cm-tile--liturgy { background: #f1ecf9; color: #60468c; }
.console-shell .cm-tile--attendance { background: #e5f1f8; color: #2d5c7e; }
.console-shell .cm-tile--management { background: #f6efe3; color: #785727; }
.console-shell .cm-tile--brand { background: #e2efe7; }
.console-shell .cm-launcher-header .cm-tile { width: 2.58rem; height: 2.58rem; }
.console-shell .cm-empty { padding: 1rem; color: var(--cm-text); font-size: .9rem; }
.console-shell .cm-section-head {
  display: flex; justify-content: space-between; align-items: center; padding: .94rem 1.1rem;
  gap: .7rem; min-width: 0;
}
.console-shell .cm-section-head--icon { justify-content: flex-start; }
.console-shell .cm-section-head p,
.console-shell .cm-setting p { font-size: .86rem; margin-top: .23rem; }
.console-shell .cm-count {
  min-width: 1.8rem; padding: .22rem .43rem; text-align: center; background: #eef5f0; color: var(--cm-brand);
  border-radius: .45rem; font-size: .84rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.console-shell .cm-directory-labels, .console-shell .cm-directory-row {
  display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(0, 1.04fr) minmax(4.5rem, .45fr) 8.1rem;
  align-items: center; column-gap: 1rem; padding: .88rem 1.1rem;
}
.console-shell .cm-directory-labels {
  font-size: .72rem; font-weight: 780; color: var(--cm-text); border-block: 1px solid var(--cm-border);
  background: #f7faf8; letter-spacing: .02em; padding-block: .52rem;
}
.console-shell .cm-directory-row + .cm-directory-row,
.console-shell .cm-directory-row--simple,
.console-shell .cm-config-row + .cm-config-row,
.console-shell .cm-history-list li + li { border-top: 1px solid var(--cm-border); }
.console-shell .cm-directory-row--simple { grid-template-columns: minmax(0, 1fr) auto; }
.console-shell .cm-church-name { min-width: 0; display: flex; align-items: center; gap: .65rem; }
.console-shell .cm-church-name > div { min-width: 0; }
.console-shell .cm-church-name h3 { margin-bottom: .12rem; }
.console-shell .cm-church-name h3 a { text-decoration: none; }
.console-shell .cm-church-name h3 a:hover { color: var(--cm-accent); text-decoration: underline; }
.console-shell .cm-church-name small { color: var(--cm-text); font-size: .76rem; overflow-wrap: anywhere; }
.console-shell .cm-module-badges { display: flex; min-width: 0; align-items: center; gap: .25rem; flex-wrap: wrap; }
.console-shell .cm-badge, .console-shell .cm-status {
  display: inline-flex; align-items: center; gap: .29rem; border-radius: .35rem;
  padding: .18rem .41rem; background: #edf2ef; color: #475d54; font-size: .73rem; font-weight: 750; line-height: 1.45;
}
.console-shell .cm-status { display: inline-flex; width: fit-content; }
.console-shell .cm-status::before { content: ""; width: .35rem; height: .35rem; border-radius: 50%; background: #7f9188; flex: none; }
.console-shell .cm-status--active { background: #e6f4e9; color: #296044; }
.console-shell .cm-status--active::before { background: #328256; }
.console-shell .cm-no-modules { font-size: .8rem; }
.console-shell .cm-badge ~ .cm-no-modules { display: none; }
.console-shell .cm-directory-action { justify-self: end; }
.console-shell .cm-admin-grid,
.console-shell .admin-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; align-items: start; }
.console-shell .cm-setting {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .7rem; padding: .87rem 1.1rem; margin-bottom: 1rem;
}
.console-shell .cm-config-list, .console-shell .cm-history-list { border-top: 1px solid var(--cm-border); }
.console-shell .cm-config-row { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; padding: .75rem 1.1rem; min-width: 0; }
.console-shell .cm-config-name { min-width: 0; flex: 1; }
.console-shell .cm-config-name h3 { margin-bottom: .15rem; }
.console-shell .cm-config-actions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.console-shell .cm-config-actions .button, .console-shell .cm-people .button { min-height: 2.2rem; padding: .4rem .55rem; font-size: .78rem; }
.console-shell .cm-config-actions .cm-icon { width: .86rem; }
.console-shell .cm-section-content { min-width: 0; padding: .55rem 1.1rem 1rem; }
.console-shell .cm-section-content--divided { border-top: 1px solid var(--cm-border); padding-top: .85rem; }
.console-shell .cm-grant-form { margin-top: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.console-shell .cm-grant-wide { grid-column: 1 / -1; }
@media(max-width: 520px) {
  .console-shell .cm-grant-form { grid-template-columns: minmax(0, 1fr); }
}
.console-shell .fields { gap: .8rem; }
.console-shell .fields > div { min-width: 0; }
.console-shell label { font-size: .88rem; }
.console-shell input:not([type=hidden]), .console-shell select { max-width: 100%; min-width: 0; border-radius: .47rem; border-color: #aebfb6; font: inherit; font-size: .88rem; }
.console-shell .cm-people { margin-top: .4rem; }
.console-shell .cm-people li { display: flex; justify-content: space-between; align-items: center; gap: .35rem; flex-wrap: wrap; padding-block: .38rem; }
.console-shell .cm-people strong, .console-shell .cm-history-list strong { font-size: .87rem; overflow-wrap: anywhere; }
.console-shell .cm-people small, .console-shell .cm-history-list small { display: block; font-size: .77rem; color: var(--cm-text); overflow-wrap: anywhere; }
.console-shell .cm-history { margin-top: 1rem; }
.console-shell .cm-history-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: .25rem .9rem; flex-wrap: wrap; padding: .62rem 1.1rem; }
.console-shell .form-shell { width: min(28rem,100%); margin: clamp(.4rem, 4vw, 2.6rem) auto 0; }
.console-shell .form-shell h1 { font-size: clamp(1.75rem, 4vw, 2.2rem); margin-bottom: .45rem; }
.console-shell .form-shell p:not(.kicker), .console-shell .dash-heading p:not(.kicker), .console-shell .card p { color: var(--cm-text); }
.console-shell .dash-heading { margin-bottom: 1.2rem; flex-wrap: wrap; }
.console-shell .dash-heading .kicker { margin-bottom: .25rem; }
.console-shell .dash-heading h1 { margin-bottom: .42rem; }
.console-shell .card h2 { font-size: 1.13rem; }
.console-shell .panel.card, .console-shell .panel.fields { padding: clamp(1rem, 2.5vw, 1.3rem); }
@media(max-width: 900px) {
  .console-shell .cm-admin-grid, .console-shell .admin-grid { grid-template-columns: minmax(0,1fr); }
}
@media(max-width: 670px) {
  .console-shell .cm-topbar-link { display: none; }
  .console-shell .cm-disclosure { position: static; }
  .console-shell .cm-popover { inset-inline-end: 0; inset-block-start: calc(100% + .27rem); }
  .console-shell .cm-directory-labels { display: none; }
  .console-shell .cm-directory-row { grid-template-columns: minmax(0,1fr) auto; gap: .55rem .5rem; }
  .console-shell .cm-directory-row:not(.cm-directory-row--simple) { border-top: 1px solid var(--cm-border); }
  .console-shell .cm-directory-row:not(.cm-directory-row--simple) .cm-church-name { grid-column: 1 / -1; }
  .console-shell .cm-module-badges { grid-column: 1 / -1; }
  .console-shell .cm-setting { grid-template-columns: auto minmax(0,1fr); }
  .console-shell .cm-setting .button { grid-column: 2; justify-self: start; }
}
@media(max-width: 405px) {
  .console-shell .cm-frame { width: calc(100% - 1.4rem); }
  .console-shell .cm-desktop-label, .console-shell .cm-brand small,
  .console-shell .cm-account .cm-control > .cm-icon { display: none; }
  .console-shell .cm-mobile-label { display: inline; }
  .console-shell .cm-brand { gap: .34rem; }
  .console-shell .cm-brand .mark { width: 1.72rem; height: 1.72rem; }
  .console-shell .cm-brand strong { font-size: .82rem; }
  .console-shell .cm-control { font-size: .79rem; padding-inline: .42rem; }
  .console-shell .cm-account .cm-control { min-width: 2.45rem; }
  .console-shell .cm-config-name { flex-basis: calc(100% - 3rem); }
  .console-shell .cm-config-actions { padding-left: 2.78rem; }
  .console-shell .cm-directory-row--simple { grid-template-columns: minmax(0,1fr); }
  .console-shell .cm-directory-row--simple .cm-directory-action { justify-self: start; margin-left: 2.88rem; }
}
