@font-face {
  font-family: "Gotham";
  src: url("assets/fonts/Gotham-Light.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 300;
}

@font-face {
  font-family: "Gotham";
  src: url("assets/fonts/Gotham-Book.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Gotham";
  src: url("assets/fonts/Gotham-Medium.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 500;
}

@font-face {
  font-family: "Gotham";
  src: url("assets/fonts/Gotham-Bold.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #e9f7e9;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --surface-3: #eceef2;
  --text: #111318;
  --text-soft: #3f4654;
  --muted: #6b7280;
  --border: #dfe3ea;
  --border-strong: #c8ced8;
  --accent: #111318;
  --accent-text: #ffffff;
  --accent-soft: #eef0f3;
  --danger: #b42318;
  --danger-hover: #912018;
  --danger-line: #efc2bd;
  --danger-line-hover: #df948c;
  --danger-soft: #fee4e2;
  --success: #087443;
  --warning: #a15c07;
  --preview-bg: #151821;
  --preview-text: #f7f7f8;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-sm: 0 10px 28px rgba(16, 24, 40, 0.08);
  --focus-ring: 0 0 0 3px rgba(17, 19, 24, 0.14);
  --font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-body: "Gotham", "Avenir Next", Montserrat, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-public-sheet: Tahoma, Geneva, Verdana, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1013;
  --surface: #16171b;
  --surface-2: #1d1f24;
  --surface-3: #252830;
  --text: #f5f6f8;
  --text-soft: #d2d6de;
  --muted: #9aa3b2;
  --border: #2c3038;
  --border-strong: #3a404c;
  --accent: #f5f6f8;
  --accent-text: #0f1013;
  --accent-soft: #252830;
  --danger: #ff7b72;
  --danger-hover: #ff9b93;
  --danger-line: rgba(255, 123, 114, 0.36);
  --danger-line-hover: rgba(255, 123, 114, 0.56);
  --danger-soft: rgba(255, 123, 114, 0.12);
  --success: #56d364;
  --warning: #e3b341;
  --preview-bg: #0f1218;
  --preview-text: #f5f6f8;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.22);
  --shadow-sm: 0 14px 34px rgba(0, 0, 0, 0.28);
  --focus-ring: 0 0 0 3px rgba(245, 246, 248, 0.16);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 8px 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  font-weight: 400;
  text-decoration: none;
  transform: translateY(-170%);
  transition: transform 140ms ease;
}

.icon-defs {
  display: none;
}

.ui-icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.skip-link:focus {
  transform: translateY(0);
}

.login-shell {
  --login-bg: #ffffff;
  --login-copy-bg: #cdfee0;
  --login-copy-ink: #05070a;
  --login-form-ink: #05070a;
  --login-muted: #7d8793;
  --login-control-bg: #ffffff;
  --login-control-border: #cfd5dd;
  --login-control-border-hover: #bfc7d1;
  --login-control-border-focus: #9aa5b1;
  --login-control-focus: 0 0 0 3px rgba(17, 19, 24, 0.08);
  --login-toggle-color: #65717d;
  --login-toggle-hover-color: #111318;
  --login-toggle-hover-bg: #edf1f5;
  --login-toggle-hover-border: #d8dde4;
  --login-check-bg: #18231d;
  --login-check-color: #ffffff;
  --login-submit-bg: #191b18;
  --login-submit-text: #ffffff;
  --login-submit-fill: #7bcf91;
  --login-submit-fill-text: #07130c;
  --login-link-hover: #087443;
  position: relative;
  min-height: 100vh;
  display: grid;
  padding: 0;
  background: var(--login-bg);
}

:root[data-theme="dark"] .login-shell {
  --login-bg: #0f1218;
  --login-copy-bg: #102419;
  --login-copy-ink: #f4fff7;
  --login-form-ink: #f5f7f8;
  --login-muted: #a8b2bf;
  --login-control-bg: #151922;
  --login-control-border: #313948;
  --login-control-border-hover: #465166;
  --login-control-border-focus: #9bd7a8;
  --login-control-focus: 0 0 0 3px rgba(210, 247, 210, 0.16);
  --login-toggle-color: #b3bdc9;
  --login-toggle-hover-color: #f5f7f8;
  --login-toggle-hover-bg: #1e2530;
  --login-toggle-hover-border: #3a4455;
  --login-check-bg: #d2f7d2;
  --login-check-color: #07130c;
  --login-submit-bg: #d2f7d2;
  --login-submit-text: #07130c;
  --login-submit-fill: #8ddfa4;
  --login-submit-fill-text: #06100a;
  --login-link-hover: #9ee3ae;
  background: var(--login-bg);
}

.login-shell .login-theme-toggle {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  min-width: 0;
  height: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  color: var(--login-toggle-color);
  background: transparent;
  border-color: transparent;
  border-radius: 999px;
}

.login-shell .login-theme-toggle:hover {
  color: var(--login-toggle-hover-color);
  background: var(--login-toggle-hover-bg);
  border-color: var(--login-toggle-hover-border);
}

.login-home-link {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
  overflow: hidden;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 1px 4px;
  color: var(--login-toggle-color);
  background: transparent;
  border: 0;
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
}

.login-home-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.login-home-link:hover,
.login-home-link:focus-visible {
  color: var(--login-toggle-hover-color);
  background: transparent;
}

.login-home-link:hover::after,
.login-home-link:focus-visible::after {
  transform: scaleX(1);
}

.login-panel {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
}

.login-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(58px, 9vh, 92px);
  min-height: 100vh;
  padding: clamp(44px, 7vw, 110px);
  background: var(--login-copy-bg);
}

.login-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.login-back {
  width: max-content;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  font-size: 0.86rem;
  text-decoration: none;
}

.login-back:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.login-legal-link {
  align-self: center;
  color: var(--muted);
  font-size: 0.74rem;
  opacity: 0.66;
}

.login-legal-link:hover {
  opacity: 0.9;
}

.login-legal-line {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 10px;
  z-index: 2;
  margin: 0;
  color: var(--login-muted);
  font-size: 0.58rem;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  opacity: 0.52;
}

.login-legal-line a {
  color: inherit;
  text-decoration: none;
}

.login-legal-line a:hover,
.login-legal-line a:focus-visible {
  color: var(--login-form-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prospect-creation-open {
  overflow: hidden;
}

.prospect-creation-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(13, 18, 24, 0.46);
  opacity: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: opacity 180ms ease;
}

.prospect-creation-backdrop[hidden] {
  display: none;
}

.prospect-creation-backdrop.is-open {
  opacity: 1;
}

.prospect-creation-card {
  width: min(520px, 100%);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 28px;
  color: #111318;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(17, 19, 24, 0.1);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(17, 19, 24, 0.22);
  scrollbar-gutter: stable;
  text-align: center;
  transform: translateY(14px) scale(0.98);
  transition: transform 180ms ease;
}

.prospect-creation-backdrop.is-open .prospect-creation-card {
  transform: translateY(0) scale(1);
}

.prospect-creation-kicker {
  margin: 0 0 8px;
  color: #087443;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prospect-creation-card h2 {
  margin: 0;
  color: #111318;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.prospect-creation-card p:not(.prospect-creation-kicker) {
  margin: 14px 0 0;
  color: #3f4654;
  line-height: 1.5;
}

.prospect-creation-spinner {
  display: block;
  width: 38px;
  height: 38px;
  margin: 24px auto 0;
  border: 3px solid rgba(8, 116, 67, 0.18);
  border-top-color: #087443;
  border-radius: 999px;
  animation: prospect-creation-spin 780ms linear infinite;
}

.prospect-creation-backdrop[data-status="error"] .prospect-creation-kicker,
.prospect-creation-backdrop[data-status="error"] .prospect-creation-card h2 {
  color: var(--danger);
}

.prospect-creation-backdrop[data-status="error"] .prospect-creation-card h2 {
  font-size: clamp(1.8rem, 4.4vw, 2.65rem);
}

@media (max-width: 560px) {
  .prospect-creation-backdrop {
    align-items: start;
    padding: 14px;
  }

  .prospect-creation-card {
    max-height: calc(100dvh - 28px);
    padding: 24px 18px;
  }
}

.admin-tour-choice-backdrop,
.admin-tour-layer {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.admin-tour-choice-backdrop[hidden],
.admin-tour-layer[hidden],
.tour-replay-action[hidden] {
  display: none;
}

.admin-tour-choice-backdrop {
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.42);
  opacity: 0;
  backdrop-filter: blur(7px);
  transition: opacity 170ms ease;
}

.admin-tour-choice-backdrop.is-open {
  opacity: 1;
}

.admin-tour-choice-card {
  width: min(620px, 100%);
  padding: clamp(28px, 5vw, 48px);
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(210, 247, 210, 0.24), rgba(255, 255, 255, 0.04)),
    var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(0.98);
  transition: transform 190ms ease;
}

.admin-tour-choice-backdrop.is-open .admin-tour-choice-card {
  transform: translateY(0) scale(1);
}

.admin-tour-kicker {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-tour-choice-card h2,
.admin-tour-tooltip h2 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.02;
}

.admin-tour-choice-card h2 {
  font-size: clamp(2.3rem, 7vw, 4.4rem);
}

.admin-tour-choice-card p:not(.admin-tour-kicker),
.admin-tour-tooltip p:not(.admin-tour-kicker) {
  color: var(--text-soft);
  font-weight: 400;
  line-height: 1.55;
}

.admin-tour-choice-card p:not(.admin-tour-kicker) {
  margin: 18px 0 0;
  font-size: 1.02rem;
}

.admin-tour-choice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

.admin-tour-choice-primary {
  box-shadow: 0 12px 34px rgba(22, 163, 74, 0.18);
}

.admin-tour-layer {
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.admin-tour-layer.is-open {
  opacity: 1;
}

.admin-tour-spotlight {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 100px;
  height: 80px;
  border: 2px solid #d2f7d2;
  border-radius: 10px;
  box-shadow:
    0 0 0 9999px rgba(6, 18, 14, 0.58),
    0 0 0 6px rgba(210, 247, 210, 0.18),
    0 18px 44px rgba(6, 18, 14, 0.22);
  transition:
    left 210ms ease,
    top 210ms ease,
    width 210ms ease,
    height 210ms ease;
}

.admin-tour-tooltip {
  position: fixed;
  left: 24px;
  top: 24px;
  width: min(390px, calc(100vw - 28px));
  padding: 20px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  transition:
    left 210ms ease,
    top 210ms ease;
}

.admin-tour-tooltip h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.admin-tour-tooltip p:not(.admin-tour-kicker) {
  margin: 12px 0 0;
  font-size: 0.95rem;
}

.admin-tour-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 18px;
}

.admin-tour-actions .primary-action,
.admin-tour-actions .secondary-action,
.admin-tour-actions .ghost-action {
  width: auto;
  margin: 0;
}

.admin-tour-actions .ghost-action {
  background: transparent;
}

@media (max-width: 760px) {
  .admin-tour-choice-backdrop {
    align-items: start;
    padding: 18px;
    overflow: auto;
  }

  .admin-tour-choice-card {
    padding: 28px 20px;
  }

  .admin-tour-choice-actions,
  .admin-tour-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-tour-choice-actions .primary-action,
  .admin-tour-choice-actions .secondary-action,
  .admin-tour-actions .primary-action,
  .admin-tour-actions .secondary-action,
  .admin-tour-actions .ghost-action {
    width: 100%;
  }

  .admin-tour-tooltip {
    left: 14px !important;
    right: 14px;
    bottom: 14px;
    top: auto !important;
    width: auto !important;
    max-height: 52vh;
    overflow: auto;
  }
}

@keyframes prospect-creation-spin {
  to {
    transform: rotate(360deg);
  }
}

.brand-row,
.app-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 60px;
  height: 60px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 8px;
}

.login-copy .brand-row {
  align-items: center;
  gap: clamp(20px, 3vw, 34px);
  width: min(560px, 100%);
}

.login-copy .brand-mark {
  width: clamp(112px, 11vw, 154px);
  height: clamp(112px, 11vw, 154px);
  margin-top: 0;
  border-radius: 18px;
}

.login-brand-text {
  min-width: 0;
}

.login-brand-text h1,
.app-brand strong,
.view-header h2 {
  font-family: var(--font-display);
}

.login-brand-text .kicker {
  margin: 0;
  color: var(--login-copy-ink);
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 1.8vw, 1.85rem);
  font-weight: 700;
  line-height: 1.08;
  text-transform: none;
}

.login-brand-text h1 {
  margin-top: 8px;
  color: var(--login-copy-ink);
  font-size: clamp(2.55rem, 4.7vw, 4.45rem);
  line-height: 0.98;
  text-transform: none;
  white-space: nowrap;
}

.app-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 8px;
}

.kicker,
.app-overline {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.02;
}

h2 {
  font-size: clamp(1.65rem, 2.3vw, 2.35rem);
  line-height: 1.06;
}

h3 {
  font-size: 1.05rem;
  line-height: 1.2;
}

.login-form,
.editor-form {
  display: grid;
  gap: 16px;
}

.login-form {
  width: min(560px, calc(100% - 96px));
  align-self: center;
  justify-self: center;
  gap: 12px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.login-lead {
  max-width: 520px;
  margin: 0;
  color: var(--text-soft);
  font-size: 1.06rem;
  line-height: 1.6;
}

.login-context {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.login-context span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.82rem;
}

.login-promises {
  display: grid;
  gap: 10px;
  width: min(650px, 100%);
  margin: clamp(-30px, -3.2vh, -18px) 0 0;
  padding: 0;
  color: var(--login-copy-ink);
  font-size: clamp(0.9rem, 1.05vw, 1.04rem);
  font-weight: 700;
  line-height: 1.22;
  list-style: none;
}

.login-promises li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.promise-check {
  position: relative;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  display: inline-grid;
  place-items: center;
  color: var(--login-check-color);
  background: var(--login-check-bg);
  border-radius: 999px;
}

.promise-check::after {
  content: "";
  width: 6px;
  height: 11px;
  border: solid currentColor;
  border-width: 0 3px 3px 0;
  transform: translateY(-1px) rotate(45deg);
}

.login-gospel-quote {
  width: min(650px, 100%);
  margin: clamp(-36px, -4vh, -18px) 0 0;
  color: var(--login-copy-ink);
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.35vw, 1.24rem);
  line-height: 1.24;
  opacity: 0.82;
}

.login-form-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding-bottom: clamp(52px, 8vh, 82px);
}

.login-lock {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.login-form-header h2 {
  color: var(--login-form-ink);
  font-family: var(--font-body);
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  font-weight: 700;
  line-height: 1.1;
}

.login-submit {
  position: relative;
  width: 100%;
  min-height: 42px;
  justify-content: center;
  margin-top: 2px;
  color: var(--login-submit-text);
  background: var(--login-submit-bg);
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  isolation: isolate;
  transition: color 180ms ease;
}

.login-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--login-submit-fill);
  transform: translateX(-102%);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.login-submit > * {
  position: relative;
  z-index: 1;
}

.login-submit-spinner {
  display: none;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border: 2px solid color-mix(in srgb, currentColor 30%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
}

.login-submit.is-loading {
  cursor: wait;
}

.login-submit.is-loading .login-submit-spinner {
  display: inline-block;
  animation: login-submit-spin 720ms linear infinite;
}

.login-submit:hover::before,
.login-submit:focus-visible::before {
  transform: translateX(0);
}

.login-submit:hover,
.login-submit:focus-visible {
  color: var(--login-submit-fill-text);
  transform: none;
}

@keyframes login-submit-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-submit.is-loading .login-submit-spinner {
    animation: none;
  }
}

.login-input-field {
  position: relative;
  display: block;
  color: var(--login-muted);
  font-size: 0.86rem;
  font-weight: 400;
}

.login-input-field > span:first-child {
  position: absolute;
  top: -9px;
  left: 16px;
  z-index: 2;
  padding: 0 7px;
  background: var(--login-bg);
  line-height: 1;
}

.login-input-field input {
  width: 100%;
  min-height: 50px;
  color: var(--login-form-ink);
  background: var(--login-control-bg);
  border: 1px solid var(--login-control-border);
  border-radius: 10px;
  padding: 13px 18px;
  font-size: 1rem;
  box-shadow: none;
}

.login-input-field input:hover {
  border-color: var(--login-control-border-hover);
}

.login-input-field input:focus {
  border-color: var(--login-control-border-focus);
  box-shadow: var(--login-control-focus);
}

.login-password-control {
  position: relative;
  display: block;
}

.login-password-control input {
  padding-right: 52px;
}

.login-password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--login-toggle-color);
  background: transparent;
  border: 0;
  border-radius: 8px;
  transform: translateY(-50%);
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
  color: var(--login-toggle-hover-color);
  background: var(--login-toggle-hover-bg);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0 10px;
  color: var(--login-form-ink);
  font-size: 0.94rem;
}

.login-remember {
  width: auto;
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 12px;
  color: var(--login-form-ink);
  font-size: inherit;
}

.login-remember input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--login-submit-bg);
}

.login-forgot {
  flex: 0 0 auto;
  color: var(--login-form-ink);
  background: transparent;
  border: 0;
  padding: 0;
  font-weight: 700;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.login-forgot:hover,
.login-forgot:focus-visible {
  color: var(--login-link-hover);
}

.password-reset-panel {
  display: grid;
  gap: 14px;
}

.password-reset-panel[hidden] {
  display: none;
}

.password-reset-header {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--login-form-ink);
}

.password-reset-header h2 {
  color: var(--login-form-ink);
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  line-height: 0.98;
}

.password-reset-header p:not(.kicker) {
  margin: 0;
  color: var(--login-muted);
  font-size: 0.96rem;
  line-height: 1.5;
}

.login-secondary-link {
  justify-self: center;
  width: max-content;
  color: var(--login-form-ink);
  background: transparent;
  border: 0;
  padding: 2px 0;
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-secondary-link:hover,
.login-secondary-link:focus-visible {
  color: var(--login-link-hover);
}

.password-reset-strength {
  height: 7px;
  overflow: hidden;
  background: color-mix(in srgb, var(--login-control-border) 70%, transparent);
  border-radius: 999px;
}

.password-reset-strength span {
  width: 0%;
  height: 100%;
  display: block;
  background: #c3271b;
  border-radius: inherit;
  transition: width 220ms ease, background 220ms ease;
}

.password-reset-strength-label {
  margin: -4px 0 2px;
  color: var(--login-muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

label {
  display: grid;
  gap: 7px;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 400;
}

.field-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.field-help {
  position: relative;
  --tooltip-bg: #2f343d;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1;
  cursor: help;
}

.field-help:hover,
.field-help:focus-visible {
  color: var(--text);
  border-color: var(--text-soft);
  outline: none;
}

.field-help::after {
  content: attr(data-help);
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 60;
  width: max-content;
  max-width: min(270px, 72vw);
  padding: 8px 10px;
  color: var(--surface);
  background: var(--tooltip-bg);
  border-radius: 7px;
  box-shadow: var(--shadow-sm);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translateY(-4px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
  white-space: normal;
}

.field-help::before {
  content: "";
  position: absolute;
  left: 3px;
  top: calc(100% + 1px);
  z-index: 61;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 8px solid var(--tooltip-bg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.field-help:hover::after,
.field-help:hover::before,
.field-help:focus-visible::after,
.field-help:focus-visible::before {
  opacity: 1;
  transform: translateY(0);
}

.color-field {
  position: relative;
  display: grid;
  gap: 7px;
  z-index: 4;
}

.sheet-publish-slot {
  display: flex;
  align-items: flex-end;
  min-width: 0;
}

.sheet-publish-slot .secondary-action {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 57px;
  justify-content: center;
}

.sheet-publish-slot .secondary-action::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 2px solid currentColor;
  border-radius: 9px;
  opacity: 0;
  clip-path: inset(0 100% 100% 0 round 9px);
  pointer-events: none;
}

.sheet-publish-slot .secondary-action:hover:not(:disabled)::after,
.sheet-publish-slot .secondary-action:focus-visible:not(:disabled)::after {
  animation: sheet-publish-border-draw 240ms cubic-bezier(0.2, 0.75, 0.25, 1) forwards;
}

@keyframes sheet-publish-border-draw {
  0% {
    opacity: 1;
    clip-path: inset(0 100% 100% 0 round 9px);
  }
  48% {
    opacity: 1;
    clip-path: inset(0 0 92% 0 round 9px);
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0 round 9px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sheet-publish-slot .secondary-action:hover:not(:disabled)::after,
  .sheet-publish-slot .secondary-action:focus-visible:not(:disabled)::after {
    animation: none;
    opacity: 1;
    clip-path: none;
  }
}

.field-label {
  color: var(--text-soft);
  font-size: 0.82rem;
}

.color-trigger {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
}

.color-trigger:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.color-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.color-swatch {
  width: 22px;
  height: 22px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px var(--surface);
}

.color-meta {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.color-value {
  color: var(--text);
  font-size: 0.88rem;
}

.color-hint {
  color: var(--muted);
  font-size: 0.74rem;
}

.native-color-input {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1px;
  min-height: 1px;
  height: 1px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.color-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 12;
  width: min(320px, calc(100vw - 32px));
  display: grid;
  gap: 12px;
  padding: 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.color-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-soft);
  font-size: 0.82rem;
}

.color-close {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1;
}

.color-close:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
}

.color-palette {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.color-swatch-option {
  min-height: 32px;
  display: grid;
  place-items: center;
  padding: 3px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.color-swatch-option:hover {
  border-color: var(--border-strong);
}

.color-swatch-option.active {
  border-color: var(--text);
}

.color-swatch-option span {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(17, 19, 24, 0.12);
  border-radius: 6px;
}

.color-free-picker {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.color-plane {
  --picker-hue: 112;
  position: relative;
  height: 146px;
  overflow: hidden;
  background:
    linear-gradient(to top, #050505 0%, rgba(5, 5, 5, 0) 100%),
    linear-gradient(to right, #ffffff 0%, hsl(var(--picker-hue) 100% 50%) 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(17, 19, 24, 0.04);
  cursor: crosshair;
  touch-action: none;
}

.color-plane:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.color-plane-handle {
  position: absolute;
  width: 16px;
  height: 16px;
  background: transparent;
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(17, 19, 24, 0.58), 0 2px 8px rgba(17, 19, 24, 0.28);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.hue-field {
  gap: 7px;
}

.hue-slider {
  width: 100%;
  min-height: 0;
  height: 22px;
  appearance: none;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  cursor: pointer;
  -webkit-appearance: none;
}

.hue-slider:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hue-slider::-webkit-slider-runnable-track {
  height: 10px;
  background: linear-gradient(to right, #ff453a, #ffd60a, #30d158, #64d2ff, #0a84ff, #bf5af2, #ff453a);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.hue-slider::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -5px;
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: 999px;
  box-shadow: 0 1px 5px rgba(17, 19, 24, 0.24);
  -webkit-appearance: none;
}

.hue-slider::-moz-range-track {
  height: 10px;
  background: linear-gradient(to right, #ff453a, #ffd60a, #30d158, #64d2ff, #0a84ff, #bf5af2, #ff453a);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.hue-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: 999px;
  box-shadow: 0 1px 5px rgba(17, 19, 24, 0.24);
}

.color-hex-field {
  gap: 6px;
}

.color-hex-field input {
  min-height: 38px;
  text-transform: uppercase;
}

.color-hex-field input.invalid {
  border-color: var(--danger);
}

.color-preview-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.color-preview {
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
  outline: none;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  height: 18px;
  accent-color: var(--accent);
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--border-strong);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

input.invalid {
  border-color: var(--danger);
}

.toggle-row {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-weight: 400;
}

.form-error[data-status="success"] {
  color: var(--accent-strong);
}

.field-hint,
.form-note {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.form-note {
  min-height: 20px;
  margin: 0;
}

.form-note[data-status="success"] {
  color: var(--accent-strong);
}

.form-note[data-status="error"] {
  color: var(--danger);
}

.access-loading-status {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 14px;
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.4;
}

.access-loading-status[hidden] {
  display: none;
}

.access-loading-status::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid rgba(8, 116, 67, 0.18);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: account-spin 800ms linear infinite;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  color: var(--text);
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.app-brand {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.app-brand > div {
  min-width: 0;
  max-width: 100%;
  flex: 1 1 auto;
}

.app-brand strong,
.session-box span {
  display: block;
}

.app-brand strong {
  overflow: hidden;
  font-size: 1.06rem;
  font-weight: 400;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-brand span:not(.app-overline) {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
}

.app-brand #parishBadge {
  max-width: 100%;
  overflow: hidden;
  color: var(--text-soft);
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
}

.theme-toggle {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-soft);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  font-weight: 400;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.main-nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 10px;
  text-align: left;
  font-weight: 400;
  transition:
    color 140ms ease,
    background 140ms ease,
    border-color 140ms ease;
}

.nav-item::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: var(--border-strong);
  border-radius: 999px;
}

.nav-item:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-item.active {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
}

.nav-item.active::before {
  background: var(--accent);
}

.session-box {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
}

.session-box span {
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 400;
}

.session-legal-link {
  display: inline-flex;
  width: max-content;
  margin: 0 0 4px;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  font-size: 0.72rem;
  line-height: 1.2;
  opacity: 0.68;
  text-decoration: none;
}

.session-legal-link:hover {
  color: var(--text-soft);
  border-color: var(--border-strong);
  opacity: 0.92;
}

.workspace {
  min-width: 0;
  padding: 28px;
}

.workspace:focus {
  outline: none;
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
}

.header-actions,
.form-actions,
.section-toolbar,
.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions,
.form-actions,
.section-actions {
  flex-wrap: wrap;
}

.primary-action,
.secondary-action,
.ghost-action,
.danger-action,
.mini-action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 12px;
  font-weight: 400;
  line-height: 1.1;
  text-decoration: none;
  transition:
    color 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}

.primary-action {
  color: var(--accent-text);
  background: var(--accent);
}

.primary-action:hover {
  transform: translateY(-1px);
}

.secondary-action,
.mini-action {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}

.secondary-action:hover,
.mini-action:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.mini-action {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.82rem;
}

.ghost-action {
  width: 100%;
  margin-top: 8px;
  color: var(--text-soft);
  background: var(--surface-2);
  border-color: var(--border);
  text-align: center;
}

.ghost-action:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.danger-action {
  color: var(--danger);
  background: transparent;
  border-color: var(--danger-line);
}

.danger-action:hover {
  color: var(--danger-hover);
  background: transparent;
  border-color: var(--danger-line-hover);
}

.two-pane {
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.list-pane,
.editor-pane,
.public-preview,
.public-admin-panel,
.notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.list-pane,
.editor-pane {
  padding: 14px;
}

.parish-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: -4px 0 16px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.parish-toolbar[hidden] {
  display: none;
}

.parish-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.parish-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.list-pane {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.record-list {
  display: grid;
  gap: 7px;
}

.sheet-list-toolbar {
  display: flex;
  margin-bottom: 12px;
}

.sheet-list-toolbar .primary-action {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
}

.sheet-list-toolbar .primary-action::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #baffbb;
  transform: translateX(-101%);
  transition: transform 260ms cubic-bezier(0.22, 0.75, 0.25, 1);
  pointer-events: none;
}

.sheet-list-toolbar .primary-action > * {
  position: relative;
  z-index: 1;
}

.sheet-list-toolbar .primary-action:hover:not(:disabled),
.sheet-list-toolbar .primary-action:focus-visible:not(:disabled) {
  color: #111318;
  border-color: #7fcb86;
}

.sheet-list-toolbar .primary-action:hover:not(:disabled)::before,
.sheet-list-toolbar .primary-action:focus-visible:not(:disabled)::before {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .sheet-list-toolbar .primary-action::before {
    transition: none;
  }
}

.sheet-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: stretch;
  overflow: hidden;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition:
    background 140ms ease,
    border-color 140ms ease;
}

.sheet-record:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.sheet-record.active {
  background: var(--accent-soft);
  border-color: var(--border-strong);
}

.sheet-record .record-button {
  min-height: 58px;
  border: 0;
  border-radius: 0;
}

.sheet-record .record-button:hover,
.sheet-record .record-button.active {
  background: transparent;
  border-color: transparent;
}

.record-delete-action {
  min-height: 58px;
  display: inline-grid;
  place-items: center;
  color: var(--danger);
  background: transparent;
  border: 0;
  border-left: 1px solid var(--border);
  transition:
    color 140ms ease,
    background 140ms ease;
}

.record-delete-action:hover {
  color: var(--danger-hover);
  background: var(--danger-soft);
}

.record-button {
  width: 100%;
  min-height: 58px;
  display: grid;
  gap: 2px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  text-align: left;
  transition:
    background 140ms ease,
    border-color 140ms ease;
}

.record-button:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.record-button.active {
  background: var(--accent-soft);
  border-color: var(--border-strong);
}

.record-button strong {
  overflow-wrap: anywhere;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.25;
}

.record-button span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sheet-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sheet-clocher-field {
  grid-column: 1 / -1;
}

.sheet-options-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
}

.sheet-editor-toolbar .sheet-options-icon {
  margin-left: auto;
}

.sheet-options-icon:hover:not(:disabled) {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
}

.sheet-options-dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.sheet-options-dialog::backdrop {
  background: rgb(17 19 24 / 45%);
  backdrop-filter: blur(2px);
}

.sheet-options-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.sheet-options-header > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sheet-options-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 1.8rem);
  line-height: 1.2;
}

.sheet-options-content {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.sheet-options-content p {
  margin: 0;
  color: var(--text-soft);
  font-size: .85rem;
  line-height: 1.6;
}

.sheet-options-content label {
  margin-top: 4px;
}

.sheet-options-content input {
  min-width: 0;
  width: 100%;
  font-size: .85rem;
}

.sheet-options-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.section-toolbar {
  justify-content: space-between;
  margin-top: 2px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sections-editor {
  display: grid;
  gap: 12px;
}

.section-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.section-card.is-dragging {
  opacity: 0.55;
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.section-card.is-drop-target-before {
  box-shadow: inset 0 3px 0 var(--accent);
}

.section-card.is-drop-target-after {
  box-shadow: inset 0 -3px 0 var(--accent);
}

.section-drag-handle {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: grab;
  touch-action: none;
}

.section-drag-handle:hover,
.section-drag-handle:focus-visible {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
}

.section-drag-handle:active {
  cursor: grabbing;
}

.section-drag-handle .ui-icon {
  pointer-events: none;
}

body.section-reorder-active,
body.section-reorder-active * {
  cursor: grabbing !important;
  user-select: none !important;
}

.section-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.section-card-body {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.section-accordion-toggle {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.section-accordion-toggle:focus-visible {
  border-radius: 8px;
  box-shadow: var(--focus-ring);
  outline: none;
}

.section-chevron {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 160ms ease;
}

.section-card:not(.is-collapsed) .section-chevron {
  transform: rotate(45deg);
}

.section-title-stack {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.section-title-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.section-title-text {
  overflow-wrap: anywhere;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.25;
}

.section-title-meta {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 400;
}

.section-complete-badge {
  position: relative;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: none;
  background: #1fbf75;
  border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(31, 191, 117, 0.35);
}

.section-complete-badge::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  width: 5px;
  height: 8px;
  border-right: 1.8px solid #ffffff;
  border-bottom: 1.8px solid #ffffff;
  transform: translate(-50%, -50%) rotate(45deg);
}

.section-card.is-complete .section-complete-badge {
  display: inline-block;
}

.section-card.complete-pulse .section-complete-badge,
.section-card.is-complete .section-complete-badge {
  animation: section-complete-pop 360ms ease-out;
}

@keyframes section-complete-pop {
  0% {
    transform: scale(0.72);
    box-shadow: 0 0 0 0 rgba(31, 191, 117, 0.38);
  }

  70% {
    transform: scale(1.08);
    box-shadow: 0 0 0 8px rgba(31, 191, 117, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(31, 191, 117, 0);
  }
}

.song-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.song-picker {
  display: grid;
  gap: 0;
  margin-top: 12px;
}

.song-picker-results {
  display: grid;
  gap: 6px;
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  padding: 0 8px;
  background: var(--surface-2);
  border: 0 solid var(--border);
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scaleY(0.98);
  transform-origin: top;
  visibility: hidden;
  transition:
    max-height 220ms cubic-bezier(0.22, 1, 0.36, 1),
    margin-top 180ms ease,
    padding 180ms ease,
    border-width 180ms ease,
    opacity 140ms ease,
    transform 180ms ease,
    visibility 0s linear 220ms;
}

.song-picker.is-open .song-picker-results {
  max-height: 260px;
  margin-top: 10px;
  overflow-y: auto;
  padding: 8px;
  border-width: 1px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scaleY(1);
  visibility: visible;
  transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
  .song-picker-results {
    transition: none;
    transform: none;
  }
}

.song-picker-result {
  width: 100%;
  display: grid;
  gap: 2px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 10px;
  text-align: left;
}

.song-picker-result strong {
  font-weight: 400;
}

.song-picker-result:hover,
.song-picker-result.active {
  border-color: var(--border-strong);
  background: var(--accent-soft);
}

.song-picker-result span,
.empty-result {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 400;
}

.empty-result {
  margin: 0;
  padding: 8px;
}

.song-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 9px;
  font-size: 0.8rem;
}

.song-options input {
  width: auto;
}

.aelf-refresh-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.aelf-refresh-status {
  flex: 1 1 220px;
  min-height: 1.2rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
}

.aelf-refresh-status[data-status="success"] {
  color: var(--success);
}

.aelf-refresh-status[data-status="error"] {
  color: var(--danger);
}

.search-field {
  margin-bottom: 10px;
}

.result-count {
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}

.sheet-form-actions {
  justify-content: flex-end;
}

.notice {
  margin-bottom: 16px;
  padding: 12px 14px;
  color: var(--text-soft);
  background: var(--surface-2);
  font-weight: 400;
}

.publish-status {
  min-height: 1.4rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 400;
}

.publish-status[data-status="success"] {
  color: var(--success);
}

.publish-status[data-status="error"] {
  color: var(--danger);
}

/* Abonnement et facturation */
.account-content {
  display: grid;
  gap: 20px;
}

.account-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.account-summary-grid article,
.account-panel,
.account-empty {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-xs);
}

.account-summary-grid article {
  min-height: 128px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 22px;
}

.account-summary-grid span,
.account-summary-grid small {
  color: var(--muted);
  font-size: 0.78rem;
}

.account-summary-grid strong {
  color: var(--text);
  font-size: 1.24rem;
  font-weight: 500;
}

.account-panel {
  padding: 24px;
}

.account-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.account-panel-header h3,
.account-empty h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 500;
}

.account-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.account-details div {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  background: var(--surface-2);
}

.account-details dt {
  color: var(--muted);
  font-size: 0.74rem;
}

.account-details dd {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.account-invoices {
  display: grid;
  gap: 8px;
}

.account-invoice {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.account-invoice-copy {
  display: grid;
  gap: 3px;
}

.account-invoice-copy small {
  color: var(--muted);
}

.account-invoice-provider {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.account-contract-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.account-contract-action:first-of-type {
  border-top: 0;
}

.account-contract-action p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.account-empty {
  max-width: 720px;
  padding: 32px;
}

.account-empty > p:not(.kicker) {
  max-width: 580px;
  color: var(--muted);
}

.account-pricing-link {
  width: max-content;
  margin-top: 8px;
  text-decoration: none;
}

.account-loading {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--muted);
}

.account-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: account-spin 800ms linear infinite;
}

@keyframes account-spin {
  to { transform: rotate(360deg); }
}

.subscription-action-dialog {
  width: min(620px, calc(100% - 28px));
  padding: 0;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.subscription-action-dialog::backdrop {
  background: rgba(8, 13, 10, 0.58);
}

.subscription-action-dialog form {
  margin: 0;
  padding: 24px;
}

.subscription-action-dialog header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.subscription-action-dialog h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 500;
}

.subscription-dialog-close {
  width: 36px;
  height: 36px;
  color: var(--muted);
  background: var(--surface-2);
  border: 0;
  border-radius: 999px;
  font-size: 1.3rem;
}

.subscription-action-summary {
  display: grid;
  gap: 10px;
  margin: 20px 0;
  padding: 16px;
  color: var(--text-soft);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  line-height: 1.55;
}

.subscription-action-summary p {
  margin: 0;
}

.subscription-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
}

@media (max-width: 760px) {
  .account-summary-grid,
  .account-details {
    grid-template-columns: 1fr;
  }

  .account-contract-action,
  .account-invoice {
    align-items: stretch;
    flex-direction: column;
  }

  .account-contract-action button,
  .account-invoice button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-spinner { animation: none; }
}

.settings-panel {
  max-width: 780px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.settings-panel + .settings-panel {
  margin-top: 18px;
}

.settings-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.settings-panel-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 500;
}

.settings-alert {
  margin: 0 0 14px;
  padding: 12px 14px;
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.settings-toggle {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.settings-toggle input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.settings-toggle strong,
.settings-toggle small {
  display: block;
}

.settings-toggle strong {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
}

.settings-toggle small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.publication-pin-open {
  overflow: hidden;
}

.publication-pin-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(5, 7, 10, 0.54), rgba(5, 7, 10, 0.38)),
    rgba(5, 7, 10, 0.48);
  opacity: 0;
  transition: opacity 140ms ease;
}

.publication-pin-backdrop.is-open {
  opacity: 1;
}

.publication-pin-card {
  width: min(430px, 100%);
  display: grid;
  gap: 14px;
  padding: 26px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transform: translateY(10px) scale(0.985);
  transition: transform 140ms ease;
}

.publication-pin-backdrop.is-open .publication-pin-card {
  transform: translateY(0) scale(1);
}

.publication-pin-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.publication-pin-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.55rem;
  line-height: 1.15;
  font-weight: 500;
}

.publication-pin-card p:not(.publication-pin-kicker):not(.publication-pin-error) {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.publication-pin-form {
  display: grid;
  gap: 12px;
}

.publication-pin-input {
  max-width: 190px;
  text-align: center;
  font-size: 1.45rem;
  letter-spacing: 0.22em;
}

.publication-pin-error {
  min-height: 1.2em;
  margin: 0;
  color: var(--danger);
  font-size: 0.84rem;
}

.publication-pin-recovery-toggle {
  justify-self: start;
  width: max-content;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 0.84rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.publication-pin-recovery-toggle:hover,
.publication-pin-recovery-toggle:focus-visible {
  color: var(--text);
}

.publication-pin-recovery {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.publication-pin-recovery[hidden] {
  display: none;
}

.publication-pin-recovery p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.publication-pin-recovery .secondary-action {
  justify-self: start;
}

.publication-pin-recovery-status[data-status="success"] {
  color: var(--success);
}

.publication-pin-recovery-status[data-status="error"] {
  color: var(--danger);
}

.publication-pin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.audit-log-list {
  display: grid;
  gap: 8px;
}

.audit-log-entry {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.audit-log-entry strong {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
}

.audit-log-entry span,
.audit-log-entry small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.audit-log-entry[data-result="failure"] {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
}

.superadmin-dashboard-status {
  min-height: 1.4rem;
  margin: 0 0 14px;
}

.superadmin-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.superadmin-stat {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.superadmin-stat span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.superadmin-stat strong {
  color: var(--text);
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.superadmin-section {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.superadmin-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.superadmin-section-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 500;
}

.superadmin-table-shell {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.superadmin-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  table-layout: fixed;
}

.superadmin-table th,
.superadmin-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.superadmin-table th {
  color: var(--muted);
  background: var(--surface-2);
  font-size: 0.74rem;
  font-weight: 500;
}

.superadmin-table th:first-child {
  width: 34%;
}

.superadmin-table th:last-child {
  width: 18%;
}

.superadmin-table tbody tr:last-child td {
  border-bottom: 0;
}

.superadmin-table td {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.superadmin-public-page {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.superadmin-public-page a {
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 500;
  text-underline-offset: 3px;
}

.superadmin-public-page small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.superadmin-table-empty {
  padding: 22px 12px !important;
  color: var(--muted) !important;
  text-align: center !important;
}

.superadmin-filters {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.superadmin-filters label {
  min-width: 180px;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.74rem;
}

.superadmin-filters select {
  min-height: 38px;
}

.superadmin-audit-log {
  max-height: 720px;
  overflow-y: auto;
  padding-right: 4px;
}

.public-admin-panel {
  max-width: 920px;
  margin: 0 auto 18px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.public-admin-panel[hidden] {
  display: none;
}

.public-admin-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.public-admin-panel h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 400;
}

.public-admin-panel p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 400;
  line-height: 1.45;
}

.public-admin-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.public-admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.public-admin-item.is-orphan {
  border-color: var(--danger-line);
}

.public-admin-item-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.public-admin-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.public-admin-title strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.25;
}

.public-admin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 400;
}

.public-admin-meta {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.4;
}

.public-admin-slug {
  overflow-wrap: anywhere;
  color: var(--text-soft);
  background: transparent;
  font-size: 0.72rem;
}

.public-admin-delete {
  flex: 0 0 auto;
}

.public-preview {
  --text-color: var(--preview-text);
  --border-color: rgba(255, 255, 255, 0.3);
  --focus-color: var(--preview-highlight, #baffbb);
  --credo-color: #58db58;
  --font-public: var(--font-public-sheet);
  --public-text-size: 20px;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem 2.25rem;
  color: var(--preview-text);
  background: var(--preview-bg);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-public-sheet);
  font-size: var(--public-text-size);
  line-height: 1.6;
}

.public-preview * {
  font-family: inherit;
}

.preview-public-header {
  padding: 0 1rem 2rem;
  text-align: center;
}

.preview-public-logo {
  display: block;
  width: clamp(86px, 16vw, 126px);
  height: auto;
  margin: 0 auto 1rem;
  border-radius: 8px;
}

.preview-public-header h1 {
  margin: 0 0 0.5rem;
  color: var(--preview-text);
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.25;
}

.public-preview .paroisse-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin: 0 0 1rem;
  padding: 0.18rem 0.9rem;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(174, 186, 207, 0.16);
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.preview-public-main {
  max-width: 800px;
  margin: 0 auto;
}

.public-preview .liturgy-accordion {
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
}

.public-preview .public-announcements {
  position: relative;
  margin-top: 2.25rem;
  padding: 2rem 1.5rem 1.35rem;
  border: 2px solid var(--focus-color);
  border-radius: 8px;
}

.public-preview .public-announcements-label {
  position: absolute;
  top: 0;
  left: 50%;
  margin: 0;
  padding: 0.32rem 0.9rem;
  color: var(--focus-contrast, #000000);
  background: var(--focus-color);
  border-radius: 3px;
  font-size: 0.85em;
  font-weight: 700;
  line-height: 1.2;
  transform: translate(-50%, -50%);
}

.public-preview .public-announcements-content p {
  margin: 0 0 1rem;
  line-height: 1.5;
  white-space: pre-line;
}

.public-preview .public-announcements-content p:last-child {
  margin-bottom: 0;
}

.public-preview .accordion-item {
  background-color: transparent;
  border-bottom: 1px solid var(--border-color);
}

.public-preview .accordion-item:last-child {
  border-bottom: 0;
}

.public-preview .accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
  background: transparent;
  border: 0;
  text-align: left;
  font-size: var(--public-text-size);
  font-weight: 400;
  line-height: 1.5;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.public-preview .accordion-label,
.public-preview .accordion-trigger > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(180px, max-content) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(4rem, 18vw, 13rem);
}

.public-preview .section-title-header {
  min-width: 0;
}

.public-preview .song-title-header {
  display: inline-block;
  min-width: 0;
  margin-left: 0;
  opacity: 0.9;
  font-size: 0.9em;
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
}

.public-preview .accordion-trigger:hover {
  opacity: 0.8;
}

.public-preview .accordion-trigger[aria-expanded="true"] {
  color: var(--focus-color);
  background-color: transparent;
}

.public-preview .icon {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-left: 10px;
  transition: transform 0.3s ease;
}

.public-preview .icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-right: 4px solid currentColor;
  border-bottom: 4px solid currentColor;
  transform: translate(-50%, -65%) rotate(45deg);
  transform-origin: center;
}

.public-preview .accordion-trigger[aria-expanded="true"] .icon {
  transform: rotate(180deg);
}

.public-preview .accordion-panel {
  max-height: 0;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.2);
  transition: max-height 0.2s ease-out;
}

.public-preview .panel-content {
  padding: 1.5rem;
  font-size: var(--public-text-size);
  line-height: 1.5;
}

.public-preview .panel-content p {
  margin: 0 0 1rem;
  line-height: 1.5;
  white-space: pre-line;
}

.public-preview .chant-refrain {
  display: block;
  margin-bottom: 1rem;
  padding-left: 10px;
  color: var(--focus-color);
  border-left: 3px solid var(--focus-color);
  font-weight: 400;
}

.public-preview .credo-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.public-preview .credo-btn {
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: var(--text-color);
  background: transparent;
  border: 2px solid var(--credo-color);
  border-radius: 20px;
  font-size: var(--public-text-size);
  font-weight: 400;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.public-preview .credo-btn:hover {
  background-color: rgba(88, 219, 88, 0.2);
}

.public-preview .credo-btn.active {
  color: #ffffff;
  background-color: var(--credo-color);
  border-color: var(--credo-color);
}

.public-preview .credo-text {
  display: none;
  animation: public-preview-fade-in 0.5s;
}

.public-preview .credo-text.visible {
  display: block;
}

.public-preview .public-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  text-align: center;
}

.song-source-note {
  padding: 9px 11px;
  color: var(--text-soft);
  background: var(--surface-2);
  border-left: 3px solid var(--border-strong);
}

.song-import-dialog {
  width: min(1220px, calc(100vw - 32px));
  max-width: none;
  height: min(860px, calc(100vh - 32px));
  max-height: none;
  margin: auto;
  padding: 0;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.song-import-dialog::backdrop {
  background: rgba(15, 16, 19, 0.66);
}

body.song-pdf-import-open {
  overflow: hidden;
}

.song-import-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.song-import-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.song-import-header h2,
.song-import-progress-stage h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.25;
}

.song-import-icon-action {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: inline-grid;
  place-items: center;
  color: var(--text-soft);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.song-import-icon-action:hover {
  color: var(--text);
  background: var(--surface-2);
}

.song-import-stage {
  min-height: 0;
  flex: 1 1 auto;
  padding: 20px;
  overflow: auto;
}

.song-import-drop-zone {
  min-height: 190px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: 16px;
  padding: 28px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.song-import-drop-zone:hover,
.song-import-drop-zone.is-dragging {
  background: var(--accent-soft);
  border-color: var(--text-soft);
}

.song-import-drop-zone > .ui-icon {
  width: 48px;
  height: 48px;
  color: var(--text-soft);
}

.song-import-drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.song-import-drop-zone span,
.song-import-drop-zone strong,
.song-import-drop-zone small {
  min-width: 0;
  display: block;
  overflow-wrap: anywhere;
}

.song-import-drop-zone small {
  margin-top: 5px;
  color: var(--muted);
}

.song-import-rights {
  margin-top: 16px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.song-import-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.song-import-progress-stage {
  display: grid;
  grid-template-columns: 72px minmax(0, 520px);
  align-content: center;
  justify-content: center;
  gap: 18px;
}

.song-import-progress-stage[hidden] {
  display: none;
}

.song-import-progress-stage > button {
  grid-column: 2;
  justify-self: start;
}

.song-import-progress-visual {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.song-import-progress-visual .ui-icon {
  width: 34px;
  height: 34px;
}

.song-import-progress-stage p {
  margin: 7px 0 13px;
  color: var(--muted);
}

.song-import-progress-stage progress {
  width: 100%;
  height: 10px;
  accent-color: var(--accent);
}

.song-import-review-stage {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.song-import-review-stage[hidden] {
  display: none;
}

.song-import-review-toolbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.song-import-review-toolbar > div {
  min-width: 0;
}

.song-import-review-toolbar strong,
.song-import-review-toolbar span {
  display: block;
  overflow-wrap: anywhere;
}

.song-import-review-toolbar span {
  color: var(--muted);
  font-size: 0.8rem;
}

.song-import-select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.song-import-review-layout {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(230px, 290px) minmax(0, 1fr);
  overflow: hidden;
}

.song-import-candidate-pane {
  min-height: 0;
  overflow: auto;
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.song-import-candidate-list {
  display: grid;
}

.song-import-candidate-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: stretch;
  border-bottom: 1px solid var(--border);
}

.song-import-candidate-row.active {
  background: var(--accent-soft);
}

.song-import-candidate-check {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--border);
}

.song-import-candidate-button {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 10px;
  color: var(--text);
  background: transparent;
  border: 0;
  text-align: left;
}

.song-import-candidate-button:hover {
  background: var(--surface-2);
}

.song-import-candidate-button strong,
.song-import-candidate-button span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.song-import-candidate-button strong {
  font-size: 0.86rem;
  line-height: 1.25;
}

.song-import-candidate-button span {
  color: var(--muted);
  font-size: 0.75rem;
}

.song-import-candidate-button .is-duplicate {
  color: var(--warning);
}

.song-import-editor-pane {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(250px, 34%) minmax(0, 1fr);
  overflow: hidden;
}

.song-import-source-preview {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
  border-right: 1px solid var(--border);
}

.song-import-preview-toolbar {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.song-import-preview-toolbar select {
  width: auto;
  max-width: 120px;
}

.song-import-canvas-frame {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding: 12px;
}

.song-import-canvas-frame canvas {
  width: 100%;
  height: auto;
  display: block;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.song-import-candidate-form {
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.song-import-candidate-status {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.song-import-candidate-status span:not(:empty) {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  color: var(--text-soft);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem;
}

#songImportDuplicateStatus:not(:empty) {
  color: var(--warning);
}

.song-import-warnings {
  display: grid;
  gap: 6px;
}

.song-import-warning {
  margin: 0;
  padding: 8px 10px;
  color: var(--warning);
  background: var(--surface-2);
  border-left: 3px solid currentColor;
  font-size: 0.78rem;
}

.song-import-review-stage > .form-note,
.song-import-review-stage > .song-import-footer {
  flex: 0 0 auto;
  margin: 0;
  padding: 10px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.song-import-review-stage > .song-import-footer {
  justify-content: space-between;
}

@keyframes public-preview-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 236px minmax(0, 1fr);
  }

  .two-pane {
    grid-template-columns: minmax(220px, 310px) minmax(0, 1fr);
  }

  .song-import-editor-pane {
    grid-template-columns: minmax(220px, 30%) minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .main-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-item {
    justify-content: center;
    text-align: center;
  }

  .nav-item::before {
    display: none;
  }

  .session-box {
    display: grid;
    grid-template-columns: 1fr auto auto auto auto;
    align-items: center;
    gap: 8px;
  }

  .session-box span,
  .session-legal-link,
  .ghost-action {
    margin: 0;
  }

  .two-pane {
    grid-template-columns: 1fr;
  }

  .parish-toolbar {
    grid-template-columns: 1fr;
  }

  .parish-toolbar-actions {
    justify-content: stretch;
  }

  .list-pane {
    position: static;
    max-height: none;
  }

  .public-admin-panel-header,
  .public-admin-item {
    align-items: stretch;
    flex-direction: column;
  }

  .superadmin-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .superadmin-audit-header,
  .superadmin-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .superadmin-filters,
  .superadmin-filters label {
    width: 100%;
  }

  .public-admin-delete {
    width: 100%;
  }

  .song-import-editor-pane {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .song-import-source-preview {
    min-height: 260px;
    max-height: 340px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .song-import-candidate-form {
    overflow: visible;
  }
}

@media (max-width: 760px) {
  .song-import-dialog {
    width: calc(100vw - 12px);
    height: calc(100vh - 12px);
  }

  .song-import-header,
  .song-import-stage {
    padding: 14px;
  }

  .song-import-drop-zone {
    min-height: 150px;
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 18px;
  }

  .song-import-drop-zone > .ui-icon {
    width: 36px;
    height: 36px;
  }

  .song-import-progress-stage {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .song-import-progress-stage > button {
    grid-column: 1;
    justify-self: stretch;
  }

  .song-import-progress-visual {
    width: 58px;
    height: 58px;
  }

  .song-import-review-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .song-import-review-layout {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .song-import-candidate-pane {
    min-height: 150px;
    max-height: 210px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .song-import-editor-pane {
    overflow: visible;
  }

  .song-import-review-stage > .song-import-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .login-home-link {
    top: 16px;
    left: 16px;
    min-height: 36px;
    padding: 0 1px 4px;
    font-size: 0.8rem;
  }

  .login-shell .login-theme-toggle {
    top: 16px;
    right: 16px;
  }

  .login-panel {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }

  .login-copy {
    align-items: flex-start;
    min-height: auto;
    gap: 34px;
    padding: 78px 22px 38px;
  }

  .login-copy .brand-row {
    gap: 14px;
  }

  .login-copy .brand-mark {
    width: 78px;
    height: 78px;
  }

  .login-brand-text .kicker {
    font-size: clamp(1.08rem, 5vw, 1.5rem);
  }

  .login-brand-text h1 {
    font-size: clamp(2.1rem, 12vw, 3.35rem);
  }

  .login-promises {
    gap: 9px;
    margin-top: -14px;
    font-size: 0.88rem;
  }

  .login-gospel-quote {
    margin-top: -16px;
    font-size: clamp(0.98rem, 4.2vw, 1.14rem);
  }

  .workspace {
    padding: 16px;
  }

  .login-shell {
    padding: 0;
  }

  .login-form {
    width: min(520px, calc(100% - 32px));
    padding: 42px 0 32px;
  }

  .login-form-header {
    padding-bottom: 30px;
  }

  .login-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .view-header,
  .section-card-header,
  .header-actions,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions,
  .form-actions,
  .section-actions {
    width: 100%;
  }

  .primary-action,
  .secondary-action,
  .danger-action,
  .mini-action {
    width: 100%;
  }

  .main-nav,
  .form-grid,
  .session-box {
    grid-template-columns: 1fr;
  }

  .superadmin-summary {
    grid-template-columns: 1fr;
  }

  .nav-item {
    justify-content: flex-start;
    text-align: left;
  }

  .nav-item::before {
    display: block;
  }

  .public-preview {
    --public-text-size: 20px;
    padding: 1.35rem 0.8rem 1.55rem;
  }

  .preview-public-header {
    padding: 0 0.5rem 1.5rem;
  }

  .preview-public-header h1 {
    font-size: 1.38rem;
  }

  .preview-public-logo {
    width: 92px;
  }

  .public-preview .paroisse-title {
    min-height: 30px;
    padding: 0.16rem 0.78rem;
    font-size: 0.86rem;
  }

  .public-preview .accordion-trigger {
    padding: 1.15rem;
  }

  .public-preview .accordion-label,
  .public-preview .accordion-trigger > span:first-child {
    grid-template-columns: minmax(120px, max-content) minmax(0, 1fr);
    column-gap: 1.75rem;
  }

  .public-preview .panel-content {
    padding: 1.2rem;
  }
}
