:root {
  color-scheme: light;
  --ink: #182238;
  --ink-soft: #42506a;
  --muted: #6d778a;
  --line: #dfe4ec;
  --line-strong: #cbd3df;
  --surface: #ffffff;
  --surface-soft: #f6f7fa;
  --surface-raised: #fbfbfd;
  --success: #176b4d;
  --success-soft: #e8f5ef;
  --warning: #965f06;
  --warning-soft: #fff4d9;
  --danger: #a7353e;
  --danger-soft: #fbeaec;
  --info-soft: #edf3ff;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(24, 34, 56, 0.05), 0 7px 24px rgba(24, 34, 56, 0.05);
  --shadow-lg: 0 24px 70px rgba(24, 34, 56, 0.2);
  --sidebar-width: 252px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--surface-soft);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

a {
  color: inherit;
}

svg {
  flex: 0 0 auto;
}

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

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

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.08), transparent 32%),
    linear-gradient(180deg, #1c2943 0%, #111a2c 100%);
}

.brand {
  display: flex;
  min-height: 102px;
  align-items: center;
  gap: 12px;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

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

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  overflow: hidden;
  font-size: 0.94rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small {
  margin-top: 3px;
  color: #aeb9cc;
  font-size: 0.74rem;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 11px;
  background: var(--accent);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.18);
  transform: rotate(3deg);
}

.brand-mark span {
  position: absolute;
  width: 15px;
  height: 2px;
  border-radius: 99px;
  background: #fff;
}

.brand-mark span:nth-child(1) {
  transform: translateY(-5px);
}

.brand-mark span:nth-child(2) {
  width: 20px;
}

.brand-mark span:nth-child(3) {
  transform: translateY(5px);
}

.brand-mark.large {
  width: 48px;
  height: 48px;
  border-color: color-mix(in srgb, var(--accent) 45%, white);
}

.main-nav {
  display: grid;
  gap: 5px;
  padding: 22px 12px;
}

.nav-item {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border-radius: 10px;
  color: #b8c3d5;
  font-size: 0.91rem;
  font-weight: 650;
  text-decoration: none;
  transition: 140ms ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-item.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 3px 0 var(--accent-soft);
}

.sidebar-user {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user .avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 0.85rem;
  font-weight: 800;
}

.sidebar-user strong,
.sidebar-user small {
  display: block;
  max-width: 125px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user strong {
  font-size: 0.82rem;
}

.sidebar-user small {
  color: #9eabc0;
  font-size: 0.69rem;
}

.sidebar-user form {
  margin: 0;
}

.app-shell {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.app-main {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 40px 44px 72px;
}

.mobile-header {
  display: none;
}

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

.page-header h1,
.dashboard-header h1 {
  margin: 4px 0 8px;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.page-header p,
.dashboard-header p {
  max-width: 720px;
  margin: 0;
  color: var(--ink-soft);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:focus-visible,
.icon-button:focus-visible,
.text-link:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 25%, transparent);
  outline-offset: 2px;
}

.button-primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 23%, transparent);
}

.button-primary:hover:not(:disabled) {
  background: var(--accent-strong);
}

.button-secondary {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--surface);
}

.button-secondary:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 4%, white);
}

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

.button-small {
  min-height: 36px;
  padding: 0 13px;
  font-size: 0.82rem;
}

.button-block {
  width: 100%;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.text-link,
.table-link,
.back-link {
  color: var(--accent-strong);
  font-weight: 750;
  text-decoration: none;
}

.text-link {
  padding: 0;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: none;
  font-size: 0.88rem;
  cursor: pointer;
}

.table-link:hover,
.back-link:hover,
.text-link:hover {
  color: var(--accent);
}

.back-link {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.82rem;
}

.back-link::before {
  content: "‹";
  margin-right: 5px;
}

.dashboard-header {
  display: flex;
  min-height: 170px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin: -8px 0 34px;
  padding: 30px 34px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 15%, var(--line));
  border-radius: var(--radius-lg);
  background:
    linear-gradient(105deg, color-mix(in srgb, var(--accent) 8%, white), white 55%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.completion-ring {
  --ring-size: 112px;
  position: relative;
  display: grid;
  width: var(--ring-size);
  height: var(--ring-size);
  flex: 0 0 var(--ring-size);
  place-content: center;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--completion) * 1%), var(--line) 0);
  text-align: center;
}

.completion-ring::before {
  position: absolute;
  inset: 9px;
  border-radius: inherit;
  background: #fff;
  content: "";
}

.completion-ring strong,
.completion-ring span {
  position: relative;
}

.completion-ring strong {
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.completion-ring span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.section-heading,
.card-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-heading {
  margin: 34px 0 17px;
}

.section-heading h2,
.card-heading h2 {
  margin: 0 0 3px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.section-heading p,
.card-heading p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 18px;
}

.ministry-card,
.content-card,
.metric,
.content-list-card,
.invite-result {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.ministry-card {
  display: flex;
  min-height: 320px;
  flex-direction: column;
  padding: 23px;
  border-radius: var(--radius);
}

.ministry-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ministry-card h2 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}

.ministry-card > p {
  min-height: 74px;
  margin: 20px 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.ministry-card > .button {
  align-self: flex-start;
  margin-top: auto;
}

.status {
  display: inline-flex;
  width: max-content;
  min-height: 27px;
  align-items: center;
  padding: 0 9px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-not_started,
.status-inactive {
  color: #5d6572;
  background: #eef0f4;
}

.status-draft {
  color: var(--warning);
  background: var(--warning-soft);
}

.status-submitted,
.status-active {
  color: var(--success);
  background: var(--success-soft);
}

.progress-wrap {
  margin: 4px 0 19px;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.73rem;
}

.progress-copy strong {
  color: var(--ink-soft);
}

.progress-track,
.table-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #e9ecf2;
}

.progress-track span,
.table-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 220ms ease;
}

.card-meta {
  display: flex;
  margin: -5px 0 21px;
  color: var(--muted);
  font-size: 0.73rem;
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.empty-state,
.error-state {
  padding: 64px 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
  background: var(--surface);
}

.empty-state > div {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 15px;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-pale);
}

.empty-state h2,
.error-state h1 {
  margin: 0 0 8px;
}

.empty-state p,
.error-state p {
  margin: 0 0 22px;
  color: var(--muted);
}

.notice {
  margin: 0 0 22px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.9rem;
}

.notice ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.notice-success {
  border-color: #b9dfcf;
  color: var(--success);
  background: var(--success-soft);
}

.notice-error {
  border-color: #efc2c6;
  color: var(--danger);
  background: var(--danger-soft);
}

.notice-info {
  border-color: #cad8f4;
  color: #315b9a;
  background: var(--info-soft);
}

.content-card {
  margin-bottom: 22px;
  padding: 24px;
  border-radius: var(--radius);
}

.content-card .card-heading {
  margin-bottom: 20px;
}

.narrow-card {
  max-width: 760px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.metric {
  padding: 20px;
  border-radius: var(--radius);
}

.metric span,
.metric small,
.metric strong {
  display: block;
}

.metric span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
  text-transform: uppercase;
}

.metric strong {
  margin: 7px 0 2px;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.metric small {
  color: var(--muted);
  font-size: 0.75rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td strong,
td small {
  display: block;
}

td small {
  max-width: 560px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.empty-cell {
  padding: 36px;
  color: var(--muted);
  text-align: center;
}

.table-progress {
  width: 95px;
  margin-bottom: 5px;
}

.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 20px;
}

.filter-bar label {
  min-width: 180px;
}

.filter-bar .text-link {
  margin: 0 0 10px 4px;
}

.stack-form {
  display: grid;
  gap: 18px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

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

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label,
fieldset {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 750;
}

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

legend {
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 0.84rem;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 7px;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  font-size: 0.9rem;
  font-weight: 480;
  transition: border 120ms ease, box-shadow 120ms ease;
}

input,
select {
  min-height: 44px;
}

textarea {
  min-height: 120px;
  line-height: 1.55;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
}

input[readonly] {
  color: var(--muted);
  background: var(--surface-soft);
}

label small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 480;
}

.form-section-title {
  margin: 12px 0 -2px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 1rem;
}

.toggle-row,
.checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toggle-row label,
.checkbox-list label {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

.toggle-row input,
.checkbox-list input {
  width: 17px;
  height: 17px;
  min-height: auto;
  margin: 0;
  padding: 0;
}

.code-textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
}

.color-input {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
}

.color-input input[type="color"] {
  padding: 5px;
}

.order-chip {
  display: inline-grid;
  min-width: 31px;
  height: 27px;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface-soft);
  font-weight: 750;
}

.content-list {
  display: grid;
  gap: 12px;
}

.content-list-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px;
  border-radius: var(--radius);
}

.content-list-card h3 {
  margin: 0 0 5px;
  font-size: 1.15rem;
}

.content-list-card p {
  max-width: 760px;
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.content-list-card > div > span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.75rem;
}

.invite-result {
  margin-bottom: 22px;
  padding: 25px;
  border-color: color-mix(in srgb, var(--accent) 25%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 4%, white);
}

.invite-result h2 {
  margin: 0 0 5px;
}

.invite-result p {
  margin: 0;
  color: var(--muted);
}

.copy-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 16px;
}

.copy-field input {
  margin: 0;
}

.auth-page {
  background:
    radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 32%),
    radial-gradient(circle at 10% 90%, rgba(38, 73, 124, 0.16), transparent 34%),
    #121c30;
}

.auth-page .app-shell {
  margin-left: 0;
}

.auth-main {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 34px 18px;
}

.auth-card {
  width: min(100%, 455px);
  padding: 38px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
}

.auth-card-wide {
  width: min(100%, 720px);
}

.auth-brand {
  margin-bottom: 22px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.auth-card .lede {
  margin: 0 0 24px;
  color: var(--ink-soft);
}

.auth-help {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

.mfa-setup-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}
.mfa-setup-grid h2 { font-size: 1.1rem; }
.mfa-qr { display: block; max-width: 100%; height: auto; background: #fff; border-radius: 8px; }
.mfa-key { font-family: monospace; font-size: .85rem; }
.mfa-cancel { margin-top: 16px; }
.mfa-recovery-list { min-width: 0; max-width: 100%; font-family: monospace; font-size: .78rem; white-space: pre; overflow-x: auto; }
@media (max-width: 640px) {
  .mfa-setup-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .mfa-qr { margin-inline: auto; }
  .copy-field:has(.mfa-recovery-list) { flex-wrap: wrap; }
  .mfa-recovery-list { flex-basis: 100%; width: 100%; }
}

.review-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.review-topbar h1 {
  margin: 0;
  font-size: 2.35rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.review-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-layout {
  display: grid;
  grid-template-columns: 230px minmax(420px, 1fr) minmax(340px, 410px);
  align-items: start;
  gap: 18px;
}

.step-sidebar,
.question-panel,
.reference-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.step-sidebar {
  position: sticky;
  top: 18px;
  padding: 17px;
}

.step-sidebar-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.step-sidebar > .progress-wrap {
  margin: 10px 0 15px;
}

.step-sidebar .progress-copy {
  display: none;
}

.step-sidebar nav {
  display: grid;
  gap: 5px;
}

.step-link {
  display: grid;
  grid-template-columns: 29px 1fr;
  min-height: 43px;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.74rem;
  text-decoration: none;
}

.step-link:hover,
.step-link.is-current {
  color: var(--ink);
  background: var(--surface-soft);
}

.step-link > span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 800;
}

.step-link.is-current > span {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.step-link.is-complete:not(.is-current) > span {
  border-color: #b9dfcf;
  color: var(--success);
  background: var(--success-soft);
}

.question-panel {
  min-height: 700px;
  padding: clamp(24px, 4vw, 44px);
}

.question-count {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.question-heading {
  max-width: 760px;
  margin-bottom: 30px;
}

.question-heading h2 {
  margin: 6px 0 11px;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.28;
  letter-spacing: -0.032em;
}

.question-form {
  display: flex;
  min-height: 480px;
  flex-direction: column;
}

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

.choice-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr;
  min-height: 78px;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  transition: 120ms ease;
}

.choice-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.choice-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-pale);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 10%, transparent);
}

.choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-number {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--muted);
  background: #fff;
  font-weight: 800;
}

.choice-card:has(input:checked) .choice-number {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.selection-toolbar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.76rem;
}

.selection-toolbar strong {
  color: var(--ink-soft);
}

.initiative-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 375px;
  padding: 2px;
  overflow-y: auto;
  scrollbar-color: var(--line-strong) transparent;
}

.initiative-choice {
  position: relative;
  display: grid;
  grid-template-columns: 27px 1fr;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

.initiative-choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-pale);
}

.initiative-choice input {
  position: absolute;
  opacity: 0;
}

.checkbox-mark {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: transparent;
  background: #fff;
}

.initiative-choice:has(input:checked) .checkbox-mark {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.initiative-choice strong,
.initiative-choice small {
  display: block;
}

.initiative-choice strong {
  font-size: 0.8rem;
  line-height: 1.25;
}

.initiative-choice small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 550;
}

.note-field {
  display: block;
  margin-top: 20px;
}

.optional {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
}

.field-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.7rem;
}

.question-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: auto;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.save-state {
  color: var(--muted);
  font-size: 0.72rem;
}

.save-state.is-saving {
  color: var(--warning);
}

.save-state.is-saved {
  color: var(--success);
}

.save-state.is-error {
  color: var(--danger);
}

.button-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.reference-panel {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: hidden;
}

.reference-header {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(120deg, var(--accent-pale), white 68%);
}

.reference-header h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.reference-close,
.reference-open {
  display: none;
}

.reference-scroll {
  max-height: calc(100vh - 119px);
  overflow-y: auto;
  scrollbar-color: var(--line-strong) transparent;
}

.reference-section {
  padding: 19px 20px;
  border-bottom: 1px solid var(--line);
}

.reference-section:last-child {
  border-bottom: 0;
}

.reference-section > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.83rem;
}

.reference-section h3 {
  margin: 0 0 12px;
  font-size: 0.9rem;
}

.reference-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 15px 0 0;
}

.reference-summary div {
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.reference-summary dt {
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 800;
  text-transform: uppercase;
}

.reference-summary dd {
  margin: 3px 0 0;
  font-size: 0.77rem;
  font-weight: 720;
}

.resource-summary > div {
  margin-top: 8px;
  padding: 11px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--surface-soft);
}

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

.resource-summary span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 760;
  text-transform: uppercase;
}

.resource-summary strong {
  margin-top: 4px;
  font-size: 0.76rem;
}

.insight-detail,
.initiative-reference {
  border-top: 1px solid var(--line);
}

.insight-detail:first-of-type,
.initiative-reference:first-of-type {
  border-top: 0;
}

.insight-detail summary,
.initiative-reference summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  list-style: none;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 730;
  cursor: pointer;
}

.insight-detail summary::-webkit-details-marker,
.initiative-reference summary::-webkit-details-marker {
  display: none;
}

.insight-detail summary span,
.details-plus {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 450;
  transition: 120ms ease;
}

.insight-detail[open] > summary > span:last-child,
.initiative-reference[open] > summary > span:last-child {
  transform: rotate(45deg);
}

.insight-detail p {
  margin: 0 0 13px;
  color: var(--ink-soft);
  font-size: 0.75rem;
  white-space: pre-line;
}

.reference-section-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: -19px -20px 8px;
  padding: 16px 20px 10px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
}

.reference-section-heading > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.reference-section-heading > div > span {
  color: var(--muted);
  font-size: 0.65rem;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field svg {
  position: absolute;
  left: 10px;
  color: var(--muted);
  pointer-events: none;
}

.search-field input {
  min-height: 37px;
  margin: 0;
  padding: 7px 9px 7px 34px;
  font-size: 0.75rem;
}

.initiative-reference summary > span:first-child {
  min-width: 0;
}

.initiative-reference summary strong,
.initiative-reference summary small {
  display: block;
}

.initiative-reference summary strong {
  overflow: hidden;
  font-size: 0.77rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.initiative-reference summary small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 600;
}

.initiative-reference-body {
  padding-bottom: 14px;
}

.initiative-reference-body > p {
  margin: 0 0 9px;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.reference-note {
  padding: 8px;
  border-radius: 7px;
  background: var(--surface-soft);
}

.reference-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.reference-table {
  min-width: 330px;
  font-size: 0.65rem;
}

.reference-table th,
.reference-table td {
  padding: 7px 8px;
}

.empty-filter {
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

.reference-backdrop {
  display: none;
}

.submitted-banner {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 17px;
  padding: 13px 15px;
  border: 1px solid #b9dfcf;
  border-radius: 10px;
  color: var(--success);
  background: var(--success-soft);
}

.submitted-banner strong,
.submitted-banner span {
  display: block;
}

.submitted-banner span {
  color: #3d7b66;
  font-size: 0.76rem;
}

.response-header p .status {
  margin-left: 7px;
  vertical-align: middle;
}

.response-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 980px;
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}

.response-meta > div {
  padding: 13px 15px;
  background: var(--surface);
}

.response-meta span,
.response-meta time {
  display: block;
}

.response-meta > div > span:first-child {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.response-meta time,
.response-meta .muted {
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.response-document {
  max-width: 980px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.response-answer {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 16px;
  padding: 26px 28px;
  border-bottom: 1px solid var(--line);
}

.response-answer:last-child {
  border-bottom: 0;
}

.response-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--accent-strong);
  background: var(--accent-pale);
  font-size: 0.76rem;
  font-weight: 800;
}

.response-answer h2 {
  max-width: 760px;
  margin: 3px 0 17px;
  font-size: 1rem;
  line-height: 1.4;
}

.answer-rating {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.answer-rating strong {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--accent);
}

.answer-rating span {
  font-weight: 720;
}

.answer-prose {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.answer-note {
  margin-top: 14px;
}

.answer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.answer-tags > span:not(.muted) {
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 8px;
  color: var(--accent-strong);
  background: var(--accent-pale);
  font-size: 0.78rem;
  font-weight: 720;
}

.error-state > span {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 4rem;
  font-weight: 850;
  letter-spacing: -0.08em;
}

.print-page {
  background: #fff;
}

.print-page .app-shell {
  margin-left: 0;
}

.print-page .app-main {
  max-width: 980px;
}

.print-brand {
  color: var(--ink) !important;
  font-weight: 800;
}

@media (max-width: 1260px) {
  .review-layout {
    grid-template-columns: 205px minmax(0, 1fr);
  }

  .reference-open,
  .reference-close {
    display: inline-grid;
  }

  .reference-open {
    display: inline-flex;
  }

  .reference-panel {
    position: fixed;
    inset: 18px 18px 18px auto;
    z-index: 80;
    width: min(94vw, 470px);
    max-height: none;
    transform: translateX(calc(100% + 36px));
    transition: transform 180ms ease;
    box-shadow: var(--shadow-lg);
  }

  .reference-panel.is-open {
    transform: translateX(0);
  }

  .reference-scroll {
    max-height: calc(100vh - 119px);
  }

  .reference-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: block;
    visibility: hidden;
    background: rgba(12, 19, 32, 0.48);
    opacity: 0;
    transition: opacity 180ms ease, visibility 180ms ease;
  }

  .reference-backdrop.is-open {
    visibility: visible;
    opacity: 1;
  }
}

@media (max-width: 1040px) {
  .app-sidebar {
    width: 272px;
    transform: translateX(-100%);
    transition: transform 180ms ease;
    box-shadow: var(--shadow-lg);
  }

  .app-sidebar.is-open {
    transform: translateX(0);
  }

  .app-shell {
    margin-left: 0;
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    min-height: 60px;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
  }

  .mobile-brand {
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
  }

  .mobile-header .icon-button:hover {
    background: var(--surface-soft);
  }

  .app-main {
    padding: 30px 24px 60px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .app-main {
    padding: 24px 16px 50px;
  }

  .page-header,
  .dashboard-header,
  .review-topbar,
  .question-footer,
  .content-list-card {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-header {
    padding: 24px;
  }

  .completion-ring {
    --ring-size: 88px;
    align-self: flex-end;
    margin-top: -70px;
  }

  .metric-grid,
  .form-grid.two,
  .form-grid.three,
  .choice-grid,
  .initiative-choices,
  .response-meta {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-bar label {
    min-width: 0;
  }

  .filter-bar .text-link {
    align-self: flex-start;
    margin: 0;
  }

  .review-actions {
    justify-content: space-between;
  }

  .review-layout {
    display: block;
  }

  .step-sidebar {
    position: static;
    margin-bottom: 14px;
  }

  .step-sidebar nav {
    grid-template-columns: repeat(7, minmax(39px, 1fr));
    gap: 4px;
  }

  .step-link {
    display: grid;
    min-height: 38px;
    grid-template-columns: 1fr;
    place-items: center;
    padding: 4px;
  }

  .step-link strong {
    display: none;
  }

  .question-panel {
    min-height: 0;
    padding: 25px 20px;
  }

  .question-form {
    min-height: 520px;
  }

  .initiative-choices {
    max-height: none;
  }

  .question-footer {
    margin-top: 32px;
  }

  .button-row {
    flex-wrap: wrap;
  }

  .question-footer .button-row .button {
    flex: 1 1 130px;
  }

  .copy-field {
    grid-template-columns: 1fr;
  }

  .response-answer {
    grid-template-columns: 34px 1fr;
    padding: 22px 18px;
  }
}

@media (max-width: 520px) {
  .page-header h1,
  .dashboard-header h1 {
    font-size: 2rem;
  }

  .dashboard-header {
    min-height: 230px;
  }

  .completion-ring {
    margin-top: -20px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 27px 22px;
    border-radius: 18px;
  }

  .content-card,
  .ministry-card {
    padding: 18px;
  }

  .reference-panel {
    inset: 0;
    width: 100%;
    border: 0;
    border-radius: 0;
  }

  .reference-scroll {
    max-height: calc(100vh - 82px);
  }

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

  .review-actions .status {
    display: none;
  }
}

@media print {
  @page {
    margin: 0.6in;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 11pt;
  }

  .no-print,
  .mobile-header,
  .app-sidebar,
  .notice {
    display: none !important;
  }

  .app-shell {
    margin: 0 !important;
  }

  .app-main {
    width: auto;
    max-width: none !important;
    padding: 0 !important;
  }

  .page-header {
    margin-bottom: 18pt;
  }

  .page-header h1 {
    font-size: 24pt;
  }

  .response-meta,
  .response-document {
    max-width: none;
    border-color: #bbb;
    box-shadow: none;
  }

  .response-answer {
    break-inside: avoid;
    padding: 16pt 0;
    border-color: #ccc;
  }

  .response-number {
    border: 1px solid #999;
    color: #000;
    background: #fff;
  }

  .answer-rating strong {
    border: 1px solid #333;
    color: #000;
    background: #fff;
  }

  .answer-tags > span:not(.muted) {
    border-color: #aaa;
    color: #000;
    background: #fff;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
.source-fields { margin: 0; }
.source-fields > div { padding: 12px 0; border-bottom: 1px solid #e8e9ee; }
.source-fields dt { font-size: 12px; font-weight: 700; line-height: 1.5; margin-bottom: 6px; white-space: pre-wrap; }
.source-fields dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; font-size: 14px; }
.source-document-list { white-space: pre-wrap; line-height: 1.75; margin-bottom: 18px; }

/* Status annotations preserve original source wording and pair color with text. */
.source-status-paused { --status-bg: #fff5cb; --status-border: #dcae28; --status-ink: #614500; }
.source-status-inactive { --status-bg: #ffebeb; --status-border: #ce4747; --status-ink: #8d2424; }
.source-status-active { --status-bg: #e6f5ec; --status-border: #399666; --status-ink: #205d3d; }
.source-status-badge { display: block; width: fit-content; max-width: 100%; margin-top: 7px; padding: 4px 8px; border: 1px solid var(--status-border); border-radius: 5px; background: var(--status-bg); color: var(--status-ink); font-size: 11px; font-weight: 700; white-space: normal; }
.source-fields > .source-status-note { margin: 8px 0; padding: 10px 12px; border: 1px solid var(--status-border); border-left-width: 4px; border-radius: 6px; background: var(--status-bg); color: var(--status-ink); }
.reference-table td.source-status-note { background: var(--status-bg); color: var(--status-ink); border-left: 3px solid var(--status-border); font-weight: 700; white-space: pre-wrap; }
.ministry-leader-feedback summary small { display: block; margin-top: 4px; font-weight: 400; color: var(--muted); }
.reference-context { font-size: 12px; line-height: 1.6; color: var(--muted); }
.reference-source-links { display: flex; gap: 8px; flex-wrap: wrap; }

/* Reference cards isolate typography from the legacy accordion span rules. */
.reference-panel .reference-card {
  margin: 10px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid var(--status-border, var(--reference-outline-strong));
  border-radius: 10px;
  background: #fff;
}
.reference-panel .reference-card > summary {
  display: block;
  padding: 15px 14px;
  list-style: none;
  cursor: pointer;
  color: var(--ink);
}
.reference-panel .reference-card > summary::-webkit-details-marker { display: none; }
.reference-panel .reference-card > summary:hover { background: #f8f8fb; }
.reference-panel .reference-card > summary:focus-visible { outline: 2px solid var(--reference-outline-strong); outline-offset: -3px; }
.reference-panel .reference-card > summary > .reference-card-heading {
  display: block;
  transform: none;
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
}
.reference-panel .reference-card .reference-card-name {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}
.reference-panel .reference-card .reference-card-meta {
  display: block;
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}
.reference-panel .reference-card .reference-card-category { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); }
.reference-panel .reference-card .reference-card-action { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; font-weight: 650; color: var(--accent); }
.reference-card .reference-action-open { display: none; }
.reference-card[open] > summary .reference-action-closed { display: none; }
.reference-card[open] > summary .reference-action-open { display: inline; }
.reference-card[open] > summary .reference-card-action svg { transform: rotate(180deg); }
.reference-panel .reference-card-statuses { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.reference-panel .reference-card .source-status-badge { margin: 0; background: var(--status-bg); color: var(--status-ink); border-color: var(--status-border); font-size: 11px; line-height: 1.5; font-weight: 700; }
.reference-panel .reference-card-body { padding: 2px 14px 14px; border-top: 1px solid var(--line); }
.reference-panel .reference-feedback-answer { padding: 14px 0; border-top: 1px solid var(--line); }
.reference-panel .reference-feedback-answer h4 { margin: 0 0 10px; font-size: 12px; font-weight: 700; line-height: 1.6; color: var(--ink); }
.reference-panel .reference-feedback-answer p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.7; color: var(--ink-soft); }
.reference-panel .reference-leader-identity { margin-top: 4px; }
.reference-panel .reference-campus-section > h4 { margin: 16px 0 9px; font-size: 13px; }
.reference-panel .reference-campus { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8f9fb; }
.reference-panel .reference-campus h5, .reference-panel .reference-extra h5 { margin: 0 0 6px; color: var(--ink); font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.reference-panel .reference-campus-fields > div { padding: 8px 0; }
.reference-panel .reference-campus-fields dt { font-size: 11px; }
.reference-panel .reference-campus-fields dd { font-size: 13px; }
.reference-panel .reference-view-switch { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.reference-panel .reference-view-switch button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--reference-color); color: var(--ink-soft); font-size: 11px; font-weight: 600; }
.reference-panel .reference-view-switch button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.reference-panel .reference-extra { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.reference-panel .reference-extra > summary { display: flex; justify-content: space-between; gap: 10px; list-style: none; font-size: 12px; color: var(--ink-soft); cursor: pointer; }
.reference-panel .reference-extra > summary::-webkit-details-marker { display: none; }
.reference-panel .reference-extra[open] > summary svg { transform: rotate(180deg); }
.reference-panel .reference-extra > div { margin-top: 12px; }

.reference-panel .reference-campus-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 10px; }
.reference-panel .reference-campus-fields > [data-source-column="B"],
.reference-panel .reference-campus-fields > [data-source-column="D"],
.reference-panel .reference-campus-fields > [data-source-column="K"] { grid-column: 1 / -1; }

/* Themeable regions and layouts that fit the available width. */
.app-sidebar { background: var(--sidebar-color); color: var(--sidebar-text-color); }
.app-sidebar .brand, .app-sidebar .brand strong, .app-sidebar .brand small,
.app-sidebar .nav-item, .app-sidebar .sidebar-user, .app-sidebar .sidebar-user strong,
.app-sidebar .sidebar-user small, .app-sidebar .icon-button { color: var(--sidebar-text-color); }
.question-panel { background: var(--question-color); color: var(--question-text-color); }
.question-panel h2, .question-panel .initiative-choice strong, .question-panel label { color: var(--question-text-color); }
.question-panel .initiative-choice, .question-panel .choice-card, .question-panel textarea { background: color-mix(in srgb,var(--question-color) 92%,white); color: var(--question-text-color); }
.reference-panel, .reference-header, .reference-scroll, .reference-section-heading,
.reference-panel .reference-card { background: var(--reference-color); }
.reference-panel {
  color: var(--reference-text-color);
  --ink: var(--reference-text-color);
  --ink-soft: var(--reference-text-color);
  --muted: color-mix(in srgb,var(--reference-text-color) 75%,var(--reference-color));
  --line: var(--reference-outline);
  --line-strong: var(--reference-outline-strong);
  --surface: var(--reference-color);
  --surface-soft: var(--reference-hover);
  --surface-raised: var(--reference-hover);
}
.reference-panel .eyebrow { color: var(--reference-text-color); }
.reference-panel .reference-card > summary:hover { background: var(--reference-hover); }
.reference-panel .source-fields > div:not(.source-status-note) { border-color: var(--line); }
.reference-panel .search-field input { background: var(--reference-color); color: var(--reference-text-color); }
.reference-panel .search-field input:focus { border-color: var(--reference-outline-strong); outline-color: var(--reference-outline-strong); }
.progress-track > span, .summary-progress > span { background: var(--progress-color); }
.sidebar-collapse { position: absolute; top: 12px; right: 8px; width: 32px; height: 32px; }
.app-sidebar .brand { padding-top: 42px; }
body.sidebar-collapsed .app-sidebar { width: 76px; }
body.sidebar-collapsed .app-shell { margin-left: 76px; }
body.sidebar-collapsed .brand > span:last-child, body.sidebar-collapsed .sidebar-user > div,
body.sidebar-collapsed .main-nav .nav-item span, body.sidebar-collapsed .sidebar-user .avatar { display: none; }
body.sidebar-collapsed .brand, body.sidebar-collapsed .sidebar-user { justify-content: center; padding-left: 12px; padding-right: 12px; }
body.sidebar-collapsed .nav-item { justify-content: center; padding-left: 10px; padding-right: 10px; }
.app-main, .app-shell, .question-panel, .question-form, .review-layout > * { min-width: 0; }
.question-panel { overflow: visible; }
.question-heading h2 { font-size: clamp(1.2rem,2.2vw,1.8rem); line-height: 1.3; overflow-wrap: anywhere; }
.question-form { display: block; }
.initiative-choices { grid-template-columns: repeat(2,minmax(0,1fr)); max-height: none; overflow: visible; }
.initiative-choice { min-width: 0; }
.initiative-choice strong, .step-link strong { overflow-wrap: anywhere; }
.initiative-choice:has(input:disabled) { opacity: .6; background: var(--surface-soft); cursor: not-allowed; }
.initiative-choice:has(input:disabled) .checkbox-mark { border-style: dashed; }
.selection-conflict { color: var(--muted); }
.question-footer, .question-footer .button-row { flex-wrap: wrap; }
.question-panel textarea { max-width: 100%; min-width: 0; }
.summary-progress { display: inline-block; width: min(170px,65%); height: 7px; margin-right: 8px; border-radius: 5px; background: var(--surface-soft); overflow: hidden; vertical-align: middle; }
.summary-progress > span { display: block; height: 100%; border-radius: inherit; }
.leader-ministry-grid, .analytics-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.leader-ministry.content-card { margin: 0; }
.leader-ministry > summary { display: flex; justify-content: space-between; gap: 14px; align-items: center; cursor: pointer; list-style: none; }
.leader-ministry > summary small { display: block; margin-top: 5px; color: var(--muted); }
.leader-ministry > summary > span:last-child { color: var(--accent); font-size: 12px; white-space: nowrap; }
.leader-ministry > div { margin-top: 15px; }
.leader-answer { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.leader-answer h3 { font-size: 14px; }
.leader-answer p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.leader-overview { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.analytics-average { display: flex; align-items: center; gap: 16px; }
.analytics-average > strong { font-size: 36px; }
.analytics-average > span { color: var(--muted); }
.analytics-selections { margin-top: 18px; }
.analytics-selections summary { cursor: pointer; color: var(--accent); font-weight: 650; }
@media (min-width:1500px) { .review-layout { grid-template-columns: 200px minmax(0,1fr) minmax(330px,400px); } }
@media (min-width:1261px) and (max-width:1499px) { .review-layout { grid-template-columns: 165px minmax(0,1fr) 320px; gap: 12px; } .step-sidebar { padding: 10px; } }
@media (max-width:1040px) { body.sidebar-collapsed .app-sidebar { width: 272px; } body.sidebar-collapsed .app-shell { margin-left: 0; } body.sidebar-collapsed .brand > span:last-child,body.sidebar-collapsed .sidebar-user > div,body.sidebar-collapsed .main-nav .nav-item span,body.sidebar-collapsed .sidebar-user .avatar { display: block; } }
@media (max-width:760px) { .review-layout { grid-template-columns: minmax(0,1fr); } .step-sidebar { position: static; } .step-sidebar nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); } .initiative-choices,.leader-ministry-grid,.analytics-grid { grid-template-columns: minmax(0,1fr); } .question-panel { padding: 18px; } .question-footer { position: static; } .review-topbar { gap: 12px; flex-wrap: wrap; } .review-topbar h1 { font-size: 1.7rem; } }
@media (max-width:400px) { .step-sidebar nav { grid-template-columns: minmax(0,1fr); } .form-grid.two,.form-grid.three { grid-template-columns: minmax(0,1fr); } .app-main { padding-left: 12px; padding-right: 12px; } }
.email-preview { padding: 14px 0; border-top: 1px solid var(--line); }
.email-preview summary { cursor: pointer; color: var(--accent); font-weight: 700; }
.email-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; line-height: 1.6; }
.email-selection-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.template-tags { line-height: 2; overflow-wrap: anywhere; }
.theme-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.step-link.is-complete > span { background: var(--progress-color); color: #fff; }
.reference-panel .reference-card-body { background: var(--reference-color); }
.reference-panel .reference-campus { background: color-mix(in srgb,var(--reference-color) 92%,var(--reference-text-color)); }
.question-panel .question-heading > h2 { color: var(--question-text-color); }
.question-panel .selection-toolbar strong { color: var(--question-text-color); }

@media (max-width:760px) {
  .step-sidebar nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .step-link { grid-template-columns: 24px minmax(0,1fr); justify-items: start; gap: 6px; min-height: 46px; padding: 6px; }
  .step-link strong { display: block; font-size: 11px; line-height: 1.4; }
  .question-form { min-height: 0; }
  .choice-card, .initiative-choice { overflow-wrap: anywhere; }
}

/* Faith Church brand book: wheat, white, black, approved artwork, flat surfaces. */
:root { --faith-wheat: #D5A619; --ink: #000000; --ink-soft: #000000; --muted: #404040; --surface: #FFFFFF; --surface-soft: #FFFFFF; --surface-raised: #FFFFFF; --line: #d3d3d3; --line-strong: #707070; --shadow-sm: none; --shadow-lg: none; --radius: 8px; --radius-lg: 8px; }
html,body { background: #FFFFFF; }
.app-sidebar { background-image: none; }
.app-sidebar .brand { display: flex; flex-direction: column; gap: 0; padding: 44px 38px 26px; text-align: center; background: #D5A619; color: #000000; }
.app-sidebar .brand > span:last-child { width: 100%; margin-top: 32px; }
.app-sidebar .brand strong { color: #000000; font-size: 13px; white-space: normal; }
.app-sidebar .brand small { color: #000000; font-size: 11px; }
.faith-wordmark { display: block; width: 100%; max-width: 176px; height: auto; }
.faith-sidebar-icon { display: none; }
.app-sidebar .sidebar-collapse { z-index: 2; color: #000000; background: #D5A619; }
body.sidebar-collapsed .app-sidebar .brand { padding: 44px 16px 24px; }
body.sidebar-collapsed .faith-wordmark { display: none; }
body.sidebar-collapsed .faith-sidebar-icon { display: block; width: 40px; height: auto; }
.app-sidebar .nav-item { color: var(--sidebar-text-color); }
.app-sidebar .nav-item.is-active { background: #000000; color: #FFFFFF; box-shadow: none; border-radius: 4px; }
.app-sidebar .nav-item:hover { background: #FFFFFF; color: #000000; }
.app-sidebar .nav-item.is-active:hover { background: #000000; color: #FFFFFF; }
.faith-mobile-icon { width: 30px; height: auto; }
.mobile-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.faith-auth-logo { display: block; width: 180px; height: auto; margin: 12px auto 34px; }
.auth-page { background: #D5A619; background-image: none; }
.auth-card { border: 1px solid #000000; border-radius: 8px; background: #FFFFFF; box-shadow: none; }
.auth-card h1, .page-header h1 { font-family: inherit; font-weight: 700; text-transform: none; letter-spacing: -.025em; }
.dashboard-header { background: #FFFFFF; background-image: none; border-color: #D5A619; box-shadow: none; }
.reference-header { background: var(--reference-color); background-image: none; border-bottom: 3px solid #D5A619; }
.reference-section-heading { background: var(--reference-color); backdrop-filter: none; }
.button-primary { color: #000000; background: var(--accent); box-shadow: none; border-color: #000000; border-radius: 4px; }
.button-primary:hover { background: #000000; color: #FFFFFF; box-shadow: none; }
.button-secondary { color: #000000; background: #FFFFFF; border-color: #000000; border-radius: 4px; box-shadow: none; }
.button-secondary:hover { background: #D5A619; color: #000000; }
.text-link, .back-link, .analytics-selections summary, .email-preview summary { color: #000000; text-decoration: underline; text-underline-offset: 3px; }
.reference-panel .reference-card .reference-card-action { color: var(--reference-text-color); text-decoration: underline; text-underline-offset: 3px; }
.question-panel .initiative-choice:has(input:checked), .question-panel .choice-card:has(input:checked) { background: var(--question-color); border-color: #D5A619; box-shadow: none; border-width: 2px; }
.checkbox-mark { background: #FFFFFF; }
.initiative-choice:has(input:checked) .checkbox-mark { background: #D5A619; border-color: #000000; color: #000000; }
.step-link.is-current { background: #FFFFFF; outline: 2px solid #D5A619; }
.step-link.is-current > span, .step-link.is-complete > span { color: #000000; background: var(--progress-color); }
.reference-panel .reference-campus { background: var(--reference-color); }
.reference-panel .reference-view-switch button[aria-pressed="true"] { background: #D5A619; border-color: #000000; color: #000000; }
input:focus,select:focus,textarea:focus { box-shadow: none; outline: 2px solid #000000; outline-offset: 2px; }
input[type="checkbox"],input[type="radio"] { width: 18px; height: 18px; min-width: 18px; min-height: 18px; max-width: 18px; max-height: 18px; padding: 0; margin: 0; accent-color: #D5A619; vertical-align: middle; }
.completion-ring { background: #FFFFFF; }
.completion-ring::before { content: none; }
.completion-ring-shape { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.completion-ring-track,.completion-ring-value { fill: none; stroke-width: 6; }
.completion-ring-track { stroke: #000000; stroke-width: 1; }
.completion-ring-value { stroke: var(--progress-color); }
.faith-print-logo { display: block; width: 150px; height: auto; margin-bottom: 24px; }
@media(max-width:1040px) { body.sidebar-collapsed .faith-wordmark { display: block; } body.sidebar-collapsed .faith-sidebar-icon { display: none; } body.sidebar-collapsed .app-sidebar .brand { padding: 44px 38px 26px; } }

/* Simplified administrator editors and system typography. */
.page-header h1 { font-size: clamp(1.65rem,3vw,2.15rem); line-height: 1.2; overflow-wrap: anywhere; }
.appearance-bar { display: flex; justify-content: flex-end; padding: 14px 34px 0; }
.appearance-control { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.appearance-control button { padding: 5px 12px; min-height: 32px; border: 0; border-radius: 3px; color: var(--ink); background: transparent; font-size: 12px; font-weight: 650; cursor: pointer; }
.appearance-control button[aria-pressed="true"] { background: #D5A619; color: #000; }
.appearance-control button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.auth-page .appearance-bar { padding-bottom: 10px; }
.question-editor-list { list-style: none; margin: 0; padding: 0; }
.question-editor-list li { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; gap: 14px; align-items: start; padding: 19px 0; border-top: 1px solid var(--line); }
.question-list-number { width: 30px; height: 30px; border: 1px solid var(--line-strong); display: grid; place-items: center; border-radius: 4px; font-size: 12px; }
.editor-title-link { font-weight: 700; font-size: 15px; text-underline-offset: 3px; }
.question-editor-list p { font-size: 13px; margin: 5px 0; color: var(--ink-soft); overflow-wrap: anywhere; }
.question-editor-list small, .ministry-editor-list small { display: block; color: var(--muted); font-size: 12px; }
.editor-search { display: flex; flex-direction: column; gap: 6px; max-width: 500px; margin: 14px 0 20px; font-size: 13px; font-weight: 600; }
.ministry-editor-list article { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 0; border-top: 1px solid var(--line); }
.ministry-editor-list article > div { min-width: 0; }
.ministry-editor-list .button-row { flex-wrap: wrap; }
.admin-editor { max-width: 1080px; }
.question-editor { max-width: 900px; }
.editor-section { display: flex; flex-direction: column; gap: 18px; }
.editor-section > h2, .editor-section > h3, .editor-section > p { margin: 0; }
.editor-section h2 { font-size: 19px; }
.editor-section h3 { font-size: 15px; margin: 10px 0 0; }
.editor-section h4 { margin: 0 0 14px; font-size: 14px; }
.editor-section h5 { margin: 0 0 14px; font-size: 14px; }
.editor-section label { display: flex; flex-direction: column; gap: 7px; min-width: 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.editor-section input, .editor-section textarea, .editor-section select { width: 100%; min-width: 0; max-width: 100%; }
.editor-section input[type="checkbox"], .editor-section input[type="radio"] { width: 18px; height: 18px; min-width: 18px; min-height: 18px; max-width: 18px; max-height: 18px; flex: 0 0 18px; }
.editor-section label small { color: var(--muted); font-size: 11px; font-weight: 400; }
.editor-section label.editor-check { flex-direction: row; align-items: center; align-self: center; width: 100%; }
.editor-section .toggle-row label { flex-direction: row; align-items: center; }
.editor-section .toggle-row { flex-wrap: wrap; }
.editor-details > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; font-weight: 700; cursor: pointer; }
.editor-details > summary > span { font-size: 12px; color: var(--muted); font-weight: 400; }
.editor-details > .editor-section { margin-top: 22px; }
.editor-details .button-row { flex-wrap: wrap; }
.editor-details { scroll-margin-top: 20px; }
.editor-jump-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 20px; font-size: 13px; font-weight: 600; }
.editor-jump-links a { text-underline-offset: 4px; }
.editor-record { display: block; border: 1px solid var(--line); border-radius: 6px; margin-top: 5px; overflow: hidden; background: var(--surface); }
.editor-record > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 16px; cursor: pointer; list-style: none; }
.editor-record > summary::-webkit-details-marker { display: none; }
.editor-record > summary strong { min-width: 0; overflow-wrap: anywhere; flex: 1 1 200px; font-size: 14px; }
.editor-record-caption { font-size: 11px; font-weight: 400; color: var(--muted); }
.editor-record-action { font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.editor-record > summary > span, .editor-details > summary > span { transform: none; }
.editor-record > summary > .editor-record-action { margin-left: auto; }
.editor-record-action::after { content: " ▾"; }
.editor-record[open] > summary { border-bottom: 1px solid var(--line); }
.editor-record[open] > summary .editor-record-action::after { content: " ▴"; }
.editor-record > .editor-source-fields, .editor-record > .form-grid, .editor-record > .editor-field, .editor-record > .editor-record, .editor-record > .button { margin: 16px; }
.editor-source-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.editor-field-wide { grid-column: 1 / -1; }
.editor-campus-list { padding: 16px; }
.editor-campus { padding: 18px 0; border-top: 1px solid var(--line); }
.editor-campus .editor-source-fields { grid-template-columns: repeat(3,minmax(0,1fr)); }
.editor-file-button { position: relative; display: inline-flex !important; overflow: hidden; cursor: pointer; }
.editor-file-button input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
.editor-json-status { font-size: 12px; color: var(--success); }
.editor-json-status.is-error { color: var(--danger); }
.editor-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); z-index: 5; }
.editor-actions > span { color: var(--muted); font-size: 12px; }
.rating-editor-rows { margin: 15px 0; }
.rating-editor-row { display: grid; grid-template-columns: 85px minmax(0,1fr) auto; gap: 12px; align-items: end; margin-bottom: 12px; }
.rating-editor-row .button { min-height: 44px; }
[hidden] { display: none !important; }

/* Dark mode overrides surfaces while keeping wheat accents and status meaning. */
:root[data-mode="light"] { color-scheme: light; }
:root[data-mode="dark"] { color-scheme: dark; --ink: #f5f5f5; --ink-soft: #dedede; --muted: #b5b5b5; --surface: #121212; --surface-soft: #1d1d1d; --surface-raised: #191919; --line: #424242; --line-strong: #8b8b8b; --sidebar-color: #000000; --sidebar-text-color: #ffffff; --question-color: #121212; --question-text-color: #ffffff; --reference-color: #121212; --reference-text-color: #ffffff; --accent: #D5A619; --accent-strong: #f5f5f5; --accent-soft: #1d1d1d; --accent-pale: #121212; --progress-color: #D5A619; --success: #91dfb3; --success-soft: #143126; --warning: #f1ca69; --warning-soft: #352c16; --danger: #ffadb3; --danger-soft: #3d2023; --info-soft: #242424; }
html[data-mode="dark"], html[data-mode="dark"] body { background: #000; color: var(--ink); }
html[data-mode="dark"] .auth-page { background: #000; }
html[data-mode="dark"] .mobile-header { background: var(--surface); color: var(--ink); backdrop-filter: none; }
html[data-mode="dark"] input, html[data-mode="dark"] select, html[data-mode="dark"] textarea { background: var(--surface); color: var(--ink); }
html[data-mode="dark"] input[readonly] { background: var(--surface-soft); color: var(--muted); }
html[data-mode="dark"] .auth-card, html[data-mode="dark"] .dashboard-header, html[data-mode="dark"] .completion-ring { background: var(--surface); border-color: var(--line); }
html[data-mode="dark"] .auth-brand { background: #fff; padding: 1px 20px; border-radius: 4px; margin-bottom: 24px; }
html[data-mode="dark"] .app-sidebar .nav-item.is-active { outline: 1px solid #D5A619; color: #fff; }
html[data-mode="dark"] .button-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
html[data-mode="dark"] .button-secondary:hover { background: #D5A619; color: #000; }
html[data-mode="dark"] .text-link, html[data-mode="dark"] .back-link, html[data-mode="dark"] .analytics-selections summary, html[data-mode="dark"] .email-preview summary, html[data-mode="dark"] .reference-panel .reference-card .reference-card-action { color: var(--ink); }
html[data-mode="dark"] .question-panel .initiative-choice, html[data-mode="dark"] .question-panel .choice-card, html[data-mode="dark"] .question-panel textarea { background: var(--question-color); color: var(--question-text-color); }
html[data-mode="dark"] .step-link.is-current { background: var(--surface); }
html[data-mode="dark"] .checkbox-mark { background: var(--surface); border-color: var(--line-strong); }
html[data-mode="dark"] .choice-number { background: var(--surface); color: var(--ink); }
html[data-mode="dark"] .choice-card:has(input:checked) .choice-number { background: #D5A619; color: #000; }
html[data-mode="dark"] .initiative-choice:has(input:checked) .checkbox-mark { background: #D5A619; color: #000; }
html[data-mode="dark"] input:focus, html[data-mode="dark"] select:focus, html[data-mode="dark"] textarea:focus { outline-color: #D5A619; }
html[data-mode="dark"] .reference-panel .reference-view-switch button { background: var(--surface); color: var(--ink); }
html[data-mode="dark"] .reference-panel .reference-view-switch button[aria-pressed="true"] { background: #D5A619; color: #000; }
html[data-mode="dark"] .completion-ring-track { stroke: #fff; }
html[data-mode="dark"] .reference-panel .source-status-note { color: #000; }
@media(max-width:1040px) { .appearance-bar { padding: 14px 24px 0; } }
@media(max-width:640px) {
  .appearance-bar { padding-left: 18px; padding-right: 18px; }
  .editor-section { padding: 20px 16px; }
  .question-editor-list li { grid-template-columns: 28px minmax(0,1fr); gap: 10px; }
  .question-editor-list li > .button { grid-column: 2; justify-self: start; }
  .ministry-editor-list article { flex-direction: column; align-items: stretch; }
  .editor-source-fields, .editor-campus .editor-source-fields { grid-template-columns: minmax(0,1fr); }
  .editor-record > summary { padding: 14px; }
  .editor-record-caption { flex-basis: 100%; }
  .rating-editor-row { grid-template-columns: 65px minmax(0,1fr); gap: 8px; }
  .rating-editor-row .button { grid-column: 2; justify-self: start; min-height: 34px; }
  .editor-actions { padding: 12px 0; }
}
@media print {
  .appearance-bar { display: none !important; }
  html[data-mode="dark"] { --ink: #000; --ink-soft: #000; --muted: #404040; --surface: #fff; --surface-soft: #fff; --surface-raised: #fff; --line: #d3d3d3; color-scheme: light; }
  html[data-mode="dark"], html[data-mode="dark"] body { color: #000; background: #fff; }
}

/* Drag ordering, account removal, and expandable people cards. */
.order-controls { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.order-controls button { display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); cursor: pointer; }
.order-handle { width: 36px; min-width: 36px; height: 38px; font-size: 19px; letter-spacing: -4px; padding-right: 4px !important; touch-action: none; cursor: grab !important; }
.order-move { width: 27px; min-width: 27px; height: 32px; font-size: 16px; }
.order-controls button:focus-visible { outline: 2px solid #D5A619; outline-offset: 2px; }
.order-controls button:disabled { opacity: .35; cursor: default; }
.order-rail { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.order-position { font-size: 11px; color: var(--muted); }
.question-editor-list li { grid-template-columns: 100px minmax(0,1fr) auto; }
.ministry-list-name { flex: 1 1 auto; }
.ministry-editor-list article { justify-content: flex-start; }
.order-save-state { display: flex; gap: 12px; align-items: center; margin-top: 15px; color: var(--muted); font-size: 12px; }
.order-save-state .is-error { color: var(--danger); }
[data-order-item].is-dragging { outline: 2px solid #D5A619; outline-offset: -2px; opacity: .75; background: var(--surface-soft); }
body.is-ordering { cursor: grabbing; user-select: none; }
body.is-ordering .order-handle { cursor: grabbing !important; }
.sortable-choice-list, .sortable-location-list { display: flex; flex-direction: column; gap: 10px; }
.sortable-location-list { padding: 16px; }
.editor-record > summary .order-controls { transform: none; margin: 0; }
.editor-record > summary .order-controls + strong { flex-basis: 140px; }
.delete-link { color: var(--danger); text-underline-offset: 3px; }
.button-danger { background: #a7353e; border-color: #a7353e; color: #fff; box-shadow: none; }
.button-danger:hover { background: #7d242b; color: #fff; }
.stack-form label.delete-confirm { display: flex; align-items: flex-start; gap: 10px; }
.stack-form label.delete-confirm input { flex: 0 0 18px; margin-top: 3px; }
.deleted-users > summary { font-weight: 700; cursor: pointer; }
.leader-card-list { display: flex; flex-direction: column; gap: 16px; }
.leader-card.content-card { padding: 0; margin: 0; overflow: hidden; }
.leader-chip { display: grid; grid-template-columns: 40px minmax(150px,1fr) 100px minmax(180px,230px) 80px; align-items: center; gap: 14px; padding: 20px; cursor: pointer; list-style: none; }
.leader-chip::-webkit-details-marker { display: none; }
.leader-chip-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #D5A619; color: #000; font-weight: 700; }
.leader-chip-person { min-width: 0; }
.leader-chip-person strong, .leader-chip-person small, .leader-chip-progress strong { display: block; overflow-wrap: anywhere; }
.leader-chip-person strong { font-size: 15px; }
.leader-chip-person small, .leader-chip-account, .leader-chip-action { color: var(--muted); font-size: 12px; }
.leader-chip-progress strong { font-size: 12px; margin-bottom: 6px; }
.leader-chip-progress > span { font-size: 11px; }
.leader-chip-action { text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.leader-card[open] > .leader-chip { border-bottom: 2px solid #D5A619; }
.leader-card[open] .leader-chip-action { color: var(--ink); }
.leader-card-expanded { padding: 20px; }
.leader-card-links { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 18px; }
.leader-overview { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 18px; }
.leader-card .leader-ministry-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
@media(max-width:850px) {
  .leader-chip { grid-template-columns: 40px minmax(0,1fr) 80px; gap: 10px; }
  .leader-chip-account { grid-column: 2; }
  .leader-chip-progress { grid-column: 2; grid-row: 3; }
  .leader-chip-action { grid-column: 3; grid-row: 1 / 4; }
  .leader-card .leader-ministry-grid { grid-template-columns: minmax(0,1fr); }
}
@media(max-width:640px) {
  .question-editor-list li { grid-template-columns: 100px minmax(0,1fr); }
  .ministry-editor-list article { display: grid; grid-template-columns: 100px minmax(0,1fr); align-items: center; }
  .ministry-editor-list article > .button-row { grid-column: 1 / -1; }
  .leader-chip { padding: 16px; }
  .leader-card-expanded { padding: 16px; }
}
