@import url("../assets/vendor/bootstrap-icons/bootstrap-icons.min.css");

/* JUJU connected Client Profile — view-first layout matched to the approved standalone HTML. */
body[data-page="client-detail"].juju-profile-page-enabled #content {
  max-width: none;
  padding: 0;
}

#page-client-detail.juju-profile-layout-enabled {
  animation: none;
  background: #f3f6f8;
  min-height: calc(100vh - 58px);
}

#page-client-detail.juju-profile-layout-enabled > .breadcrumb,
#page-client-detail.juju-profile-layout-enabled > .client-profile-hdr,
#page-client-detail.juju-profile-layout-enabled > #client-profile-alert,
#page-client-detail.juju-profile-layout-enabled > #client-profile-hero,
#page-client-detail.juju-profile-layout-enabled > #client-profile-status,
#page-client-detail.juju-profile-layout-enabled > .client-profile-budget-section,
#page-client-detail.juju-profile-layout-enabled .client-profile-main-card > .client-profile-card-title,
#page-client-detail.juju-profile-layout-enabled .client-profile-main-card > .locked-source-note {
  display: none !important;
}

#page-client-detail.juju-profile-layout-enabled > .client-profile-layout {
  display: block;
  margin: 0;
}

#page-client-detail.juju-profile-layout-enabled .client-profile-main-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.client-profile-info-grid.juju-client-profile-root {
  display: block;
  gap: 0;
}

.juju-profile-phase1 {
  --juju-navy: #24364d;
  --juju-muted: #748196;
  --juju-line: #d9e2e9;
  --juju-soft-line: #e8eef2;
  --juju-teal: #0f7c76;
  --juju-teal-dark: #0a625d;
  --juju-teal-soft: #e9f6f3;
  background: #f3f6f8;
  color: var(--juju-navy);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-width: 0;
}

.juju-new-client-create .juju-profile-tabs button:disabled {
  cursor: not-allowed;
  opacity: .48;
}
.juju-new-client-create .juju-profile-tabs button.active:disabled {
  cursor: default;
  opacity: 1;
}
.juju-create-guide {
  background: #f1faf7;
  border: 1px solid #cce7df;
  border-radius: 10px;
  display: grid;
  gap: 4px;
  margin: 0 14px 14px;
  padding: 12px 13px;
}
.juju-create-guide strong { color: var(--juju-teal-dark); font-size:var(--ui-font-12, 12px); }
.juju-create-guide small { color: var(--juju-muted); font-size:var(--ui-font-11, 11px); line-height: 1.45; }
.juju-create-callout {
  align-items: flex-start;
  background: #f1faf7;
  border: 1px solid #cce7df;
  border-radius: 10px;
  color: var(--juju-teal-dark);
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  padding: 13px 15px;
}
.juju-create-callout span { display: grid; gap: 3px; }
.juju-create-callout strong { font-size:var(--ui-font-13, 13px); }
.juju-create-callout small { color: #587389; font-size:var(--ui-font-12, 12px); line-height: 1.45; }
.juju-group-toggle.is-static { cursor: default; }
.juju-new-client-create .juju-edit-field > span {
  color: #71849a;
  display: block;
  font-size:var(--ui-font-10, 10px);
  font-weight: 850;
  letter-spacing: .08em;
  margin-bottom: 7px;
  text-transform: uppercase;
}
.juju-new-client-create .juju-create-optional { margin-top: 16px; }

.juju-progress-notes-review {
  background: #fff;
  border: 1px solid var(--juju-line);
  border-radius: 10px;
  overflow: hidden;
}
.juju-progress-notes-toolbar {
  align-items: center;
  border-bottom: 1px solid var(--juju-line);
  display: flex;
  justify-content: space-between;
  padding: 16px 20px;
}
.juju-progress-notes-toolbar > div { display: flex; flex-direction: column; gap: 3px; }
.juju-progress-notes-toolbar strong { color: var(--juju-navy); font-size: 17px; }
.juju-progress-notes-toolbar small, .juju-progress-notes-notice { color: var(--juju-muted); font-size:var(--ui-font-12, 12px); }
.juju-progress-notes-notice { background: #f7fbfc; border-bottom: 1px solid var(--juju-soft-line); padding: 10px 20px; }
.juju-progress-notes-empty { border-bottom: 1px solid var(--juju-soft-line); display: flex; flex-direction: column; gap: 5px; padding: 22px 20px; }
.juju-progress-notes-empty strong { color: var(--juju-navy); font-size:var(--ui-font-14, 14px); }
.juju-progress-notes-empty span { color: var(--juju-muted); font-size:var(--ui-font-12, 12px); }
.juju-progress-note-composer { background: #fbfcfd; border-bottom: 1px solid var(--juju-soft-line); padding: 18px 20px; }
.juju-progress-note-composer-title { align-items: baseline; display: flex; gap: 10px; margin-bottom: 14px; }
.juju-progress-note-composer-title strong { color: var(--juju-navy); font-size:var(--ui-font-14, 14px); }
.juju-progress-note-composer-title span { color: var(--juju-muted); font-size:var(--ui-font-11, 11px); }
.juju-progress-note-composer-grid { display: grid; gap: 12px 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.juju-progress-note-composer label { color: #71849a; display: flex; flex-direction: column; font-size:var(--ui-font-10, 10px); font-weight: 850; gap: 5px; letter-spacing: .08em; text-transform: uppercase; }
.juju-progress-note-composer label.is-wide { grid-column: span 2; }
.juju-progress-note-composer input, .juju-progress-note-composer select, .juju-progress-note-composer textarea { border: 1px solid var(--juju-line); border-radius: 6px; color: var(--juju-navy); font: inherit; letter-spacing: normal; padding: 9px 10px; text-transform: none; }
.juju-progress-note-file-input small { color: var(--juju-muted); font-size:var(--ui-font-10, 10px); font-weight: 600; letter-spacing: normal; line-height: 1.45; text-transform: none; }
.juju-progress-note-author { background: #edf7f5; border: 1px solid #c7e1dd; border-radius: 6px; color: var(--juju-teal-dark); font-size:var(--ui-font-11, 11px); font-weight: 700; letter-spacing: normal; min-height: 36px; padding: 9px 10px; text-transform: none; }
.juju-progress-note-composer-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.juju-progress-note-table-head, .juju-progress-note-row {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 145px 150px minmax(210px, 1fr) 115px 140px minmax(155px, auto);
  min-width: 980px;
  padding: 12px 20px;
}
.juju-progress-note-table-head { background: #f8fafb; color: #71849a; font-size:var(--ui-font-10, 10px); font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.juju-progress-note-entry { border-bottom: 1px solid var(--juju-soft-line); }
.juju-progress-note-entry.is-saved { border-left: 3px solid var(--juju-teal); }
.juju-progress-note-entry.is-deleted { border-left-color: #9aa8b7; }
.juju-progress-note-entry.is-deleted .juju-progress-note-row { background: #f8f9fb; color: #6f7d90; }
.juju-progress-note-entry:last-child { border-bottom: 0; }
.juju-progress-note-row { color: #3f5268; font-size:var(--ui-font-12, 12px); }
.juju-progress-note-meta { display: flex; flex-direction: column; gap: 2px; }
.juju-progress-note-meta strong { font-size:var(--ui-font-11, 11px); }
.juju-progress-note-meta small { color: var(--juju-muted); font-size:var(--ui-font-10, 10px); }
.juju-progress-note-type { font-weight: 750; }
.juju-progress-note-summary { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.juju-progress-note-files { color: var(--juju-teal-dark); font-weight: 700; }
.juju-progress-note-file-count { background: transparent; border: 0; color: var(--juju-teal-dark); cursor: pointer; font: inherit; font-weight: 800; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.juju-progress-note-next { color: var(--juju-muted); }
.juju-progress-note-actions { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.juju-progress-note-actions .btn { min-height: 30px; padding: 4px 8px; }
.juju-progress-note-actions .btn-danger, .juju-progress-note-delete-panel .btn-danger { background: #a82626; border-color: #a82626; color: #fff; }
.juju-progress-note-detail { background: #fbfcfd; border-top: 1px solid var(--juju-soft-line); display: grid; gap: 18px; grid-template-columns: 1fr 1fr; padding: 14px 20px 16px 179px; }
.juju-progress-note-detail[hidden] { display: none; }
.juju-progress-note-detail strong { color: #71849a; font-size:var(--ui-font-10, 10px); letter-spacing: .08em; text-transform: uppercase; }
.juju-progress-note-detail p { color: #42566c; font-size:var(--ui-font-12, 12px); margin: 4px 0 0; white-space: pre-wrap; }
.juju-progress-note-detail-attachments { grid-column: 1 / -1; }
.juju-progress-note-attachment-list { display: grid; gap: 7px; margin-top: 7px; }
.juju-progress-note-attachment-list article { align-items: center; background: #fff; border: 1px solid #d8e5e8; border-radius: 8px; display: flex; gap: 12px; justify-content: space-between; padding: 9px 10px; }
.juju-progress-note-attachment-list article > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.juju-progress-note-attachment-list article > div:first-child strong { color: #304157; font-size:var(--ui-font-11, 11px); letter-spacing: 0; overflow-wrap: anywhere; text-transform: none; }
.juju-progress-note-attachment-list article > div:first-child span { color: var(--juju-muted); font-size:var(--ui-font-10, 10px); }
.juju-progress-note-attachment-list article > div:last-child { display: flex; flex: 0 0 auto; gap: 5px; }
.juju-progress-note-attachment-panel { align-items: end; background: #f1faf7; border-top: 1px solid #bcded6; display: grid; gap: 14px; grid-template-columns: minmax(260px, 1.2fr) minmax(260px, 1fr) auto; padding: 14px 20px; }
.juju-progress-note-attachment-panel > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.juju-progress-note-attachment-panel strong { color: var(--juju-teal-dark); font-size:var(--ui-font-12, 12px); }
.juju-progress-note-attachment-panel span { color: #506c75; font-size:var(--ui-font-11, 11px); line-height: 1.4; }
.juju-progress-note-attachment-panel label { color: #46666c; display: flex; flex-direction: column; font-size:var(--ui-font-10, 10px); font-weight: 850; gap: 5px; letter-spacing: .06em; text-transform: uppercase; }
.juju-progress-note-attachment-panel input { background: #fff; border: 1px solid #9fcac1; border-radius: 6px; font: inherit; padding: 7px; text-transform: none; }
.juju-progress-note-attachment-panel > div:last-child { display: flex; gap: 7px; }
.juju-progress-note-delete-panel { align-items: end; background: #fff5f5; border-top: 1px solid #efc1c1; display: grid; gap: 14px; grid-template-columns: minmax(220px, .9fr) minmax(260px, 1.4fr) auto; padding: 14px 20px; }
.juju-progress-note-delete-panel > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.juju-progress-note-delete-panel strong { color: #812121; font-size:var(--ui-font-12, 12px); }
.juju-progress-note-delete-panel span { color: #755555; font-size:var(--ui-font-11, 11px); line-height: 1.4; }
.juju-progress-note-delete-panel label { color: #7f4a4a; display: flex; flex-direction: column; font-size:var(--ui-font-10, 10px); font-weight: 850; gap: 5px; letter-spacing: .06em; text-transform: uppercase; }
.juju-progress-note-delete-panel textarea { border: 1px solid #d9aaaa; border-radius: 6px; box-sizing: border-box; font: inherit; padding: 8px 10px; resize: vertical; width: 100%; }
.juju-progress-note-delete-panel > div:last-child { display: flex; gap: 7px; }
.juju-progress-notes-more { background: #f8fafb; border-bottom: 1px solid var(--juju-soft-line); color: var(--juju-muted); font-size:var(--ui-font-11, 11px); padding: 10px 20px; }
@media (max-width: 900px) {
  .juju-progress-note-detail { padding-left: 20px; }
  .juju-progress-note-composer-grid { grid-template-columns: 1fr 1fr; }
  .juju-progress-note-composer label.is-wide { grid-column: span 2; }
  .juju-progress-note-delete-panel { align-items: stretch; grid-template-columns: 1fr; }
  .juju-progress-note-delete-panel > div:last-child { justify-content: flex-end; }
  .juju-progress-note-attachment-panel { align-items: stretch; grid-template-columns: 1fr; }
  .juju-progress-note-attachment-panel > div:last-child { justify-content: flex-end; }
  .juju-progress-note-attachment-list article { align-items: stretch; flex-direction: column; }
}
@media (max-width: 640px) {
  .juju-progress-note-table-head { display: none; }
  .juju-progress-note-row { align-items: start; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-width: 0; padding: 14px; }
  .juju-progress-note-summary { grid-column: 1 / -1; white-space: normal; }
  .juju-progress-note-files, .juju-progress-note-next { border-top: 1px solid var(--juju-soft-line); padding-top: 9px; }
  .juju-progress-note-files::before, .juju-progress-note-next::before { color: #71849a; display: block; font-size:var(--ui-font-8, 8px); font-weight: 850; letter-spacing: .08em; margin-bottom: 4px; text-transform: uppercase; }
  .juju-progress-note-files::before { content: "Attachments"; }
  .juju-progress-note-next::before { content: "Next action"; }
  .juju-progress-note-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .juju-progress-note-detail { grid-template-columns: 1fr; padding: 14px; }
  .juju-progress-note-detail-attachments { grid-column: 1; }
}

.juju-legacy-budget-review {
  background: #fff;
  border: 1px solid var(--juju-line);
  border-radius: 10px;
  overflow: hidden;
}
.juju-legacy-budget-head {
  align-items: center;
  border-bottom: 1px solid var(--juju-line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px 20px;
}
.juju-legacy-budget-actions { align-items:center; display:flex; flex-wrap:wrap; gap:9px; justify-content:flex-end; }
.juju-open-budget-plans { background:#087b70; border:1px solid #087b70; border-radius:7px; color:#fff; cursor:pointer; font:700 13px/1.2 inherit; min-height:38px; padding:9px 13px; }
.juju-open-budget-plans:hover,.juju-open-budget-plans:focus-visible { background:#06675e; border-color:#06675e; outline:2px solid #9fd7d0; outline-offset:2px; }
@media(max-width:700px) { .juju-legacy-budget-actions { align-items:stretch; flex-direction:column; width:100%; }.juju-open-budget-plans { width:100%; } }
.juju-legacy-budget-head strong { color: var(--juju-navy); display: block; font-size: 17px; }
.juju-legacy-budget-head small { color: var(--juju-muted); display: block; font-size:var(--ui-font-12, 12px); margin-top: 3px; }
.juju-readonly-pill { border: 1px solid #c9e2df; border-radius: 999px; color: var(--juju-teal-dark); font-size:var(--ui-font-11, 11px); font-weight: 800; padding: 6px 10px; white-space: nowrap; }
.juju-legacy-budget-notice { background: #f7fbfc; border-bottom: 1px solid var(--juju-soft-line); color: var(--juju-muted); font-size:var(--ui-font-12, 12px); padding: 11px 20px; }
.juju-legacy-budget-approved { align-items: baseline; background: #f3faf7; border-bottom: 1px solid var(--juju-soft-line); display: flex; gap: 12px; padding: 12px 20px; }
.juju-legacy-budget-approved strong { color: #1c6c64; font-size:var(--ui-font-10, 10px); letter-spacing: .08em; text-transform: uppercase; }
.juju-legacy-budget-approved span { color: #3f556d; font-size:var(--ui-font-12, 12px); font-weight: 700; }
.juju-client-documents-entry { align-items: center; background: #f3faf7; border: 1px solid #cfe9e1; border-radius: 12px; display: flex; gap: 18px; justify-content: space-between; margin: 0 0 16px; padding: 14px 18px; }
.juju-client-documents-entry > div { display: grid; gap: 4px; }
.juju-client-documents-entry strong { color: #1c6c64; font-size:var(--ui-font-12, 12px); letter-spacing: .06em; text-transform: uppercase; }
.juju-client-documents-entry span { color: #526b84; font-size:var(--ui-font-13, 13px); }
@media (max-width: 700px) { .juju-client-documents-entry { align-items: flex-start; flex-direction: column; } }

.juju-document-checklist {
  background: #fff;
  border: 1px solid var(--juju-line);
  border-radius: 10px;
  overflow: hidden;
}
.juju-document-checklist-head {
  align-items: center;
  background: #f5fbf9;
  border-bottom: 1px solid #d8e9e5;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px 20px;
}
.juju-document-checklist-head > div { display: grid; gap: 4px; }
.juju-document-checklist-head strong { color: #173c42; font-size: 17px; }
.juju-document-checklist-head span { color: #5f7282; font-size:var(--ui-font-13, 13px); line-height: 1.45; }
.juju-document-progress {
  background: #fff;
  border: 1px solid #bcded7;
  border-radius: 999px;
  color: #0b6b64 !important;
  flex: 0 0 auto;
  font-size:var(--ui-font-12, 12px)!important;
  font-weight: 800;
  padding: 7px 11px;
}
.juju-document-checklist-columns,
.juju-document-checklist-row {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(240px, 1.1fr) 110px minmax(280px, 1.45fr) 112px;
}
.juju-document-checklist-columns {
  background: #f8fafb;
  border-bottom: 1px solid var(--juju-soft-line);
  color: #6d7c8e;
  font-size:var(--ui-font-12, 12px);
  font-weight: 850;
  letter-spacing: .045em;
  padding: 9px 20px;
  text-transform: uppercase;
}
.juju-document-checklist-row {
  border-bottom: 1px solid var(--juju-soft-line);
  min-height: 76px;
  padding: 12px 20px;
}
.juju-document-checklist-row:last-child { border-bottom: 0; }
.juju-document-checklist-row.is-missing { background: #fffdf9; }
.juju-document-type { align-items: flex-start; display: flex; gap: 12px; min-width: 0; }
.juju-document-type > span:last-child { display: grid; gap: 4px; min-width: 0; }
.juju-document-type strong { color: #24364d; font-size: 15px; line-height: 1.3; }
.juju-document-type small { color: #6d7d8f; font-size:var(--ui-font-12, 12px); line-height: 1.35; }
.juju-document-code {
  background: #e8f5f2;
  border-radius: 6px;
  color: #0d6b63;
  flex: 0 0 auto;
  font-size:var(--ui-font-12, 12px);
  font-weight: 850;
  padding: 5px 7px;
}
.juju-document-code.is-other { font-size:var(--ui-font-12, 12px); }
.juju-document-state > span {
  border-radius: 999px;
  display: inline-flex;
  font-size:var(--ui-font-12, 12px);
  font-weight: 800;
  padding: 6px 9px;
}
.juju-document-state .is-uploaded { background: #e7f7ec; color: #23703d; }
.juju-document-state .is-missing { background: #fff0df; color: #94520e; }
.juju-document-state .is-optional { background: #eef2f6; color: #667688; }
.juju-document-files { min-width: 0; }
.juju-document-files > span { color: #8290a0; font-size:var(--ui-font-13, 13px); }
.juju-document-files ul { display: grid; gap: 7px; list-style: none; margin: 0; padding: 0; }
.juju-document-files li { align-items: center; display: flex; gap: 10px; justify-content: space-between; min-width: 0; }
.juju-document-files li > span { display: grid; gap: 2px; min-width: 0; }
.juju-document-files li strong { color: #33485e; font-size:var(--ui-font-13, 13px); overflow-wrap: anywhere; }
.juju-document-files li small { color: #7a8797; font-size:var(--ui-font-12, 12px); }
.juju-document-action { display: flex; justify-content: flex-end; }
.juju-document-action .btn { min-height: 36px; min-width: 96px; }
@media (max-width: 920px) {
  .juju-document-checklist-columns { display: none; }
  .juju-document-checklist-row { align-items: flex-start; grid-template-columns: 1fr auto; }
  .juju-document-files { grid-column: 1 / -1; }
  .juju-document-action { grid-column: 1 / -1; justify-content: stretch; }
  .juju-document-action .btn { width: 100%; }
}
@media (max-width: 620px) {
  .juju-document-checklist-head { align-items: flex-start; flex-direction: column; }
  .juju-document-checklist-row { grid-template-columns: 1fr; }
  .juju-document-state, .juju-document-files, .juju-document-action { grid-column: 1; }
}
.juju-legacy-budget-grid { display: grid; gap: 0 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0 20px 8px; }
.juju-legacy-budget-card { border-bottom: 1px solid var(--juju-soft-line); min-width: 0; padding: 14px 0; }
.juju-legacy-budget-card dt { color: #71849a; font-size:var(--ui-font-10, 10px); font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.juju-legacy-budget-card dd { color: var(--juju-navy); font-size: 15px; font-weight: 700; margin: 7px 0 0; overflow-wrap: anywhere; }
@media (max-width: 900px) { .juju-legacy-budget-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .juju-legacy-budget-grid { grid-template-columns: 1fr; } .juju-legacy-budget-head { align-items: flex-start; flex-direction: column; } }

.juju-funding-cards { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.juju-funding-card { border: 1px solid #d7e3e5; border-radius: 14px; overflow: hidden; padding: 20px; }
.juju-funding-card.is-on { background: #f1faf7; border-color: #c6e5dc; }
.juju-funding-card.is-at { background: #f2f7ff; border-color: #c9dcf6; }
.juju-funding-card.is-hm { background: #f7f3ff; border-color: #ddd1fa; }
.juju-funding-card.is-rc { background: #fff8f0; border-color: #f1d9b9; }
.juju-funding-card-head { align-items: flex-start; display: flex; gap: 16px; justify-content: space-between; }
.juju-funding-eyebrow { color: #607690; display: block; font-size:var(--ui-font-12, 12px); font-weight: 850; letter-spacing: .13em; }
.juju-funding-card h3 { color: #17233a; font-size: 27px; letter-spacing: -.02em; margin: 7px 0 5px; }
.juju-funding-card-head p { color: #5e7188; font-size:var(--ui-font-14, 14px); font-weight: 650; line-height: 1.35; margin: 0; }
.juju-funding-period { background: rgba(255,255,255,.72); border: 1px solid rgba(137,166,177,.24); border-radius: 999px; color: #2a5c70; font-size:var(--ui-font-12, 12px); font-weight: 850; padding: 8px 13px; white-space: nowrap; }
.juju-funding-card-body { margin-top: 22px; }
.juju-funding-field-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.juju-funding-field, .juju-funding-amount { background: rgba(255,255,255,.82); border: 1px solid #dbe5ed; border-radius: 11px; min-width: 0; padding: 13px 14px; }
.juju-funding-field dt, .juju-funding-amount dt { color: #65738b; font-size:var(--ui-font-10, 10px); font-weight: 850; letter-spacing: .1em; }
.juju-funding-field dd { color: #18243a; font-size: 16px; font-weight: 800; margin: 8px 0 0; overflow-wrap: anywhere; }
.juju-funding-amount { margin-top: 14px; }
.juju-funding-amount dd { color: #18243a; font-size: 17px; font-weight: 800; margin: 8px 0 0; }
.juju-funding-amount p { color: #64748b; font-size:var(--ui-font-12, 12px); line-height: 1.4; margin: 8px 0 0; }
.juju-funding-card footer { color: #5e7188; font-size:var(--ui-font-14, 14px); font-weight: 700; margin-top: 20px; }
.juju-funding-card.is-editing .juju-funding-card-body { margin-top: 20px; }
.juju-funding-edit-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.juju-funding-edit-field { background: rgba(255,255,255,.88); border: 1px solid #dbe5ed; border-radius: 11px; min-width: 0; padding: 12px 14px; }
.juju-funding-edit-field > label, .juju-funding-edit-pair label { color: #65738b; display: block; font-size:var(--ui-font-10, 10px); font-weight: 850; letter-spacing: .1em; margin-bottom: 7px; }
.juju-funding-edit-field .form-control, .juju-funding-edit-pair .form-control { background: #fff; border: 1px solid #c8d7e5; border-radius: 9px; box-sizing: border-box; color: #18243a; font-size: 15px; min-height: 42px; padding: 9px 11px; width: 100%; }
.juju-funding-edit-field .form-control:disabled { background: #f1f4f7; color: #738197; cursor: not-allowed; }
.juju-funding-edit-field.is-readonly { opacity: .82; }
.juju-funding-edit-pair { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-column: 1 / -1; }
.juju-funding-edit-pair > div { background: rgba(255,255,255,.88); border: 1px solid #dbe5ed; border-radius: 11px; padding: 12px 14px; }
.juju-funding-edit-pair small { color: #60738b; display: block; font-size:var(--ui-font-12, 12px); line-height: 1.35; margin-top: 7px; }
.juju-funding-edit-grid-on { grid-template-columns: 1fr; }
.juju-funding-on-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.juju-funding-on-panel .juju-funding-status-field { grid-column: 1 / -1; }
.juju-funding-on-detail { grid-column: 1 / -1; }
.juju-funding-card-note, .juju-funding-rule-help { color: #60738b; display: block; font-size:var(--ui-font-13, 13px); line-height: 1.45; margin-top: 12px; }
.juju-funding-agreement-row { align-items: center; border-top: 1px solid rgba(122,151,165,.24); display: flex; gap: 12px; justify-content: space-between; margin-top: 18px; padding-top: 16px; }
.juju-funding-agreement-row span { color: #5e7188; font-size:var(--ui-font-14, 14px); font-weight: 750; }
.juju-funding-agreement-row .btn { white-space: nowrap; }
@media (max-width: 900px) { .juju-funding-cards { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .juju-funding-field-grid, .juju-funding-edit-grid, .juju-funding-edit-pair, .juju-funding-on-panel { grid-template-columns: 1fr; } .juju-funding-card-head { flex-direction: column; } .juju-funding-agreement-row { align-items: flex-start; flex-direction: column; } }

.juju-document-link-row { align-items: center; border-top: 1px solid var(--juju-soft-line); display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin-top: 12px; padding-top: 10px; }
.juju-document-link-row > span:first-child { color: #71849a; font-size:var(--ui-font-10, 10px); font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.juju-document-link { align-items: center; display: inline-flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.juju-document-link > span { color: var(--juju-teal-dark); font-size:var(--ui-font-12, 12px); font-weight: 750; max-width: 300px; overflow-wrap: anywhere; }
.juju-document-link-empty { color: var(--juju-muted); font-size:var(--ui-font-11, 11px); }

/* Form 200 questions are deliberately more prominent than their explanatory notes. */
.juju-readonly-field.is-question { background: #fffdf1; border-left: 3px solid #e5b84b; padding-left: 13px; }
.juju-readonly-field.is-question dt { color: #8b6815; font-size:var(--ui-font-12, 12px); letter-spacing: .045em; line-height: 1.35; }
.juju-readonly-field.is-question dd { font-size: 16px; }
.juju-input-type-tag { background: #fff0c2; border-radius: 999px; color: #8b6815; display: inline-block; font-size:var(--ui-font-9, 9px); font-weight: 800; letter-spacing: .02em; margin-left: 7px; padding: 3px 7px; text-transform: none; }
.juju-question-label-tag { background: #fff0c2; border-radius: 999px; color: #8b6815; display: inline-block; font-size:var(--ui-font-9, 9px); font-weight: 800; letter-spacing: .02em; margin-left: 7px; padding: 3px 7px; text-transform: none; }
.juju-question-note { color: #9a4d42; display: block; font-size:var(--ui-font-10, 10px); font-weight: 650; letter-spacing: 0; line-height: 1.4; margin-top: 5px; text-transform: none; }
.juju-risk-link-note { color: #9a4d42; font-weight: 800; }
.juju-section-guidance.is-form200 { background: #fffdf1; border-left: 3px solid #e5b84b; }

.juju-profile-summary {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--juju-line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 60px;
  padding: 10px 30px;
}

.juju-profile-summary-case {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.juju-case-state {
  background: var(--juju-teal-soft);
  border-radius: 999px;
  color: var(--juju-teal-dark);
  display: inline-flex;
  flex: 0 0 auto;
  font-size:var(--ui-font-11, 11px);
  font-weight: 900;
  letter-spacing: .09em;
  padding: 7px 11px;
}

.juju-profile-summary-case strong {
  color: #3f5064;
  font-size:var(--ui-font-14, 14px);
  white-space: nowrap;
}

.juju-profile-summary-case small {
  color: #8b96a5;
  font-size:var(--ui-font-12, 12px);
  white-space: nowrap;
}

.juju-profile-facts {
  align-items: center;
  display: flex;
  gap: 36px;
  margin: 0;
}

.juju-profile-facts > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 96px;
}

.juju-profile-facts dt {
  color: #8a96a5;
  font-size:var(--ui-font-10, 10px);
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.juju-profile-facts dd {
  color: #33465b;
  font-size:var(--ui-font-13, 13px);
  font-weight: 750;
  margin: 0;
}

.juju-profile-workspace {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  margin: 0 auto;
  max-width: none;
  min-height: calc(100vh - 118px);
}

.juju-profile-sidebar {
  background: #fff;
  border-right: 1px solid var(--juju-line);
  min-width: 0;
  padding: 19px 12px 28px;
}

.juju-sidebar-head {
  border-bottom: 1px solid var(--juju-soft-line);
  padding: 0 10px 15px;
}

.juju-sidebar-head span {
  color: #8a95a4;
  display: block;
  font-size:var(--ui-font-11, 11px);
  font-weight: 850;
  letter-spacing: .13em;
}

.juju-sidebar-head strong {
  color: #34465c;
  display: block;
  font-size:var(--ui-font-14, 14px);
}

.juju-profile-switch {
  background: #f4faf9;
  border: 1px solid #cfe4e0;
  border-radius: 8px;
  display: grid;
  gap: 9px;
  margin: 12px 8px 9px;
  padding: 10px;
}

.juju-profile-switch > div {
  display: grid;
  gap: 2px;
}

.juju-profile-switch strong {
  color: #315049;
  font-size:var(--ui-font-13, 13px);
}

.juju-profile-switch small {
  color: #708093;
  font-size:var(--ui-font-11, 11px);
  line-height: 1.4;
}

.juju-profile-switch .btn {
  justify-content: center;
  white-space: normal;
  width: 100%;
}

.juju-field-search {
  align-items: center;
  background: #f9fbfc;
  border: 1px solid #d4dfe6;
  border-radius: 7px;
  display: flex;
  gap: 7px;
  height: 38px;
  margin: 12px 8px 9px;
  padding: 0 10px;
  position: relative;
}

.juju-field-search > i {
  color: #7c899a;
  font-size:var(--ui-font-14, 14px);
}

.juju-field-search input {
  background: transparent;
  border: 0;
  color: #384a60;
  font-size:var(--ui-font-13, 13px);
  height: 100%;
  min-width: 0;
  outline: 0;
  padding: 0;
  width: 100%;
}

.juju-search-results {
  background: #fff;
  border: 1px solid #cfdbe2;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(29, 45, 61, .16);
  left: 0;
  max-height: 300px;
  overflow: auto;
  padding: 5px;
  position: absolute;
  right: 0;
  top: 42px;
  z-index: 20;
}

.juju-search-results[hidden] {
  display: none;
}

.juju-search-results button {
  align-items: flex-start;
  background: transparent;
  border: 0;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 44px;
  padding: 8px;
  text-align: left;
  width: 100%;
}

.juju-search-results button:hover,
.juju-search-results button:focus-visible {
  background: #edf7f5;
  outline: 0;
}

.juju-search-results strong {
  color: #3c4d61;
  font-size:var(--ui-font-13, 13px);
}

.juju-search-results small,
.juju-search-empty {
  color: #8a96a5;
  font-size:var(--ui-font-11, 11px);
}

.juju-search-empty {
  padding: 12px 9px;
}

.juju-profile-tabs {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  overflow: visible;
  padding: 0;
}

.juju-profile-tabs button {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0;
  color: #3b4b60;
  cursor: pointer;
  display: grid;
  flex: none;
  font: inherit;
  gap: 9px;
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 50px;
  padding: 7px 9px;
  text-align: left;
  white-space: normal;
  width: 100%;
}

.juju-profile-tabs button:hover,
.juju-profile-tabs button:focus-visible {
  background: #f6f8f9;
  color: var(--juju-teal-dark);
  outline: 0;
}

.juju-profile-tabs button.active {
  background: #edf7f5;
  border-left-color: var(--juju-teal);
  box-shadow: none;
  color: var(--juju-teal-dark);
}

.juju-tab-icon {
  align-items: center;
  background: #edf2f5;
  border-radius: 7px;
  color: #67798c;
  display: flex;
  font-size: 16px;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.juju-profile-tabs button.active .juju-tab-icon {
  background: var(--juju-teal);
  color: #fff;
}

.juju-profile-tabs button strong {
  color: inherit;
  font-size:var(--ui-font-13, 13px);
  font-weight: 780;
  line-height: 1.28;
  min-width: 0;
}

.juju-sidebar-note {
  align-items: flex-start;
  border-top: 1px solid var(--juju-soft-line);
  color: #708093;
  display: flex;
  gap: 8px;
  margin: 18px 9px 0;
  padding-top: 14px;
}

.juju-sidebar-note > i {
  color: var(--juju-teal);
  font-size: 16px;
}

.juju-sidebar-note span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.juju-sidebar-note strong {
  color: #425368;
  font-size:var(--ui-font-12, 12px);
}

.juju-sidebar-note small {
  font-size:var(--ui-font-11, 11px);
  line-height: 1.4;
}

.juju-profile-main {
  min-width: 0;
  padding: 29px 32px 44px;
}

.juju-page-head {
  align-items: flex-start;
  display: flex;
  gap: 22px;
  justify-content: space-between;
  margin-bottom: 13px;
  min-height: 72px;
}

.juju-page-head > div:first-child > span {
  color: var(--juju-teal);
  font-size:var(--ui-font-11, 11px);
  font-weight: 900;
  letter-spacing: .13em;
}

.juju-page-head h2 {
  color: #1e2e43;
  font-size: 25px;
  letter-spacing: -.035em;
  line-height: 1.15;
  margin: 5px 0 4px;
}

.juju-page-head p {
  color: #6f7d90;
  font-size:var(--ui-font-14, 14px);
  line-height: 1.45;
  margin: 0;
}

.juju-page-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
  max-width: 560px;
  padding-top: 2px;
}

.juju-page-actions .btn {
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
}

.juju-view-mode {
  align-items: center;
  background: #f1f8f7;
  border: 1px solid #cfe1df;
  border-radius: 999px;
  color: var(--juju-teal-dark);
  display: inline-flex;
  font-size:var(--ui-font-10, 10px);
  font-weight: 800;
  justify-content: center;
  min-height: 34px;
  min-width: 96px;
  padding: 0 15px;
}

.juju-view-mode.is-editing {
  background: #fff7e8;
  border-color: #e2c58f;
  color: #8a5a18;
}

.juju-inline-notice {
  border: 1px solid;
  border-radius: 7px;
  font-size:var(--ui-font-11, 11px);
  font-weight: 800;
  margin: 0 0 10px;
  padding: 9px 11px;
}

.juju-inline-notice.is-success {
  background: #ecfdf3;
  border-color: #a7e6bd;
  color: #166534;
}

.juju-inline-notice.is-error {
  background: #fff1f1;
  border-color: #efb5b5;
  color: #9f1d1d;
}

.juju-profile-panel {
  background: #fff;
  border: 1px solid var(--juju-line);
  border-radius: 9px;
  box-shadow: 0 1px 0 rgba(31, 49, 68, .02);
  overflow: hidden;
}

.juju-readonly-group + .juju-readonly-group {
  border-top: 1px solid var(--juju-soft-line);
}

.juju-readonly-group.is-risk-pair {
  border-left: 3px solid #98cfc8;
}

.juju-readonly-group.is-risk-pair .juju-group-toggle {
  background: #f8fcfb;
}

.juju-readonly-group.is-risk-pair .juju-readonly-fields,
.juju-readonly-group.is-risk-pair .juju-edit-fields {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr);
  padding-left: 28px;
}

.juju-readonly-group.is-risk-pair .juju-readonly-field.is-wide,
.juju-readonly-group.is-risk-pair .juju-edit-field.is-wide {
  grid-column: auto;
}

.juju-group-toggle {
  align-items: center;
  background: #fff;
  border: 0;
  color: #304157;
  display: grid;
  gap: 10px;
  grid-template-columns: 26px minmax(0, 1fr);
  min-height: 48px;
  padding: 8px 15px;
  text-align: left;
  width: 100%;
}

.juju-group-toggle:hover,
.juju-group-toggle:focus-visible {
  background: #f8fafb;
  outline: 0;
}

.juju-group-marker {
  align-items: center;
  border: 1px solid #b7d7d3;
  border-radius: 50%;
  color: var(--juju-teal);
  display: flex;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.juju-group-marker i {
  font-size:var(--ui-font-12, 12px);
  transition: transform .14s ease;
}

.juju-readonly-group:not(.is-open) .juju-group-marker i {
  transform: rotate(-90deg);
}

.juju-group-toggle > span:nth-child(2) {
  align-items: baseline;
  display: flex;
  gap: 8px;
}

.juju-group-toggle strong {
  color: #304157;
  font-size:var(--ui-font-13, 13px);
}

.juju-group-toggle small {
  color: #8a96a5;
  font-size:var(--ui-font-11, 11px);
}

.juju-group-content[hidden] {
  display: none !important;
}

.juju-readonly-fields,
.juju-edit-fields {
  background: #fff;
  border-top: 1px solid var(--juju-soft-line);
  display: grid;
  gap: 0 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 8px 24px 14px 46px;
}

.juju-section-flat .juju-readonly-fields,
.juju-section-flat .juju-edit-fields {
  border-top: 0;
  padding: 14px 24px 18px;
}

.juju-readonly-field {
  background: #fff;
  border-bottom: 1px solid #edf1f4;
  display: block;
  min-height: 64px;
  padding: 12px 0 10px;
}

.juju-readonly-field.is-wide,
.juju-edit-field.is-wide {
  grid-column: span 2;
}

.juju-readonly-field dt {
  color: var(--juju-muted);
  font-size:var(--ui-font-12, 12px);
  font-weight: 850;
  letter-spacing: .085em;
  line-height: 1.35;
  margin: 0 0 7px;
  text-transform: uppercase;
}

.juju-field-help {
  color: #64748b;
  display: block;
  font-size:var(--ui-font-12, 12px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.45;
  margin-top: 7px;
  max-width: 76ch;
  text-transform: none;
}

.juju-section-guidance {
  align-items: baseline;
  background: #f4fbf9;
  border: 1px solid #cfe6e2;
  border-radius: 12px;
  color: #36546b;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 16px;
  padding: 13px 16px;
}

.juju-section-guidance strong {
  color: #0f766e;
}

.juju-section-guidance.is-summary {
  background: #f5f9fe;
  border-color: #cfe0f3;
}

.juju-readonly-field dd {
  color: #26384d;
  font-size:var(--ui-font-14, 14px);
  font-weight: 500;
  line-height: 1.45;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.juju-readonly-field dd .business-unit-badges {
  margin-top: -3px;
}

.juju-partner-access-value {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: space-between;
}

.juju-partner-access-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.juju-partner-access-chips span {
  background: #e8f5f2;
  border: 1px solid #b9ded8;
  border-radius: 999px;
  color: #0f645e;
  font-size:var(--ui-font-12, 12px);
  font-weight: 750;
  padding: 5px 9px;
}

.juju-partner-access-empty {
  color: #71808a;
}

@media (max-width: 640px) {
  .juju-partner-access-value {
    align-items: stretch;
    flex-direction: column;
  }

  .juju-partner-access-value .btn {
    width: 100%;
  }
}

.juju-source-tag {
  border-radius: 999px;
  display: inline-block;
  font-size:var(--ui-font-7, 7px);
  font-weight: 900;
  letter-spacing: 0;
  margin-left: 4px;
  padding: 2px 5px;
  text-transform: none;
}

.juju-rule-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e7f5f2;
  color: #0c766d;
  font-size:var(--ui-font-10, 10px);
  font-weight: 700;
  letter-spacing: .04em;
}

.juju-rule-tag.is-system {
  background: #edf1f6;
  color: #64748b;
}

.juju-rule-hint {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size:var(--ui-font-12, 12px);
  line-height: 1.4;
}

.juju-source-tag.is-current {
  display: none;
}

.juju-source-tag.is-form200 {
  background: #dff3ef;
  color: var(--juju-teal-dark);
}

.juju-source-tag.is-restricted {
  background: #ffeadf;
  color: #a13f10;
}

.juju-readonly-field.is-form200 {
  background: #fbfefd;
}

.juju-readonly-field.is-payment-restricted {
  background: #fff9f5;
}

.juju-payment-note {
  align-items: flex-start;
  background: #fff5ec;
  border-bottom: 1px solid #f2ceb5;
  color: #8f421b;
  display: flex;
  font-size:var(--ui-font-11, 11px);
  font-weight: 750;
  gap: 8px;
  line-height: 1.45;
  padding: 11px 15px;
}

.juju-payment-note i {
  flex: 0 0 auto;
  font-size:var(--ui-font-14, 14px);
}

.juju-edit-fields {
  background: #fbfcfd;
}

.juju-edit-field {
  background: transparent;
  border-bottom: 1px solid #e5ebef;
  min-width: 0;
  padding: 10px 0 12px;
}

.juju-edit-field > label {
  color: #536176;
  display: block;
  font-size:var(--ui-font-9, 9px);
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 5px;
}

.juju-edit-field .form-control {
  background: #fff;
  border: 1px solid #cbd7e0;
  border-radius: 6px;
  color: #26384d;
  font-size:var(--ui-font-12, 12px);
  min-height: 36px;
  width: 100%;
}

.juju-edit-field .form-control:focus {
  border-color: #73aba6;
  box-shadow: 0 0 0 3px rgba(15, 124, 118, .08);
  outline: 0;
}

.juju-edit-field textarea.form-control {
  line-height: 1.4;
  resize: vertical;
}

.juju-edit-stack {
  display: grid;
  gap: 6px;
}

.juju-linked-detail {
  background: #f3f8f7;
  border-left: 3px solid #5fa49e;
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 9px 10px;
}

.juju-linked-detail[hidden] {
  display: none;
}

.juju-linked-detail > label {
  color: #3f5961;
  font-size:var(--ui-font-10, 10px);
  font-weight: 800;
}

.juju-linked-detail > small {
  color: #64748b;
  font-size:var(--ui-font-10, 10px);
  line-height: 1.4;
}

.juju-risk-trigger {
  background: #fff9e8;
  border: 1px solid #edd79a;
  border-left: 3px solid #d59c24;
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 9px 10px;
}

.juju-risk-trigger[hidden] {
  display: none;
}

.juju-risk-trigger strong {
  color: #75500c;
  font-size:var(--ui-font-10, 10px);
}

.juju-risk-trigger small,
.juju-risk-trigger span {
  color: #806d43;
  font-size:var(--ui-font-9, 9px);
  line-height: 1.4;
}

.juju-screening-details textarea {
  min-height: 82px;
}

.juju-action-check {
  align-items: center;
  color: #526173;
  display: flex;
  font-size:var(--ui-font-11, 11px);
  font-weight: 800;
  gap: 6px;
}

.juju-readonly-field.is-search-target,
.juju-edit-field.is-search-target {
  animation: juju-search-pulse 2.1s ease;
}

@keyframes juju-search-pulse {
  0%, 100% { background: transparent; }
  18%, 70% { background: #fff6cf; }
}

@media (max-width: 1120px) {
  .juju-profile-facts {
    gap: 18px;
  }

  .juju-profile-facts > div {
    min-width: 80px;
  }

  .juju-profile-workspace {
    grid-template-columns: 218px minmax(0, 1fr);
  }

  .juju-profile-main {
    padding: 24px 22px 38px;
  }

  .juju-readonly-fields,
  .juju-edit-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .juju-profile-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 11px 14px;
  }

  .juju-profile-facts {
    justify-content: space-between;
    width: 100%;
  }

  .juju-profile-workspace {
    display: block;
    min-height: 0;
  }

  .juju-profile-sidebar {
    border-bottom: 1px solid var(--juju-line);
    border-right: 0;
    padding: 8px 10px;
    position: sticky;
    top: 58px;
    z-index: 12;
  }

  .juju-sidebar-head,
  .juju-field-search,
  .juju-sidebar-note {
    display: none;
  }

  .juju-profile-switch {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 0 0 8px;
    padding: 7px 9px;
  }

  .juju-profile-switch > div { display: none; }
  .juju-profile-switch .btn { width: auto; }

  .juju-profile-tabs {
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .juju-profile-tabs button {
    border-bottom: 2px solid transparent;
    border-left: 0;
    display: flex;
    flex: 0 0 62px;
    flex-direction: column;
    gap: 3px;
    justify-content: center;
    min-height: 54px;
    padding: 5px;
    text-align: center;
    width: 62px;
  }

  .juju-profile-tabs button.active {
    border-bottom-color: var(--juju-teal);
  }

  .juju-tab-icon {
    height: 27px;
    width: 27px;
  }

  .juju-profile-tabs button strong {
    display: none;
  }

  .juju-profile-main {
    padding: 19px 14px 32px;
  }

  .juju-page-head {
    min-height: 64px;
  }

  .juju-page-actions {
    max-width: 320px;
  }
}

@media (max-width: 620px) {
  .juju-profile-summary-case {
    flex-wrap: wrap;
  }

  .juju-profile-summary-case small {
    flex-basis: 100%;
  }

  .juju-profile-facts {
    gap: 10px;
  }

  .juju-profile-facts > div {
    min-width: 0;
  }

  .juju-profile-facts > div:nth-child(2) {
    display: none;
  }

  .juju-page-head {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .juju-page-head h2 {
    font-size: 22px;
  }

  .juju-page-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .juju-view-mode {
    margin-right: auto;
  }

  .juju-readonly-fields,
  .juju-edit-fields {
    gap: 0;
    grid-template-columns: 1fr;
    padding: 7px 14px 12px;
  }

  .juju-readonly-field.is-wide,
  .juju-edit-field.is-wide {
    grid-column: auto;
  }

  .juju-readonly-group.is-risk-pair .juju-readonly-fields,
  .juju-readonly-group.is-risk-pair .juju-edit-fields {
    grid-template-columns: 1fr;
    padding-left: 14px;
  }

  .juju-readonly-field {
    min-height: 58px;
  }

  .juju-group-toggle > span:nth-child(2) {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
  }
}

/*
 * 4F-02 unified edit + whole-surface typography candidate — 2026-09-01.
 * Operational text is at least 12px, routine content is 14–15px, and the
 * action state is one predictable View mode -> Editing transition.
 */
.juju-profile-facts dt,
.juju-case-state,
.juju-page-head > div:first-child > span,
.juju-profile-switch small,
.juju-sidebar-note small,
.juju-group-toggle small {
  font-size:var(--ui-font-12, 12px);
}

.juju-search-results strong {
  font-size:var(--ui-font-13, 13px);
}

.juju-search-results small,
.juju-search-empty {
  font-size:var(--ui-font-12, 12px);
}

.juju-view-mode {
  background: #f1f8f7;
  border-color: #cfe1df;
  color: var(--juju-teal-dark);
  font-size:var(--ui-font-13, 13px);
  min-width: 104px;
}

.juju-view-mode.is-editing {
  background: #fff7e8;
  border-color: #e2c58f;
  color: #8a5a18;
}

.juju-edit-source-legend {
  align-items: center;
  background: #f5faf9;
  border-bottom: 1px solid #d7e8e4;
  color: #4a6370;
  display: flex;
  flex-wrap: wrap;
  font-size:var(--ui-font-13, 13px);
  gap: 7px 12px;
  padding: 12px 20px;
}

.juju-edit-source-legend strong {
  color: #29475a;
}

.juju-edit-source-form200 {
  background: #e9f6f3;
  border-radius: 999px;
  color: var(--juju-teal-dark);
  font-size:var(--ui-font-11, 11px);
  font-weight: 800;
  padding: 3px 7px;
}

.juju-progress-notes-toolbar small,
.juju-progress-notes-notice,
.juju-progress-notes-empty span,
.juju-progress-note-composer-title span,
.juju-progress-note-composer label,
.juju-progress-note-file-input small,
.juju-progress-note-meta small,
.juju-progress-note-detail strong,
.juju-progress-note-attachment-list article > div:first-child strong,
.juju-progress-note-attachment-list article > div:first-child span,
.juju-progress-note-attachment-panel strong,
.juju-progress-note-attachment-panel span,
.juju-progress-note-attachment-panel label,
.juju-progress-note-delete-panel strong,
.juju-progress-note-delete-panel span,
.juju-progress-note-delete-panel label,
.juju-progress-notes-more {
  font-size:var(--ui-font-12, 12px);
}

.juju-progress-note-table-head {
  font-size:var(--ui-font-12, 12px);
  letter-spacing: .045em;
}

.juju-progress-note-row,
.juju-progress-note-detail p {
  font-size:var(--ui-font-14, 14px);
}

.juju-progress-note-meta strong,
.juju-progress-note-author {
  font-size:var(--ui-font-13, 13px);
}

.juju-legacy-budget-head small,
.juju-readonly-pill,
.juju-legacy-budget-approved strong,
.juju-legacy-budget-approved span,
.juju-legacy-budget-card dt,
.juju-document-link-row > span:first-child,
.juju-document-link > span,
.juju-document-link-empty {
  font-size:var(--ui-font-12, 12px);
}

.juju-legacy-budget-notice {
  font-size:var(--ui-font-13, 13px);
}

.juju-funding-field dt,
.juju-funding-amount dt,
.juju-funding-edit-field > label,
.juju-funding-edit-pair label {
  font-size:var(--ui-font-12, 12px);
  letter-spacing: .055em;
}

.juju-funding-edit-field .form-control,
.juju-funding-edit-pair .form-control {
  font-size: 15px;
  min-height: 44px;
}

.juju-input-type-tag,
.juju-question-label-tag,
.juju-question-note,
.juju-source-tag,
.juju-rule-hint,
.juju-risk-trigger strong,
.juju-risk-trigger small,
.juju-risk-trigger span,
.juju-linked-detail label,
.juju-linked-detail small,
.juju-action-check,
.juju-payment-note {
  font-size:var(--ui-font-12, 12px);
}

.juju-client-documents-entry strong,
.juju-client-documents-entry span {
  font-size:var(--ui-font-14, 14px);
}

.juju-page-actions .btn {
  font-size:var(--ui-font-14, 14px);
  min-height: 44px;
  padding: 10px 15px;
}

@media (max-width: 620px) {
  .juju-page-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(100px, auto) minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
  }

  .juju-view-mode {
    margin: 0;
  }

  .juju-page-actions .btn {
    justify-content: center;
    width: 100%;
  }

  .juju-page-actions .juju-view-mode + .btn:last-child {
    grid-column: span 2;
  }
}

/*
 * 4F-02 readability candidate — 2026-09-01
 * Presentation only: larger type and controls, a two-column form rhythm,
 * bounded reading width, and persistent navigation/actions. No field, value,
 * permission, source, or save behavior changes.
 */
.juju-profile-phase1 {
  font-size: 16px;
  line-height: 1.5;
}

.juju-profile-summary {
  min-height: 72px;
  padding: 14px 28px;
}

.juju-case-state {
  font-size:var(--ui-font-11, 11px);
  padding: 8px 12px;
}

.juju-profile-summary-case strong {
  font-size:var(--ui-font-14, 14px);
}

.juju-profile-summary-case small {
  font-size:var(--ui-font-12, 12px);
}

.juju-profile-facts dt {
  font-size:var(--ui-font-10, 10px);
}

.juju-profile-facts dd {
  font-size:var(--ui-font-14, 14px);
}

.juju-profile-workspace {
  grid-template-columns: 280px minmax(0, 1fr);
}

.juju-profile-sidebar {
  height: calc(100vh - 58px);
  overflow-y: auto;
  padding: 22px 14px 32px;
  position: sticky;
  top: 58px;
}

.juju-sidebar-head strong {
  font-size: 16px;
}

.juju-profile-switch strong,
.juju-sidebar-note strong {
  font-size:var(--ui-font-12, 12px);
}

.juju-profile-switch small,
.juju-sidebar-note small {
  font-size:var(--ui-font-11, 11px);
  line-height: 1.5;
}

.juju-field-search {
  height: 44px;
}

.juju-field-search input {
  font-size:var(--ui-font-14, 14px);
}

.juju-profile-tabs button {
  gap: 11px;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 56px;
  padding: 9px 11px;
}

.juju-tab-icon {
  font-size: 17px;
  height: 34px;
  width: 34px;
}

.juju-profile-tabs button strong {
  font-size:var(--ui-font-14, 14px);
  line-height: 1.3;
}

.juju-profile-main {
  box-sizing: border-box;
  justify-self: center;
  padding: 32px 36px 56px;
  width: min(100%, 1360px);
}

.juju-page-head {
  background: #f3f6f8;
  margin: -10px 0 16px;
  min-height: 88px;
  padding: 14px 0 12px;
  position: sticky;
  top: 58px;
  z-index: 9;
}

.juju-page-head > div:first-child > span {
  font-size:var(--ui-font-11, 11px);
}

.juju-page-head h2 {
  font-size: 30px;
  margin-top: 7px;
}

.juju-page-head p {
  font-size: 15px;
}

.juju-page-actions .btn,
.juju-profile-switch .btn {
  font-size:var(--ui-font-14, 14px);
  min-height: 42px;
  padding: 9px 14px;
}

.juju-view-mode {
  font-size:var(--ui-font-12, 12px);
  min-height: 42px;
  min-width: 108px;
}

.juju-profile-panel {
  border-radius: 12px;
}

.juju-group-toggle {
  min-height: 58px;
  padding: 12px 20px;
}

.juju-group-toggle strong {
  font-size: 16px;
}

.juju-group-toggle small {
  font-size:var(--ui-font-11, 11px);
}

.juju-readonly-fields,
.juju-edit-fields,
.juju-readonly-group.is-risk-pair .juju-readonly-fields,
.juju-readonly-group.is-risk-pair .juju-edit-fields {
  gap: 0 30px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px 28px 24px;
}

.juju-section-flat .juju-readonly-fields,
.juju-section-flat .juju-edit-fields {
  padding: 18px 28px 26px;
}

.juju-readonly-field,
.juju-edit-field {
  min-height: 78px;
  padding: 15px 0 16px;
}

.juju-readonly-field dt,
.juju-edit-field > label,
.juju-new-client-create .juju-edit-field > span {
  font-size:var(--ui-font-12, 12px);
  letter-spacing: .045em;
  line-height: 1.4;
  margin-bottom: 8px;
}

.juju-readonly-field dd {
  font-size: 15px;
  line-height: 1.5;
}

.juju-edit-field .form-control,
.juju-progress-note-composer input,
.juju-progress-note-composer select,
.juju-progress-note-composer textarea {
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 15px;
  min-height: 44px;
  padding: 10px 12px;
}

.juju-field-help {
  font-size:var(--ui-font-13, 13px);
  margin-top: 8px;
}

.juju-inline-notice,
.juju-payment-note {
  font-size:var(--ui-font-13, 13px);
}

@media (max-width: 1120px) {
  .juju-profile-workspace {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .juju-profile-main {
    padding: 26px 24px 44px;
  }
}

@media (max-width: 820px) {
  .juju-profile-sidebar {
    height: auto;
    overflow: visible;
    padding: 8px 10px;
    top: 58px;
  }

  .juju-profile-main {
    padding: 20px 16px 36px;
    width: 100%;
  }

  .juju-page-head {
    margin-top: 0;
    padding-top: 10px;
    position: static;
  }

  .juju-profile-tabs button {
    flex: 0 0 124px;
    flex-direction: row;
    justify-content: flex-start;
    min-height: 58px;
    padding: 7px 9px;
    text-align: left;
    width: 124px;
  }

  .juju-profile-tabs button strong {
    display: block;
    font-size:var(--ui-font-12, 12px);
  }
}

@media (max-width: 620px) {
  .juju-page-head h2 {
    font-size: 26px;
  }

  .juju-page-head p {
    font-size:var(--ui-font-14, 14px);
  }

  .juju-readonly-fields,
  .juju-edit-fields,
  .juju-readonly-group.is-risk-pair .juju-readonly-fields,
  .juju-readonly-group.is-risk-pair .juju-edit-fields {
    gap: 0;
    grid-template-columns: 1fr;
    padding: 10px 16px 18px;
  }

  .juju-readonly-field.is-wide,
  .juju-edit-field.is-wide {
    grid-column: auto;
  }
}

/* Final cascade for the approved whole-page readability scale. */
.juju-profile-facts dt,
.juju-case-state,
.juju-page-head > div:first-child > span,
.juju-profile-switch small,
.juju-sidebar-note small,
.juju-group-toggle small {
  font-size:var(--ui-font-12, 12px);
}

.juju-view-mode {
  font-size:var(--ui-font-13, 13px);
}

.juju-page-actions .btn {
  min-height: 44px;
}

@media (max-width: 620px) {
  .juju-page-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(100px, auto) minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
  }

  .juju-view-mode {
    margin: 0;
  }

  .juju-page-actions .btn {
    justify-content: center;
    width: 100%;
  }

  .juju-page-actions .juju-view-mode + .btn:last-child {
    grid-column: span 2;
  }
}

/* Client deletion belongs at the bottom of the profile navigation. */
.juju-client-delete-area {
  margin-top: auto;
  padding-top: 24px;
}
#app .juju-client-delete-area .btn.juju-client-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  background: #b91c1c;
  border: 1px solid #b91c1c;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}
#app .juju-client-delete-area .btn.juju-client-delete:hover:not(:disabled) { background: #991b1b; border-color: #991b1b; }
#app .juju-client-delete-area .btn.juju-client-delete:focus-visible { outline: 3px solid #b91c1c; outline-offset: 3px; }
#app .juju-client-delete-area .btn.juju-client-delete:disabled { opacity: .5; cursor: not-allowed; }

.juju-profile-sidebar:has(.juju-client-delete-area) { display: flex; flex-direction: column; }
.juju-profile-sidebar:has(.juju-client-delete-area) > * { flex-shrink: 0; }

@media (max-width: 820px) {
  .juju-client-delete-area { padding-top: 12px; padding-bottom: 4px; align-self: flex-start; }
  #app .juju-client-delete-area .btn.juju-client-delete { width: auto; }
}

/* Compact Funding presentation: retain category colours and existing controls. */
.juju-funding-cards { gap: 12px; align-items: start; }
.juju-funding-card { --funding-accent: #558b7b; --funding-tint: #f5f9f7; padding: 0 14px 12px; border: 1px solid #dce3e8; border-left: 3px solid var(--funding-accent); border-radius: 5px; box-shadow: none; }
.juju-funding-card.is-on { --funding-accent: #558b7b; --funding-tint: #f5f9f7; background: #fff; border-color: #dce3e8; border-left-color: var(--funding-accent); }
.juju-funding-card.is-at { --funding-accent: #648ab5; --funding-tint: #f5f8fb; background: #fff; border-color: #dce3e8; border-left-color: var(--funding-accent); }
.juju-funding-card.is-hm { --funding-accent: #9380b2; --funding-tint: #f8f6fa; background: #fff; border-color: #dce3e8; border-left-color: var(--funding-accent); }
.juju-funding-card.is-rc { --funding-accent: #b58c58; --funding-tint: #fbf8f3; background: #fff; border-color: #dce3e8; border-left-color: var(--funding-accent); }
.juju-funding-card-head { position: relative; display: block; background: var(--funding-tint); border-bottom: 1px solid #e5e9ed; margin: 0 -14px; padding: 10px 14px; }
.juju-funding-eyebrow { display: inline; font-size: 12px; font-weight: 500; letter-spacing: .02em; }
.juju-funding-card h3 { display: inline; color: #24354a; font-size: 16px; font-weight: 650; letter-spacing: 0; margin: 0 0 0 9px; }
.juju-funding-card-head > div { padding-right: 115px; }
.juju-funding-card-head p { color: #526579; font-size: 12px; font-weight: 400; line-height: 1.45; margin: 5px -115px 0 0; }
.juju-funding-period { position: absolute; top: 11px; right: 14px; color: #526579; background: transparent; border: 0; border-radius: 0; padding: 0; font-size: 12px; font-weight: 500; }
.juju-funding-card-body, .juju-funding-card.is-editing .juju-funding-card-body { margin-top: 4px; }
.juju-funding-field-grid { gap: 0 18px; }
.juju-funding-field, .juju-funding-amount { background: transparent; border: 0; border-bottom: 1px solid #e8edf0; border-radius: 0; padding: 9px 0; }
.juju-funding-field dt, .juju-funding-amount dt, .juju-funding-edit-field > label, .juju-funding-edit-pair label { color: #536478; font-size: 12px; font-weight: 500; letter-spacing: .015em; }
.juju-funding-field dd, .juju-funding-amount dd { color: #223349; font-size: 14px; font-weight: 600; line-height: 1.4; margin: 4px 0 0; overflow-wrap: anywhere; }
.juju-funding-amount { margin-top: 0; }
.juju-funding-amount p { color: #5d6e80; font-size: 12px; line-height: 1.4; margin: 4px 0 0; }
.juju-funding-card footer { color: #5d6e80; font-size: 12px; font-weight: 400; margin-top: 9px; }
.juju-funding-edit-grid, .juju-funding-edit-pair { gap: 0 16px; }
.juju-funding-edit-field, .juju-funding-edit-pair > div { background: transparent; border: 0; border-radius: 0; min-width: 0; padding: 9px 0; }
.juju-funding-edit-field > label, .juju-funding-edit-pair label { margin-bottom: 5px; }
.juju-funding-edit-field .form-control, .juju-funding-edit-pair .form-control { border-radius: 4px; font-size: 14px; min-height: 40px; padding: 8px 10px; }
.juju-funding-card-note, .juju-funding-rule-help, .juju-funding-edit-pair small { font-size: 12px; line-height: 1.45; margin-top: 6px; }
.juju-funding-agreement-row { gap: 8px; margin-top: 10px; padding-top: 10px; }
.juju-funding-agreement-row span { font-size: 12px; font-weight: 400; }
@media (max-width: 620px) {
  .juju-funding-card { padding-inline: 12px; }
  .juju-funding-card-head { margin-inline: -12px; padding-inline: 12px; }
  .juju-funding-card-head > div { padding-right: 0; }
  .juju-funding-card-head p { margin-right: 0; }
  .juju-funding-period { position: static; display: block; margin-top: 4px; }
  .juju-funding-edit-field .form-control, .juju-funding-edit-pair .form-control { min-height: 44px; }
}

/* Integrated care questions and canonical risk follow-ups. */
.juju-care-integrated { display: grid; gap: 12px; }
.juju-care-question { min-width: 0; }
.juju-care-question > button { margin: 4px 12px 10px; }
.juju-care-risk-panel { min-width: 0; margin: 0 0 12px 16px; padding: 16px; border-left: 3px solid #137c76; background: #f3faf9; }
.juju-care-risk-panel[hidden] { display: none !important; }
.juju-care-risk-panel h3 { font-size: 16px; margin: 0 0 12px; }
@media (max-width: 600px) { .juju-care-risk-panel { margin-left: 0; padding: 12px; } }

/* Presentation only: retain original question order, labels and interaction. */
.juju-profile-main { justify-self: stretch; width: 100%; max-width: 1600px; padding: 24px 28px 48px; }
.juju-page-head { min-height: 76px; margin: -8px 0 16px; }
.juju-page-head h2 { font-size: 26px; line-height: 1.25; }
.juju-profile-phase1 .juju-readonly-field dt,
.juju-profile-phase1 .juju-edit-field > span,
.juju-profile-phase1 .juju-edit-field > label { font-size: 14px; line-height: 1.5; font-weight: 650; letter-spacing: 0; text-transform: none; color: #34485f; }
.juju-profile-phase1 .juju-readonly-field dd { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.juju-profile-phase1 input, .juju-profile-phase1 select, .juju-profile-phase1 textarea { font-size: 15px; }
.juju-care-integrated { gap: 12px; }
.juju-care-question { padding: 12px; }
.juju-care-question > :is(.juju-readonly-field,.juju-edit-field) { margin: 0; padding: 12px; }
@media (max-width: 1100px) { .juju-profile-main { padding: 20px; } }
@media (max-width: 820px) {
 .juju-profile-main { padding: 18px 14px 32px; }
 .juju-page-head h2 { font-size: 24px; }
 .juju-care-question { padding: 8px; }
 .juju-profile-phase1 input, .juju-profile-phase1 select, .juju-profile-phase1 textarea { font-size: 16px; }
}
