/* ============================================================================
   My CV Details — revised builder experience (makethecv-v41 reference)
   ----------------------------------------------------------------------------
   Every rule in this file is scoped to `body.mtc-profile-builder` (the My CV
   Details / profile builder shell) or to `.mtcd-*` class names that only exist
   in markup this feature adds. Nothing here can reach another page.

   Design tokens mirror the existing builder shell (navy / teal / neutral) so the
   new controls sit inside the current design system rather than beside it.
   ========================================================================== */

body.mtc-profile-builder {
  --mtcd-navy: #0b1f3a;
  --mtcd-navy-70: #3c516b;
  --mtcd-navy-40: #8593a5;
  --mtcd-teal: #0ea885;
  --mtcd-teal-dark: #0b8a6d;
  --mtcd-teal-tint: #e8f7f2;
  --mtcd-gold-tint: #fdf6e9;
  --mtcd-paper: #fff;
  --mtcd-canvas: #f5f7f9;
  --mtcd-line: #e2e8ef;
  --mtcd-line-soft: #eef2f6;
  --mtcd-danger: #c0442f;
  --mtcd-r: 10px;
}

body.mtc-profile-builder #view2 .mtcd-profile-intro {
  margin-bottom: 12px;
  padding: 12px 16px;
  border: 1px solid var(--mtcd-line);
  border-radius: 14px;
  background: linear-gradient(135deg, #fff 0%, #f7fbfa 100%);
}

body.mtc-profile-builder #view2 .mtcd-profile-kicker {
  margin-bottom: 5px;
  color: var(--mtcd-teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.mtc-profile-builder #view2 .mtcd-profile-intro h1 {
  margin: 0 0 4px;
  color: var(--mtcd-navy);
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -.03em;
}

body.mtc-profile-builder #view2 .mtcd-profile-intro p {
  max-width: 68ch;
  margin: 0;
  color: var(--mtcd-navy-70);
  font-size: 13px;
  line-height: 1.4;
}

body.mtc-profile-builder #view2 .mtcd-preview-note {
  max-width: 560px;
  margin: 14px auto 12px;
  padding: 9px 12px;
  border: 1px solid rgba(14, 168, 133, .18);
  border-radius: 10px;
  background: rgba(232, 247, 242, .88);
  color: #0a6b55;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.35;
}

body.mtc-profile-builder #view2 .fs-nav .next-btn.mtcd-is-saving,
body.mtc-profile-builder .mtcd-mobile-bar .mtcd-btn.mtcd-is-saving {
  cursor: wait;
  opacity: .78;
}

body.mtc-profile-builder #view2 .fs-nav .next-btn.mtcd-save-error,
body.mtc-profile-builder .mtcd-mobile-bar .mtcd-btn.mtcd-save-error {
  border-color: #f0b8ad;
  background: #fff5f3;
  color: var(--mtcd-danger);
}

body.mtc-profile-builder #view2 .mtcd-ai-helper {
  margin-top: 8px;
  color: var(--mtcd-navy-40);
  font-size: 12px;
  line-height: 1.45;
}

body.mtc-profile-builder #view2 .mtcd-complete-note {
  margin: 8px 0 0;
  color: var(--mtcd-navy-70);
  font-size: 12.5px;
  line-height: 1.45;
}

body.mtc-profile-builder .mtc-nav-builder-actions .saved-dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--mtcd-teal);
}

body.mtc-profile-builder .mtc-nav-builder-actions .saved.mtcd-is-saving {
  color: var(--mtcd-navy-70);
}

body.mtc-profile-builder .mtc-nav-builder-actions .saved.mtcd-save-error {
  color: var(--mtcd-danger);
}

body.mtc-profile-builder .mtc-nav-builder-actions .saved.mtcd-save-error .saved-dot {
  background: var(--mtcd-danger);
}

/* The shell that carries this markup is shared with the /designs editor, which
   keeps its own interface. Everything this feature adds is hidden unless the
   page is actually the My CV Details profile builder. */
.mtcd-secbar,
.mtcd-mobile-bar,
.mtcd-prev-close {
  display: none;
}

/* ─────────────────────────── Sections summary bar ───────────────────────── */
/* Sits directly under the progress rail: shows where the user is, how many
   sections are on the CV, and opens the section manager. */
body.mtc-profile-builder #view2 .mtcd-secbar {
  display: none !important;
  align-items: center;
  gap: 10px;
  margin: -14px 0 22px;
  padding: 10px 12px;
  border: 1px solid var(--mtcd-line);
  border-radius: 12px;
  background: var(--mtcd-paper);
}

body.mtc-profile-builder #view2 .rail {
  position: relative;
  z-index: 5;
  overflow: visible;
}

body.mtc-profile-builder #view2 .rail-seg {
  position: relative;
  cursor: pointer;
}

body.mtc-profile-builder #view2 .rail-seg::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: 20px;
  z-index: 30;
  max-width: 180px;
  padding: 6px 8px;
  border-radius: 7px;
  background: var(--navy, #0b1f3a);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(11, 31, 58, .18);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%);
  transition: opacity .05s;
}

body.mtc-profile-builder #view2 .rail-seg:hover::after {
  opacity: 1;
  visibility: visible;
}

body.mtc-profile-builder #view2 .section-body-area {
  display: block;
  min-height: 0;
  overflow: visible;
  padding: 0 0 18px;
}

body.mtc-profile-builder #view2 .section-body-area .fields-area {
  min-height: 0;
  overflow: visible;
  padding: 22px 0 0;
}

body.mtc-profile-builder #view2 #formSections {
  flex: none;
  min-height: auto;
}

body.mtc-profile-builder #view2 .form-section {
  height: auto;
  min-height: 0;
  overflow: visible;
}

body.mtc-profile-builder #view2 .form-section.active-panel {
  display: block;
  animation: none;
}

body.mtc-profile-builder #view2 .mtcd-inline-add {
  flex: 0 0 auto;
  padding: 16px 0 0;
}

body.mtc-profile-builder #view2 .mtcd-inline-add .mtcd-btn {
  width: 100%;
  justify-content: center;
}

body.mtc-profile-builder #view2 .mtcd-section-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

body.mtc-profile-builder #view2 .mtcd-section-foot .mtcd-section-add,
body.mtc-profile-builder #view2 .mtcd-section-foot .mtcd-section-remove {
  min-height: 32px;
  padding: 6px 11px;
  font-size: 12.5px;
}

body.mtc-profile-builder #view2 .mtcd-section-foot .mtcd-section-remove {
  border-color: transparent;
  background: transparent;
  color: var(--mtcd-navy-70);
}

body.mtc-profile-builder #view2 .mtcd-section-foot .mtcd-section-remove:hover {
  border-color: transparent;
  background: var(--mtcd-line-soft);
}

body.mtc-profile-builder #view2 .sec-pill[data-key="experience"] .pill-x,
body.mtc-profile-builder #view2 .sec-pill[data-key="education"] .pill-x,
body.mtc-profile-builder #view2 .sec-pill[data-key="skills"] .pill-x,
body.mtc-profile-builder #view2 .sec-pill[data-key="summary"] .pill-x {
  display: none;
}

body.mtc-profile-builder #view2 .mtcd-expchoice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

body.mtc-profile-builder #view2 .mtcd-expopt {
  display: flex;
  min-height: 76px;
  align-items: flex-start;
  gap: 11px;
  padding: 16px;
  border: 1px solid var(--mtcd-line, #e2e8ef);
  border-radius: 12px;
  background: var(--mtcd-paper, #fff);
  color: var(--mtcd-navy, #0b1f3a);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

body.mtc-profile-builder #view2 .mtcd-expopt:hover {
  border-color: var(--mtcd-teal, #0ea885);
  background: var(--mtcd-teal-tint, #e8f7f2);
}

body.mtc-profile-builder #view2 .mtcd-expopt.is-active {
  border-color: var(--mtcd-teal, #0ea885);
  background: var(--mtcd-teal-tint, #e8f7f2);
}

body.mtc-profile-builder #view2 .mtcd-expdot {
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border: 2px solid var(--mtcd-teal, #0ea885);
  border-radius: 99px;
  background: #fff;
  box-shadow: inset 0 0 0 3px #fff;
}

body.mtc-profile-builder #view2 .mtcd-expopt.is-active .mtcd-expdot {
  background: var(--mtcd-teal, #0ea885);
}

body.mtc-profile-builder #view2 .mtcd-expopt b {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
  line-height: 1.25;
}

body.mtc-profile-builder #view2 .mtcd-expopt small {
  display: block;
  color: var(--mtcd-navy-70, #52627a);
  font-size: 12.5px;
  line-height: 1.35;
}

body.mtc-profile-builder #view2 .mtcd-expempty {
  display: none;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--mtcd-line, #e2e8ef);
  border-radius: 12px;
  background: var(--mtcd-paper, #fff);
}

body.mtc-profile-builder #view2 .mtcd-expempty h4 {
  margin: 0 0 6px;
  color: var(--mtcd-navy, #0b1f3a);
  font-size: 15px;
  font-weight: 800;
}

body.mtc-profile-builder #view2 .mtcd-expempty p {
  max-width: 70ch;
  margin: 0;
  color: var(--mtcd-navy-70, #52627a);
  font-size: 13.5px;
  line-height: 1.55;
}

body.mtc-profile-builder #view2 .mtcd-expempty-label {
  margin: 18px 0 10px;
  color: var(--mtcd-navy-40, #8593a5);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}

body.mtc-profile-builder #view2 .mtcd-expempty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.mtc-profile-builder #view2 .mtcd-expaction {
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--mtcd-line, #e2e8ef);
  border-radius: 99px;
  background: var(--mtcd-paper, #fff);
  color: var(--mtcd-navy-70, #52627a);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

body.mtc-profile-builder #view2 .mtcd-expaction:hover,
body.mtc-profile-builder #view2 .mtcd-expaction:focus-visible {
  border-color: var(--mtcd-teal, #0ea885);
  color: var(--mtcd-teal, #0ea885);
}

body.mtc-profile-builder #view2 .mtcd-expaction.is-warm {
  border-color: #f0e0be;
  background: var(--mtcd-gold-tint, #fdf6e9);
  color: #8a6a24;
}

body.mtc-profile-builder #view2 .mtcd-expaction.is-warm:hover,
body.mtc-profile-builder #view2 .mtcd-expaction.is-warm:focus-visible {
  border-color: #d4a043;
  color: #7d5b18;
}

body.mtc-profile-builder #view2 .form-section.is-fresher .mtcd-expempty {
  display: block;
}

body.mtc-profile-builder #view2 .form-section.is-fresher [data-replist="experience"],
body.mtc-profile-builder #view2 .form-section.is-fresher [data-replist="experience"] ~ .add-more-btn {
  display: none;
}

body.mtc-profile-builder #view2 .fs-step-label {
  display: none;
}

body.mtc-profile-builder #view2 .mtcd-secbar-copy {
  min-width: 0;
  flex: 1;
}

body.mtc-profile-builder #view2 .mtcd-secbar-title {
  color: var(--mtcd-navy);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

body.mtc-profile-builder #view2 .mtcd-secbar-sub {
  margin-top: 2px;
  color: var(--mtcd-navy-40);
  font-size: 12px;
  line-height: 1.35;
}

body.mtc-profile-builder #view2 .mtcd-secbar-btn {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--mtcd-line);
  border-radius: var(--mtcd-r);
  background: var(--mtcd-paper);
  color: var(--mtcd-navy);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

body.mtc-profile-builder #view2 .mtcd-secbar-btn:hover {
  border-color: var(--mtcd-teal);
  background: var(--mtcd-teal-tint);
  color: var(--mtcd-teal-dark);
}

body.mtc-profile-builder #view2 .mtcd-secbar-btn svg {
  flex: none;
}

/* Keep the Professional summary introduction clear: show the helper copy
   directly below its heading without changing other section headers. */
body.mtc-profile-builder #view2 .header-area.is-summary-compact {
  display: block;
}

body.mtc-profile-builder #view2 .header-area.is-summary-compact .fs-head-row {
  margin-bottom: 6px;
}

body.mtc-profile-builder #view2 .header-area.is-summary-compact .fs-title {
  margin-bottom: 0;
}

body.mtc-profile-builder #view2 .header-area.is-summary-compact .fs-hint {
  max-width: none;
}

/* ───────────────────────────────── Modals ───────────────────────────────── */
.mtcd-modal[hidden] {
  display: none !important;
}

.mtcd-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(11, 31, 58, .55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.mtcd-sheet {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 620px;
  max-height: min(88vh, 780px);
  flex-direction: column;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(11, 31, 58, .32);
  color: var(--mtcd-navy, #0b1f3a);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.mtcd-sheet-wide {
  max-width: 1040px;
}

.mtcd-sheet-head {
  padding: 22px 24px 0;
}

.mtcd-sheet h2 {
  margin: 0 44px 6px 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.mtcd-sheet-sub {
  margin: 0;
  color: var(--mtcd-navy-70, #3c516b);
  font-size: 13.5px;
  line-height: 1.5;
}

.mtcd-sheet-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--mtcd-line, #e2e8ef);
  border-radius: 9px;
  background: #fff;
  color: var(--mtcd-navy-70, #3c516b);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.mtcd-sheet-close:hover {
  border-color: var(--mtcd-navy-40, #8593a5);
  background: var(--mtcd-line-soft, #eef2f6);
}

.mtcd-sheet-body {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 18px 24px 4px;
  -webkit-overflow-scrolling: touch;
}

.mtcd-sheet-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid var(--mtcd-line, #e2e8ef);
}

.mtcd-sheet-foot .mtcd-spacer {
  flex: 1;
}

.mtcd-foot-count {
  color: var(--mtcd-navy-40, #8593a5);
  font-size: 12.5px;
}

/* Buttons shared by the modals (mirrors the builder's .btn family). */
.mtcd-btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid var(--mtcd-line, #e2e8ef);
  border-radius: var(--mtcd-r, 10px);
  background: #fff;
  color: var(--mtcd-navy, #0b1f3a);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.mtcd-btn:hover {
  border-color: var(--mtcd-navy-40, #8593a5);
}

.mtcd-btn-primary {
  border-color: var(--mtcd-teal, #0ea885);
  background: var(--mtcd-teal, #0ea885);
  color: #fff;
}

.mtcd-btn-primary:hover {
  border-color: var(--mtcd-teal-dark, #0b8a6d);
  background: var(--mtcd-teal-dark, #0b8a6d);
}

.mtcd-btn-link {
  border-color: transparent;
  background: transparent;
  color: var(--mtcd-navy-70, #3c516b);
  text-underline-offset: 3px;
}

/* ──────────────────────────────── Tabs ──────────────────────────────────── */
.mtcd-tabs {
  display: flex;
  gap: 6px;
  margin: 16px 24px 0;
  padding: 4px;
  border-radius: 11px;
  background: var(--mtcd-line-soft, #eef2f6);
}

.mtcd-tab {
  flex: 1;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--mtcd-navy-70, #3c516b);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.mtcd-tab[aria-selected="true"] {
  border-color: var(--mtcd-line, #e2e8ef);
  background: #fff;
  color: var(--mtcd-navy, #0b1f3a);
  box-shadow: 0 1px 3px rgba(11, 31, 58, .08);
}

/* ───────────────────────── Active section list ──────────────────────────── */
.mtcd-slist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mtcd-srow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 9px 10px;
  border: 1px solid var(--mtcd-line, #e2e8ef);
  border-radius: 11px;
  background: #fff;
}

.mtcd-srow.is-locked {
  background: var(--mtcd-line-soft, #eef2f6);
}

.mtcd-srow.is-current {
  border-color: var(--mtcd-teal, #0ea885);
  box-shadow: 0 0 0 3px var(--mtcd-teal-tint, #e8f7f2);
}

.mtcd-srow.is-dragging {
  opacity: .45;
}

.mtcd-srow.is-dropinto {
  border-color: var(--mtcd-teal, #0ea885);
  border-style: dashed;
}

.mtcd-grip {
  display: grid;
  width: 26px;
  height: 30px;
  flex: none;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--mtcd-navy-40, #8593a5);
  font-size: 14px;
  line-height: 1;
  cursor: grab;
  touch-action: none;
}

.mtcd-grip:hover {
  background: var(--mtcd-line-soft, #eef2f6);
  color: var(--mtcd-navy, #0b1f3a);
}

.mtcd-sname {
  min-width: 0;
  flex: 1;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.mtcd-sname:hover {
  color: var(--mtcd-teal-dark, #0b8a6d);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mtcd-sname[disabled] {
  cursor: default;
  text-decoration: none;
}

.mtcd-sflag {
  flex: none;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--mtcd-line-soft, #eef2f6);
  color: var(--mtcd-navy-40, #8593a5);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

.mtcd-sflag.is-filled {
  background: var(--mtcd-teal-tint, #e8f7f2);
  color: var(--mtcd-teal-dark, #0b8a6d);
}

.mtcd-sflag.is-locked {
  background: var(--mtcd-gold-tint, #fdf6e9);
  color: #8a6116;
}

/* Icon-only row controls — 44px hit area on touch, per the accessibility brief. */
.mtcd-sbtn {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  place-items: center;
  border: 1px solid var(--mtcd-line, #e2e8ef);
  border-radius: 8px;
  background: #fff;
  color: var(--mtcd-navy-70, #3c516b);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.mtcd-sbtn:hover:not([disabled]) {
  border-color: var(--mtcd-teal, #0ea885);
  color: var(--mtcd-teal-dark, #0b8a6d);
}

.mtcd-sbtn[disabled] {
  opacity: .35;
  cursor: not-allowed;
}

.mtcd-sbtn.is-danger:hover {
  border-color: #f2cfc7;
  background: #fdf0ed;
  color: var(--mtcd-danger, #c0442f);
}

.mtcd-hint {
  margin: 0 0 12px;
  color: var(--mtcd-navy-40, #8593a5);
  font-size: 12.5px;
  line-height: 1.5;
}

/* ───────────────────────── "Add a section" gallery ──────────────────────── */
.mtcd-group {
  margin-bottom: 18px;
}

.mtcd-group-h {
  margin: 0 0 9px;
  color: var(--mtcd-navy-40, #8593a5);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.mtcd-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.mtcd-card {
  display: flex;
  min-height: 74px;
  flex-direction: column;
  gap: 4px;
  padding: 12px 13px;
  border: 1.5px solid var(--mtcd-line, #e2e8ef);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}

.mtcd-card:hover {
  border-color: var(--mtcd-teal, #0ea885);
  background: var(--mtcd-teal-tint, #e8f7f2);
  box-shadow: 0 4px 14px rgba(14, 168, 133, .16);
}

.mtcd-card-t {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
}

.mtcd-card-d {
  color: var(--mtcd-navy-70, #3c516b);
  font-size: 12px;
  line-height: 1.45;
}

.mtcd-card-plus {
  margin-left: auto;
  color: var(--mtcd-teal, #0ea885);
  font-size: 15px;
  font-weight: 800;
}

.mtcd-empty {
  padding: 26px 16px;
  border: 1.5px dashed var(--mtcd-line, #e2e8ef);
  border-radius: 12px;
  color: var(--mtcd-navy-40, #8593a5);
  font-size: 13px;
  text-align: center;
}

/* ─────────────────────────── Template gallery ───────────────────────────── */
.mtcd-filters {
  display: flex;
  overflow-x: auto;
  gap: 7px;
  margin: 14px 24px 4px;
  padding-bottom: 4px;
  min-height: 40px;
}

.mtcd-filter {
  min-height: 34px;
  flex: none;
  padding: 7px 13px;
  border: 1px solid var(--mtcd-line, #e2e8ef);
  border-radius: 99px;
  background: #fff;
  color: var(--mtcd-navy-70, #3c516b);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.mtcd-filter[aria-pressed="true"] {
  border-color: var(--mtcd-navy, #0b1f3a);
  background: var(--mtcd-navy, #0b1f3a);
  color: #fff;
}

.mtcd-tplgal {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.mtcd-tpl {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1.5px solid var(--mtcd-line, #e2e8ef);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  font: inherit;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.mtcd-tpl:hover {
  border-color: var(--mtcd-teal, #0ea885);
  box-shadow: 0 8px 22px rgba(11, 31, 58, .14);
}

.mtcd-tpl[aria-pressed="true"] {
  border-color: var(--mtcd-teal, #0ea885);
  box-shadow: 0 0 0 3px var(--mtcd-teal-tint, #e8f7f2);
}

.mtcd-tpl-thumb {
  position: relative;
  overflow: hidden;
  height: 196px;
  border-bottom: 1px solid var(--mtcd-line, #e2e8ef);
  background: #fff;
}

.mtcd-tpl-thumb > * {
  pointer-events: none;
}

/* Name over style, so neither gets crushed in a narrow card. */
.mtcd-tpl-meta {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
  padding: 9px 11px;
}

.mtcd-tpl-name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mtcd-tpl-style {
  overflow: hidden;
  color: var(--mtcd-navy-40, #8593a5);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* "In use" tick, so the selected design reads without relying on colour alone. */
.mtcd-tpl-on {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 99px;
  background: var(--mtcd-teal, #0ea885);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
}

.mtcd-tpl[aria-pressed="true"] .mtcd-tpl-on {
  display: inline-flex;
}

/* ───────────────────────── Preview column additions ─────────────────────── */
/* "Back to editing" only matters once the preview is a full-screen overlay. */
body.mtc-profile-builder #view2 .mtcd-prev-close {
  display: none;
}

/* Rail dock popovers: give the focused option a visible ring. */
body.mtc-profile-builder #view2 .rpop :focus-visible,
body.mtc-profile-builder #view2 .rbtn:focus-visible {
  outline: 2px solid var(--mtcd-teal);
  outline-offset: 2px;
}

body.mtc-profile-builder #view2 .mtcd-zoomrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

body.mtc-profile-builder #view2 .mtcd-zoomval {
  flex: 1;
  color: var(--mtcd-navy);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

body.mtc-profile-builder #view2 .mtcd-zoombtn {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--mtcd-line);
  border-radius: 8px;
  background: #fff;
  color: var(--mtcd-navy);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

body.mtc-profile-builder #view2 .mtcd-zoombtn:hover {
  border-color: var(--mtcd-teal);
  color: var(--mtcd-teal-dark);
}

/* ───────────────────────────── Mobile action bar ────────────────────────── */
/* dashboard.css animates `.view.active` with a transform. While that transform
   is applied it becomes the containing block for position:fixed descendants,
   which pinned the preview overlay and this bar to the panel instead of the
   viewport. The editor step needs no entrance animation, so switch it off. */
body.mtc-profile-builder #view2.active {
  animation: none !important;
  transform: none !important;
}

body.mtc-profile-builder .mtcd-mobile-bar {
  display: none;
}

@media (max-width: 980px) {
  /* Only while the editor step itself is on screen (the bar is a sibling of
     #view2, after it in the DOM). */
  body.mtc-profile-builder #view2.active ~ .mtcd-mobile-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 55;
    display: flex;
    gap: 10px;
    padding: 10px 14px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--mtcd-line);
    background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    backdrop-filter: saturate(160%) blur(12px);
    box-shadow: 0 -8px 26px -18px rgba(11, 18, 32, .45);
  }

  body.mtc-profile-builder .mtcd-mobile-bar .mtcd-btn {
    min-height: 44px;
    flex: 1;
  }

  /* The preview overlay owns the screen, so its own controls replace this bar. */
  body.mtc-profile-builder.mtcd-preview-open #view2.active ~ .mtcd-mobile-bar {
    display: none;
  }

  /* Three actions on one row overflow a phone: let the labels shrink instead of
     letting the primary "Generate my CV" button run off the screen. */
  body.mtc-profile-builder .mtc-nav-builder-actions .btn {
    min-width: 0;
    overflow: hidden;
    padding: 9px 10px;
    font-size: 13px;
    text-overflow: ellipsis;
  }

  body.mtc-profile-builder #view2 .mtcd-prev-close {
    position: sticky;
    top: 0;
    z-index: 2;
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    padding: 10px 15px;
    border: 1px solid var(--mtcd-line);
    border-radius: var(--mtcd-r);
    background: #fff;
    color: var(--mtcd-navy);
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(11, 31, 58, .1);
    cursor: pointer;
  }

  /* Keep the last field clear of the fixed bar. */
  body.mtc-profile-builder #view2 .formcol {
    padding-bottom: 128px;
  }

  .mtcd-modal {
    padding: 0;
  }

  .mtcd-sheet {
    max-width: none;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
  }

  .mtcd-tplgal {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .mtcd-tpl-thumb {
    height: 168px;
  }

  body.mtc-profile-builder #view2 .mtcd-expchoice {
    grid-template-columns: 1fr;
  }
}

/* Below the dashboard tab bar breakpoint the bar has to clear the tab bar. */
@media (max-width: 760px) {
  body.mtc-profile-builder #view2.active ~ .mtcd-mobile-bar {
    bottom: calc(58px + env(safe-area-inset-bottom));
    padding-bottom: 10px;
  }

  body.mtc-profile-builder #view2 .formcol {
    padding-bottom: 180px;
  }

  body.mtc-profile-builder #view2 .prevcol {
    padding-bottom: 150px;
  }

  .mtcd-srow {
    flex-wrap: wrap;
  }

  .mtcd-sname {
    flex: 1 0 55%;
  }

  .mtcd-sbtn {
    width: 44px;
    height: 44px;
  }

  .mtcd-grip {
    width: 34px;
    height: 44px;
  }
}

/* ────────────────────────── Motion / focus / a11y ───────────────────────── */
.mtcd-modal :focus-visible,
body.mtc-profile-builder #view2 .mtcd-secbar-btn:focus-visible,
body.mtc-profile-builder .mtcd-mobile-bar .mtcd-btn:focus-visible {
  outline: 2px solid var(--mtcd-teal, #0ea885);
  outline-offset: 2px;
}

/* Screen-reader-only live region for save / section announcements. */
.mtcd-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .mtcd-modal,
  .mtcd-sheet,
  .mtcd-card,
  .mtcd-tpl,
  .mtcd-srow {
    transition: none !important;
    animation: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   "Add a section" gallery — mirrors the reference prototype's card gallery:
   grouped cards, each with a miniature of how the section prints, a blurb and
   a +/✓ toggle, over a sticky action bar.
   ═════════════════════════════════════════════════════════════════════════ */

/* The gallery needs the wider sheet and the prototype's canvas ground. */
#mtcdSectionModal .mtcd-sheet {
  max-width: 1060px;
  background: var(--mtcd-canvas, #f5f7f9);
}

#mtcdSectionModal .mtcd-tabs {
  background: #e7ecf1;
}

.mtcd-galgroup {
  margin: 24px 0 12px;
  color: var(--mtcd-navy-40, #8593a5);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.mtcd-galgroup:first-child {
  margin-top: 0;
}

.mtcd-gal {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.mtcd-gcard {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--mtcd-line, #e2e8ef);
  border-radius: 12px;
  background: var(--mtcd-paper, #fff);
  color: inherit;
  font: inherit;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.mtcd-gcard:hover {
  border-color: var(--mtcd-teal, #0ea885);
  box-shadow: 0 8px 22px rgba(11, 31, 58, .08);
}

.mtcd-gcard[aria-pressed="true"] {
  border-color: var(--mtcd-teal, #0ea885);
  background: #f7fdfb;
}

.mtcd-gthumb {
  overflow: hidden;
  height: 126px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--mtcd-line-soft, #eef2f6);
  background: #fff;
}

.mtcd-gcard[aria-pressed="true"] .mtcd-gthumb {
  background: #f7fdfb;
}

.mtcd-gfoot {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px 15px;
}

.mtcd-gfoot > span:first-child {
  min-width: 0;
  flex: 1;
}

.mtcd-gname {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.mtcd-gblurb {
  display: block;
  margin-top: 3px;
  color: var(--mtcd-navy-70, #3c516b);
  font-size: 12px;
  line-height: 1.45;
}

.mtcd-gthumb {
  display: block;
}

.mtcd-gmark {
  display: grid;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-left: auto;
  place-items: center;
  border: 1.5px solid var(--mtcd-line, #e2e8ef);
  border-radius: 99px;
  color: var(--mtcd-navy-40, #8593a5);
  font-size: 13px;
  font-weight: 700;
}

.mtcd-gcard[aria-pressed="true"] .mtcd-gmark {
  border-color: var(--mtcd-teal, #0ea885);
  background: var(--mtcd-teal, #0ea885);
  color: #fff;
}

.mtcd-grec {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border: 1px solid #f0e0be;
  border-radius: 99px;
  background: var(--mtcd-gold-tint, #fdf6e9);
  color: #8a6a24;
  font-size: 10.5px;
  font-weight: 700;
}

.mtcd-gcard[aria-pressed="true"] .mtcd-grec {
  display: none;
}

/* A core section the user removed reads differently from an optional extra. */
.mtcd-grec.is-core {
  border-color: #c9d7e6;
  background: #eef4fa;
  color: #2c5480;
}

.mtcd-galnote {
  max-width: 62ch;
  margin: -6px 0 12px;
  color: var(--mtcd-navy-70, #3c516b);
  font-size: 12.5px;
  line-height: 1.5;
}

/* Sticky action bar under the gallery. */
.mtcd-galbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  border-top: 1px solid var(--mtcd-line, #e2e8ef);
  border-radius: 0 0 16px 16px;
  background: var(--mtcd-paper, #fff);
}

.mtcd-galbar .mtcd-spacer {
  flex: 1;
}

.mtcd-galbar-count {
  color: var(--mtcd-navy-70, #3c516b);
  font-size: 13.5px;
  font-weight: 600;
}

.mtcd-galbar-count b {
  color: var(--mtcd-navy, #0b1f3a);
  font-weight: 800;
}

/* ── Section miniatures ──────────────────────────────────────────────────── */
.mtcd-t-h {
  margin-bottom: 7px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e6eaef;
  color: var(--mtcd-teal, #0ea885);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.mtcd-t-row {
  margin-bottom: 6px;
}

.mtcd-t-t {
  color: #1c2b3d;
  font-size: 9.5px;
  font-weight: 700;
}

.mtcd-t-s {
  margin-top: 1px;
  color: #6b7b8f;
  font-size: 8.5px;
  line-height: 1.4;
}

.mtcd-t-d {
  float: right;
  color: #93a1b2;
  font-size: 8px;
  font-weight: 600;
}

.mtcd-t-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mtcd-t-chip {
  padding: 2px 6px;
  border-radius: 3px;
  background: #f2f5f8;
  color: #3c516b;
  font-size: 8px;
  font-weight: 600;
}

.mtcd-t-kv {
  color: #3c516b;
  font-size: 8.5px;
  line-height: 1.6;
}

.mtcd-t-kv b {
  color: #1c2b3d;
}

.mtcd-t-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.mtcd-t-inline span {
  color: #6b7b8f;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   "Add sections" step — the screen between the five core sections and any
   optional ones the user has added.
   ═════════════════════════════════════════════════════════════════════════ */
body.mtc-profile-builder #view2 .mtcd-sec-h {
  margin: 0 0 6px;
  color: var(--mtcd-navy);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.18;
}

body.mtc-profile-builder #view2 .mtcd-sec-sub {
  max-width: 56ch;
  margin: 0;
  color: var(--mtcd-navy-70);
  font-size: 14px;
  line-height: 1.55;
}

body.mtc-profile-builder #view2 #mtcdMorePanel {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

body.mtc-profile-builder #view2 #mtcdMorePanel[hidden] {
  display: none;
}

body.mtc-profile-builder #view2 .mtcd-morecard {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--mtcd-line);
  border-radius: 12px;
  background: var(--mtcd-paper);
}

body.mtc-profile-builder #view2 .mtcd-morehead {
  flex: 0 0 auto;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--mtcd-line);
  background: var(--mtcd-paper);
}

body.mtc-profile-builder #view2 .mtcd-morebody {
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px 24px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

body.mtc-profile-builder #view2 .mtcd-morebottom {
  flex: 0 0 auto;
  padding: 16px 24px 18px;
  border-top: 1px solid var(--mtcd-line);
  background: var(--mtcd-paper);
}

body.mtc-profile-builder #view2 .mtcd-moretitle {
  margin-bottom: 11px;
  color: var(--mtcd-navy-40);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

body.mtc-profile-builder #view2 .mtcd-morebtn {
  padding: 10px 16px;
  border-color: #cbeade;
  background: var(--mtcd-teal-tint);
  color: #0a6b55;
  font-size: 14px;
}

body.mtc-profile-builder #view2 .mtcd-morebtn:hover {
  border-color: var(--mtcd-teal);
  background: #dbf3ea;
  color: #0a6b55;
}

body.mtc-profile-builder #view2 .mtcd-more-start {
  margin: 10px 10px 0;
  padding: 10px 16px;
  font-size: 14px;
}

body.mtc-profile-builder #view2 .mtcd-added-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

body.mtc-profile-builder #view2 .mtcd-added-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 6px 12px;
  border: 1px solid #cbeade;
  border-radius: 99px;
  background: var(--mtcd-teal-tint);
  color: #0a6b55;
  font-size: 12.5px;
  font-weight: 600;
}

body.mtc-profile-builder #view2 .mtcd-added-pill button {
  min-height: 22px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

body.mtc-profile-builder #view2 .mtcd-added-pill .mtcd-pill-x {
  opacity: .55;
  font-size: 13px;
}

body.mtc-profile-builder #view2 .mtcd-added-pill .mtcd-pill-x:hover {
  opacity: 1;
}

body.mtc-profile-builder #view2 .mtcd-added-pill .mtcd-pill-go:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.mtc-profile-builder #view2 .mtcd-added-pill.is-todo {
  border-color: #f0e0be;
  background: var(--mtcd-gold-tint);
  color: #8a6a24;
}

body.mtc-profile-builder #view2 .mtcd-qgroup {
  margin: 14px 0 7px;
  color: var(--mtcd-navy-40);
  font-size: 11.5px;
  font-weight: 700;
}

body.mtc-profile-builder #view2 .mtcd-sugg {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

body.mtc-profile-builder #view2 .mtcd-sugg-chip {
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--mtcd-line);
  border-radius: 99px;
  background: var(--mtcd-paper);
  color: var(--mtcd-navy-70);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

body.mtc-profile-builder #view2 .mtcd-sugg-chip:hover {
  border-color: var(--mtcd-teal);
  color: var(--mtcd-teal);
}

body.mtc-profile-builder #view2 .mtcd-sugg-chip.is-rec {
  border-color: #f0e0be;
  background: var(--mtcd-gold-tint);
  color: #8a6a24;
}

body.mtc-profile-builder #view2 .mtcd-sugg-chip.is-core {
  border-color: #c9d7e6;
  background: #eef4fa;
  color: #2c5480;
  font-weight: 700;
}

body.mtc-profile-builder #view2 .mtcd-rnote {
  margin-top: 10px;
  color: var(--mtcd-navy-40);
  font-size: 11.5px;
  line-height: 1.45;
}

body.mtc-profile-builder #view2 .mtcd-morefoot {
  margin: 0 0 14px;
  color: var(--mtcd-navy-40);
  font-size: 13px;
  line-height: 1.5;
}

/* Same footer shape as a real section step. */
body.mtc-profile-builder #view2 .mtcd-navrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

body.mtc-profile-builder #view2 .mtcd-navrow .mtcd-spacer {
  flex: 1;
}

@media (max-width: 1180px) {
  .mtcd-gal {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 980px) {
  .mtcd-gal {
    grid-template-columns: 1fr;
  }

  .mtcd-galbar {
    padding: 12px 16px;
    border-radius: 0;
  }

  .mtcd-galbar-count {
    display: none;
  }

  .mtcd-galbar .mtcd-btn {
    flex: 1;
    min-height: 44px;
  }

  body.mtc-profile-builder #view2 .mtcd-navrow {
    align-items: stretch;
    flex-direction: column;
  }

  body.mtc-profile-builder #view2 .mtcd-navrow .mtcd-btn {
    min-height: 44px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SKILLS — chip entry
   Replaces the repeated one-input-per-skill rows with the reference
   prototype's chip field. The builder's own repeat list is kept in the DOM
   (hidden) because collectData() reads it, so the saved shape stays
   skills: [{ name }] exactly as before.
   ═════════════════════════════════════════════════════════════════════════ */
body.mtc-profile-builder #view2 .form-section.mtcd-skills [data-replist="skills"],
body.mtc-profile-builder #view2 .form-section.mtcd-skills > .add-more-btn {
  display: none !important;
}

body.mtc-profile-builder #view2 .form-section.mtcd-tools .mtcd-native {
  display: none !important;
}

body.mtc-profile-builder #view2 .mtcd-toolsbox {
  padding-top: 12px;
}

body.mtc-profile-builder #view2 .mtcd-toolsbox .field {
  margin-bottom: 12px;
}

body.mtc-profile-builder #view2 .mtcd-toolsbox input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--mtcd-line);
  border-radius: var(--mtcd-r);
  background: var(--mtcd-paper);
  color: var(--mtcd-navy);
  font: inherit;
  font-size: 14px;
}

body.mtc-profile-builder #view2 .mtcd-toolsbox input:focus {
  outline: none;
  border-color: var(--mtcd-teal);
  box-shadow: 0 0 0 3px var(--mtcd-teal-tint);
}

body.mtc-profile-builder #view2 .mtcd-toolsbox input::placeholder {
  color: #a8b4c2;
}

body.mtc-profile-builder #view2 .form-section[data-sec="2"] .fields-area,
body.mtc-profile-builder #view2 .form-section[data-sec="14"] .fields-area,
body.mtc-profile-builder #view2 .form-section[data-sec="15"] .fields-area,
body.mtc-profile-builder #view2 .form-section[data-sec="16"] .fields-area {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--mtcd-line);
  border-radius: 12px;
  background: var(--mtcd-paper);
}

body.mtc-profile-builder #view2 .mtcd-chips {
  display: flex;
  min-height: 34px;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

body.mtc-profile-builder #view2 .mtcd-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px 7px 13px;
  border: 1px solid #cbeade;
  border-radius: 99px;
  background: var(--mtcd-teal-tint);
  color: #0a6b55;
  font-size: 13px;
  font-weight: 600;
}

body.mtc-profile-builder #view2 .mtcd-chip button {
  min-height: 22px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #0a6b55;
  font-size: 14px;
  line-height: 1;
  opacity: .55;
  cursor: pointer;
}

body.mtc-profile-builder #view2 .mtcd-chip button:hover {
  opacity: 1;
}

body.mtc-profile-builder #view2 .mtcd-chips-empty {
  margin-bottom: 22px;
  padding-top: 0;
  color: var(--mtcd-navy-40);
  font-size: 13.5px;
}

body.mtc-profile-builder #view2 .mtcd-helper {
  margin-top: 6px;
  color: var(--mtcd-navy-40);
  font-size: 12px;
  line-height: 1.45;
}

body.mtc-profile-builder #view2 .mtcd-helper em {
  font-style: italic;
}

body.mtc-profile-builder #view2 .mtcd-refchoice {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--mtcd-line);
  border-radius: 12px;
  background: var(--mtcd-paper);
}

body.mtc-profile-builder #view2 .mtcd-refchoice label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--mtcd-navy);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

body.mtc-profile-builder #view2 .mtcd-refchoice input {
  width: 15px;
  height: 15px;
  accent-color: var(--mtcd-teal);
}

body.mtc-profile-builder #view2 .mtcd-refchoice p {
  margin: 7px 0 0 24px;
  color: var(--mtcd-navy-40);
  font-size: 12px;
  line-height: 1.45;
}

body.mtc-profile-builder #view2 .form-section.mtcd-refs.is-request [data-replist="references"],
body.mtc-profile-builder #view2 .form-section.mtcd-refs.is-request > .section-body-area > .fields-area > .add-more-btn {
  display: none !important;
}

/* The "tell us the job you're going for" prompt. */
body.mtc-profile-builder #view2 .mtcd-tip {
  margin: 16px 0 18px;
  padding: 12px 14px;
  border: 1px solid #f0e0be;
  border-radius: 10px;
  background: var(--mtcd-gold-tint);
  color: #6b5320;
  font-size: 13px;
  line-height: 1.5;
}

body.mtc-profile-builder #view2 .mtcd-tip b {
  font-weight: 700;
}

body.mtc-profile-builder #view2 .mtcd-tip .mtcd-btn {
  display: block;
  margin-top: 10px;
}

body.mtc-profile-builder #view2 .mtcd-suggead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-top: 18px;
  color: var(--mtcd-navy-70);
  font-size: 12.5px;
  font-weight: 700;
}

body.mtc-profile-builder #view2 .mtcd-suggwhy {
  color: var(--mtcd-navy-40);
  font-size: 11.5px;
  font-weight: 500;
}

body.mtc-profile-builder #view2 .mtcd-ai-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
}

body.mtc-profile-builder #view2 .mtcd-bpolish {
  display: inline-flex;
  height: 32px;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  border: 1px solid #cbeade;
  border-radius: 10px;
  background: var(--mtcd-teal-tint);
  color: var(--mtcd-teal-dark);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

body.mtc-profile-builder #view2 .mtcd-bpolish:hover:not([disabled]) {
  border-color: var(--mtcd-teal);
  background: var(--mtcd-teal);
  color: #fff;
}

body.mtc-profile-builder #view2 .mtcd-bpolish[disabled] {
  opacity: .5;
  cursor: wait;
}

body.mtc-profile-builder #view2 .mtcd-ai-hint {
  color: var(--mtcd-navy-40);
  font-size: 12px;
}

body.mtc-profile-builder #view2 .mtcd-ai-err {
  color: #8a3f2f;
}

@media (max-width: 760px) {
  body.mtc-profile-builder #view2 .mtcd-chip button {
    min-width: 28px;
    min-height: 28px;
  }

  body.mtc-profile-builder #view2 .mtcd-sugg-chip {
    min-height: 40px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   WORK EXPERIENCE & EDUCATION — card layout, date pickers, bullet points
   The builder's own inputs stay in the DOM (marked .mtcd-native and hidden)
   because they are what collectData() reads and what the AI writer targets.
   ═════════════════════════════════════════════════════════════════════════ */
body.mtc-profile-builder #view2 .form-section.mtcd-cards .mtcd-native {
  display: none !important;
}

body.mtc-profile-builder #view2 .mtcd-entry {
  padding-top: 16px;
}

body.mtc-profile-builder #view2 .mtcd-cardhead {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -4px 34px 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--mtcd-line-soft);
}

body.mtc-profile-builder #view2 .mtcd-cardnum {
  display: grid;
  width: 24px;
  height: 24px;
  flex: none;
  place-items: center;
  border-radius: 99px;
  background: var(--mtcd-navy);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

body.mtc-profile-builder #view2 .mtcd-cardtitle {
  min-width: 0;
  overflow: hidden;
  color: var(--mtcd-navy);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.mtc-profile-builder #view2 .mtcd-cardtitle.is-empty {
  color: var(--mtcd-navy-40);
  font-weight: 600;
}

/* ── date pickers ────────────────────────────────────────────────────────── */
body.mtc-profile-builder #view2 .mtcd-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

body.mtc-profile-builder #view2 .mtcd-date > label {
  display: block;
  margin-bottom: 6px;
  color: var(--mtcd-navy);
  font-size: 13px;
  font-weight: 600;
}

body.mtc-profile-builder #view2 .mtcd-date-note {
  grid-column: 1 / -1;
}

body.mtc-profile-builder #view2 .mtcd-my {
  display: flex;
  gap: 8px;
}

body.mtc-profile-builder #view2 .mtcd-sel {
  width: 100%;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid var(--mtcd-line);
  border-radius: var(--mtcd-r);
  background: var(--mtcd-paper);
  color: var(--mtcd-navy);
  font: inherit;
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}

body.mtc-profile-builder #view2 .mtcd-sel:hover:not([disabled]) {
  border-color: var(--mtcd-navy-40);
}

body.mtc-profile-builder #view2 .mtcd-sel:focus {
  outline: none;
  border-color: var(--mtcd-teal);
  box-shadow: 0 0 0 3px var(--mtcd-teal-tint);
}

body.mtc-profile-builder #view2 .mtcd-sel[disabled] {
  background: var(--mtcd-line-soft);
  color: var(--mtcd-navy-40);
}

body.mtc-profile-builder #view2 .mtcd-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  color: var(--mtcd-navy-70);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

body.mtc-profile-builder #view2 .mtcd-check input {
  width: 16px;
  height: 16px;
  flex: none;
  accent-color: var(--mtcd-teal);
}

/* ── bullet points ───────────────────────────────────────────────────────── */
body.mtc-profile-builder #view2 .mtcd-bullets {
  margin-bottom: 16px;
}

body.mtc-profile-builder #view2 .mtcd-bullets > label {
  display: block;
  margin-bottom: 8px;
  color: var(--mtcd-navy);
  font-size: 13px;
  font-weight: 600;
}

body.mtc-profile-builder #view2 .mtcd-opt {
  color: var(--mtcd-navy-40);
  font-weight: 500;
}

body.mtc-profile-builder #view2 .mtcd-bullet {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

body.mtc-profile-builder #view2 .mtcd-bullet-dot {
  padding-top: 11px;
  color: var(--mtcd-navy-40);
  font-size: 15px;
  line-height: 1;
}

body.mtc-profile-builder #view2 .mtcd-bullet textarea {
  min-height: 62px;
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--mtcd-line);
  border-radius: var(--mtcd-r);
  background: var(--mtcd-paper);
  color: var(--mtcd-navy);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}

body.mtc-profile-builder #view2 .mtcd-bullet textarea:focus {
  outline: none;
  border-color: var(--mtcd-teal);
  box-shadow: 0 0 0 3px var(--mtcd-teal-tint);
}

body.mtc-profile-builder #view2 .mtcd-bactions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 2px;
}

body.mtc-profile-builder #view2 .mtcd-bdel {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--mtcd-line);
  border-radius: 8px;
  background: var(--mtcd-paper);
  color: var(--mtcd-navy-40);
  font-size: 12px;
  cursor: pointer;
}

body.mtc-profile-builder #view2 .mtcd-bdel:hover {
  border-color: #f2cfc7;
  background: #fdf0ed;
  color: var(--mtcd-danger);
}

body.mtc-profile-builder #view2 .mtcd-bpolish {
  display: inline-flex;
  height: 32px;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid #cbeade;
  border-radius: 10px;
  background: var(--mtcd-teal-tint);
  color: var(--mtcd-teal-dark);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

body.mtc-profile-builder #view2 .mtcd-bpolish:hover:not([disabled]) {
  border-color: var(--mtcd-teal);
  background: var(--mtcd-teal);
  color: #fff;
}

body.mtc-profile-builder #view2 .mtcd-bpolish[disabled] {
  opacity: .5;
  cursor: wait;
}

body.mtc-profile-builder #view2 .mtcd-btn-sm {
  min-height: 32px;
  padding: 6px 11px;
  border-color: var(--mtcd-line);
  background: var(--mtcd-paper);
  color: var(--mtcd-navy);
  font-size: 12.5px;
}

body.mtc-profile-builder #view2 .mtcd-bcount {
  margin: 4px 0 10px;
  color: #8a6a24;
  font-size: 12.5px;
  font-weight: 700;
}

body.mtc-profile-builder #view2 .mtcd-bcount.is-ok {
  color: var(--mtcd-teal-dark);
}

@media (max-width: 760px) {
  body.mtc-profile-builder #view2 .mtcd-dates {
    grid-template-columns: 1fr;
  }

  body.mtc-profile-builder #view2 .mtcd-bpolish-t {
    display: none;
  }

  body.mtc-profile-builder #view2 .mtcd-bpolish {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  body.mtc-profile-builder #view2 .mtcd-ai-row .mtcd-bpolish {
    width: auto;
    padding: 0 11px;
  }

  body.mtc-profile-builder #view2 .mtcd-ai-row .mtcd-bpolish .mtcd-bpolish-t {
    display: inline;
  }

  body.mtc-profile-builder #view2 .mtcd-bdel {
    width: 40px;
    height: 40px;
  }
}
