:root {
  --cw-midnight: #091a2d;
  --cw-ink: #0b1929;
  --cw-ink-soft: #2b3a4c;
  --cw-cobalt: #4967f2;
  --cw-cobalt-deep: #334fcf;
  --cw-cobalt-pale: #e9edff;
  --cw-cobalt-wash: rgba(73, 103, 242, 0.075);
  --cw-cloud: #f3f6fb;
  --cw-white: #fff;
  --cw-slate: #667588;
  --cw-slate-light: #8b98a9;
  --cw-line: rgba(9, 26, 45, 0.14);
  --cw-line-soft: rgba(9, 26, 45, 0.085);
  --cw-success: #227452;
  --cw-success-pale: #eaf6f0;
  --cw-danger: #a64036;
  --cw-shadow: 0 22px 56px -36px rgba(9, 26, 45, 0.42);
  --cw-sans: "SF Pro Text", "Segoe UI", Inter, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--cw-cloud);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--cw-ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(73, 103, 242, 0.045), transparent 28rem),
    var(--cw-cloud);
  font-family: var(--cw-sans);
  -webkit-font-smoothing: antialiased;
}

button,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

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

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(73, 103, 242, 0.32);
  outline-offset: 2px;
}

.cw-client-skip {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: var(--cw-white);
  background: var(--cw-midnight);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-150%);
}

.cw-client-skip:focus {
  transform: translateY(0);
}

.cw-client-bar {
  height: 62px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--cw-line-soft);
  backdrop-filter: blur(16px);
}

.cw-client-bar-inner {
  width: min(1180px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cw-client-firm,
.cw-client-bar-actions {
  display: flex;
  align-items: center;
}

.cw-client-firm {
  min-width: 0;
  gap: 10px;
}

.cw-client-firm strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 720;
  letter-spacing: -0.012em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cw-client-firm > span {
  width: 1px;
  height: 18px;
  flex: 0 0 auto;
  background: var(--cw-line);
}

.cw-client-firm small {
  flex: 0 0 auto;
  color: var(--cw-slate);
  font-size: 12px;
  font-weight: 650;
}

.cw-client-bar-actions {
  flex: 0 0 auto;
  gap: 18px;
}

.cw-client-preview {
  padding: 5px 8px;
  color: var(--cw-slate);
  background: var(--cw-cloud);
  border: 1px solid var(--cw-line-soft);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.055em;
  line-height: 1;
  text-transform: uppercase;
}

.cw-client-help,
.cw-client-footer button,
.cw-not-me {
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(73, 103, 242, 0.3);
  text-underline-offset: 3px;
}

.cw-client-help {
  color: var(--cw-cobalt-deep);
  font-size: 12px;
  font-weight: 700;
}

.cw-client-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 14px;
}

.cw-client-progress {
  margin: 0 4px 14px;
}

.cw-client-progress ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.cw-client-progress li {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cw-slate-light);
}

.cw-client-progress li:not(:last-child)::after {
  position: absolute;
  z-index: 0;
  top: 16px;
  right: 10px;
  left: 45px;
  height: 1px;
  content: "";
  background: var(--cw-line);
}

.cw-client-progress li > span {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--cw-slate);
  background: var(--cw-white);
  border: 1px solid var(--cw-line);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.cw-client-progress li > div {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding-right: 10px;
  background: var(--cw-cloud);
}

.cw-client-progress strong,
.cw-client-progress small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cw-client-progress strong {
  font-size: 12px;
  font-weight: 750;
}

.cw-client-progress small {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 520;
}

.cw-client-progress .is-current {
  color: var(--cw-ink);
}

.cw-client-progress .is-current > span {
  color: var(--cw-white);
  background: var(--cw-cobalt);
  border-color: var(--cw-cobalt);
  box-shadow: 0 0 0 4px rgba(73, 103, 242, 0.1);
}

.cw-confirm-card {
  min-height: 486px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 344px;
  overflow: hidden;
  background: var(--cw-white);
  border: 1px solid var(--cw-line-soft);
  border-radius: 16px;
  box-shadow: var(--cw-shadow);
}

.cw-confirm-main {
  min-width: 0;
  padding: 30px 36px 24px;
}

.cw-safety-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  color: var(--cw-success);
  background: var(--cw-success-pale);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}

.cw-safety-state svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.cw-confirm-heading {
  margin-top: 15px;
}

.cw-confirm-heading h1 {
  margin: 0;
  font-size: clamp(29px, 3vw, 37px);
  font-weight: 760;
  letter-spacing: -0.038em;
  line-height: 1.08;
}

.cw-confirm-heading p {
  max-width: 620px;
  margin: 9px 0 0;
  color: var(--cw-slate);
  font-size: 14px;
  line-height: 1.48;
}

.cw-party-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.cw-party-card {
  min-width: 0;
  padding: 16px 17px 17px;
  background: #fafbfe;
  border: 1px solid var(--cw-line);
  border-radius: 11px;
}

.cw-party-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 11px;
}

.cw-party-label span {
  color: var(--cw-cobalt-deep);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.cw-party-label small {
  overflow: hidden;
  color: var(--cw-slate);
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cw-party-card strong {
  display: block;
  overflow: hidden;
  font-size: 16px;
  font-weight: 720;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cw-readonly-note {
  margin: 10px 2px 0;
  color: var(--cw-slate);
  font-size: 11px;
  line-height: 1.45;
}

.cw-children-group {
  margin-top: 12px;
  padding: 11px 13px 12px;
  background: var(--cw-cobalt-wash);
  border: 1px solid rgba(73, 103, 242, 0.14);
  border-radius: 10px;
}

.cw-children-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cw-children-heading strong {
  color: var(--cw-ink-soft);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.cw-children-heading span {
  color: var(--cw-slate);
  font-size: 9px;
  font-weight: 650;
}

.cw-children-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 9px;
}

.cw-children-list article {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.cw-children-list article > span {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--cw-cobalt-deep);
  background: var(--cw-white);
  border: 1px solid rgba(73, 103, 242, 0.16);
  border-radius: 50%;
  font-size: 8px;
  font-weight: 800;
}

.cw-children-list article > div {
  min-width: 0;
}

.cw-children-list strong,
.cw-children-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cw-children-list strong {
  font-size: 11px;
  font-weight: 720;
}

.cw-children-list small {
  margin-top: 2px;
  color: var(--cw-slate);
  font-size: 9px;
}

.cw-correction-state {
  margin-top: 14px;
  padding: 11px 13px;
  color: var(--cw-success);
  background: var(--cw-success-pale);
  border: 1px solid rgba(34, 116, 82, 0.16);
  border-radius: 9px;
  font-size: 11px;
  line-height: 1.4;
}

.cw-correction-state strong,
.cw-correction-state span {
  display: block;
}

.cw-correction-state span {
  margin-top: 2px;
}

.cw-confirm-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.cw-button {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

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

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

.cw-button-primary {
  color: var(--cw-white);
  background: var(--cw-cobalt);
  border-color: var(--cw-cobalt);
  box-shadow: 0 8px 18px -12px rgba(51, 79, 207, 0.9);
}

.cw-button-primary:hover:not(:disabled) {
  background: var(--cw-cobalt-deep);
  border-color: var(--cw-cobalt-deep);
}

.cw-button-primary svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.cw-button-secondary {
  color: var(--cw-ink-soft);
  background: var(--cw-white);
  border-color: var(--cw-line);
}

.cw-button-secondary:hover {
  border-color: rgba(73, 103, 242, 0.42);
  background: var(--cw-cobalt-wash);
}

.cw-not-me {
  display: block;
  margin-top: 13px;
  color: var(--cw-slate);
  font-size: 11px;
  font-weight: 620;
}

.cw-next-panel {
  padding: 30px 28px;
  background:
    linear-gradient(180deg, rgba(73, 103, 242, 0.08), rgba(73, 103, 242, 0.025)),
    #f9faff;
  border-left: 1px solid rgba(73, 103, 242, 0.13);
}

.cw-next-label {
  color: var(--cw-cobalt-deep);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.cw-next-panel h2 {
  margin: 8px 0 0;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.cw-next-panel > p {
  margin: 9px 0 0;
  color: var(--cw-slate);
  font-size: 12px;
  line-height: 1.48;
}

.cw-source-preview {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.cw-source-preview li {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-top: 1px solid var(--cw-line-soft);
}

.cw-source-preview li:last-child {
  border-bottom: 1px solid var(--cw-line-soft);
}

.cw-source-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--cw-cobalt-deep);
  background: var(--cw-white);
  border: 1px solid rgba(73, 103, 242, 0.16);
  border-radius: 8px;
}

.cw-source-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.cw-source-preview li > span:last-child {
  min-width: 0;
}

.cw-source-preview strong,
.cw-source-preview small {
  display: block;
}

.cw-source-preview strong {
  font-size: 12px;
  font-weight: 720;
}

.cw-source-preview small {
  margin-top: 3px;
  color: var(--cw-slate);
  font-size: 10px;
  font-weight: 560;
}

.cw-next-boundary {
  display: flex;
  gap: 9px;
  margin-top: 18px;
  padding: 11px 12px;
  color: var(--cw-ink-soft);
  background: var(--cw-white);
  border: 1px solid var(--cw-line-soft);
  border-radius: 9px;
  font-size: 10px;
  line-height: 1.45;
}

.cw-next-boundary svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--cw-success);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.cw-next-boundary strong {
  display: block;
  margin-bottom: 2px;
  font-weight: 780;
}

.cw-client-footer {
  width: min(1180px, calc(100% - 40px));
  min-height: 44px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 0 4px 12px;
  color: var(--cw-slate);
  font-size: 9.5px;
  line-height: 1.4;
}

.cw-client-footer p {
  margin: 0;
}

.cw-client-footer p span {
  color: var(--cw-ink-soft);
  font-weight: 680;
}

.cw-client-footer > div {
  display: flex;
  flex: 0 0 auto;
  gap: 14px;
}

.cw-client-footer button {
  color: var(--cw-slate);
  font-size: inherit;
}

.cw-dialog {
  width: min(480px, calc(100% - 32px));
  max-height: calc(100svh - 40px);
  margin: auto;
  padding: 0;
  overflow: visible;
  color: var(--cw-ink);
  background: transparent;
  border: 0;
}

.cw-dialog::backdrop {
  background: rgba(9, 26, 45, 0.56);
  backdrop-filter: blur(3px);
}

.cw-dialog-shell {
  position: relative;
  max-height: calc(100svh - 40px);
  padding: 26px;
  overflow-y: auto;
  background: var(--cw-white);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  box-shadow: 0 30px 80px -30px rgba(9, 26, 45, 0.68);
}

.cw-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--cw-slate);
  background: var(--cw-cloud);
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.cw-dialog-close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.cw-dialog-kicker {
  margin: 0 42px 7px 0;
  color: var(--cw-cobalt-deep);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cw-dialog h2 {
  margin: 0 42px 0 0;
  font-size: 23px;
  font-weight: 760;
  letter-spacing: -0.03em;
  line-height: 1.18;
}

.cw-dialog-copy {
  margin: 11px 0 0;
  color: var(--cw-slate);
  font-size: 13px;
  line-height: 1.55;
}

.cw-dialog-field {
  display: block;
  margin-top: 18px;
}

.cw-dialog-field > span {
  display: block;
  margin-bottom: 7px;
  color: var(--cw-ink-soft);
  font-size: 11px;
  font-weight: 750;
}

.cw-dialog-field textarea {
  width: 100%;
  min-height: 108px;
  resize: vertical;
  padding: 11px 12px;
  color: var(--cw-ink);
  background: var(--cw-white);
  border: 1px solid var(--cw-line);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.cw-dialog-field textarea::placeholder {
  color: var(--cw-slate-light);
}

.cw-dialog-field textarea[aria-invalid="true"] {
  border-color: var(--cw-danger);
}

.cw-field-error {
  margin: 6px 0 0;
  color: var(--cw-danger);
  font-size: 10px;
  font-weight: 650;
}

.cw-dialog-note {
  margin: 13px 0 0;
  padding: 10px 11px;
  color: var(--cw-slate);
  background: var(--cw-cloud);
  border-radius: 8px;
  font-size: 10px;
  line-height: 1.45;
}

.cw-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}

.cw-client-live {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .cw-client-bar-inner,
  .cw-client-main,
  .cw-client-footer {
    width: calc(100% - 28px);
  }

  .cw-confirm-card {
    grid-template-columns: minmax(0, 1fr) 292px;
  }

  .cw-confirm-main {
    padding-right: 24px;
    padding-left: 24px;
  }

  .cw-next-panel {
    padding-right: 22px;
    padding-left: 22px;
  }

  .cw-party-card strong {
    min-height: 34px;
    overflow: visible;
    font-size: 14px;
    line-height: 1.22;
    text-overflow: clip;
    white-space: normal;
  }

  .cw-party-label small {
    font-size: 9px;
  }

  .cw-children-list strong {
    overflow: visible;
    line-height: 1.2;
    text-overflow: clip;
    white-space: normal;
  }

  .cw-confirm-actions .cw-button {
    padding-right: 12px;
    padding-left: 12px;
    font-size: 11px;
  }

  .cw-client-progress li {
    gap: 8px;
  }

  .cw-client-progress li:not(:last-child)::after {
    left: 42px;
  }
}

@media (min-width: 721px) and (max-width: 800px) {
  .cw-party-label {
    display: block;
  }

  .cw-party-label small {
    display: block;
    margin-top: 3px;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
}

@media (max-width: 720px) {
  .cw-client-bar {
    height: 56px;
  }

  .cw-client-bar-inner,
  .cw-client-main,
  .cw-client-footer {
    width: calc(100% - 24px);
  }

  .cw-client-bar-actions {
    gap: 12px;
  }

  .cw-client-preview,
  .cw-client-help {
    display: none;
  }

  .cw-client-firm > span,
  .cw-client-firm small {
    display: none;
  }

  .cw-client-main {
    padding: 12px 0 16px;
  }

  .cw-client-progress {
    margin: 0 2px 11px;
  }

  .cw-client-progress li {
    gap: 7px;
  }

  .cw-client-progress li > span {
    width: 27px;
    height: 27px;
    font-size: 10px;
  }

  .cw-client-progress li:not(:last-child)::after {
    top: 13px;
    right: 6px;
    left: 35px;
  }

  .cw-client-progress li > div {
    padding-right: 6px;
  }

  .cw-client-progress strong {
    font-size: 10px;
  }

  .cw-client-progress small {
    display: none;
  }

  .cw-confirm-card {
    min-height: 0;
    display: block;
    overflow: visible;
    border-radius: 13px;
  }

  .cw-confirm-main {
    padding: 18px 17px 17px;
  }

  .cw-safety-state {
    padding: 5px 8px;
    font-size: 10px;
  }

  .cw-confirm-heading {
    margin-top: 12px;
  }

  .cw-confirm-heading h1 {
    font-size: 28px;
  }

  .cw-confirm-heading p {
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.42;
  }

  .cw-party-list {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 14px;
  }

  .cw-children-group {
    margin-top: 9px;
    padding: 9px 10px 10px;
  }

  .cw-children-list {
    gap: 7px;
    margin-top: 7px;
  }

  .cw-children-list article {
    gap: 7px;
  }

  .cw-children-list article > span {
    width: 24px;
    height: 24px;
  }

  .cw-children-list strong {
    font-size: 10px;
  }

  .cw-children-list small {
    font-size: 8px;
  }

  .cw-party-card {
    padding: 11px 12px;
  }

  .cw-party-label {
    margin-bottom: 7px;
  }

  .cw-party-card strong {
    min-height: 0;
    font-size: 14px;
  }

  .cw-readonly-note {
    margin-top: 8px;
    font-size: 10px;
  }

  .cw-confirm-actions {
    display: grid;
    gap: 8px;
    margin-top: 12px;
  }

  .cw-button {
    min-height: 42px;
    width: 100%;
  }

  .cw-not-me {
    margin: 11px auto 0;
  }

  .cw-next-panel {
    margin: 0 10px 10px;
    padding: 13px 15px 14px;
    border: 1px solid rgba(73, 103, 242, 0.13);
    border-radius: 10px;
  }

  .cw-next-panel h2 {
    margin-top: 5px;
    font-size: 17px;
  }

  .cw-next-panel > p {
    margin-top: 6px;
    font-size: 11px;
  }

  .cw-source-preview {
    display: none;
  }

  .cw-next-boundary {
    display: none;
  }

  .cw-client-footer {
    display: block;
    padding: 0 3px 16px;
    text-align: center;
  }

  .cw-client-footer > div {
    justify-content: center;
    margin-top: 7px;
  }
}

@media (max-width: 370px) {
  .cw-client-bar-inner,
  .cw-client-main,
  .cw-client-footer {
    width: calc(100% - 18px);
  }

  .cw-client-firm strong {
    font-size: 12px;
  }

  .cw-confirm-main {
    padding-right: 14px;
    padding-left: 14px;
  }

  .cw-confirm-heading h1 {
    font-size: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* signed-in identity chip (post-2FA header) */
.cw-client-identity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cw-ink, #0b1929);
  font-size: 12px;
  font-weight: 700;
}

.cw-client-identity > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--cw-cobalt, #4967f2);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.02em;
}

@media (max-width: 640px) {
  .cw-client-identity {
    font-size: 0;
    gap: 0;
  }
}

@media (max-width: 360px) {
  /* the Next preview panel is auxiliary — on tiny screens the task itself wins */
  .cw-next-panel {
    display: none;
  }

  .cw-confirm-main {
    padding-bottom: 14px;
  }
}

@media (max-width: 360px) {
  .cw-client-progress li div small {
    display: none;
  }

  .cw-client-progress {
    margin-bottom: 8px;
  }

  .cw-confirm-heading h1 {
    font-size: 21px;
  }

  .cw-confirm-heading p {
    font-size: 11px;
    line-height: 1.42;
  }

  .cw-party-card,
  .cw-children-list article {
    padding: 8px 10px;
  }

  .cw-children-group {
    margin-top: 8px;
  }

  .cw-readonly-note {
    margin-top: 8px;
    font-size: 10px;
    line-height: 1.4;
  }

  .cw-confirm-actions {
    margin-top: 10px;
    gap: 6px;
  }

  .cw-safety-state {
    margin-bottom: 6px;
  }
}

@media (max-width: 360px) {
  .cw-children-list article span {
    width: 26px;
    height: 26px;
    font-size: 9px;
  }

  .cw-children-list article {
    gap: 8px;
  }

  .cw-children-heading {
    margin-bottom: 6px;
  }

  .cw-party-list {
    gap: 6px;
  }

  .cw-client-footer {
    padding-top: 6px;
    padding-bottom: 8px;
  }

  .cw-client-footer div {
    display: none;
  }

  .cw-client-footer p {
    font-size: 8.5px;
  }

  .cw-not-me {
    margin-top: 4px;
    min-height: 34px;
  }
}

@media (max-width: 360px) {
  .cw-party-card {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
  }

  .cw-party-card .cw-party-label {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 0;
  }

  .cw-party-card strong {
    font-size: 11.5px;
    text-align: right;
  }

  .cw-party-list {
    margin-top: 10px;
  }
}

/* client edits to people: pencil, pending chip, add-person form */
.cw-person-edit {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--cw-slate, #64748b);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
}

.cw-person-edit:hover {
  color: var(--cw-cobalt-deep, #334fcf);
  border-color: rgba(73, 103, 242, 0.25);
  background: rgba(73, 103, 242, 0.06);
}

.cw-person-edit svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cw-party-card {
  position: relative;
}

.cw-party-card .cw-person-edit {
  position: absolute;
  right: 10px;
  bottom: 10px;
}

.cw-children-list article .cw-person-edit {
  margin-left: auto;
}

.cw-person-input {
  min-height: 34px;
  padding: 0 10px;
  color: var(--cw-ink, #0b1929);
  background: #fff;
  border: 1.5px solid var(--cw-cobalt, #4967f2);
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
}

.cw-person-pending {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  color: #8a5a00;
  background: #fff3df;
  border-radius: 999px;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 740;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cw-changes-note {
  margin-top: 10px;
  padding: 10px 13px;
  background: #fff3df;
  border-left: 3px solid #d88725;
  border-radius: 7px;
  font-size: 11.5px;
  line-height: 1.45;
}

.cw-changes-note strong {
  font-weight: 760;
}

.cw-add-person-open {
  margin-top: 10px;
  min-height: 40px;
  padding: 0 4px;
  color: var(--cw-cobalt-deep, #334fcf);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 720;
  text-decoration: underline;
  text-decoration-color: rgba(73, 103, 242, 0.3);
  text-underline-offset: 3px;
}

.cw-add-person {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) 64px auto auto;
  gap: 8px;
  align-items: center;
}

.cw-add-person input,
.cw-add-person select {
  min-height: 40px;
  padding: 0 11px;
  color: var(--cw-ink, #0b1929);
  background: #fafbfc;
  border: 1.5px solid rgba(9, 26, 45, 0.14);
  border-radius: 8px;
  font: inherit;
  font-size: 12.5px;
}

.cw-add-person input:focus,
.cw-add-person select:focus {
  background: #fff;
  border-color: var(--cw-cobalt, #4967f2);
  outline: 3px solid rgba(73, 103, 242, 0.22);
  outline-offset: 1px;
}

.cw-add-person[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .cw-add-person {
    grid-template-columns: 1fr 1fr;
  }

  .cw-add-person input:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  /* the full request is the next screen — on phones the preview list folds */
  .cw-source-preview {
    display: none;
  }

  .cw-next-panel h2 {
    font-size: 15px;
  }

  .cw-add-person-open {
    margin-top: 6px;
    min-height: 34px;
    font-size: 11.5px;
  }

  .cw-readonly-note {
    font-size: 10.5px;
  }
}

@media (max-width: 360px) {
  .cw-add-person-open {
    margin-top: 2px;
    min-height: 30px;
    font-size: 10.5px;
  }

  .cw-person-edit {
    width: 26px;
    height: 26px;
  }
}

/* provenance tag: neutral, informational — no approval loop */
.cw-person-pending {
  color: #64748b;
  background: rgba(9, 26, 45, 0.06);
}

@media (max-width: 640px) {
  /* auxiliary on phones: the request IS the next screen */
  .cw-next-panel {
    display: none;
  }
}

@media (max-width: 360px) {
  .cw-client-main {
    padding-top: 8px;
    padding-bottom: 10px;
  }

  .cw-confirm-heading {
    margin-top: 8px;
  }

  .cw-confirm-heading h1 {
    font-size: 19px;
  }

  .cw-confirm-heading p {
    margin-top: 4px;
    font-size: 10.5px;
    line-height: 1.38;
  }

  .cw-children-group {
    padding: 7px 9px 8px;
  }

  .cw-children-list {
    gap: 5px;
  }

  .cw-readonly-note {
    margin-top: 6px;
  }

  .cw-confirm-actions {
    margin-top: 8px;
  }

  .cw-confirm-actions .cw-button {
    min-height: 40px;
  }

  .cw-client-bar {
    height: 50px;
  }
}

.cw-people-empty {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.cw-people-empty[hidden] {
  display: none;
}

.cw-children-list:empty {
  display: none;
}

@media (max-width: 360px) {
  .cw-people-empty {
    font-size: 10px;
    line-height: 1.35;
  }

  .cw-children-heading {
    margin-bottom: 3px;
  }

  .cw-safety-state {
    margin-bottom: 4px;
    padding: 4px 8px;
  }

  .cw-client-progress {
    margin-bottom: 6px;
  }
}

/* handle chips: numbers/emails are how discovery binds people to threads */
.cw-handle-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.cw-handle {
  padding: 4px 10px;
  color: #334155;
  background: rgba(9, 26, 45, 0.05);
  border: 1px solid rgba(9, 26, 45, 0.1);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}

.cw-handle-alias {
  color: #334fcf;
  background: rgba(73, 103, 242, 0.07);
  border-color: rgba(73, 103, 242, 0.2);
}

.cw-handle-add {
  padding: 4px 8px;
  color: #334fcf;
  background: transparent;
  border: 1px dashed rgba(73, 103, 242, 0.4);
  border-radius: 999px;
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 700;
}

.cw-handle-add:hover {
  background: rgba(73, 103, 242, 0.06);
}

.cw-handle-input {
  min-height: 26px;
  padding: 0 10px;
  border: 1.5px solid var(--cw-cobalt, #4967f2);
  border-radius: 999px;
  font: inherit;
  font-size: 11px;
  outline: none;
}

.cw-party-card {
  display: block;
}

.cw-who-else {
  margin: 12px 0 0;
  color: #334155;
  font-size: 12px;
  font-weight: 640;
  line-height: 1.5;
}

.cw-child-phone {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 11.5px;
  color: #334155;
}

.cw-child-phone span {
  font-weight: 700;
}

.cw-child-phone label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.cw-add-person-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}

.cw-add-person {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr) 64px;
}

.cw-add-person #add-person-handle {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .cw-add-person {
    grid-template-columns: 1fr 1fr;
  }

  .cw-who-else {
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .cw-who-else {
    display: none;
  }

  .cw-handle {
    font-size: 9.5px;
    padding: 3px 8px;
  }

  .cw-handle-add {
    font-size: 9px;
  }
}

/* reclaim vertical space now that party cards carry handle rows */
.cw-confirm-card {
  padding: 18px 22px;
}

.cw-confirm-heading p {
  margin-top: 6px;
}

.cw-party-list {
  margin-top: 12px;
}

.cw-party-card {
  padding: 12px 14px;
}

.cw-children-group {
  margin-top: 10px;
}

.cw-readonly-note {
  margin-top: 10px;
}

.cw-confirm-actions {
  margin-top: 12px;
}


/* initial state fits 768 desktop; scroll appears only as the roster grows */
.cw-confirm-heading h1 { font-size: 28px; }
.cw-confirm-heading p { margin-top: 5px; font-size: 13px; }
.cw-children-heading { margin-bottom: 6px; }
.cw-who-else { margin-top: 8px; font-size: 11.5px; }
.cw-add-person-open { margin-top: 6px; }
.cw-children-group { padding: 12px 14px; }

.cw-confirm-card { padding-top: 15px; padding-bottom: 15px; }

/* shared source rail (unified across confirm-people + connect screens) */
.cw-source-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin-bottom: 20px;
  font-size: 12px;
}
.cw-source-rail span {
  color: var(--cw-slate-light, #8d9aab);
  font-weight: 650;
}
.cw-source-rail span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 1px;
  margin-left: 10px;
  vertical-align: middle;
  background: rgba(9, 26, 45, 0.18);
}
.cw-source-rail .is-done {
  color: var(--cw-slate, #64748b);
}
.cw-source-rail .is-current {
  color: var(--cw-cobalt-deep, #334fcf);
  font-weight: 760;
}
