:root {
  --cnz-ink: #17231b;
  --cnz-ink-soft: #425148;
  --cnz-green: #146b3a;
  --cnz-green-dark: #0e4b2a;
  --cnz-green-pale: #edf5ee;
  --cnz-cream: #f7f4ed;
  --cnz-paper: #fffdfa;
  --cnz-line: #d8ddd7;
  --cnz-line-strong: #bcc7bd;
  --cnz-orange: #d77b2d;
  --cnz-danger: #9b3d2f;
  --cnz-radius: 6px;
  --cnz-shadow: 0 1px 2px rgba(18, 42, 26, .05), 0 14px 36px rgba(18, 42, 26, .06);
}

html { background: var(--cnz-cream); }
body {
  color: var(--cnz-ink);
  background: var(--cnz-cream) !important;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  letter-spacing: -.005em;
}

body.portalForm button.primary {
  min-height: 46px;
  border: 1px solid var(--cnz-green-dark);
  border-radius: 4px;
  background: var(--cnz-green-dark);
  color: #fff;
  padding: 10px 16px;
  font-weight: 750;
  box-shadow: none;
}
body.portalForm button.primary:hover { border-color: var(--cnz-green); background: var(--cnz-green); color: #fff; }
body.portalForm button.secondary {
  min-height: 46px;
  border: 1px solid var(--cnz-green);
  border-radius: 4px;
  background: #fff;
  color: var(--cnz-green-dark);
  padding: 10px 16px;
  font-weight: 700;
}
body.portalForm button:focus-visible { outline: 3px solid rgba(20,107,58,.2); outline-offset: 2px; }

.portalShell {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 48px;
}
.portalHeader {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--cnz-line-strong);
  padding: 0 0 18px;
}
.portalBrand {
  display: flex;
  align-items: center;
  gap: 18px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.portalBrand img { width: 126px; height: 56px; object-fit: contain; display: block; }
.portalBrandCopy { border-left: 1px solid var(--cnz-line-strong); padding-left: 18px; }
.portalBrandCopy strong { display: block; font-size: 15px; line-height: 1.25; }
.portalBrandCopy span { display: block; margin-top: 3px; color: var(--cnz-ink-soft); font-size: 12px; }
.portalSecurity { color: var(--cnz-ink-soft); font-size: 12px; line-height: 1.4; text-align: right; }
.portalSecurity strong { color: var(--cnz-green-dark); }

.portalEntry {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, .72fr);
  gap: clamp(40px, 7vw, 84px);
  align-items: start;
  padding: clamp(52px, 8vw, 92px) 0 32px;
}
.portalIntro { max-width: 610px; }
.portalEyebrow {
  display: block;
  margin-bottom: 20px;
  color: var(--cnz-green-dark);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.portalIntro h1, .applicationHeading h1 {
  margin: 0;
  max-width: 15ch;
  color: var(--cnz-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 5.5vw, 66px);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: .98;
}
.portalIntro > p {
  max-width: 56ch;
  margin: 26px 0 0;
  color: var(--cnz-ink-soft);
  font-size: 17px;
  line-height: 1.7;
}
.portalTrustList {
  display: grid;
  gap: 10px;
  margin: 34px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--cnz-line);
  list-style: none;
}
.portalTrustList li { display: flex; gap: 12px; color: var(--cnz-ink-soft); font-size: 14px; line-height: 1.5; }
.portalTrustList li::before { content: "✓"; flex: 0 0 auto; color: var(--cnz-green); font-weight: 800; }

.portalLogin {
  border-top: 4px solid var(--cnz-green);
  border-radius: var(--cnz-radius);
  background: var(--cnz-paper);
  box-shadow: var(--cnz-shadow);
  padding: 30px;
}
.portalLogin h2 { margin: 0; color: var(--cnz-ink); font-size: 24px; line-height: 1.2; }
.portalLogin .loginHelp { margin: 8px 0 24px; color: var(--cnz-ink-soft); font-size: 14px; line-height: 1.5; }
.portalLoginForm { display: grid; gap: 17px; }
.portalField { display: grid; gap: 7px; color: var(--cnz-ink); font-size: 13px; font-weight: 700; }
.portalField input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--cnz-line-strong);
  border-radius: 4px;
  background: #fff;
  color: var(--cnz-ink);
  padding: 11px 13px;
  font: inherit;
  font-weight: 450;
}
.portalField input:focus { border-color: var(--cnz-green); box-shadow: 0 0 0 3px rgba(20,107,58,.12); outline: none; }
.portalPrimaryButton {
  min-height: 50px;
  border: 1px solid var(--cnz-green-dark);
  border-radius: 4px;
  background: var(--cnz-green-dark);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  padding: 11px 18px;
}
.portalPrimaryButton:hover { background: #093b21; }
.portalPrimaryButton:disabled { cursor: not-allowed; opacity: .5; }
.portalStatus { min-height: 22px; margin: 14px 0 0; color: var(--cnz-danger); font-size: 13px; line-height: 1.45; }

.applicationView { padding: 42px 0 20px; }
.applicationHeading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: end;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--cnz-line-strong);
}
.applicationHeading h1 { max-width: none; font-size: clamp(36px, 4.4vw, 54px); }
.applicationHeading p { max-width: 57ch; margin: 16px 0 0; color: var(--cnz-ink-soft); font-size: 15px; line-height: 1.6; }
.applicationStage { min-width: 180px; text-align: right; }
.applicationStage span { display: block; color: var(--cnz-ink-soft); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.applicationStage strong { display: block; margin-top: 6px; color: var(--cnz-green-dark); font-size: 16px; }

.applicationBody {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 42px;
  align-items: start;
  padding-top: 36px;
}
.taskSection h2, .reviewSection h2 { margin: 0; font-size: 20px; line-height: 1.25; }
.taskSection > p { margin: 8px 0 24px; color: var(--cnz-ink-soft); font-size: 14px; }
.portalTaskList { display: grid; border-top: 1px solid var(--cnz-line-strong); }
.portalTask {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 116px;
  border-bottom: 1px solid var(--cnz-line);
  color: inherit;
  text-decoration: none;
  padding: 22px 4px;
}
.portalTask:hover .taskAction,
.portalTask:focus-visible .taskAction { background: var(--cnz-green-dark); color: #fff; }
.taskNumber {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cnz-line-strong);
  border-radius: 50%;
  color: var(--cnz-green-dark);
  font-family: Georgia, serif;
  font-size: 17px;
}
.portalTask[data-status="complete"] .taskNumber,
.portalTask[data-status="submitted"] .taskNumber { border-color: var(--cnz-green); background: var(--cnz-green); color: #fff; }
.taskCopy h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.taskCopy p { max-width: 58ch; margin: 6px 0 0; color: var(--cnz-ink-soft); font-size: 13px; line-height: 1.55; }
.taskMeta { display: grid; gap: 8px; justify-items: stretch; min-width: 132px; }
.taskState { color: var(--cnz-ink-soft); font-size: 12px; }
.taskAction {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--cnz-green-dark);
  border-radius: 4px;
  background: transparent;
  color: var(--cnz-green-dark);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  padding: 10px 16px;
  text-decoration: none;
}

.applicationAside { position: sticky; top: 24px; display: grid; gap: 20px; }
.applicationNote { border-left: 3px solid var(--cnz-orange); padding: 2px 0 2px 18px; }
.applicationNote h3 { margin: 0; font-size: 15px; }
.applicationNote p { margin: 8px 0 0; color: var(--cnz-ink-soft); font-size: 13px; line-height: 1.55; }
.reviewSection {
  border: 1px solid var(--cnz-line-strong) !important;
  border-radius: var(--cnz-radius) !important;
  background: var(--cnz-paper) !important;
  box-shadow: none !important;
  padding: 22px !important;
}
.reviewSection .portalEyebrow { margin-bottom: 8px; }
.reviewSection > div > p { margin: 8px 0 0; color: var(--cnz-ink-soft); font-size: 13px; line-height: 1.5; }
.reviewSection .taskStatusList { margin-top: 16px; }
.reviewSection .taskStatusItem { font-size: 13px; }
.reviewSection .declaration { margin-top: 16px; color: var(--cnz-ink-soft); }
.reviewSection .reviewActions { margin-top: 16px; display: grid; }
.reviewSection button { width: 100%; min-height: 48px; border-radius: 4px !important; background: var(--cnz-green-dark) !important; color: #fff !important; }

.portalLaterStage { margin-top: 30px; border-top: 1px solid var(--cnz-line-strong); padding-top: 24px; }
.portalLaterStage .portalTask { min-height: 96px; }
.portalFooter {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--cnz-line-strong);
  margin-top: 50px;
  padding-top: 20px;
  color: var(--cnz-ink-soft);
  font-size: 12px;
  line-height: 1.5;
}
.portalFooter a { color: var(--cnz-green-dark); }

body.portalActivation .shell { width: min(680px, calc(100% - 32px)); padding: 28px 0 52px; }
body.portalActivation .previewNotice {
  border: 1px solid #d8d5bd;
  border-radius: var(--cnz-radius);
  background: #faf7e9;
  margin-bottom: 22px;
  padding: 10px 12px;
  color: var(--cnz-ink);
  font-size: 13px;
  line-height: 1.45;
}
body.portalActivation .previewNotice strong { color: var(--cnz-green-dark); letter-spacing: .06em; text-transform: uppercase; }
body.portalActivation .brand {
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--cnz-line-strong);
  margin: 0 0 44px;
  padding: 0 0 18px;
}
body.portalActivation .brand img { width: 126px; height: 56px; border-radius: 0; background: transparent; box-shadow: none; padding: 0; object-fit: contain; }
body.portalActivation .brand strong { font-size: 15px; }
body.portalActivation .brand span { font-size: 12px; }
body.portalActivation .card {
  border: 1px solid var(--cnz-line-strong);
  border-top: 4px solid var(--cnz-green);
  border-radius: var(--cnz-radius);
  background: var(--cnz-paper);
  box-shadow: var(--cnz-shadow);
  padding: clamp(26px, 5vw, 42px);
}
body.portalActivation .eyebrow { color: var(--cnz-green-dark); font-size: 12px; letter-spacing: .11em; }
body.portalActivation h1 { max-width: 14ch; font-family: Georgia, "Times New Roman", serif; font-size: clamp(36px, 7vw, 52px); font-weight: 500; line-height: 1; }
body.portalActivation .lead { max-width: 54ch; margin-top: 18px; color: var(--cnz-ink-soft); font-size: 16px; line-height: 1.65; }
body.portalActivation .notice { border-left: 3px solid var(--cnz-orange); border-radius: 0; background: transparent; padding: 2px 0 2px 15px; }
body.portalActivation input { border-radius: 4px; }
body.portalActivation button { border-radius: 4px; background: var(--cnz-green-dark); }

/* Shared treatment for the three client work pages. */
body.portalForm .shell { width: min(1040px, calc(100% - 40px)); padding-top: 22px; }
body.portalForm .topbar {
  border: 0 !important;
  border-bottom: 1px solid var(--cnz-line-strong) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 0 18px !important;
}
body.portalForm .topbar .brand img,
body.portalForm .topbar .logo { width: 118px !important; height: auto !important; }
body.portalForm .topbar > span:last-child { display: grid; gap: 4px; justify-items: end; text-align: right; }
body.portalForm .topbar > span:last-child > a { color: var(--cnz-green-dark); font-size: 13px; font-weight: 700; text-underline-offset: 4px; }
body.portalForm .topbar > span:last-child .save-state { display: block; }
body.portalForm .nav,
body.portalForm .siteNav { gap: 0 !important; }
body.portalForm .nav a,
body.portalForm .siteNav a {
  min-height: 40px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--cnz-green-dark) !important;
  padding: 0 0 0 16px !important;
  text-decoration: underline !important;
  text-underline-offset: 4px;
}
body.portalForm .hero {
  border: 0 !important;
  border-left: 4px solid var(--cnz-green) !important;
  border-radius: 0 !important;
  background: var(--cnz-paper) !important;
  box-shadow: none !important;
  color: var(--cnz-ink) !important;
  margin-top: 26px !important;
  padding: 22px 24px !important;
}
body.portalForm .hero p,
body.portalForm .heroNote p { color: var(--cnz-ink-soft) !important; }
body.portalForm .wizard,
body.portalForm .wizardShell,
body.portalForm .wizardCard,
body.portalForm .startPanel,
body.portalForm .card,
body.portalForm .statusPanel {
  border-radius: var(--cnz-radius) !important;
  box-shadow: 0 1px 2px rgba(18,42,26,.04) !important;
}
body.portalForm .wizard,
body.portalForm .wizardShell,
body.portalForm .wizardCard,
body.portalForm .startPanel,
body.portalForm .card { background: var(--cnz-paper) !important; }
body.portalForm button,
body.portalForm input,
body.portalForm select,
body.portalForm textarea { border-radius: 4px !important; }
body.portalForm .step,
body.portalForm .stepBadge { border-radius: 3px !important; background: var(--cnz-green-pale) !important; }
body.portalForm .siteFooter .footerNav { display: none; }

@media (max-width: 820px) {
  .portalShell { width: min(100% - 28px, 1080px); padding-top: 16px; }
  .portalHeader { align-items: flex-start; }
  .portalEntry { grid-template-columns: 1fr; gap: 34px; padding-top: 44px; }
  .portalIntro h1 { max-width: 13ch; }
  .portalLogin { max-width: 560px; width: 100%; }
  .applicationHeading { grid-template-columns: 1fr; }
  .applicationStage { text-align: left; }
  .applicationBody { grid-template-columns: 1fr; gap: 34px; }
  .applicationAside { position: static; }
  body.portalForm .shell { width: min(100% - 24px, 1040px); }
}

@media (max-width: 520px) {
  .portalShell { width: min(100% - 24px, 1080px); padding-top: 12px; }
  .portalHeader { min-height: 58px; padding-bottom: 12px; }
  .portalBrand { gap: 10px; }
  .portalBrand img { width: 92px; height: 44px; }
  .portalBrandCopy { padding-left: 10px; }
  .portalBrandCopy strong { font-size: 13px; }
  .portalBrandCopy span, .portalSecurity { display: none; }
  .portalEntry { padding-top: 36px; }
  .portalIntro h1 { font-size: 40px; line-height: 1.02; }
  .portalIntro > p { margin-top: 20px; font-size: 15px; }
  .portalTrustList { margin-top: 26px; padding-top: 18px; }
  .portalLogin { padding: 22px 18px; }
  .applicationView { padding-top: 30px; }
  .applicationHeading { padding-bottom: 24px; }
  .applicationHeading h1 { font-size: 38px; }
  .applicationBody { padding-top: 26px; }
  .portalTask { grid-template-columns: 38px minmax(0, 1fr); gap: 12px; min-height: 0; padding: 20px 0; }
  .taskNumber { width: 36px; height: 36px; font-size: 15px; }
  .taskMeta { grid-column: 2; justify-items: stretch; min-width: 0; }
  .taskAction { width: 100%; min-height: 48px; }
  .portalFooter { display: grid; }
  .reviewSection { padding: 20px !important; }
  .reviewSection .taskStatusItem { gap: 8px; }
  body.portalActivation .shell { width: min(100% - 24px, 680px); padding-top: 16px; }
  body.portalActivation .brand { margin-bottom: 28px; }
  body.portalActivation .brand img { width: 100px; height: 46px; }
  body.portalForm .topbar { align-items: stretch !important; flex-direction: column !important; gap: 6px !important; padding-bottom: 10px !important; }
  body.portalForm .topbar .brand { width: 100%; }
  body.portalForm .topbar .brandText { flex: 1; }
  body.portalForm .topbar .nav { justify-content: space-between; width: 100%; }
  body.portalForm .topbar .nav a { padding-left: 0 !important; }
  body.portalForm .topbar > a:not(.brand),
  body.portalForm .topbar > span:last-child > a { display: inline-flex; align-items: center; min-height: 44px; }
  body.portalForm .topbar .brand img,
  body.portalForm .topbar .logo { width: 94px !important; }
  body.portalForm .brandText h1,
  body.portalForm .brand h1 { font-size: 16px !important; }
  body.portalForm .brandText p,
  body.portalForm .brand .small { display: none; }
  body.portalForm .hero { margin-top: 14px !important; padding: 12px 16px !important; }
  body.portalForm .hero h1 { margin: 0; font-size: 22px; line-height: 1.2; }
  body.portalForm .hero p { margin: 8px 0 0; font-size: 14px; line-height: 1.45; }
}

/* Student Visa module unification: one local, reversible visual layer. */
body.portalForm #builderPanel #sectionDraft {
  min-height: 220px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
}
body.portalForm #builderPanel label.field {
  font-size: 15px;
  font-weight: 650;
  color: var(--cnz-ink);
}
body.portalForm {
  --cnz-module-width: 1040px;
  --cnz-module-gutter: 20px;
  --cnz-module-radius: 8px;
  --cnz-module-surface: #fffdfa;
  --cnz-module-shadow: 0 1px 2px rgba(18, 42, 26, .05), 0 12px 30px rgba(18, 42, 26, .05);
}

body.portalForm .shell,
body.portalForm main.shell {
  width: min(var(--cnz-module-width), calc(100% - (2 * var(--cnz-module-gutter))));
  max-width: var(--cnz-module-width) !important;
  margin-left: auto;
  margin-right: auto;
  padding: 22px 0 calc(96px + env(safe-area-inset-bottom));
  gap: 16px;
}

body.portalForm .topbar {
  min-height: 64px;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--cnz-line-strong) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 0 14px !important;
}

body.portalForm .topbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--cnz-ink);
  text-decoration: none;
}

body.portalForm .topbar .brand > img,
body.portalForm .topbar .brand > .logo {
  width: 104px !important;
  height: 48px !important;
  flex: 0 0 104px;
  display: grid;
  place-items: center;
  overflow: hidden;
  object-fit: contain;
}

body.portalForm .topbar .brand > .logo { position: relative; }
body.portalForm .topbar .brand > .logo img {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  /* Override legacy fixed-width brand images inside the logo frame. */
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

body.portalForm .topbar .brandText,
body.portalForm .topbar .brand > div:not(.logo) {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body.portalForm .topbar .brandText h1,
body.portalForm .topbar .brand > div:not(.logo) h1,
body.portalForm .topbar .brand > span strong {
  margin: 0;
  color: var(--cnz-ink);
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -.01em;
  line-height: 1.25;
}

body.portalForm .topbar .brandText p,
body.portalForm .topbar .brand > div:not(.logo) p,
body.portalForm .topbar .brand > span small {
  margin: 0;
  color: var(--cnz-ink-soft);
  font-size: 13px;
  line-height: 1.35;
}

body.portalForm .topbar > .nav,
body.portalForm .topbar > .siteNav,
body.portalForm .topbar > nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

body.portalForm .topbar > .nav a,
body.portalForm .topbar > .siteNav a,
body.portalForm .topbar > nav a,
body.portalForm .topbar > a:not(.brand),
body.portalForm .topbar > span:last-child > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px !important;
  border: 1px solid var(--cnz-green) !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: var(--cnz-green-dark) !important;
  padding: 0 14px !important;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none !important;
  text-underline-offset: 4px;
}

body.portalForm .topbar > .nav a::before,
body.portalForm .topbar > .siteNav a::before,
body.portalForm .topbar > nav a::before,
body.portalForm .topbar > a:not(.brand)::before,
body.portalForm .topbar > span:last-child > a::before {
  content: "←";
  margin-right: 8px;
  font-weight: 800;
}

body.portalForm .topbar > .nav a:hover,
body.portalForm .topbar > .siteNav a:hover,
body.portalForm .topbar > nav a:hover,
body.portalForm .topbar > a:not(.brand):hover,
body.portalForm .topbar > span:last-child > a:hover {
  background: var(--cnz-green-pale) !important;
  border-color: var(--cnz-green-dark) !important;
  color: var(--cnz-green-dark) !important;
}

body.portalForm .hero {
  margin-top: 0 !important;
  border: 1px solid var(--cnz-line-strong) !important;
  border-top: 3px solid var(--cnz-green) !important;
  border-left: 1px solid var(--cnz-line-strong) !important;
  border-radius: var(--cnz-module-radius) !important;
  background: var(--cnz-module-surface) !important;
  box-shadow: var(--cnz-module-shadow) !important;
  color: var(--cnz-ink) !important;
  padding: 20px 22px !important;
}

body.portalForm .hero h1 {
  margin: 0;
  color: var(--cnz-ink) !important;
  font-size: clamp(25px, 3.2vw, 34px);
  font-weight: 760;
  line-height: 1.12;
  letter-spacing: -.02em;
}

body.portalForm .hero p,
body.portalForm .heroNote p {
  margin: 8px 0 0;
  color: var(--cnz-ink-soft) !important;
  font-size: 15px;
  line-height: 1.55;
}

body.portalForm .startPanel,
body.portalForm .sopStart {
  width: 100%;
  max-width: none;
  margin: 0;
  border: 1px solid var(--cnz-line-strong) !important;
  border-radius: var(--cnz-module-radius) !important;
  background: var(--cnz-module-surface) !important;
  box-shadow: var(--cnz-module-shadow) !important;
  padding: clamp(20px, 3vw, 28px) !important;
}

body.portalForm .startPanel,
body.portalForm .sopStart,
body.portalForm .sopStartIntro {
  gap: 16px;
}

body.portalForm .startCopy,
body.portalForm .sopStartIntro,
body.portalForm .beforeWrite,
body.portalForm .startAction {
  min-width: 0;
}

body.portalForm .startCopy > #caseName {
  margin: 0;
}

body.portalForm .startNotice,
body.portalForm .guideCallout {
  border-radius: 6px;
}

body.portalForm .sopStartIntro h2 {
  color: var(--cnz-ink);
  font-size: clamp(25px, 3.2vw, 34px);
  font-weight: 760;
  line-height: 1.12;
  letter-spacing: -.02em;
}

body.portalForm .sopStartIntro > p,
body.portalForm .beforeWrite,
body.portalForm .startActionCopy p {
  color: var(--cnz-ink-soft);
}

body.portalForm .guideCallout {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 18px 20px;
  border-color: #b8d3bf;
  border-left-width: 4px;
  background: var(--cnz-green-pale);
}

body.portalForm .guideCalloutCopy h3 {
  color: var(--cnz-ink);
  font-size: 20px;
  line-height: 1.25;
}

body.portalForm .beforeWrite {
  padding-top: 2px;
}

body.portalForm .beforeWrite h3 {
  color: var(--cnz-ink);
  font-size: 16px;
}

body.portalForm .wizard,
body.portalForm .wizardShell,
body.portalForm .wizardCard,
body.portalForm #builderPanel > .sectionGrid > .panel {
  border: 1px solid var(--cnz-line-strong) !important;
  border-radius: var(--cnz-module-radius) !important;
  background: var(--cnz-module-surface) !important;
  box-shadow: var(--cnz-module-shadow) !important;
}

body.portalForm .wizard,
body.portalForm .wizardShell,
body.portalForm .wizardCard,
body.portalForm #builderPanel > .sectionGrid > .panel {
  padding: clamp(18px, 3vw, 26px) !important;
}

body.portalForm .wizard {
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
}

body.portalForm .wizardHeader,
body.portalForm .wizard-head {
  display: grid;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--cnz-line);
}

body.portalForm .wizardTopline,
body.portalForm .head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

body.portalForm .stepBadge,
body.portalForm .step {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid #c6dbc4;
  border-radius: 999px !important;
  background: var(--cnz-green-pale) !important;
  color: var(--cnz-green-dark) !important;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

body.portalForm .progress {
  height: 7px;
  border-radius: 999px;
  background: #dfe8d5;
}

body.portalForm .progress > span {
  background: linear-gradient(90deg, #93d500, var(--cnz-green));
}

body.portalForm .sectionIntro,
body.portalForm .question,
body.portalForm .field,
body.portalForm .guideBox,
body.portalForm .actionBlock {
  min-width: 0;
}

body.portalForm .sectionIntro h2,
body.portalForm .wizard legend,
body.portalForm .question > .question-heading,
body.portalForm .field > label:not(.choiceItem),
body.portalForm .field > legend,
body.portalForm .guideBox h3,
body.portalForm .actionTitle {
  color: var(--cnz-ink);
  font-weight: 750;
}

body.portalForm .sectionIntro h2,
body.portalForm .wizard legend {
  font-size: clamp(22px, 2.7vw, 28px);
  line-height: 1.2;
}

body.portalForm .sectionIntro p,
body.portalForm .wizard .muted,
body.portalForm .wizard .hint,
body.portalForm .wizard .status,
body.portalForm .wizard .save-state {
  color: var(--cnz-ink-soft);
}

body.portalForm .wizard input,
body.portalForm .wizard select,
body.portalForm .wizard textarea,
body.portalForm #builderPanel input,
body.portalForm #builderPanel select,
body.portalForm #builderPanel textarea {
  min-height: 48px;
  border-radius: 6px !important;
}

body.portalForm .choice,
body.portalForm .choiceItem {
  min-height: 48px;
  border-radius: 6px !important;
  padding: 12px 16px;
  background: #fff;
  color: var(--cnz-ink);
  font-weight: 400;
}

body.portalForm .choice:hover,
body.portalForm .choiceItem:hover {
  border-color: var(--cnz-line-strong);
  background: var(--cnz-green-pale);
}

body.portalForm .choice input[type="radio"],
body.portalForm .choice input[type="checkbox"],
body.portalForm .choiceItem input[type="radio"],
body.portalForm .choiceItem input[type="checkbox"] {
  width: 22px !important;
  min-width: 22px !important;
  max-width: 22px !important;
  height: 22px !important;
  min-height: 22px !important;
  flex: 0 0 22px;
  margin: 2px 0 0;
  padding: 0;
}

body.portalForm .choice span,
body.portalForm .choiceText,
body.portalForm .choiceItem .choiceText {
  min-width: 0;
  color: var(--cnz-ink);
  font-weight: 400;
  line-height: 1.42;
}

body.portalForm .sectionGrid {
  width: 100%;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

body.portalForm #builderPanel .side {
  position: sticky;
  top: 18px;
  border: 1px solid var(--cnz-line-strong);
  border-radius: var(--cnz-module-radius);
  background: var(--cnz-module-surface);
  box-shadow: var(--cnz-module-shadow);
  padding: 16px;
}

body.portalForm #builderPanel .side button {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--cnz-ink-soft);
  padding: 9px 10px;
  text-align: left;
}

body.portalForm #builderPanel .side button:hover,
body.portalForm #builderPanel .side button.active {
  border-color: #b8d9a5;
  background: var(--cnz-green-pale);
  color: var(--cnz-green-dark);
}

body.portalForm #builderPanel .side button.active {
  font-weight: 750;
}

body.portalForm button,
body.portalForm .guideCallout a {
  min-height: 46px;
  border-radius: 6px !important;
  font-weight: 750;
  line-height: 1.2;
}

body.portalForm button.primary,
body.portalForm .primary,
body.portalForm #startBtn,
body.portalForm #createSessionBtn,
body.portalForm .wizard .button:not(.secondary),
body.portalForm .saveBar #nextBtn,
body.portalForm #reviewSectionBtn,
body.portalForm #finalDraftBtn,
body.portalForm .guideCallout a {
  border: 1px solid var(--cnz-green-dark) !important;
  background: var(--cnz-green-dark) !important;
  color: #fff !important;
  box-shadow: none;
}

body.portalForm button.primary:hover,
body.portalForm .primary:hover,
body.portalForm #startBtn:hover,
body.portalForm #createSessionBtn:hover,
body.portalForm .wizard .button:not(.secondary):hover,
body.portalForm .saveBar #nextBtn:hover,
body.portalForm #reviewSectionBtn:hover,
body.portalForm #finalDraftBtn:hover,
body.portalForm .guideCallout a:hover {
  border-color: var(--cnz-green) !important;
  background: var(--cnz-green) !important;
  color: #fff !important;
}

body.portalForm button.secondary,
body.portalForm .secondary,
body.portalForm .navActions button,
body.portalForm #refreshBtn {
  border: 1px solid var(--cnz-green) !important;
  background: #fff !important;
  color: var(--cnz-green-dark) !important;
}

body.portalForm button:focus-visible,
body.portalForm a:focus-visible {
  outline: 3px solid rgba(20, 107, 58, .22);
  outline-offset: 2px;
}

body.portalForm .saveBar {
  width: min(var(--cnz-module-width), calc(100% - (2 * var(--cnz-module-gutter))));
  border: 1px solid var(--cnz-line-strong) !important;
  border-radius: var(--cnz-module-radius) !important;
  box-shadow: var(--cnz-module-shadow) !important;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}

body.portalForm .saveBar #backBtn {
  min-height: 44px;
  border-color: transparent !important;
  background: transparent !important;
  color: var(--cnz-green-dark) !important;
}

body.portalForm .wizard > .actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

body.portalForm .wizard > .actions .save-state {
  flex: 1 1 auto;
  min-width: 0;
}

body.portalForm .wizard > .actions button {
  flex: 0 0 auto;
  min-width: 112px;
}

@media (max-width: 820px) {
  body.portalForm {
    --cnz-module-gutter: 12px;
  }

  body.portalForm .shell,
  body.portalForm main.shell {
    padding-top: 14px;
  }

  body.portalForm .topbar {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding-bottom: 12px !important;
  }

  body.portalForm .topbar .brand {
    width: 100%;
  }

  body.portalForm .topbar > .nav,
  body.portalForm .topbar > .siteNav,
  body.portalForm .topbar > nav {
    width: 100%;
    justify-content: flex-start;
  }

  body.portalForm .topbar > .nav a,
  body.portalForm .topbar > .siteNav a,
  body.portalForm .topbar > nav a,
  body.portalForm .topbar > a:not(.brand),
  body.portalForm .topbar > span:last-child > a {
    min-height: 44px !important;
  }

  body.portalForm .topbar .brand > img,
  body.portalForm .topbar .brand > .logo {
    width: 92px !important;
    height: 44px !important;
    flex-basis: 92px;
  }

  body.portalForm .topbar .brandText h1,
  body.portalForm .topbar .brand > div:not(.logo) h1,
  body.portalForm .topbar .brand > span strong {
    font-size: 17px;
  }

  body.portalForm .topbar .brandText p,
  body.portalForm .topbar .brand > div:not(.logo) p,
  body.portalForm .topbar .brand > span small {
    display: none;
  }

  body.portalForm .guideCallout {
    grid-template-columns: 1fr;
  }

  body.portalForm .guideCallout a {
    width: 100%;
  }

  body.portalForm .wizard > .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-right: -12px;
    margin-bottom: -18px;
    margin-left: -12px;
    padding: 12px;
    border-top: 1px solid var(--cnz-line);
    background: rgba(255, 253, 250, .96);
  }

  body.portalForm .wizard > .actions .save-state {
    grid-column: 1 / -1;
  }

  body.portalForm .wizard > .actions button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
  }

  body.portalForm #builderPanel .side {
    position: static;
  }
}

@media (max-width: 520px) {
  body.portalForm .hero {
    padding: 14px 16px !important;
  }

  body.portalForm .hero h1 {
    font-size: 22px;
    line-height: 1.18;
  }

  body.portalForm .hero p {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.4;
  }

  body.portalForm .startPanel,
  body.portalForm .sopStart,
  body.portalForm .wizard,
  body.portalForm .wizardShell,
  body.portalForm .wizardCard,
  body.portalForm #builderPanel > .sectionGrid > .panel {
    padding: 18px !important;
  }

  body.portalForm .topbar .brand > img,
  body.portalForm .topbar .brand > .logo {
    width: 86px !important;
    height: 42px !important;
    flex-basis: 86px;
  }

  body.portalForm .topbar .brandText h1,
  body.portalForm .topbar .brand > div:not(.logo) h1,
  body.portalForm .topbar .brand > span strong {
    font-size: 16px;
  }

  body.portalForm .guideCallout,
  body.portalForm .startNotice {
    padding: 16px;
  }

  body.portalForm .beforeWrite ul {
    grid-template-columns: 1fr;
  }

  body.portalForm .startAction {
    align-items: stretch;
    flex-direction: column;
  }

  body.portalForm .startAction .actions {
    display: grid;
    width: 100%;
  }

  body.portalForm .startAction button {
    width: 100%;
  }

  body.portalForm .sectionGrid {
    grid-template-columns: 1fr;
  }

  body.portalForm #builderPanel .side {
    padding: 12px;
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    max-width: 100%;
  }
  body.portalForm #builderPanel .side button {
    flex: 0 0 190px;
    min-height: 72px;
    align-content: center;
  }

  body.portalForm .choice,
  body.portalForm .choiceItem {
    padding: 12px 14px;
  }
}

/* Cross-module chapter layout: the main work area stays left and the step rail stays right on desktop. */
body.portalForm .moduleTitle {
  display: grid;
  gap: 6px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--cnz-line);
}

body.portalForm .moduleTitle h1 {
  margin: 0;
  color: var(--cnz-ink);
  font-size: clamp(25px, 3.2vw, 34px);
  font-weight: 760;
  line-height: 1.12;
  letter-spacing: -.02em;
}

body.portalForm .moduleTitle p {
  margin: 0;
  color: var(--cnz-ink-soft);
  font-size: 15px;
  line-height: 1.55;
}

/* Keep the legacy visual-test hook without restoring a separate Finance hero panel. */
body.portalForm .moduleTitle.hero {
  margin: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--cnz-ink) !important;
  padding: 0 0 16px !important;
}

body.portalForm .financeLayout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 220px);
  gap: 20px;
  align-items: start;
  width: 100%;
}

body.portalForm .financeMain {
  min-width: 0;
  width: 100%;
  grid-column: 1;
  grid-row: 1;
}

body.portalForm .financeMain .wizard {
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
}

body.portalForm .chapterNav {
  display: grid;
  grid-column: 2;
  grid-row: 1;
  align-content: start;
  gap: 10px;
  min-width: 0;
  position: sticky;
  top: 18px;
  padding: 16px;
  border: 1px solid var(--cnz-line-strong);
  border-radius: var(--cnz-module-radius);
  background: var(--cnz-module-surface);
  box-shadow: var(--cnz-module-shadow);
}

body.portalForm .chapterNav::before {
  content: none;
  color: var(--cnz-ink);
  font-size: 15px;
  font-weight: 760;
}

body.portalForm .chapterNav ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: finance-chapter;
}

body.portalForm .chapterNav li {
  min-width: 0;
  counter-increment: finance-chapter;
}

body.portalForm .chapterNav button {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 6px !important;
  background: transparent !important;
  color: var(--cnz-ink-soft);
  padding: 9px 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
}

body.portalForm .chapterNav button::before {
  content: counter(finance-chapter);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cnz-line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--cnz-ink-soft);
  font-size: 12px;
  font-weight: 800;
}

body.portalForm .chapterNav button::after {
  content: none;
  min-width: 0;
}

body.portalForm .chapterNav button.active {
  border-color: #b8d9a5;
  background: var(--cnz-green-pale) !important;
  color: var(--cnz-green-dark);
  font-weight: 800;
}

body.portalForm .chapterNav button.active::before,
body.portalForm .chapterNav button.complete::before {
  border-color: var(--cnz-green);
  background: var(--cnz-green);
  box-shadow: inset 0 0 0 2px #fff;
  color: #fff;
}

body.portalForm .chapterNav button.complete {
  color: var(--cnz-green-dark);
}

body.portalForm .chapterNav button[data-state="upcoming"] {
  color: var(--cnz-ink-soft);
  opacity: .62;
}

body.portalForm .chapterNav button:disabled {
  cursor: default;
}

@media (min-width: 821px) {
  body.portalForm #builderPanel .sectionGrid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 220px) !important;
  }

  body.portalForm #builderPanel > .sectionGrid > .side {
    grid-column: 2;
    grid-row: 1;
  }

  body.portalForm #builderPanel > .sectionGrid > .panel {
    grid-column: 1;
    grid-row: 1;
  }
}

@media (max-width: 820px) {
  body.portalForm .financeLayout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  body.portalForm .financeMain,
  body.portalForm .chapterNav {
    grid-column: auto;
    grid-row: auto;
  }

  body.portalForm .chapterNav {
    position: static;
    padding: 12px;
    overflow: hidden;
  }

  body.portalForm .chapterNav ol {
    display: flex;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 2px;
  }

  body.portalForm .chapterNav li {
    flex: 0 0 190px;
  }

  body.portalForm .chapterNav button {
    min-height: 64px;
    align-content: center;
  }
}

@media (max-width: 520px) {
  body.portalForm .moduleTitle h1 {
    font-size: 22px;
    line-height: 1.18;
  }

  body.portalForm .moduleTitle p {
    font-size: 14px;
    line-height: 1.4;
  }

  body.portalForm .chapterNav li {
    flex-basis: 174px;
  }
}

/* Unified chapter navigation contract: one numbered rail, one work header. */
body.portalForm main.shell {
  width: min(var(--cnz-module-width), calc(100% - (2 * var(--cnz-module-gutter)))) !important;
}

body.portalForm .financeLayout,
body.portalForm #intakeLayout,
body.portalForm #builderPanel .sectionGrid {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr) !important;
  gap: 20px;
  align-items: start;
  min-width: 0;
}

body.portalForm .financeLayout > .chapterNav,
body.portalForm #intakeLayout > .chapterNav,
body.portalForm #builderPanel .sectionGrid > .side {
  grid-column: 1;
  grid-row: 1;
}

body.portalForm .financeLayout > .financeMain,
body.portalForm #intakeLayout > div,
body.portalForm #builderPanel .sectionGrid > .panel {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

body.portalForm details.chapterNav {
  display: grid !important;
  align-content: start;
  gap: 12px;
  min-width: 0;
  position: sticky;
  top: 18px;
  padding: 16px;
  border: 1px solid var(--cnz-line-strong);
  border-radius: var(--cnz-module-radius);
  background: var(--cnz-module-surface);
  box-shadow: var(--cnz-module-shadow);
}

body.portalForm details.chapterNav > summary {
  display: none;
}

body.portalForm details.chapterNav > .chapterNavBody {
  display: grid;
  gap: 12px;
  min-width: 0;
}

body.portalForm .chapterNavHeading,
body.portalForm .chapterNavBody > h3 {
  margin: 0;
  color: var(--cnz-ink);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.3;
}

body.portalForm .chapterNavBody > ol,
body.portalForm .chapterNavList {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: unified-chapter;
  min-width: 0;
  overflow: visible;
}

body.portalForm .chapterNavBody > ol > li,
body.portalForm .chapterNavList > li {
  min-width: 0;
  counter-increment: unified-chapter;
}

body.portalForm .chapterNavBody > ol > li[hidden] {
  display: none;
}

body.portalForm .chapterNavBody .sectionNavButton,
body.portalForm .chapterNavBody .chapterNavList button,
body.portalForm .chapterNavBody > ol button {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 6px !important;
  background: transparent !important;
  color: var(--cnz-ink-soft);
  padding: 9px 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
}

body.portalForm .chapterNavBody .sectionNavButton::before,
body.portalForm .chapterNavBody .chapterNavList button::before,
body.portalForm .chapterNavBody > ol button::before {
  content: counter(unified-chapter);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cnz-line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--cnz-ink-soft);
  font-size: 12px;
  font-weight: 800;
}

body.portalForm .chapterNavBody .chapterNavList button strong,
body.portalForm .chapterNavBody .chapterNavList button .small {
  min-width: 0;
  grid-column: 2;
}

body.portalForm .chapterNavBody .chapterNavList button strong {
  font-weight: inherit;
}

body.portalForm .chapterNavBody .chapterNavList button .small {
  margin-top: -4px;
}

body.portalForm .chapterNavBody .sectionNavButton:hover,
body.portalForm .chapterNavBody .sectionNavButton:focus-visible,
body.portalForm .chapterNavBody .chapterNavList button:hover,
body.portalForm .chapterNavBody .chapterNavList button:focus-visible,
body.portalForm .chapterNavBody > ol button:hover,
body.portalForm .chapterNavBody > ol button:focus-visible {
  border-color: #b8d9a5;
  background: var(--cnz-green-pale) !important;
}

body.portalForm .chapterNavBody .sectionNavButton[aria-current="step"],
body.portalForm .chapterNavBody .chapterNavList button[aria-current="step"],
body.portalForm .chapterNavBody > ol button[aria-current="step"],
body.portalForm .chapterNavBody li.current .sectionNavButton,
body.portalForm .chapterNavBody .chapterNavList button.active,
body.portalForm .chapterNavBody > ol button.active {
  border-color: #b8d9a5;
  background: var(--cnz-green-pale) !important;
  color: var(--cnz-green-dark);
  font-weight: 800;
}

body.portalForm .chapterNavBody .sectionNavButton[aria-current="step"]::before,
body.portalForm .chapterNavBody .chapterNavList button[aria-current="step"]::before,
body.portalForm .chapterNavBody > ol button[aria-current="step"]::before,
body.portalForm .chapterNavBody li.complete .sectionNavButton::before,
body.portalForm .chapterNavBody .chapterNavList button.complete::before,
body.portalForm .chapterNavBody > ol button.complete::before {
  border-color: var(--cnz-green);
  background: var(--cnz-green);
  box-shadow: inset 0 0 0 2px #fff;
  color: #fff;
}

body.portalForm .chapterNavBody button:disabled {
  cursor: default;
}

body.portalForm .chapterNavBody #refreshBtn {
  justify-self: start;
  min-height: 36px;
}

body.portalForm .moduleWorkHeader {
  display: grid;
  gap: 8px;
  min-width: 0;
}

body.portalForm .moduleWorkHeader .stepBadge {
  justify-self: start;
}

body.portalForm .wizard-route-meta {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  text-align: right;
}

body.portalForm .wizard-route-meta > span {
  min-width: 0;
}

@media (max-width: 820px) {
  body.portalForm .financeLayout,
  body.portalForm #intakeLayout,
  body.portalForm #builderPanel .sectionGrid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px;
  }

  body.portalForm .financeLayout > .chapterNav,
  body.portalForm #intakeLayout > .chapterNav,
  body.portalForm #builderPanel .sectionGrid > .side {
    grid-column: 1;
    grid-row: 1;
  }

  body.portalForm .financeLayout > .financeMain,
  body.portalForm #intakeLayout > div,
  body.portalForm #builderPanel .sectionGrid > .panel {
    grid-column: 1;
    grid-row: 2;
  }

  body.portalForm details.chapterNav {
    position: static;
    display: block !important;
    padding: 0 !important;
    overflow: visible;
  }

  body.portalForm details.chapterNav > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 52px;
    padding: 12px 14px;
    color: var(--cnz-green-dark);
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    list-style: none;
  }

  body.portalForm details.chapterNav > summary::-webkit-details-marker {
    display: none;
  }

  body.portalForm details.chapterNav > summary::after {
    content: "⌄";
    flex: 0 0 auto;
    font-size: 18px;
    line-height: 1;
  }

  body.portalForm details.chapterNav[open] > summary::after {
    content: "⌃";
  }

  body.portalForm details.chapterNav > .chapterNavBody,
  body.portalForm details.chapterNav:not([open]) > .chapterNavBody {
    display: none;
  }

  body.portalForm details.chapterNav[open] > .chapterNavBody {
    display: grid;
    padding: 0 12px 12px;
  }

  body.portalForm .wizard-route-meta {
    justify-content: flex-start;
    text-align: left;
  }
}

/* CP1/CP2 shared shell closure: keep the chapter model and work area identical. */
body.portalForm {
  --cnz-shell-width: 1040px;
  --cnz-rail-width: 220px;
  --cnz-shell-gap: 20px;
  --cnz-action-bar-height: 72px;
}

body.portalForm main.shell {
  width: min(var(--cnz-shell-width), calc(100% - (2 * var(--cnz-module-gutter)))) !important;
  max-width: var(--cnz-shell-width) !important;
}

body.portalForm .topbar .brand > img,
body.portalForm .topbar .brand > .logo {
  width: 104px !important;
  height: 48px !important;
  flex: 0 0 104px;
  overflow: hidden;
}

body.portalForm .topbar .brand > img {
  object-fit: contain;
  object-position: center;
}

body.portalForm .topbar .brand > .logo img {
  object-fit: contain;
  object-position: center;
}

body.portalForm .topbar .brandText,
body.portalForm .topbar .brand > div:not(.logo),
body.portalForm .topbar .brand > span {
  min-width: 0;
}

body.portalForm .startTitle {
  margin: 0;
  color: var(--cnz-ink);
  font-size: clamp(25px, 3.2vw, 34px);
  font-weight: 760;
  line-height: 1.12;
  letter-spacing: -.02em;
}

body.portalForm .financeLayout,
body.portalForm #intakeLayout,
body.portalForm #builderPanel .sectionGrid {
  grid-template-columns: minmax(0, var(--cnz-rail-width)) minmax(0, 1fr) !important;
  gap: var(--cnz-shell-gap);
  align-items: start;
}

body.portalForm .financeLayout > .chapterNav,
body.portalForm #intakeLayout > .chapterNav,
body.portalForm #builderPanel .sectionGrid > .side {
  grid-column: 1;
  grid-row: 1;
}

body.portalForm .financeLayout > .financeMain,
body.portalForm #intakeLayout > div,
body.portalForm #builderPanel .sectionGrid > .panel {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

body.portalForm .wizardShell {
  border: 0 !important;
  border-bottom: 1px solid var(--cnz-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 0 14px !important;
}

body.portalForm #intakeLayout > div {
  display: grid;
  gap: 14px;
  padding-bottom: calc(var(--cnz-action-bar-height) + 20px);
}

body.portalForm #intakeLayout .wizardCard {
  box-shadow: var(--cnz-module-shadow) !important;
}

body.portalForm .saveBar {
  /* Keep actions in document flow so no answer is covered. */
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
  margin: 0 auto;
  min-height: 60px;
  width: min(var(--cnz-shell-width), calc(100% - (2 * var(--cnz-module-gutter))));
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

body.portalForm #builderPanel .sopActionBlock {
  position: sticky;
  bottom: 8px;
  z-index: 4;
  margin-right: -26px;
  margin-left: -26px;
  padding: 12px 26px;
  border: 1px solid var(--cnz-line-strong);
  border-radius: var(--cnz-module-radius);
  background: rgba(255, 253, 250, .97);
  box-shadow: var(--cnz-module-shadow);
}

body.portalForm #builderPanel .sopActionBlock .actions {
  align-items: center;
}

body.portalForm #builderPanel .sopNavActions {
  border-top: 1px solid var(--cnz-line);
  padding-top: 14px;
  scroll-margin-bottom: calc(var(--cnz-action-bar-height) + 20px);
}

body.portalForm #builderPanel .sopNavActions .actions {
  align-items: center;
}

body.portalForm #builderPanel .side.chapterNav {
  min-width: 0;
}

/* Only real chapter controls receive the numbered marker. Utility actions do not. */
body.portalForm .chapterNav #refreshBtn {
  display: inline-flex !important;
  grid-template-columns: none !important;
  width: auto;
  gap: 6px;
}

body.portalForm .chapterNav #refreshBtn::before,
body.portalForm .chapterNav #refreshBtn::after {
  content: none !important;
  display: none !important;
}

/* A completion marker may be green, but only the current chapter gets a selected surface. */
body.portalForm .chapterNavBody li.complete:not(.current) .sectionNavButton:not([aria-current="step"]):not(:focus-visible):not(:hover),
body.portalForm .chapterNavBody li.partial:not(.current) .sectionNavButton:not([aria-current="step"]):not(:focus-visible):not(:hover) {
  border-color: transparent;
  background: transparent !important;
}

@media (max-width: 820px) {
  body.portalForm {
    --cnz-rail-width: 1fr;
    --cnz-shell-gap: 12px;
    --cnz-action-bar-height: 76px;
  }

  body.portalForm .financeLayout,
  body.portalForm #intakeLayout,
  body.portalForm #builderPanel .sectionGrid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.portalForm .financeLayout > .chapterNav,
  body.portalForm #intakeLayout > .chapterNav,
  body.portalForm #builderPanel .sectionGrid > .side {
    grid-column: 1;
    grid-row: 1;
  }

  body.portalForm .financeLayout > .financeMain,
  body.portalForm #intakeLayout > div,
  body.portalForm #builderPanel .sectionGrid > .panel {
    grid-column: 1;
    grid-row: 2;
  }

  body.portalForm details.chapterNav {
    display: block !important;
    position: static;
    overflow: visible;
    padding: 0 !important;
  }

  body.portalForm details.chapterNav > summary {
    display: flex;
    min-height: 52px;
  }

  body.portalForm details.chapterNav > .chapterNavBody,
  body.portalForm details.chapterNav:not([open]) > .chapterNavBody {
    display: none;
  }

  body.portalForm details.chapterNav[open] > .chapterNavBody {
    display: grid;
    padding: 0 12px 12px;
  }

  body.portalForm #builderPanel .side.chapterNav {
    display: block !important;
    overflow: visible;
  }

  body.portalForm #builderPanel .side.chapterNav .chapterNavList {
    display: grid;
    overflow: visible;
  }

  body.portalForm #intakeLayout > div {
    padding-bottom: calc(var(--cnz-action-bar-height) + 24px);
  }

  body.portalForm #builderPanel .sopActionBlock {
    margin-right: -18px;
    margin-left: -18px;
    padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 520px) {
  body.portalForm .topbar .brand > img,
  body.portalForm .topbar .brand > .logo {
    width: 92px !important;
    height: 44px !important;
    flex-basis: 92px;
  }

  body.portalForm .startTitle {
    font-size: 24px;
  }

  body.portalForm #builderPanel .sopActionBlock .actions,
  body.portalForm #builderPanel .sopNavActions .actions {
    gap: 8px;
  }

  body.portalForm #builderPanel .sopActionBlock button {
    min-height: 44px;
  }
}

/* Approved compact chapter navigation: selection, progress and utility actions stay distinct. */
body.portalForm details.chapterNav {
  gap: 8px;
}

body.portalForm details.chapterNav > .chapterNavBody {
  gap: 8px;
}

body.portalForm .chapterNavBody > ol,
body.portalForm .chapterNavBody .chapterNavList {
  gap: 3px;
}

body.portalForm .chapterNavBody .sectionNavButton,
body.portalForm .chapterNavBody .chapterNavList > li > button,
body.portalForm .chapterNavBody > ol > li > button {
  min-height: 42px;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.25;
}

body.portalForm .chapterNavBody .chapterNavList > li > button .small {
  margin-top: 0;
  font-weight: 400;
  line-height: 1.2;
}

body.portalForm .chapterNavBody li.complete .sectionNavButton,
body.portalForm .chapterNavBody .chapterNavList > li > button.complete,
body.portalForm .chapterNavBody > ol > li > button.complete {
  color: var(--cnz-ink-soft);
  font-weight: 400;
}

body.portalForm .chapterNavBody .sectionNavButton[aria-current="step"],
body.portalForm .chapterNavBody .chapterNavList > li > button[aria-current="step"],
body.portalForm .chapterNavBody > ol > li > button[aria-current="step"] {
  border-color: #b8d9a5;
  background: var(--cnz-green-pale) !important;
  color: var(--cnz-green-dark);
  font-weight: 650;
}

/* Current is a row state. An incomplete current section keeps its number. */
body.portalForm .chapterNavBody .sectionNavButton[aria-current="step"]::before,
body.portalForm .chapterNavBody .chapterNavList > li > button[aria-current="step"]::before,
body.portalForm .chapterNavBody > ol > li > button[aria-current="step"]::before {
  content: counter(unified-chapter);
  border-color: var(--cnz-line-strong);
  background: #fff !important;
  color: var(--cnz-ink-soft);
  box-shadow: none;
}

/* A checkmark is reserved for the existing complete state, never partial progress. */
body.portalForm .chapterNavBody li.complete .sectionNavButton::before,
body.portalForm .chapterNavBody .chapterNavList > li > button.complete::before,
body.portalForm .chapterNavBody > ol > li > button.complete::before {
  content: "✓";
  border-color: var(--cnz-green);
  background: var(--cnz-green) !important;
  box-shadow: inset 0 0 0 2px #fff;
  color: #fff;
  font-size: 13px;
}

body.portalForm .chapterNavBody li.partial .sectionNavButton::before,
body.portalForm .chapterNavBody .chapterNavList > li > button.partial::before,
body.portalForm .chapterNavBody > ol > li > button.partial::before {
  content: counter(unified-chapter);
  border-color: #91ad97;
  background: #fff !important;
  box-shadow: inset 0 -3px 0 #dcebdc;
  color: var(--cnz-green-dark);
}

body.portalForm .chapterNavBody .chapterNavUtility {
  display: flex;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--cnz-line);
}

body.portalForm .chapterNavBody .chapterNavUtility #refreshBtn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 40px;
  margin: 0;
  padding: 0 12px !important;
  border: 1px solid var(--cnz-line-strong) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--cnz-green-dark) !important;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  text-underline-offset: 0;
}

body.portalForm .chapterNavBody .chapterNavUtility #refreshBtn:hover,
body.portalForm .chapterNavBody .chapterNavUtility #refreshBtn:focus-visible {
  border-color: var(--cnz-green) !important;
  background: var(--cnz-green-pale) !important;
}

@media (max-width: 820px) {
  body.portalForm .chapterNavBody > ol,
  body.portalForm .chapterNavBody .chapterNavList {
    gap: 3px;
  }
}
