/* Screen UI only. The artwork and typesetting inside document previews use their own styles. */
body.csm-tool {
  font-family: CSM, Arial, sans-serif;
  background: #f8f7fb;
  color: var(--csm-ink);
}
.csm-tool :is(.w2-banner, .intro, .offer-intro, .classic-builder-copy, .sc-hero) {
  color: var(--csm-ink);
}
.csm-tool :is(.w2-banner, .intro, .offer-intro) {
  margin-block: 1rem 1.5rem;
  padding: clamp(1.1rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem);
  border: 1px solid #dcd4ee;
  border-radius: var(--csm-radius);
  background: linear-gradient(122deg, #f4effc, #edf7f3);
  box-shadow: none;
}
.csm-tool :is(.w2-banner, .intro, .offer-intro) h1,
.csm-tool .classic-builder-copy h1 {
  color: var(--csm-ink);
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
  line-height: 1.14;
  letter-spacing: -.038em;
}
.csm-tool :is(.w2-banner, .intro, .offer-intro) h1 { margin: 0 0 .5rem; }
.csm-tool :is(.w2-banner, .intro, .offer-intro) .eyebrow {
  display: inline-block;
  margin-bottom: .35rem;
  color: #514184;
  font-size: var(--csm-small-text);
  letter-spacing: .07em;
}
.csm-tool .w2-banner > div:first-child > p,
.csm-tool :is(.intro, .offer-intro) .intro-copy > p {
  max-width: 58ch;
  color: var(--csm-muted);
  font-size: var(--csm-body);
  line-height: 1.6;
}
.csm-tool :is(.w2-banner, .intro, .offer-intro) .intro-pricing {
  color: var(--csm-muted);
  background: #fff;
  border: 1px solid var(--csm-line);
  border-radius: .75rem;
  box-shadow: none;
  padding: .65rem .9rem;
}
.csm-tool .intro-pricing :is(p, span, small) { color: var(--csm-muted); }
.csm-tool .intro-pricing strong, .csm-tool .intro-pricing strong a { color: var(--csm-accent-dark); }
.csm-tool .w2-banner ol {
  gap: .7rem 1.3rem;
  font-size: var(--csm-label);
  color: var(--csm-muted);
}
.csm-tool .w2-banner ol span { background: #e9e2f8; border-color: #d4c6ec; color: #443082; }
.csm-tool .banner-document {
  background: white;
  color: var(--csm-accent-dark);
  box-shadow: 0 .4rem 1.1rem #32225c25;
}
.csm-tool .w2-banner .banner-document span { color: var(--csm-muted); }
.csm-tool .csm-builder-banner {
  margin: .4rem 0 .75rem;
  padding: .55rem .75rem;
  border: 1px solid #ded7ee;
  border-radius: .5rem;
  background: #f4f0fb;
  color: #463c60;
  font-size: var(--csm-small-text);
  line-height: 1.45;
}
.csm-tool .csm-builder-banner b { color: var(--csm-ink); }

.csm-tool form :is(label, legend), .csm-tool :is(.sc-input-card, .nc-input-card) label {
  color: var(--csm-ink);
  font-family: inherit;
  font-size: var(--csm-label);
  line-height: 1.45;
}
.csm-tool :is(main, dialog, .login-main) :is(input:not([type="hidden"], [type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="button"], [type="submit"], [type="image"]), select, textarea) {
  font-family: inherit;
  font-size: var(--csm-body);
  line-height: 1.4;
  color: var(--csm-ink);
  border-color: var(--csm-field-border);
  border-radius: .5rem;
  max-width: 100%;
}
.csm-tool :is(main, dialog) :is(input:not([type="hidden"], [type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="button"], [type="submit"], [type="image"]), select) {
  min-height: 2.75rem;
}
.csm-tool :is(main, dialog) :is(input, select, textarea)[aria-invalid="true"],
.csm-tool :is(main, dialog) :is(input, select, textarea).invalid {
  border-color: #ac314b;
}
.csm-tool :is(main, dialog) :is(input, select, textarea):focus {
  border-color: var(--csm-focus);
}
.csm-tool :is(main, dialog) :is(input[type=checkbox], input[type=radio]) { accent-color: var(--csm-accent); }
.csm-tool :is(.helper, .field-help, .input-hint, .form-note, .saved-note, .preview-caption) {
  color: var(--csm-muted);
  font-size: var(--csm-small-text);
  line-height: 1.55;
}
.csm-tool :is(.section-card, .step-card, .form-card, .preview-sidebar, .preview-card, .sc-input-card, .sc-result-card) {
  border-color: var(--csm-line);
  border-radius: var(--csm-radius);
}
.csm-tool .section-card > h2, .csm-tool .section-heading h2, .csm-tool .step-card > h2 {
  font-size: 1.25rem;
  line-height: 1.35;
  color: var(--csm-ink);
}
.csm-tool .preview-sidebar {
  background: #f1eff8;
  min-width: 0;
}
.csm-tool .preview-sidebar .preview-header :is(h2,.eyebrow) { color: var(--csm-ink); }
.csm-tool .preview-sidebar img { max-width: 100%; height: auto; }
.csm-tool :is(.layout, .builder-layout, .editor-layout, .checkout-layout) > * { min-width: 0; }
.csm-tool .template-selection { background: #f4f0fc; border-color: #d8cfed; }
.csm-tool .template-selection .template-availability { background: #e8dff7; border-color: #d8cbed; color: #493281; }
.csm-tool .stepper button[aria-current] .step-num { background: var(--csm-accent); border-color: var(--csm-accent); }
.csm-tool .stepper .complete .step-num { background: #e5f3eb; border-color: #afcfbf; color: #116349; }
.csm-tool :is(button.primary, button.btn-primary, .button.primary, .primary-button, a.primary) {
  background-color: var(--csm-accent);
  border-color: var(--csm-accent);
  color: #fff;
}
.csm-tool :is(button.primary, button.btn-primary, .button.primary, .primary-button, a.primary):hover:not(:disabled) {
  background-color: var(--csm-accent-dark);
  border-color: var(--csm-accent-dark);
}
.csm-tool :is(button.primary, button.secondary, button.btn-primary, button.btn-secondary, .button.primary) {
  min-height: 2.75rem;
}
#prepare-payment, #prepare-paypal { scroll-margin-bottom: 7rem; }
.csm-admin-extra { display: flex; flex-direction: column; gap: .75rem; padding: 1.25rem; }
.csm-admin-extra a { color: inherit; font-size: var(--csm-label); text-decoration: none; }

@media (max-width: 48rem) {
  body.csm-tool { min-width: 0; }
  .csm-tool .w2-banner { margin-top: .7rem; }
  .csm-tool .w2-banner > div:first-child { min-width: 0; }
  .csm-tool :is(.w2-banner, .intro, .offer-intro) h1 { overflow-wrap: anywhere; }
  .csm-tool .section-card > h2, .csm-tool .section-heading h2 { font-size: 1.125rem; }
}

.csm-tool .w2-banner .intro-pricing .intro-price-note { color: var(--csm-muted); }
.csm-builder-page .workspace > * { min-width: 0; max-width: 100%; }
.csm-builder-page .workspace :is(form, fieldset, .section-card) { min-width: 0; }
.csm-tool input[type=file] { font-size: var(--csm-body) !important; }
.csm-tool input[type=file]::file-selector-button {
  margin-inline-end: .65rem;
  padding: .5rem .65rem;
  border: 1px solid var(--csm-line);
  border-radius: .4rem;
  background: var(--csm-tint);
  color: var(--csm-ink);
  font: 650 var(--csm-label)/1.4 CSM, Arial, sans-serif;
  cursor: pointer;
}
.csm-tool.classic-workspace .classic-sheet-stage :is(input, select):not([type="hidden"], [type="checkbox"], [type="radio"]) {
  font-size: var(--csm-body) !important;
}
.csm-tool.classic-workspace .classic-builder-copy h1 { font-size: clamp(1.9rem, 3.5vw, 2.75rem) !important; }
.csm-tool .sc-hero :is(h1, p) { overflow-wrap: anywhere; }

.csm-tool .calculated-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 44%);
  align-items: baseline;
  gap: .35rem .75rem;
  overflow-wrap: anywhere;
}
.csm-tool .calculated-row > strong {
  text-align: right;
  white-space: normal;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 24rem) {
  .csm-tool .calculated-row { grid-template-columns: minmax(0, 1fr); }
  .csm-tool .calculated-row > strong { text-align: start; }
}

/* Legacy builders set a smaller root font, which also shrinks the shared rem scale. */
html:has(body.classic-workspace.csm-tool) { font-size: 100%; }
.csm-tool.classic-workspace :is(.classic-mobile-tabs, .classic-builder-tags) { gap: .55rem; }
.csm-tool.classic-workspace .classic-mobile-tabs button { min-height: 2.75rem; }
.csm-tool.classic-workspace .classic-mobile-tabs button[aria-pressed="true"] {
  border-color: var(--csm-accent);
  color: var(--csm-accent-dark);
  background: #eee8fa;
}
.csm-admin-app .login-main form label { font-size: var(--csm-label); }
.csm-admin-app .login-main form input { font-size: var(--csm-body); min-height: 2.75rem; }
.csm-admin-app :is(.login-main, .drawer, .dialog-body) :focus-visible {
  outline: 3px solid var(--csm-focus);
  outline-offset: 3px;
}

.csm-tool.classic-workspace form > .paystub:not(:has(.classic-sheet-stage)) {
  max-width: 100%;
  overflow-x: auto;
}
/* A native select remains recognizable when a product removes the browser's arrow. */
body.csm-tool :is(main,dialog) select {
  appearance:none;
  background-image:url('/assets/field-chevron.svg');
  background-repeat:no-repeat;
  background-position:right 14px center;
  background-size:16px 16px;
  padding-right:44px!important;
}

/* Shared loading states follow the site purple palette. */
body.csm-tool .payment-loading{border-color:#ddd1ee;background:#f7f3fc;color:#573e83}
body.csm-tool .loading-spinner{border-color:#e1d5f0;border-top-color:#6041b6}
body.csm-tool .upload-status[data-state=loading]{color:#6041b6}
