/* ==========================================================================
   R-Code Project Builder — brand purple #4D44C5, matches css/rc-card.css
   ========================================================================== */

.pb-section { background: #F7F7FB; }
.pb-intro { margin-bottom: 32px; }
.pb-intro h2 { font-family: var(--ztc-family-font1); font-size: 36px; font-weight: 700; line-height: 1.2; color: #111; margin-bottom: 10px; }
.pb-intro p { font-size: 17px; color: #5B6172; margin: 0; }

.pb-card {
  position: relative;
  padding: 36px;
  background: #fff;
  border: 1px solid #ECEBF3;
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 20px 48px -24px rgba(16, 24, 40, 0.18);
}
@media (max-width: 575px) { .pb-card { padding: 22px 16px; border-radius: 16px; } .pb-intro h2 { font-size: 28px; } }

.pb-noscript { padding: 12px 14px; background: #FEF3F2; color: #B42318; border-radius: 10px; }

/* Progress */
.pb-progress { margin-bottom: 28px; }
.pb-progress__bar { height: 6px; background: #EFEEF7; border-radius: 99px; overflow: hidden; }
.pb-progress__bar span { display: block; height: 100%; width: 14%; background: #4D44C5; border-radius: 99px; transition: width 0.35s ease; }
.pb-progress__label { margin: 10px 0 0; font-size: 14px; font-weight: 500; color: #5B6172; }

/* Steps */
.pb-step { border: 0; padding: 0; margin: 0; min-width: 0; }
.pb-step legend {
  float: none;
  width: 100%;
  margin-bottom: 6px;
  font-family: var(--ztc-family-font1);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  color: #111;
  outline: none;
}
.pb-hint { margin: 0 0 22px; font-size: 15px; color: #5B6172; }

/* Tiles (single choice) */
.pb-tiles { display: grid; gap: 12px; }
.pb-tiles--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 991px) { .pb-tiles--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pb-tile { position: relative; margin: 0; cursor: pointer; }
.pb-tile input { position: absolute; opacity: 0; pointer-events: none; }
.pb-tile__box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  height: 100%;
  padding: 18px 16px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: #111;
  background: #fff;
  border: 1.5px solid #E4E3EE;
  border-radius: 14px;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.pb-tile__box i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 17px;
  color: #4D44C5;
  background: #F1F0FB;
  border-radius: 10px;
}
.pb-tile:hover .pb-tile__box { border-color: #C9C5F0; }
.pb-tile input:checked + .pb-tile__box { border-color: #4D44C5; background: #F7F6FE; box-shadow: 0 0 0 3px rgba(77, 68, 197, 0.12); }
.pb-tile input:checked + .pb-tile__box i { color: #fff; background: #4D44C5; }
.pb-tile input:focus-visible + .pb-tile__box { outline: 2px solid #4D44C5; outline-offset: 2px; }

/* Checkboxes (features) */
.pb-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 767px) { .pb-checks { grid-template-columns: 1fr; } }
.pb-check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 14px 14px;
  background: #fff;
  border: 1.5px solid #E4E3EE;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.pb-check input { position: absolute; opacity: 0; pointer-events: none; }
.pb-check__box {
  flex: 0 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 12px;
  color: transparent;
  border: 1.5px solid #C9C8D6;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.pb-check__label { flex: 1; font-size: 15px; font-weight: 500; color: #1D2433; line-height: 1.35; }
.pb-check:hover { border-color: #C9C5F0; }
.pb-check:has(input:checked) { border-color: #4D44C5; background: #F7F6FE; }
.pb-check input:checked ~ .pb-check__box { color: #fff; background: #4D44C5; border-color: #4D44C5; }
.pb-check input:focus-visible ~ .pb-check__box { outline: 2px solid #4D44C5; outline-offset: 2px; }

.pb-tag { display: inline-block; padding: 3px 8px; font-size: 11.5px; font-weight: 600; line-height: 1.3; border-radius: 6px; white-space: nowrap; }
.pb-tag--suggested { color: #4D44C5; background: #F1F0FB; }

/* Pills (budget, timeline) */
.pb-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pb-pill { position: relative; margin: 0; cursor: pointer; }
.pb-pill input { position: absolute; opacity: 0; pointer-events: none; }
.pb-pill span {
  display: inline-block;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 500;
  color: #1D2433;
  background: #fff;
  border: 1.5px solid #E4E3EE;
  border-radius: 10px;
  transition: all 0.2s ease;
}
.pb-pill:hover span { border-color: #C9C5F0; }
.pb-pill input:checked + span { color: #fff; background: #4D44C5; border-color: #4D44C5; }
.pb-pill input:focus-visible + span { outline: 2px solid #4D44C5; outline-offset: 2px; }

/* Text fields */
.pb-field { margin-bottom: 20px; }
.pb-field label, .pb-label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 600; color: #1D2433; }
.pb-optional { font-weight: 400; color: #8A90A0; }
.pb-field input[type="text"], .pb-field input[type="email"], .pb-field input[type="tel"], .pb-field textarea {
  width: 100%;
  padding: 13px 14px;
  font-family: var(--ztc-family-font1);
  font-size: 16px;
  color: #111;
  background: #fff;
  border: 1.5px solid #E4E3EE;
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.pb-field textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
.pb-field input:focus, .pb-field textarea:focus { outline: none; border-color: #4D44C5; box-shadow: 0 0 0 3px rgba(77, 68, 197, 0.14); }
.pb-field [aria-invalid="true"] { border-color: #D92D20; }
.pb-counter { margin: 6px 0 0; font-size: 12.5px; color: #8A90A0; text-align: right; }
#pb-custom-wrap { margin-top: 16px; }

.pb-consent { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 0; font-size: 15px; color: #3D4C5E; line-height: 1.5; cursor: pointer; }
.pb-consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: #4D44C5; flex: 0 0 18px; }
.pb-consent a { color: #4D44C5; text-decoration: underline; }

/* Errors & status */
.pb-error { display: none; margin: 8px 0 0; font-size: 14px; color: #D92D20; }
.pb-error.is-visible { display: block; }
.pb-status { display: flex; gap: 10px; align-items: flex-start; margin-top: 22px; padding: 12px 14px; font-size: 15px; line-height: 1.5; border-radius: 10px; }
.pb-status.is-error { color: #B42318; background: #FEF3F2; border: 1px solid #FECDCA; }
.pb-status i { margin-top: 3px; }

/* Estimate */
.pb-estimate { display: flex; gap: 12px; margin-top: 8px; padding: 14px 16px; background: #F7F6FE; border: 1px solid #E4E1FA; border-radius: 12px; }
.pb-estimate i { margin-top: 3px; color: #4D44C5; }
.pb-estimate strong { display: block; font-size: 15px; color: #1D2433; }
.pb-estimate span { display: block; margin-top: 4px; font-size: 14px; color: #5B6172; line-height: 1.5; }

/* Review */
.pb-review { border: 1px solid #ECEBF3; border-radius: 14px; overflow: hidden; }
.pb-review__row { display: grid; grid-template-columns: 170px 1fr auto; gap: 16px; padding: 14px 16px; border-bottom: 1px solid #ECEBF3; }
.pb-review__row:last-of-type { border-bottom: 0; }
.pb-review__row dt { font-size: 14px; font-weight: 600; color: #5B6172; }
.pb-review__row dd { margin: 0; font-size: 15px; color: #111; line-height: 1.55; word-break: break-word; }
.pb-edit { align-self: start; padding: 0; font-size: 14px; font-weight: 600; color: #4D44C5; background: none; border: 0; cursor: pointer; }
.pb-edit:hover { text-decoration: underline; }
.pb-review__note { margin: 0; padding: 12px 16px; font-size: 14px; color: #5B6172; background: #F7F6FE; border-top: 1px solid #ECEBF3; }
.pb-review__note i { color: #4D44C5; margin-right: 6px; }
@media (max-width: 575px) { .pb-review__row { grid-template-columns: 1fr auto; } .pb-review__row dt { grid-column: 1 / -1; } }

/* Navigation */
.pb-nav { display: flex; justify-content: flex-end; gap: 10px; margin-top: 30px; padding-top: 22px; border-top: 1px solid #ECEBF3; }
.pb-nav #pb-back { margin-right: auto; }
.pb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  font-family: var(--ztc-family-font1);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  background: #4D44C5;
  border: 1.5px solid #4D44C5;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.pb-btn:hover { color: #fff; background: #3F37A8; border-color: #3F37A8; }
.pb-btn[disabled] { opacity: 0.65; cursor: progress; }
.pb-btn--ghost { color: #1D2433; background: #fff; border-color: #E4E3EE; }
.pb-btn--ghost:hover { color: #4D44C5; background: #F7F6FE; border-color: #C9C5F0; }
.pb-btn--small { padding: 8px 12px; font-size: 14px; }
.pb-btn[hidden] { display: none; }
.pb-spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; border-radius: 50%; animation: pb-spin 0.7s linear infinite; }
@keyframes pb-spin { to { transform: rotate(360deg); } }

/* Honeypot */
.pb-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Result */
.pb-result { text-align: center; outline: none; }
.pb-result__icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 16px; font-size: 26px; color: #fff; background: #4D44C5; border-radius: 50%; }
.pb-result h2 { font-family: var(--ztc-family-font1); font-size: 28px; font-weight: 700; color: #111; margin-bottom: 10px; }
.pb-result__ref { font-size: 17px; color: #1D2433; margin-bottom: 6px; }
.pb-result__ref strong { padding: 3px 10px; font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.04em; color: #4D44C5; background: #F1F0FB; border-radius: 6px; }
.pb-result > p { color: #5B6172; }
.pb-brief { margin: 26px 0 24px; text-align: left; border: 1px solid #ECEBF3; border-radius: 14px; overflow: hidden; }
.pb-brief__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; background: #F7F7FB; border-bottom: 1px solid #ECEBF3; }
.pb-brief__head > span { font-weight: 600; color: #1D2433; }
.pb-brief__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pb-brief pre { margin: 0; padding: 18px; max-height: 360px; overflow: auto; font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; line-height: 1.6; color: #1D2433; white-space: pre-wrap; word-break: break-word; background: #fff; }

/* Pre-filled from the AI assistant */
.pb-prefill { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 18px; padding: 12px 14px; font-size: 14.5px; color: #1D2433; background: #F7F6FE; border: 1px solid #E4E1FA; border-radius: 12px; }
.pb-prefill i { margin-top: 3px; color: #4D44C5; }
.pb-prefill p { margin: 0; font-size: inherit; line-height: 1.5; color: inherit; }

/* Print: only the brief */
@media print {
  body.pb-printing * { visibility: hidden !important; }
  body.pb-printing #pb-brief-text, body.pb-printing #pb-brief-text * { visibility: visible !important; }
  body.pb-printing #pb-brief-text { position: absolute; left: 0; top: 0; width: 100%; max-height: none; overflow: visible; font-size: 12pt; }
}

/* Priced packages, add-on prices and the running total */
.pb-packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 8px 0 18px; }
.pb-package { position: relative; cursor: pointer; }
.pb-package input { position: absolute; opacity: 0; pointer-events: none; }
.pb-package__box { display: grid; gap: 4px; height: 100%; padding: 16px; background: #fff; border: 2px solid #E4E2F3; border-radius: 14px; transition: border-color .15s, box-shadow .15s; }
.pb-package__box strong { font-size: 16px; color: #14142B; }
.pb-package__box span { font-size: 13px; color: #55566B; }
.pb-package__box em { font-style: normal; font-weight: 700; color: #4D44C5; margin-top: 4px; }
.pb-package input:checked + .pb-package__box { border-color: #4D44C5; box-shadow: 0 0 0 3px rgba(77, 68, 197, .15); }
.pb-package input:focus-visible + .pb-package__box { outline: 3px solid #4D44C5; outline-offset: 2px; }
.pb-price { margin-left: 8px; font-weight: 700; color: #4D44C5; white-space: nowrap; }
.pb-total { margin-top: 18px; padding: 16px; background: #F4F3FA; border-radius: 14px; }
.pb-total ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.pb-total li, .pb-total p { display: flex; justify-content: space-between; gap: 12px; margin: 0; }
.pb-total p { padding-top: 8px; border-top: 1px solid #DAD7EE; font-size: 17px; }
.pb-total small { display: block; margin-top: 6px; color: #667085; }

/* ---------- AI start + plan ---------- */
.pb-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pb-ai[hidden], .pb-plan[hidden] { display: none; }
.pb-ai__badge { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 4px 11px; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; color: #4D44C5; background: #F1EEFD; border-radius: 999px; }
.pb-ai h3, .pb-plan h3 { margin: 0 0 8px; font-family: var(--ztc-family-font1); font-size: 24px; font-weight: 700; line-height: 1.25; color: #111; }
.pb-plan h4 { margin: 22px 0 6px; font-size: 16px; font-weight: 700; color: #111; }
.pb-ai textarea { display: block; width: 100%; min-height: 130px; padding: 14px 16px; resize: vertical; font: inherit; font-size: 16px; line-height: 1.55; color: #1D2433; background: #fff; border: 1.5px solid #E4E3EE; border-radius: 14px; }
.pb-ai textarea:focus { outline: none; border-color: #4D44C5; box-shadow: 0 0 0 3px rgba(77, 68, 197, .14); }
.pb-ai__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.pb-chip { padding: 7px 13px; font: inherit; font-size: 13.5px; font-weight: 500; color: #4D44C5; background: #fff; border: 1px solid #D9D6F5; border-radius: 999px; cursor: pointer; }
.pb-chip:hover { background: #F1EEFD; }
.pb-chip:focus-visible { outline: 2px solid #4D44C5; outline-offset: 2px; }
.pb-ai__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.pb-plan__summary { margin: 0 0 14px; font-size: 17px; line-height: 1.55; color: #1D2433; }
.pb-plan__warn { padding: 12px 14px; margin: 0 0 10px; color: #8A5A00; background: #FFF8EB; border: 1px solid #F5E1B8; border-radius: 12px; }
.pb-plan__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 0 0 6px; }
.pb-plan__facts div { padding: 12px 14px; background: #F7F6FE; border: 1px solid #E4E1FA; border-radius: 12px; }
.pb-plan__facts dt { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #6B6F82; }
.pb-plan__facts dd { margin: 3px 0 0; font-weight: 600; color: #111; }
.pb-plan__facts small { display: block; font-weight: 500; color: #4D44C5; }
.pb-plan__questions { margin: 8px 0 0; padding-left: 20px; color: #3D4C5E; }
.pb-plan__features { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pb-plan__features .pb-check__label small { display: block; margin-top: 2px; font-size: 13.5px; font-weight: 400; color: #5B6172; }
.pb-plan__features--addons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 575px) { .pb-plan__features--addons { grid-template-columns: 1fr; } .pb-ai h3, .pb-plan h3 { font-size: 21px; } }
.pb-plan__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 20px; padding: 14px 16px; font-size: 17px; background: #F4F3FA; border-radius: 14px; }
.pb-plan__fine { margin: 8px 2px 0; font-size: 13px; color: #6B6F82; }
.pb-result__links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.pb-result__links .pb-btn { text-decoration: none; }
