@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --brand-blue: #3b8aca;
  --brand-blue-deep: #235782;
  --brand-green: #96bf3b;
  --brand-green-deep: #6f9731;
  --brand-blue-rgb: 59, 138, 202;
  --brand-blue-deep-rgb: 35, 87, 130;
  --brand-green-rgb: 150, 191, 59;
  --ink: #17324a;
  --ink-soft: #4b6175;
  --surface: #f5fbff;
  --panel: #ffffff;
  --line: #d4e3ef;
  --danger: #b42318;
  --ok: #027a48;
  --shadow: 0 18px 40px rgba(var(--brand-blue-deep-rgb), 0.12);
  --site-banner-offset: 0px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(var(--brand-blue-rgb), 0.18), transparent 35%),
    radial-gradient(circle at 90% 10%, rgba(var(--brand-green-rgb), 0.22), transparent 32%),
    linear-gradient(180deg, #f8fcff 0%, #f0f8f4 100%);
}

.app-shell {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 2rem 1rem 2.5rem;
}

.staff-entry-link {
  position: fixed;
  right: 1rem;
  bottom: 0.9rem;
  z-index: 20;
  color: var(--brand-blue-deep);
  font-weight: 500;
  font-size: 0.92rem;
  text-decoration: underline;
  text-underline-offset: 0.14rem;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(var(--brand-blue-deep-rgb), 0.2);
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
}

.staff-entry-link:hover {
  color: var(--brand-blue);
  background: rgba(255, 255, 255, 0.96);
}

.view {
  animation: fade-up 220ms ease;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes review-pulse {
  0% {
    box-shadow: 0 0 0 2px rgba(181, 33, 33, 0.24), 0 0 0 rgba(217, 56, 56, 0.2);
  }

  50% {
    box-shadow: 0 0 0 3px rgba(181, 33, 33, 0.38), 0 0 24px rgba(217, 56, 56, 0.68);
  }

  100% {
    box-shadow: 0 0 0 2px rgba(181, 33, 33, 0.24), 0 0 0 rgba(217, 56, 56, 0.2);
  }
}

@keyframes fireworks-burst {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.2);
  }

  12% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(
      calc(var(--firework-x) + var(--firework-drift)),
      var(--firework-y)
    ) scale(1);
  }
}

.landing-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.25rem;
  align-items: stretch;
}

.brand-column {
  border-radius: 24px;
  padding: clamp(1.4rem, 3vw, 2.1rem);
  background:
    linear-gradient(150deg, rgba(var(--brand-blue-deep-rgb), 0.94) 0%, rgba(var(--brand-blue-rgb), 0.92) 55%, rgba(var(--brand-green-rgb), 0.9) 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.brand-logo {
  display: block;
  width: min(290px, 100%);
  height: auto;
  margin-bottom: 1.25rem;
  background: #ffffff;
  border-radius: 14px;
  padding: 0.45rem 0.6rem;
}

.kicker {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  opacity: 0.95;
}

h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
}

.subtitle {
  margin-top: 0.85rem;
  margin-bottom: 1.2rem;
  max-width: 42ch;
  opacity: 0.97;
}

.benefits {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.benefits li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.96rem;
}

.benefits li::before {
  content: '●';
  color: #eaf7c9;
  font-size: 0.78rem;
  margin-top: 0.34rem;
}

.client-card,
.panel {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.client-card {
  padding: clamp(1.15rem, 3vw, 1.6rem);
}

h2,
h3,
legend {
  margin-top: 0;
}

.help-text {
  margin-top: -0.3rem;
  color: var(--ink-soft);
}

.client-step,
.admin-step {
  display: grid;
  gap: 0.85rem;
}

.case-lock {
  margin: 0;
  padding: 0.58rem 0.68rem;
  border-radius: 10px;
  border: 1px dashed #a9c2d7;
  background: #f3f9ff;
  color: var(--ink-soft);
}

.split-actions {
  display: grid;
  gap: 0.58rem;
}

.photo-challenge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.photo-option {
  width: 100%;
  padding: 0;
  border: 1px solid #b8cfe2;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
}

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

.photo-option:hover {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 2px rgba(var(--brand-blue-rgb), 0.18);
}

.landing-footer {
  margin-top: 1.1rem;
  text-align: center;
}

.landing-footer a {
  color: var(--brand-blue-deep);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--brand-blue-deep-rgb), 0.35);
}

.landing-footer a:hover {
  color: var(--brand-blue);
  border-bottom-color: var(--brand-blue);
}

.auth-panel,
.workspace-panel {
  padding: 1.2rem;
}

.auth-panel {
  width: min(520px, 100%);
  margin: 2.5rem auto;
}

.admin-step .split-actions {
  margin-top: 0.2rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.panel-head-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.panel-head-actions button {
  width: auto;
}

.text-button {
  width: auto;
  background: transparent;
  border: none;
  color: var(--brand-blue-deep);
  padding: 0;
  font-weight: 500;
  cursor: pointer;
}

label {
  display: block;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

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

input[type='text'],
input[type='email'],
input[type='password'],
input[type='number'],
input[type='date'],
input[type='color'],
input:not([type]),
select,
textarea {
  width: 100%;
  margin-top: 0.34rem;
  padding: 0.67rem 0.72rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

input[type='color'] {
  padding: 0.24rem;
  min-height: 3rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(var(--brand-blue-rgb), 0.25);
  border-color: var(--brand-blue);
}

input[type='checkbox'] {
  width: auto;
  margin: 0;
}

button {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 0.72rem 0.95rem;
  background: linear-gradient(135deg, var(--brand-green), var(--brand-green-deep));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  filter: brightness(0.95);
}

button:disabled {
  background: #eef3f8;
  border: 1px solid #d5dde7;
  color: #8a99a9;
  cursor: not-allowed;
  filter: none;
}

button.ghost {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

button.ghost:hover {
  background: #f7fbff;
}

button.ghost:disabled {
  background: #f5f7fa;
  border-color: #d5dde7;
  color: #8a99a9;
}

button.review-required-pulse {
  background: linear-gradient(135deg, #b52121, #d93838);
  box-shadow: 0 0 0 2px rgba(181, 33, 33, 0.24), 0 0 18px rgba(217, 56, 56, 0.45);
  animation: review-pulse 1.35s ease-in-out infinite;
}

button.review-required-pulse:hover {
  filter: brightness(1);
}

button.review-next-blocked:disabled {
  background: #e6ebf1;
  border: 1px solid #cdd6e0;
  color: #7f8d9e;
  box-shadow: none;
  opacity: 1;
}

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

label.inline {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  font-weight: 500;
}

.choice-prompt {
  margin: 0 0 0.45rem;
  font-weight: 600;
}

.choice-stack {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.34rem;
  margin-bottom: 0.8rem;
}

.choice-stack label.inline {
  margin-bottom: 0;
}

.residence-question {
  margin-bottom: 0.8rem;
}

.property-address-block {
  margin-bottom: 0.8rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.property-address-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.35rem;
}

.property-address-head h4 {
  margin: 0;
  font-size: 0.96rem;
}

.property-address-head .ghost {
  width: auto;
}

fieldset {
  border: 1px solid var(--line);
  background: #fcfeff;
  border-radius: 12px;
  margin: 0 0 0.95rem;
  padding: 0.88rem;
}

legend {
  padding: 0 0.28rem;
  font-weight: 700;
}

.section-progress {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.36rem;
  margin: 0.14rem 0 0.78rem;
  align-items: start;
}

.section-group-card {
  border: 1px solid #d2e0eb;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8fb 100%);
  padding: 0.24rem;
}

.section-group-card.current {
  border-color: rgba(var(--brand-blue-deep-rgb), 0.34);
  box-shadow: 0 0 0 1px rgba(var(--brand-blue-deep-rgb), 0.12);
}

.section-group-button,
.section-substep {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.section-group-button {
  min-height: 2.3rem;
  padding: 0.34rem 0.46rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.08rem;
}

.section-group-title {
  font-size: 0.69rem;
  font-weight: 700;
  line-height: 1.08;
}

.section-group-meta {
  font-size: 0.6rem;
  font-weight: 500;
  line-height: 1.02;
  opacity: 0.86;
}

.section-substeps-rail {
  grid-column: 1 / -1;
  border: 1px solid #d2e0eb;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8fb 100%);
  padding: 0.28rem;
}

.section-substeps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 0.3rem;
}

.section-substep {
  min-height: 1.75rem;
  padding: 0.26rem 0.42rem;
  line-height: 1.05;
  font-size: 0.67rem;
  font-weight: 400;
  display: grid;
  align-content: center;
}

.section-group-button.unvisited,
.section-substep.unvisited {
  border-color: #f5c1c1;
  background: #fff3f3;
  color: #8d2b2b;
}

.section-group-button.visited-incomplete,
.section-substep.visited-incomplete {
  border-color: #f1db9a;
  background: #fff9e8;
  color: #806324;
}

.section-group-button.visited-complete,
.section-substep.visited-complete {
  border-color: #a5d8b2;
  background: #eaf9ee;
  color: #24653c;
}

.section-group-button.current,
.section-substep.current {
  box-shadow: inset 0 0 0 2px rgba(var(--brand-blue-deep-rgb), 0.55);
}

.section-group-button.reviewed,
.section-substep.reviewed {
  padding-right: 3.8rem;
}

.section-group-button.reviewed::after,
.section-substep.reviewed::after {
  content: attr(data-review-label);
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(var(--brand-blue-deep-rgb), 0.14);
  color: var(--brand-blue-deep);
  padding: 0.12rem 0.38rem;
  font-size: 0.58rem;
  font-weight: 700;
}

.section-guide-card {
  border: 1px solid #c8dced;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7fbff 0%, #eef8ff 100%);
  padding: 0.72rem 0.8rem;
  margin-bottom: 0.9rem;
}

.section-guide-step {
  margin: 0;
  color: var(--brand-blue-deep);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section-guide-title {
  margin: 0.2rem 0 0.3rem;
  color: var(--ink);
  font-size: 1.03rem;
}

.section-guide-description {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.section-intro-modal {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(8, 20, 32, 0.48);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.section-intro-panel {
  width: min(560px, 100%);
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 28px 48px rgba(8, 20, 32, 0.28);
  padding: 0.95rem;
  display: grid;
  gap: 0.72rem;
}

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

.session-warning-panel {
  border-color: rgba(200, 44, 44, 0.24);
}

.session-warning-countdown {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #a12424;
}

.section-intro-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.section-intro-head h3 {
  margin: 0;
}

.section-intro-close {
  width: auto;
  min-width: 2.1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  font-weight: 700;
  padding: 0.32rem 0.55rem;
}

.section-intro-close:hover {
  background: #f7fbff;
}

#section-intro-message {
  margin: 0;
  color: var(--ink-soft);
}

#section-intro-continue-button {
  width: auto;
  justify-self: end;
  min-width: 140px;
}

.section-step {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff3f3;
  color: #8d2b2b;
  padding: 0 0.54rem;
  min-height: 2.35rem;
  max-height: 2.35rem;
  line-height: 1.15;
  font-size: 0.78rem;
  font-weight: 500;
  display: grid;
  align-content: center;
  position: relative;
  overflow: hidden;
}

.section-step.unvisited {
  border-color: #f5c1c1;
  background: #fff3f3;
  color: #8d2b2b;
}

.section-step.visited-incomplete {
  border-color: #f1db9a;
  background: #fff9e8;
  color: #806324;
}

.section-step.visited-complete {
  border-color: #a5d8b2;
  background: #eaf9ee;
  color: #24653c;
}

.section-step.current {
  box-shadow: inset 0 0 0 2px rgba(var(--brand-blue-deep-rgb), 0.55);
}

.section-step.reviewed {
  padding-right: 4.4rem;
}

.section-step.reviewed::after {
  content: 'Reviewed';
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(var(--brand-blue-deep-rgb), 0.14);
  color: var(--brand-blue-deep);
  padding: 0.12rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
}

.section-step:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.section-group-button:disabled,
.section-substep:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.section-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 0.55rem;
  margin: 0.3rem 0 0.45rem;
}

.section-hint {
  margin: 0.2rem 0 1rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.review-submit-screen {
  margin: 0.6rem 0 1rem;
}

.review-submit-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #c8dced;
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(var(--brand-blue-rgb), 0.12), transparent 34%),
    linear-gradient(180deg, #fcfeff 0%, #f3f8fc 100%);
  box-shadow: 0 20px 38px rgba(var(--brand-blue-deep-rgb), 0.12);
}

.review-submit-stage {
  position: relative;
  z-index: 1;
  min-height: 320px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 0.8rem;
  padding: 2.1rem 1.2rem;
}

.review-submit-stage .help-text {
  max-width: 560px;
  margin: 0 auto;
}

.review-submit-stage button {
  width: min(280px, 100%);
  justify-self: center;
}

.review-submit-kicker {
  margin: 0;
  color: var(--brand-blue-deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.review-submit-success {
  display: grid;
  justify-items: center;
  gap: 0.8rem;
}

.review-submit-success p {
  max-width: 560px;
  margin: 0;
  color: var(--ink-soft);
}

.submission-fireworks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.submission-firework-particle {
  position: absolute;
  left: 50%;
  top: 58%;
  width: var(--firework-size);
  height: var(--firework-size);
  margin-left: calc(var(--firework-size) / -2);
  margin-top: calc(var(--firework-size) / -2);
  border-radius: 999px;
  background: var(--firework-color);
  opacity: 0;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.55);
}

.submission-fireworks.is-active .submission-firework-particle {
  animation: fireworks-burst 1.5s ease-out forwards;
  animation-delay: var(--firework-delay);
}

.child-block {
  border: 1px dashed #a8c6de;
  border-radius: 10px;
  background: #f6fbff;
  padding: 0.7rem;
  margin-bottom: 0.6rem;
}

.child-block h4 {
  margin: 0 0 0.5rem;
}

.spouse-two-client-info {
  margin-top: 0.75rem;
  border: 1px solid #c2d8ea;
  border-radius: 12px;
  background: #f4fbff;
  padding: 0.72rem;
}

#client-form-panel .section-guide-card {
  border-color: #bfd3e3;
  background: linear-gradient(180deg, #f8fbfe 0%, #f1f7fb 100%);
}

#client-form-panel fieldset,
#client-form-panel .child-block,
#client-form-panel .property-address-block,
#client-form-panel .spouse-two-client-info,
#client-form-panel .fiduciary-block,
#client-form-panel .beneficiary-block,
#client-form-panel .special-gift-block,
#client-form-panel .fiduciary-spouse-group,
#client-form-panel .fiduciary-slot-row,
#client-form-panel .beneficiary-card-pane,
#client-form-panel .fiduciary-card-pane {
  border-color: #c6d7e5;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8fc 100%);
}

#client-form-panel input[type='text'],
#client-form-panel input[type='email'],
#client-form-panel input[type='password'],
#client-form-panel input[type='number'],
#client-form-panel input[type='date'],
#client-form-panel input[type='color'],
#client-form-panel input:not([type]),
#client-form-panel select,
#client-form-panel textarea {
  border-color: #b5cadb;
  background: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(var(--brand-blue-deep-rgb), 0.05);
}

#client-form-panel input:hover,
#client-form-panel select:hover,
#client-form-panel textarea:hover {
  border-color: #9fb9ce;
}

#client-form-panel input:focus,
#client-form-panel select:focus,
#client-form-panel textarea:focus {
  outline: 2px solid rgba(var(--brand-blue-rgb), 0.2);
  border-color: #6da6cf;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 0 0 3px rgba(var(--brand-blue-rgb), 0.08);
}

#client-form-panel.review-mode .section-guide-card {
  border-color: rgba(var(--brand-green-rgb), 0.34);
  background: linear-gradient(180deg, #f9fcfb 0%, #eef8f2 100%);
}

#client-form-panel.review-mode .form-section input,
#client-form-panel.review-mode .form-section select,
#client-form-panel.review-mode .form-section textarea,
#client-form-panel.review-mode .form-section button,
#client-form-panel.review-mode .form-section [draggable='true'],
#client-form-panel.review-mode .form-section .fiduciary-slot-dropzone,
#client-form-panel.review-mode .form-section .gift-beneficiary-dropzone,
#client-form-panel.review-mode .form-section #distribution-dropzone {
  pointer-events: none;
}

#client-form-panel.review-mode .form-section input,
#client-form-panel.review-mode .form-section select,
#client-form-panel.review-mode .form-section textarea {
  background: #f7fafc;
  border-color: #cbd9e4;
  box-shadow: none;
}

.spouse-two-client-info h4 {
  margin: 0 0 0.35rem;
  color: var(--brand-blue-deep);
}

#fiduciaries-container {
  display: grid;
  gap: 0.72rem;
  margin-bottom: 0.72rem;
}

.fiduciary-block {
  border: 1px solid #c8dded;
  border-radius: 12px;
  background: #f9fcff;
  padding: 0.75rem;
}

.fiduciary-block.under18-unacknowledged {
  border-color: #f6b4b4;
  box-shadow: inset 0 0 0 1px rgba(180, 35, 24, 0.24);
}

.fiduciary-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.fiduciary-block-head h4 {
  margin: 0;
}

.fiduciary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.6rem;
}

.fiduciary-relationship-selects {
  margin-top: 0.34rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.fiduciary-relationship-selects select {
  margin-top: 0;
}

.relationship-owner-static {
  margin-top: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f4f8fb;
  color: var(--ink-soft);
  font-weight: 700;
  text-transform: lowercase;
}

.under18-warning {
  margin-top: 0.5rem;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff6f6;
  padding: 0.56rem 0.66rem;
}

.under18-warning p {
  margin: 0 0 0.5rem;
  color: #9f1239;
  font-size: 0.88rem;
}

#beneficiaries-container {
  display: grid;
  gap: 0.72rem;
  margin-bottom: 0.72rem;
}

#charitable-gifts-workspace {
  margin: 0.72rem 0 0.72rem;
  display: grid;
  gap: 0.72rem;
}

#charitable-gifts-container {
  display: grid;
  gap: 0.72rem;
}

.beneficiary-block {
  border: 1px solid #c8dded;
  border-radius: 12px;
  background: #f9fcff;
  padding: 0.75rem;
}

.tm-invalid {
  outline: 2px solid rgba(180, 35, 24, 0.82);
  outline-offset: 2px;
  border-radius: 12px;
}

.password-policy-note {
  color: #a02316;
  font-weight: 600;
}

label.tm-invalid,
.residence-question.tm-invalid {
  padding: 0.2rem;
}

.fiduciary-slot-dropzone.tm-invalid,
.distribution-dropzone.tm-invalid {
  border-color: rgba(180, 35, 24, 0.82);
  background: rgba(180, 35, 24, 0.06);
}

.beneficiary-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.beneficiary-block-head h4 {
  margin: 0;
}

.beneficiary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.6rem;
}

.charitable-org-fields {
  display: grid;
  gap: 0.6rem;
}

.charitable-org-top-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.3fr) minmax(230px, 1.5fr) minmax(170px, 1fr);
  gap: 0.6rem;
}

.charitable-org-gift-row textarea {
  min-height: 5.2rem;
}

.charitable-gift-timing-row {
  display: grid;
  gap: 0.4rem;
}

.charitable-gift-timing-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.charitable-gift-timing-options label.inline {
  align-items: flex-start;
}

.special-gifts-workspace {
  margin: 0.65rem 0 0.8rem;
}

.gift-assignment-grid {
  display: grid;
  grid-template-columns: minmax(220px, 30%) minmax(0, 1fr);
  gap: 0.7rem;
}

.beneficiary-card-pane {
  border: 1px solid #cbddeb;
  border-radius: 10px;
  background: #f7fbff;
  padding: 0.6rem;
}

.beneficiary-card-pane h4 {
  margin: 0 0 0.45rem;
  color: var(--brand-blue-deep);
}

.beneficiary-card-list {
  display: grid;
  gap: 0.46rem;
}

.beneficiary-card {
  margin: 0;
  border: 1px solid #a8c8df;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 0.5rem 0.6rem;
  cursor: grab;
  display: grid;
  gap: 0.2rem;
}

.beneficiary-card strong {
  font-size: 0.9rem;
}

.beneficiary-card span {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.beneficiary-card.assigned {
  border-color: #95c9a8;
  background: #f3fcf5;
}

.beneficiary-card.add {
  cursor: pointer;
  text-align: center;
  background: #ecf6ff;
  border-style: dashed;
  color: var(--brand-blue-deep);
}

.beneficiary-card.dragging {
  opacity: 0.55;
}

.gift-list-pane {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

#special-gifts-container {
  display: grid;
  gap: 0.48rem;
}

.special-gift-block {
  border: 1px solid #c8dded;
  border-radius: 12px;
  background: #fcfeff;
  padding: 0.46rem 0.52rem;
}

.special-gift-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.12rem;
}

.special-gift-head h4 {
  margin: 0;
}

.special-gift-card-body {
  display: grid;
  grid-template-columns: minmax(240px, 40%) minmax(0, 1fr);
  gap: 0.38rem;
  align-items: start;
}

.special-gift-card-body > * {
  margin-bottom: 0;
}

.gift-beneficiary-assignment {
  margin-top: 0;
}

.special-gift-copy {
  display: grid;
  gap: 0.38rem;
}

.gift-beneficiary-assignment p {
  margin: 0 0 0.32rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.gift-beneficiary-dropzone {
  border: 1px dashed #a8c8df;
  border-radius: 10px;
  background: #f7fbff;
  padding: 0.42rem;
  display: grid;
  gap: 0.3rem;
  min-height: 46px;
}

.gift-beneficiary-dropzone.is-over {
  border-color: var(--brand-green-deep);
  background: #edf8e5;
}

.special-gift-description {
  margin: 0;
}

.special-gift-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.38rem;
}

.special-gift-meta-field {
  margin: 0;
}

.special-gift-description textarea {
  min-height: 3.35rem;
}

.gift-add-beneficiary-button {
  width: auto;
  justify-self: start;
}

#add-special-gift-button {
  width: fit-content;
  justify-self: start;
  align-self: start;
  display: inline-flex;
  padding: 0.38rem 0.58rem;
  font-size: 0.8rem;
}

.distribution-workspace {
  margin-top: 0.65rem;
}

.distribution-followup {
  margin-top: 0.75rem;
}

.final-disposition-panel {
  border: 1px solid #d4e3ef;
  border-radius: 12px;
  background: #fff;
  padding: 0.75rem;
  display: grid;
  gap: 0.6rem;
}

.final-disposition-panel + .final-disposition-panel {
  margin-top: 0.75rem;
}

.final-disposition-panel h4 {
  margin: 0;
  color: var(--brand-blue-deep);
}

.distribution-assignment-grid {
  display: grid;
  grid-template-columns: minmax(220px, 30%) minmax(0, 1fr);
  gap: 0.7rem;
}

.distribution-main-pane {
  display: grid;
  gap: 0.45rem;
}

.distribution-dropzone-label {
  margin-bottom: 0;
}

.distribution-dropzone {
  border: 1px dashed #a8c8df;
  border-radius: 10px;
  background: #f7fbff;
  padding: 0.55rem;
  display: grid;
  gap: 0.42rem;
  align-content: start;
  height: clamp(260px, 46vh, 560px);
  overflow-y: auto;
}

.distribution-dropzone.is-over {
  border-color: var(--brand-green-deep);
  background: #edf8e5;
}

.distribution-assigned-card {
  border: 1px solid #95c9a8;
  border-radius: 10px;
  background: #f3fcf5;
  padding: 0.45rem 0.52rem;
  display: grid;
  gap: 0.35rem;
}

.distribution-assigned-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.distribution-assigned-head strong {
  font-size: 0.88rem;
}

.distribution-assigned-head span {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.distribution-percentage-field {
  margin-bottom: 0;
}

.distribution-percentage-field input {
  max-width: 180px;
}

#disinheritance-workspace {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

#disinheritance-container {
  display: grid;
  gap: 0.55rem;
}

#hipaa-participants-container {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

#asset-information-container {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.asset-block {
  display: grid;
  gap: 0.55rem;
}

.asset-grid-top {
  grid-template-columns: minmax(240px, 1.35fr) minmax(220px, 1fr);
}

.asset-grid-bottom {
  align-items: end;
}

.asset-grid-bottom-couple {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.asset-grid-bottom-individual {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.fiduciary-assignment-layout-wrap {
  margin-top: 0.62rem;
}

.fiduciary-spouse-group {
  border: 1px solid #d2e1ec;
  border-radius: 12px;
  background: #fff;
  padding: 0.68rem;
}

.fiduciary-spouse-group.active {
  box-shadow: inset 0 0 0 2px rgba(var(--brand-blue-deep-rgb), 0.14);
}

.fiduciary-spouse-group + .fiduciary-spouse-group {
  margin-top: 0.7rem;
}

.fiduciary-spouse-heading {
  margin: 0 0 0.24rem;
  color: var(--brand-blue-deep);
}

.fiduciary-spouse-intro {
  margin: 0 0 0.55rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.fiduciary-step-controls {
  margin: 0 0 0.55rem;
  border: 1px solid #cfe1ef;
  border-radius: 10px;
  background: #f4f9ff;
  padding: 0.48rem 0.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.fiduciary-step-controls.single {
  justify-content: center;
}

.fiduciary-step-controls .small-button {
  margin: 0;
}

.fiduciary-step-status {
  margin: 0;
  color: var(--brand-blue-deep);
  font-size: 0.84rem;
  font-weight: 600;
  text-align: center;
}

.fiduciary-assignment-grid {
  display: grid;
  grid-template-columns: minmax(220px, 30%) minmax(0, 1fr);
  gap: 0.7rem;
}

.fiduciary-card-pane {
  border: 1px solid #cbddeb;
  border-radius: 10px;
  background: #f7fbff;
  padding: 0.6rem;
}

.fiduciary-card-pane h4 {
  margin: 0 0 0.45rem;
  color: var(--brand-blue-deep);
}

.fiduciary-card-list {
  display: grid;
  gap: 0.46rem;
}

.fiduciary-card {
  margin: 0;
  border: 1px solid #a8c8df;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 0.5rem 0.6rem;
  cursor: grab;
  display: grid;
  gap: 0.2rem;
}

.fiduciary-card strong {
  font-size: 0.9rem;
}

.fiduciary-card span {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.fiduciary-card.assigned {
  border-color: #95c9a8;
  background: #effaf1;
}

.fiduciary-card.add {
  width: 100%;
  text-align: left;
  background: #f1f8ff;
  border-style: dashed;
  border-color: #98b8cf;
  color: var(--brand-blue-deep);
  cursor: pointer;
}

.fiduciary-card.dragging {
  opacity: 0.65;
}

.fiduciary-card[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.fiduciary-slot-pane {
  display: grid;
  gap: 0.56rem;
}

.fiduciary-slot-row {
  display: grid;
  grid-template-columns: minmax(210px, 42%) minmax(0, 1fr);
  gap: 0.58rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  padding: 0.55rem;
}

.fiduciary-slot-copy h4 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
}

.fiduciary-slot-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.fiduciary-slot-copy .small-button {
  margin-top: 0.45rem;
}

.fiduciary-co-toggle {
  margin-top: 0.55rem;
}

.fiduciary-slot-dropzone-wrap {
  display: grid;
}

.fiduciary-slot-multi {
  display: grid;
  gap: 0.5rem;
}

.fiduciary-slot-subzone {
  display: grid;
  gap: 0.25rem;
}

.fiduciary-slot-subtitle {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.fiduciary-slot-dropzone {
  border: 1px dashed #bad1e3;
  border-radius: 10px;
  background: #fff;
  padding: 0.45rem;
  min-height: 66px;
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.fiduciary-slot-dropzone.is-over {
  border-color: var(--brand-blue);
  background: #f2f8ff;
}

.slot-placeholder {
  margin: 0;
  color: #6d8192;
  font-size: 0.84rem;
}

.fiduciary-quick-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(8, 20, 32, 0.48);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.fiduciary-quick-modal-panel {
  width: min(760px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 28px 48px rgba(8, 20, 32, 0.28);
  padding: 0.95rem;
}

.beneficiary-import-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.beneficiary-import-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
  padding: 0.8rem 0.85rem;
  border: 1px solid rgba(var(--brand-blue-deep-rgb), 0.12);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  cursor: pointer;
}

.beneficiary-import-check {
  padding-top: 0.18rem;
}

.beneficiary-import-card-body {
  display: grid;
  gap: 0.18rem;
}

.beneficiary-import-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.beneficiary-import-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: rgba(var(--brand-blue-rgb), 0.12);
  color: var(--brand-blue-deep);
  font-size: 0.75rem;
  font-weight: 700;
}

.beneficiary-import-summary {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.small-button {
  width: auto;
  margin: 0;
  padding: 0.4rem 0.58rem;
  font-size: 0.8rem;
}

.message,
.save-indicator {
  min-height: 1.2rem;
  margin-top: 0.65rem;
  color: var(--ink-soft);
}

.actions + .save-indicator {
  margin-top: 0.35rem;
}

.lock-banner {
  margin: 0.55rem 0 0.75rem;
  padding: 0.62rem 0.72rem;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: #fff5f5;
  color: #9f1239;
  font-weight: 500;
}

.message.error,
.save-indicator.error {
  color: var(--danger);
}

.message.ok,
.save-indicator.ok {
  color: var(--ok);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.8rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 0.55rem 0.25rem;
  vertical-align: top;
}

th {
  background: #f5faff;
  color: var(--brand-blue-deep);
}

td .small-button {
  width: auto;
  margin-right: 0.4rem;
  margin-bottom: 0.2rem;
  padding: 0.4rem 0.55rem;
}

.staff-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(var(--brand-blue-deep-rgb), 0.16);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(var(--brand-blue-rgb), 0.08) 0%, rgba(var(--brand-green-rgb), 0.12) 100%),
    #ffffff;
  box-shadow: 0 14px 30px rgba(28, 66, 96, 0.08);
  position: sticky;
  top: calc(var(--site-banner-offset, 0px) + 0.8rem);
  z-index: 25;
}

.staff-ribbon-brand {
  display: grid;
  gap: 0.1rem;
  min-width: 190px;
}

.staff-ribbon-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-blue-deep);
}

.staff-ribbon-brand strong {
  font-size: 1rem;
  color: var(--ink);
}

.staff-ribbon-user {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.staff-ribbon-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.staff-ribbon-link {
  width: auto;
  margin: 0;
  padding: 0.55rem 0.82rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--brand-blue-deep-rgb), 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: none;
  font-size: 0.92rem;
}

.staff-ribbon-link:hover {
  border-color: rgba(var(--brand-blue-deep-rgb), 0.26);
  background: #ffffff;
}

.staff-ribbon-link.active,
.staff-ribbon-link[aria-current='page'] {
  border-color: rgba(var(--brand-blue-deep-rgb), 0.34);
  background: linear-gradient(
    135deg,
    rgba(var(--brand-blue-deep-rgb), 0.16) 0%,
    rgba(var(--brand-green-rgb), 0.18) 100%
  );
  color: var(--brand-blue-deep);
}

.site-banner {
  position: sticky;
  top: 0;
  z-index: 65;
  padding: 0.45rem 0.75rem;
  background: #ffffff;
  border-bottom: 1px solid rgba(var(--brand-blue-deep-rgb), 0.16);
  box-shadow: 0 10px 22px rgba(8, 20, 32, 0.08);
}

.site-banner-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.site-banner p {
  margin: 0;
  color: var(--brand-blue-deep);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
}

.cases-group {
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfeff;
}

.cases-group summary {
  cursor: pointer;
  padding: 0.75rem 0.85rem;
  font-weight: 600;
  color: var(--brand-blue-deep);
}

.cases-group[open] summary {
  border-bottom: 1px solid var(--line);
}

.group-help {
  margin: 0.65rem 0.85rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.cases-group .table-wrap {
  padding: 0 0.85rem 0.85rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-chip.submitted {
  background: #e8f5d0;
  color: #4f6f17;
}

.status-chip.draft {
  background: #eaf4ff;
  color: #1f5f92;
}

.status-chip.locked {
  background: #fde7e9;
  color: #b42318;
}

.status-chip.unlocked {
  background: #ecfdf3;
  color: #027a48;
}

.status-chip.staff-role {
  background: #eff6fd;
  color: var(--brand-blue-deep);
}

.status-chip.questionnaire-current {
  background: #eaf4ff;
  color: #1f5f92;
  text-transform: none;
  letter-spacing: 0;
}

.status-chip.questionnaire-outdated {
  background: #fff4e5;
  color: #9a5b00;
  text-transform: none;
  letter-spacing: 0;
}

.small-button.delete {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b42318;
}

.small-button.delete:hover {
  background: #fee2e2;
}

.new-case-credentials {
  background: #ecfdf3;
  border: 1px solid #a6f4c5;
  color: #065f46;
  border-radius: 10px;
  padding: 0.8rem;
  margin: 1rem 0;
  white-space: pre-wrap;
}

.case-preview {
  margin-top: 0.8rem;
  max-height: 300px;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f7fbfe;
  padding: 0.8rem;
}

.section-settings-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.55rem;
}

.questionnaire-editor-switcher {
  margin: 0.9rem 0 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4fbff 100%);
  padding: 0.9rem;
}

.questionnaire-editor-switcher-head h3 {
  margin: 0 0 0.18rem;
}

.questionnaire-editor-switcher-head .help-text {
  margin: 0;
}

.settings-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.settings-link-card {
  width: 100%;
  min-height: 128px;
  display: grid;
  gap: 0.35rem;
  align-content: start;
  text-align: left;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--brand-blue-deep-rgb), 0.18);
  background: linear-gradient(180deg, #fbfdff 0%, #f4fbff 100%);
  color: var(--ink);
  box-shadow: none;
}

.settings-link-card:hover {
  border-color: rgba(var(--brand-blue-deep-rgb), 0.3);
  background: linear-gradient(180deg, #ffffff 0%, #eef7ff 100%);
}

.settings-link-card:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.settings-link-title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-blue-deep);
}

.settings-link-body {
  display: block;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

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

.questionnaire-editor-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
  margin-top: 0.7rem;
}

.questionnaire-editor-tab {
  width: auto;
  min-width: 170px;
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--brand-blue-deep-rgb), 0.18);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  box-shadow: none;
}

.questionnaire-editor-tab.active {
  border-color: rgba(var(--brand-blue-deep-rgb), 0.36);
  background: linear-gradient(
    135deg,
    rgba(var(--brand-blue-deep-rgb), 0.12) 0%,
    rgba(var(--brand-green-rgb), 0.14) 100%
  );
  color: var(--brand-blue-deep);
}

.section-setting-group {
  display: grid;
  gap: 0.42rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9fc 100%);
  padding: 0.48rem;
}

.section-setting-group-row {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid #d7e4ee;
  border-radius: 10px;
  background: #eef6fb;
}

.section-setting-group-meta {
  display: flex;
  align-items: center;
}

.section-setting-group-row input {
  margin: 0;
  font-weight: 600;
}

.section-setting-subsections {
  display: grid;
  gap: 0.42rem;
  padding-left: 0.5rem;
}

.section-editor {
  margin-top: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
  padding: 0.75rem;
}

.branding-settings-card {
  margin: 0.9rem 0 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4fbff 100%);
  padding: 0.9rem;
}

.branding-settings-card h3 {
  margin-bottom: 0.25rem;
}

.branding-logo-row {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 0.8rem;
  align-items: stretch;
  margin-top: 0.2rem;
}

.branding-logo-preview-card {
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.75rem;
}

.branding-logo-label {
  margin: 0 0 0.55rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 600;
}

.branding-logo-preview {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  max-height: 110px;
  object-fit: contain;
}

.branding-logo-actions {
  display: grid;
  gap: 0.5rem;
  align-content: start;
}

#staff-password-card {
  margin-bottom: 1rem;
}

.branding-upload-field {
  margin: 0;
}

.branding-upload-field input[type='file'] {
  margin-top: 0.45rem;
}

.section-editor-fields {
  display: grid;
  gap: 0.55rem;
}

.section-editor-group {
  margin-top: 0.4rem;
}

.section-editor-group h4 {
  margin: 0.2rem 0 0.15rem;
  color: var(--brand-blue-deep);
}

.section-editor-field {
  margin: 0;
}

.section-editor-field span {
  display: inline-block;
  margin-bottom: 0.24rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.staff-inline-controls {
  display: flex;
  gap: 0.38rem;
  align-items: center;
}

.staff-inline-controls input,
.staff-inline-controls select {
  margin: 0;
  min-width: 0;
}

.staff-inline-controls button {
  width: auto;
  margin: 0;
  padding: 0.42rem 0.62rem;
}

.section-setting-row {
  display: grid;
  grid-template-columns: 24px minmax(200px, 1fr) auto auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fcff;
}

.section-setting-row.dragging {
  opacity: 0.55;
}

.section-setting-row.drop-target {
  border-color: var(--brand-blue);
  box-shadow: inset 0 0 0 2px rgba(var(--brand-blue-rgb), 0.18);
}

.section-setting-row input {
  margin: 0;
}

.section-setting-row button {
  width: auto;
  padding: 0.5rem 0.72rem;
}

.section-setting-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.drag-handle {
  color: #8aa7bf;
  font-weight: 700;
  cursor: grab;
  user-select: none;
  line-height: 1;
  justify-self: center;
}

.section-kind {
  border-radius: 999px;
  border: 1px solid #c7d8e6;
  background: #eff6fd;
  color: var(--brand-blue-deep);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.14rem 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.section-kind.custom {
  border-color: #c9e6b9;
  background: #f0fbe6;
  color: #47671f;
}

.custom-section-placeholder {
  margin: 0;
  color: var(--ink-soft);
}

.hidden {
  display: none !important;
}

@media (max-width: 960px) {
  .landing-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    padding-top: 1.2rem;
  }

  .staff-ribbon {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .staff-ribbon-links {
    justify-content: flex-start;
  }

  .section-controls {
    grid-template-columns: 1fr;
  }

  .section-setting-group-row,
  .section-setting-row {
    grid-template-columns: 1fr;
  }

  .section-setting-subsections {
    padding-left: 0;
  }

  .branding-logo-row {
    grid-template-columns: 1fr;
  }

  .staff-inline-controls {
    flex-wrap: wrap;
  }

  .fiduciary-assignment-grid,
  .gift-assignment-grid,
  .distribution-assignment-grid,
  .fiduciary-slot-row,
  .charitable-org-top-row,
  .special-gift-card-body {
    grid-template-columns: 1fr;
  }

  .charitable-gift-timing-options {
    grid-template-columns: 1fr;
  }

  .fiduciary-relationship-selects {
    grid-template-columns: 1fr;
  }

  .fiduciary-step-controls {
    flex-direction: column;
    align-items: stretch;
  }

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

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

@media (max-width: 720px) {
  .section-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-substeps {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

@media (max-width: 560px) {
  .section-progress {
    grid-template-columns: 1fr;
  }
}
