/* v41.3.1 - writing helper and watermark policy. */
.cv-watermark {
  display: none !important;
}

.v4131-writing-helper {
  margin: -3px 0 18px;
  border: 1px solid #d9e2e7;
  border-radius: 12px;
  background: linear-gradient(145deg, #f8fbfc, #f1f6f8);
  color: #263f4d;
  overflow: hidden;
  box-shadow: 0 7px 20px rgba(28, 63, 82, 0.07);
}

.v4131-writing-helper > summary {
  min-height: 54px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  list-style: none;
}

.v4131-writing-helper > summary::-webkit-details-marker {
  display: none;
}

.v4131-writing-helper > summary > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.v4131-writing-helper > summary b {
  font-size: 10px;
  line-height: 1.35;
}

.v4131-writing-helper > summary small {
  color: #71818a;
  font-size: 7.5px;
  line-height: 1.4;
}

.v4131-writing-helper > summary > i {
  color: #6f8794;
  font-size: 16px;
  font-style: normal;
  text-align: center;
  transition: transform 0.18s ease;
}

.v4131-writing-helper[open] > summary > i {
  transform: rotate(45deg);
}

.v4131-ai-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #c8a762;
  border-radius: 10px;
  color: #75531b;
  background: linear-gradient(145deg, #fff8e9, #eedcb8);
  font-size: 15px;
}

.v4131-writing-helper-body {
  padding: 13px;
  border-top: 1px solid #dce5e9;
  background: rgba(255, 255, 255, 0.72);
}

.v4131-writing-helper-body > p {
  margin: 0 0 11px;
  color: #637681;
  font-size: 8.5px;
  line-height: 1.65;
}

.v4131-writing-controls {
  display: flex;
  align-items: end;
  gap: 8px;
  margin-bottom: 8px;
}

.v4131-writing-controls label {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #506873;
  font-size: 7.5px;
  font-weight: 800;
}

.v4131-writing-controls select {
  width: 100%;
  height: 35px;
  padding: 0 10px;
  border: 1px solid #cad8df;
  border-radius: 8px;
  color: #263f4d;
  background: #fff;
  font-size: 9px;
  outline: none;
}

.v4131-writing-controls select:focus {
  border-color: #6e98ad;
  box-shadow: 0 0 0 3px rgba(62, 117, 146, 0.12);
}

.v4131-writing-prompt {
  width: 100%;
  height: 180px !important;
  min-height: 174px;
  max-height: 300px;
  resize: vertical;
  padding: 11px;
  border: 1px solid #d2dde2;
  border-radius: 9px;
  color: #243740;
  background: #fff;
  font-family: Arial, Tahoma, sans-serif;
  font-size: 8.4px;
  line-height: 1.65;
  outline: none;
}

.v4131-writing-prompt:focus {
  border-color: #6e98ad;
  box-shadow: 0 0 0 3px rgba(62, 117, 146, 0.12);
}

.v4131-writing-actions {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 7px;
  margin-top: 8px;
}

.v4131-writing-actions button,
.v4131-writing-actions a {
  min-height: 37px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid #cbd7dd;
  border-radius: 9px;
  font-size: 8.5px;
  font-weight: 850;
  text-decoration: none;
}

.v4131-copy-prompt {
  color: #fff;
  background: linear-gradient(135deg, #173f57, #276b8d);
  border-color: #1d526f !important;
}

.v4131-open-chatgpt {
  color: #345463;
  background: #fff;
}

.v4131-writing-privacy {
  display: block;
  margin-top: 9px;
  color: #7b8b93;
  font-size: 7px;
  line-height: 1.5;
}

.ui-en .v4131-writing-helper,
.ui-en .v4131-writing-helper-body,
.ui-en .v4131-writing-prompt {
  direction: ltr;
  text-align: left;
}

@media (max-width: 760px) {
  .v4131-writing-helper {
    margin-bottom: 15px;
  }

  .v4131-writing-helper > summary {
    min-height: 58px;
  }

  .v4131-writing-helper > summary b {
    font-size: 10.5px;
  }

  .v4131-writing-helper > summary small,
  .v4131-writing-helper-body > p {
    font-size: 8px;
  }

  .v4131-writing-actions {
    grid-template-columns: 1fr;
  }

  .v4131-writing-actions button,
  .v4131-writing-actions a {
    min-height: 42px;
    font-size: 9px;
  }

  .v4131-writing-prompt {
    height: 190px !important;
    min-height: 190px !important;
  }
}

@media print {
  html,
  body {
    direction: ltr !important;
    height: auto !important;
    overflow: visible !important;
  }

  .v4131-writing-helper {
    display: none !important;
  }
}

/* V41.6 — readable writing helper, one install action, and a single signature card. */
.v4131-writing-helper {
  margin: 0 0 20px;
  border-radius: 16px;
}

.v4131-writing-helper > summary {
  min-height: 70px;
  grid-template-columns: 44px minmax(0, 1fr) 26px;
  gap: 12px;
  padding: 13px 15px;
}

.v4131-ai-mark {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  font-size: 20px;
}

.v4131-writing-helper > summary b {
  font-size: 13px;
  line-height: 1.45;
}

.v4131-writing-helper > summary small {
  font-size: 10.5px;
  line-height: 1.55;
}

.v4131-writing-helper-body {
  padding: 16px;
}

.v4131-writing-helper-body > p {
  font-size: 11.5px;
  line-height: 1.75;
}

.v4131-writing-controls label,
.v4131-writing-privacy {
  font-size: 10.5px;
  line-height: 1.6;
}

.v4131-writing-controls select {
  height: 44px;
  border-radius: 10px;
  font-size: 12px;
}

.v4131-writing-prompt {
  height: 230px !important;
  min-height: 210px !important;
  padding: 13px;
  border-radius: 11px;
  font-size: 12px;
  line-height: 1.75;
}

.v4131-writing-actions button,
.v4131-writing-actions a {
  min-height: 46px;
  border-radius: 11px;
  font-size: 12px;
}

.signature-footer-control {
  display: none !important;
}

.v4134-signature-tools {
  grid-column: 1 / -1 !important;
  gap: 12px !important;
  width: 100% !important;
  margin-top: 16px !important;
  padding: 16px !important;
  border-radius: 16px !important;
}

.v416-signature-toggle {
  direction: rtl;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 66px;
  padding: 11px 12px;
  border: 1px solid #cbd9df;
  border-radius: 13px;
  color: #395766;
  background: #fff;
  text-align: right;
}

.ui-en .v416-signature-toggle {
  direction: ltr;
  text-align: left;
}

.v416-signature-toggle > span:first-child {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #6d7f88;
  background: #edf3f6;
  font-size: 19px;
  font-weight: 900;
}

.v416-signature-toggle > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.v416-signature-toggle b {
  font-size: 13px;
  line-height: 1.35;
}

.v416-signature-toggle small {
  color: #70818a;
  font-size: 10.5px;
  line-height: 1.5;
}

.v416-signature-toggle em {
  border-radius: 20px;
  padding: 6px 9px;
  color: #735523;
  background: #fff2d8;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.v416-signature-toggle.active {
  border-color: #8fc4aa;
  color: #20583b;
  background: #f4fbf7;
  box-shadow: 0 7px 20px rgba(29, 102, 66, .10);
}

.v416-signature-toggle.active > span:first-child {
  color: #fff;
  background: #2c7b52;
}

.v4134-signature-tools-copy b {
  font-size: 13px !important;
}

.v4134-signature-tools-copy small,
.v4134-signature-state {
  font-size: 10.5px !important;
  line-height: 1.6 !important;
}

.v4134-signature-buttons {
  gap: 8px !important;
}

.v4134-signature-buttons button {
  min-height: 47px !important;
  padding: 10px !important;
  font-size: 12px !important;
}

.v4134-show-signature {
  display: none !important;
}

.v4134-signature-state {
  padding: 9px 11px !important;
  border-radius: 10px !important;
}

.v4134-signature-tools.v416-signature-disabled .v4134-signature-tools-copy,
.v4134-signature-tools.v416-signature-disabled .v4134-signature-buttons {
  opacity: .46;
}

.v4134-signature-tools.v416-signature-disabled .v4134-signature-buttons {
  pointer-events: none;
}

@media (min-width: 901px) {
  .app-header {
    grid-template-columns: max-content minmax(120px, 1fr) max-content !important;
    column-gap: 20px !important;
  }

  .app-shell.ui-ar .brand-mark {
    direction: rtl !important;
    justify-self: end !important;
    width: max-content !important;
  }

  .app-shell.ui-ar .brand-mark > div {
    direction: ltr;
    text-align: left;
  }

  .header-actions {
    justify-self: start !important;
  }
}

@media (min-width: 761px) {
  .v31-mobile-install {
    display: none !important;
  }
}

@media (max-width: 760px) {
  .header-actions .v31-install-button {
    display: none !important;
  }

  .v4131-writing-helper > summary {
    min-height: 70px;
  }

  .v4131-writing-helper > summary b {
    font-size: 13px;
  }

  .v4131-writing-helper > summary small,
  .v4131-writing-helper-body > p,
  .v4131-writing-privacy {
    font-size: 10.5px;
  }

  .v4131-writing-prompt {
    height: 250px !important;
    min-height: 230px !important;
    font-size: 12px;
  }

  .v416-signature-toggle {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .v416-signature-toggle em {
    grid-column: 2;
    justify-self: start;
  }

  .v4134-signature-buttons button {
    min-height: 50px !important;
    font-size: 12.5px !important;
  }

  .mobile-app-dock {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
    padding-inline: 6px !important;
  }

  .mobile-app-dock > button {
    min-width: 0 !important;
    padding-inline: 3px !important;
  }

  .mobile-app-dock > button b {
    overflow: hidden;
    font-size: 10px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media print {
  .v4131-writing-helper,
  .v416-signature-toggle {
    display: none !important;
  }
}

/* V41.6.6 — complete, high-contrast dark treatment for the late UX layers. */
body.v40-builder .section-journey-head {
  grid-template-columns: 92px minmax(0, 1fr) 92px !important;
  gap: 8px !important;
}

body.v40-builder .journey-arrow.v40-journey-control {
  width: 92px !important;
  min-width: 92px !important;
  height: 48px !important;
  min-height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  overflow: hidden !important;
  padding: 7px 9px !important;
  font-size: 16px !important;
}

body.v40-builder .journey-arrow.v40-journey-control > span {
  flex: 0 0 auto;
  font-size: 17px !important;
  line-height: 1 !important;
}

body.v40-builder .journey-arrow.v40-journey-control > b {
  min-width: 0;
  overflow: hidden;
  font-size: 11px !important;
  font-weight: 950 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.v30-dark body.v40-builder .v26-map-head > div > span {
  color: #f2cf87 !important;
  font-size: 10.5px !important;
}

html.v30-dark body.v40-builder .v26-map-guide {
  color: #e8f2f5 !important;
  background: #1a3039 !important;
  border-color: #46626e !important;
}

html.v30-dark body.v40-builder .section-title-editor {
  color: #eef6f8 !important;
  background: #172b34 !important;
  border-color: #405c68 !important;
}

html.v30-dark body.v40-builder .section-title-editor b {
  color: #eef6f8 !important;
  font-size: 12px !important;
}

html.v30-dark body.v40-builder .section-title-editor small {
  color: #bfd0d7 !important;
  font-size: 10.5px !important;
}

html.v30-dark body.v40-builder .section-title-editor input {
  color: #f2f7f9 !important;
  background: #0d1e25 !important;
  border-color: #45626e !important;
  font-size: 12px !important;
}

html.v30-dark body.v40-builder .section-title-editor input::placeholder {
  color: #91a8b2 !important;
}

html.v30-dark body.v40-builder .preview-design-selector {
  color: #eef6f8 !important;
  background: #102129 !important;
  border-color: #3b5662 !important;
}

html.v30-dark body.v40-builder .sample-alert-mark {
  background: #985405 !important;
}

html.v30-dark body.v40-builder .v4131-writing-helper {
  color: #edf6f8 !important;
  background: linear-gradient(145deg, #152a33, #102129) !important;
  border-color: #3c5965 !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .24) !important;
}

html.v30-dark body.v40-builder .v4131-writing-helper > summary b {
  color: #f3f8fa !important;
}

html.v30-dark body.v40-builder .v4131-writing-helper > summary small,
html.v30-dark body.v40-builder .v4131-writing-helper-body > p,
html.v30-dark body.v40-builder .v4131-writing-controls label,
html.v30-dark body.v40-builder .v4131-writing-privacy {
  color: #bfd0d7 !important;
}

html.v30-dark body.v40-builder .v4131-writing-helper > summary > i {
  color: #dcebef !important;
}

html.v30-dark body.v40-builder .v4131-ai-mark {
  color: #ffe6ae !important;
  background: #3b321f !important;
  border-color: #a98646 !important;
}

html.v30-dark body.v40-builder .v4131-writing-helper-body {
  background: rgba(10, 25, 31, .62) !important;
  border-color: #354f5b !important;
}

html.v30-dark body.v40-builder .v4131-writing-controls select,
html.v30-dark body.v40-builder .v4131-writing-prompt {
  color: #f1f7f9 !important;
  background: #0d1e25 !important;
  border-color: #45626e !important;
  caret-color: #82d1ec !important;
}

html.v30-dark body.v40-builder .v4131-writing-controls select:focus,
html.v30-dark body.v40-builder .v4131-writing-prompt:focus {
  border-color: #6eacc4 !important;
  box-shadow: 0 0 0 3px rgba(83, 164, 195, .18) !important;
}

html.v30-dark body.v40-builder .v4131-copy-prompt {
  color: #fff !important;
  background: linear-gradient(135deg, #1e5870, #287e9f) !important;
  border-color: #4d94ae !important;
}

html.v30-dark body.v40-builder .v4131-open-chatgpt {
  color: #e4f2f6 !important;
  background: #1a3039 !important;
  border-color: #46626e !important;
}

html.v30-dark body.v40-builder .v416-signature-toggle {
  color: #eaf3f6 !important;
  background: #172b34 !important;
  border-color: #425e69 !important;
  box-shadow: none !important;
}

html.v30-dark body.v40-builder .v416-signature-toggle > span:first-child {
  color: #d8e8ed !important;
  background: #243c46 !important;
}

html.v30-dark body.v40-builder .v416-signature-toggle small {
  color: #bfd0d7 !important;
}

html.v30-dark body.v40-builder .v416-signature-toggle em {
  color: #ffe7b2 !important;
  background: #463820 !important;
}

html.v30-dark body.v40-builder .v416-signature-toggle.active {
  color: #e9fff3 !important;
  background: #173629 !important;
  border-color: #4d8a68 !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .2) !important;
}

html.v30-dark body.v40-builder .v416-signature-toggle.active > span:first-child {
  color: #fff !important;
  background: #317a54 !important;
}

html.v30-dark body.v40-builder .v4134-signature-tools-copy b {
  color: #eef6f8 !important;
}

html.v30-dark body.v40-builder .v4134-signature-tools-copy small,
html.v30-dark body.v40-builder .v4134-signature-state {
  color: #bfd0d7 !important;
}

html.v30-dark body.v40-builder .v4134-signature-state {
  background: #1b3039 !important;
  border: 1px solid #425d68 !important;
}

html.v30-dark body.v40-builder .v4134-signature-state.active {
  color: #c9f1db !important;
  background: #19372a !important;
  border-color: #48795f !important;
}

@media (max-width: 760px) {
  body.v40-builder .section-journey-head {
    grid-template-columns: 82px minmax(0, 1fr) 82px !important;
    gap: 7px !important;
  }

  body.v40-builder .journey-arrow.v40-journey-control {
    width: 82px !important;
    min-width: 82px !important;
    padding-inline: 6px !important;
  }

  body.v40-builder .journey-arrow.v40-journey-control > b {
    font-size: 10.5px !important;
  }
}
