/* compass-rendering.css — the form-render rule set, single-sourced in the
   Compass.Rendering RCL and served at
   _content/Advant.Crossroads.Compass.Rendering/compass-rendering.css.

   Every consumer of the form-render components (Compass form-fill, Threshold
   Quick preview, Atlas SystemAppDef preview) loads THIS file. It holds the
   `.cmp`-scoped reset/base plus the form-body chrome (shell, rail, content,
   group cards, fields, action bar, soft-gate, and their mobile counterparts).
   Compass-app-only chrome (topbar, save indicator, dashboard, review/confirm/
   read-only/edge screens, Message-from-Campus, preview banner) stays in
   Compass's local compass.css.

   Rule blocks below are relocated verbatim from compass.css (Compass P4) —
   do not edit rule text here; values resolve to tenant tokens via --cmp-*. */

.cmp, .cmp *, .cmp *::before, .cmp *::after { box-sizing: border-box; }

.cmp {
  font-family: var(--cmp-font-body);
  color: var(--cmp-text);
  background: var(--cmp-bg-app);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Resolve cmp-m's height: 100% so the mobile shell, its body scroll, and
     the absolute-positioned sheets all size to the artboard frame and not
     to their own content. frame-root supplies the height context. */
  height: 100%;
}
.cmp h1, .cmp h2, .cmp h3, .cmp h4 {
  font-family: var(--cmp-font-headline);
  color: var(--cmp-text);
  margin: 0;
  letter-spacing: -0.005em;
}

/* ====================================================================
   Three-column shell — left rail | content | message panel
   ==================================================================== */
.cmp-shell {
  display: grid;
  grid-template-columns: 264px 1fr 340px;
  gap: 0;
  min-height: calc(100% - 80px);
}
.cmp-shell--no-mfc { grid-template-columns: 264px 1fr; }

/* Left section rail — railTreatment knob:
   white (default) | tinted (primary at low alpha) | solid (primary fill, light-on-dark) */
.cmp-rail {
  border-right: 1px solid var(--cmp-rail-border-right);
  background: var(--cmp-rail-bg);
  padding: 28px 0;
  position: sticky; top: 80px;
  align-self: start;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
.cmp-rail__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cmp-rail-title-color);
  padding: 0 24px 12px;
}
.cmp-rail__progress {
  font-size: 12.5px;
  color: var(--cmp-rail-progress-fg);
  padding: 0 24px 16px;
}
.cmp-rail__progress strong { color: var(--cmp-rail-progress-strong); font-weight: 700; }
.cmp-rail__list {
  display: flex; flex-direction: column;
  gap: 2px;
  padding: 0 12px;
}
.cmp-rail__item {
  display: flex; align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--cmp-radius-md);
  font-size: 14px;
  color: var(--cmp-rail-item-color);
  background: transparent; border: 0;
  text-align: left;
  cursor: pointer;
  width: 100%;
  line-height: 1.3;
  transition: background 100ms ease, color 100ms ease;
  font-family: inherit;
}
.cmp-rail__item:hover { background: var(--cmp-rail-item-hover-bg); color: var(--cmp-rail-active-color); }
.cmp-rail__item--active {
  background: var(--cmp-rail-active-bg);
  color: var(--cmp-rail-active-color);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--cmp-rail-active-bar);
}
.cmp-rail__item--complete { color: var(--cmp-rail-active-color); }
.cmp-rail__icon {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
}
.cmp-rail__icon--complete {
  background: var(--cmp-check-bg);
  color: var(--cmp-check-fg);
  border-radius: 50%;
}
.cmp-rail__icon--active {
  border: 2px solid var(--cmp-rail-active-icon-border);
  border-radius: 50%;
  background: var(--cmp-rail-active-icon-bg);
}
.cmp-rail__icon--active::after {
  content: ''; width: 8px; height: 8px;
  background: var(--cmp-rail-active-icon-border); border-radius: 50%;
}
.cmp-rail__icon--untouched {
  border: 1.5px solid var(--cmp-rail-untouched-border);
  border-radius: 50%;
}
.cmp-rail__icon--errors {
  background: var(--cmp-warning);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
}
.cmp-rail__num {
  font-size: 11px;
  color: var(--cmp-rail-num-color);
  font-variant-numeric: tabular-nums;
}
.cmp-rail__divider {
  height: 1px;
  background: var(--cmp-rail-divider);
  margin: 16px 24px;
}

/* Center content */
.cmp-content {
  padding: 40px 56px 120px;
  max-width: 780px;
  width: 100%;
}
.cmp-content__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--cmp-eyebrow-tracking);
  text-transform: uppercase;
  color: var(--cmp-eyebrow-color);
  margin-bottom: 12px;
  display: inline-flex; align-items: center; gap: 10px;
}
.cmp-content__eyebrow::before {
  content: '';
  width: 26px; height: 1.5px;
  background: var(--cmp-eyebrow-color);
}
.cmp-content__crumb {
  font-size: 12.5px;
  color: var(--cmp-text-subtle);
  letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 6px;
}
.cmp-content__title {
  font-family: var(--cmp-sectitle-font);
  font-size: var(--cmp-sectitle-size);
  font-weight: var(--cmp-sectitle-weight);
  color: var(--cmp-sectitle-color);
  margin: 0 0 8px;
  letter-spacing: -0.015em;
  line-height: 1.05;
}
.cmp-content__lede {
  font-size: 16px;
  color: var(--cmp-lede-color);
  margin: 4px 0 32px;
  max-width: 56ch;
  line-height: 1.55;
}

/* ====================================================================
   Group cards — section is composed of groups
   ==================================================================== */
.cmp-group {
  background: var(--cmp-bg-panel);
  border: 1px solid var(--cmp-border);
  border-radius: var(--cmp-radius-lg);
  margin-bottom: 18px;
  overflow: hidden;
}
.cmp-group__head {
  padding: 18px 24px 10px;
  display: flex; align-items: baseline; gap: 10px;
  border-bottom: 1px solid var(--cmp-border);
}
.cmp-group__head h3 {
  font-family: var(--cmp-grouphead-font);
  font-size: var(--cmp-grouphead-size);
  font-weight: var(--cmp-grouphead-weight);
  color: var(--cmp-grouphead-color);
  letter-spacing: 0;
  position: relative;
  padding-bottom: 6px;
}
.cmp-group__head h3::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--cmp-grouphead-underline);
  border-radius: 1px;
  width: 32px;
}
.cmp-group__hint {
  font-size: 12.5px;
  color: var(--cmp-text-subtle);
  margin-left: auto;
}
.cmp-group__body {
  padding: 12px 24px 22px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px 18px;
}

/* ====================================================================
   Field — labels + Bootstrap-flavored form-control chrome
   ==================================================================== */
.cmp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cmp-field--sm   { grid-column: span 4; }
.cmp-field--md   { grid-column: span 6; }
.cmp-field--lg   { grid-column: span 8; }
.cmp-field--full { grid-column: span 12; }
.cmp-field__label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--cmp-text);
}
.cmp-field__req {
  color: var(--cmp-text-subtle);
  font-weight: 400;
  font-size: 12px;
  margin-left: 4px;
}
.cmp-field__opt {
  color: var(--cmp-text-subtle);
  font-weight: 400;
  font-size: 12px;
  margin-left: 4px;
}
.cmp-field__input {
  width: 100%;
  height: 42px;
  padding: 8px 12px;
  background: var(--cmp-bg-panel);
  border: 1px solid var(--cmp-border-strong);
  border-radius: var(--cmp-radius-sm);
  font: inherit;
  font-size: 14.5px;
  color: var(--cmp-text);
  outline: none;
  transition: border-color 100ms ease, box-shadow 100ms ease;
}
.cmp-field__input:focus {
  border-color: var(--cmp-primary);
  box-shadow: 0 0 0 3px var(--cmp-primary-soft);
}
.cmp-field__input--textarea {
  height: auto;
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
  padding: 10px 12px;
}
.cmp-field__input--select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%235A6473' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.cmp-field__input--empty { color: var(--cmp-text-subtle); }
.cmp-field__helper {
  font-size: 12px;
  color: var(--cmp-text-subtle);
  line-height: 1.4;
}
.cmp-field__count {
  font-size: 11.5px;
  color: var(--cmp-text-subtle);
  align-self: flex-end;
}
.cmp-radio-group {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 2px;
}
.cmp-radio {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--cmp-border-strong);
  border-radius: var(--cmp-radius-pill);
  background: var(--cmp-bg-panel);
  font-size: 13.5px;
  color: var(--cmp-text-muted);
  cursor: pointer;
  user-select: none;
  transition: border-color 100ms, background 100ms, color 100ms;
}
.cmp-radio:hover { border-color: var(--cmp-text-subtle); color: var(--cmp-text); }
.cmp-radio__dot {
  width: 14px; height: 14px;
  border: 1.5px solid var(--cmp-border-strong);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.cmp-radio--selected {
  border-color: var(--cmp-primary);
  background: var(--cmp-primary-soft);
  color: var(--cmp-text);
  font-weight: 500;
}
.cmp-radio--selected .cmp-radio__dot { border-color: var(--cmp-primary); }
.cmp-radio--selected .cmp-radio__dot::after {
  content: ''; width: 7px; height: 7px; background: var(--cmp-primary); border-radius: 50%;
}
.cmp-fileslot {
  border: 1.5px dashed var(--cmp-border-strong);
  border-radius: var(--cmp-radius-md);
  padding: 18px;
  display: flex; align-items: center; gap: 14px;
  background: var(--cmp-bg-soft);
}
.cmp-fileslot__icon {
  width: 36px; height: 36px;
  border-radius: var(--cmp-radius-sm);
  background: var(--cmp-bg-panel);
  border: 1px solid var(--cmp-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--cmp-text-subtle);
  font-size: 16px;
}
.cmp-fileslot__text { font-size: 13.5px; color: var(--cmp-text-muted); }
.cmp-fileslot__text strong { color: var(--cmp-primary); font-weight: 500; }

/* ====================================================================
   Bottom action bar — Previous / Save & exit / Next
   ==================================================================== */
.cmp-actions {
  display: flex; align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--cmp-border);
}
.cmp-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px;
  padding: 0 18px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  border-radius: var(--cmp-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  color: var(--cmp-text);
  transition: background 100ms, border-color 100ms, color 100ms;
  white-space: nowrap;
}
.cmp-btn--primary {
  background: var(--cmp-primary);
  color: var(--cmp-primary-fg);
}
.cmp-btn--primary:hover { background: var(--cmp-primary-hover); }
.cmp-btn--outline {
  border-color: var(--cmp-border-strong);
  background: var(--cmp-bg-panel);
  color: var(--cmp-text);
}
.cmp-btn--outline:hover { border-color: var(--cmp-text-subtle); }
.cmp-btn--text { color: var(--cmp-text-muted); }
.cmp-btn--text:hover { background: var(--cmp-bg-soft); color: var(--cmp-text); }
.cmp-actions__spacer { flex: 1; }

/* ====================================================================
   Soft-gate — surfaced inline above the action bar when "Next section" is
   clicked while the section has unanswered required questions.
   Calm caution tone — not a hard block. Tenant warning color, not danger.
   ==================================================================== */
.cmp-softgate {
  display: flex; gap: 14px;
  background: var(--cmp-bg-panel);
  border: 1px solid var(--cmp-warning);
  border-left-width: 4px;
  border-radius: var(--cmp-radius-md);
  padding: 18px 20px 18px 18px;
  margin: 24px 0 0;
  box-shadow: 0 1px 0 var(--cmp-warning) inset, 0 6px 18px rgba(0,0,0,0.04);
}
.cmp-softgate__icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--cmp-warning);
}
.cmp-softgate__body { flex: 1; min-width: 0; }
.cmp-softgate__title {
  font-family: var(--cmp-font-headline);
  font-size: 17px;
  font-weight: 600;
  color: var(--cmp-text);
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}
.cmp-softgate__detail {
  font-size: 14px;
  color: var(--cmp-text-muted);
  line-height: 1.5;
}
.cmp-softgate__list {
  list-style: none;
  padding: 8px 0 0;
  margin: 8px 0 0;
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13.5px;
}
.cmp-softgate__list li {
  display: flex; align-items: center; gap: 8px;
  color: var(--cmp-text);
}
.cmp-softgate__dot {
  width: 5px; height: 5px;
  background: var(--cmp-warning);
  border-radius: 50%;
  flex-shrink: 0;
}
.cmp-softgate__actions {
  display: flex; gap: 10px;
  margin-top: 14px;
  align-items: center;
}

/* Muted variant of the primary button — used for the "Next section" button
   when the soft-gate is open, so the warning panel's primary action gets
   the visual lead instead. */
.cmp-btn--muted {
  color: var(--cmp-text-muted);
}
.cmp-btn--muted:hover { color: var(--cmp-text); }

/* ====================================================================
   Mobile shell
   ==================================================================== */
.cmp-m {
  display: flex; flex-direction: column;
  height: 100%;
  font-size: 16px;
}

.cmp-m-section-head {
  padding: 16px 16px;
  background: var(--cmp-bg-panel);
  display: flex; align-items: center; gap: 14px;
}
.cmp-m-section-head__title {
  font-family: var(--cmp-sectitle-font);
  font-weight: var(--cmp-sectitle-weight);
  font-size: 22px;
  color: var(--cmp-sectitle-color);
  margin-top: 4px;
  display: flex; align-items: center; gap: 8px;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.cmp-m-section-head__col { flex: 1; min-width: 0; line-height: 1.2; }
.cmp-m-section-head__num {
  font-size: 11px;
  letter-spacing: var(--cmp-eyebrow-tracking);
  text-transform: uppercase;
  color: var(--cmp-eyebrow-color);
  font-weight: 700;
}
.cmp-m-section-head__caret {
  color: var(--cmp-text-subtle);
  font-size: 13px;
}
.cmp-m-section-head__progress {
  width: 64px;
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.cmp-m-ring {
  width: 48px; height: 48px;
  position: relative;
}
.cmp-m-ring svg { display: block; }
.cmp-m-ring__label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--cmp-text);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.cmp-m-ring__caption {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cmp-text-subtle);
  line-height: 1;
}

.cmp-m-body {
  flex: 1;
  padding: 16px 16px 100px;
  background: var(--cmp-bg-app);
  overflow-y: auto;
}
.cmp-m-body .cmp-group { margin-bottom: 14px; }
.cmp-m-body .cmp-group__head { padding: 14px 16px 4px; }
.cmp-m-body .cmp-group__head h3 { font-size: 15px; }
.cmp-m-body .cmp-group__body {
  padding: 8px 16px 18px;
  grid-template-columns: 1fr;
  gap: 14px;
}
.cmp-m-body .cmp-field { grid-column: 1 / -1 !important; }
.cmp-m-body .cmp-field__input { height: 48px; font-size: 16px; }
.cmp-m-body .cmp-field__input--textarea { min-height: 110px; height: auto; }
.cmp-m-body .cmp-radio { padding: 11px 14px; font-size: 14px; }

.cmp-m-foot {
  position: sticky; bottom: 0;
  background: var(--cmp-bg-panel);
  border-top: 1px solid var(--cmp-border);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px;
}
.cmp-m-foot .cmp-btn { flex: 1; justify-content: center; height: 50px; padding: 0 16px; font-size: 15px; }
.cmp-m-foot .cmp-btn--prev { flex: 0 0 50px; }

/* Section sheet (mobile) — full-overlay drawer showing the section rail */
.cmp-m-sheet-root {
  position: absolute; inset: 0;
  z-index: 10;
  display: flex; flex-direction: column;
  pointer-events: auto;
}
.cmp-m-sheet-scrim {
  position: absolute; inset: 0;
  background: rgba(20,28,40,0.42);
  backdrop-filter: blur(2px);
}
.cmp-m-sheet {
  position: relative;
  background: var(--cmp-bg-panel);
  border-bottom: 1px solid var(--cmp-border);
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
  padding: 14px 0 18px;
  margin-top: 0;
  max-height: 78%;
  overflow-y: auto;
  border-radius: 0 0 var(--cmp-radius-lg) var(--cmp-radius-lg);
}
.cmp-m-sheet__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 16px 12px;
  gap: 12px;
}
.cmp-m-sheet__title {
  font-family: var(--cmp-sectitle-font);
  font-weight: var(--cmp-sectitle-weight);
  font-size: 18px;
  color: var(--cmp-text);
  letter-spacing: -0.005em;
}
.cmp-m-sheet__subtitle {
  font-size: 12px;
  color: var(--cmp-text-subtle);
  margin-top: 2px;
}
.cmp-m-sheet__close {
  width: 36px; height: 36px;
  border-radius: var(--cmp-radius-md);
  border: 1px solid var(--cmp-border);
  background: var(--cmp-bg-panel);
  color: var(--cmp-text-muted);
  display: flex; align-items: center; justify-content: center;
}
.cmp-m-sheet__list { display: flex; flex-direction: column; padding: 0 8px; }
.cmp-m-sheet__item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 12px;
  border-radius: var(--cmp-radius-md);
  background: transparent; border: 0;
  font: inherit;
  font-size: 15.5px;
  color: var(--cmp-text-muted);
  text-align: left;
  width: 100%;
  line-height: 1.3;
}
.cmp-m-sheet__item--complete { color: var(--cmp-text); }
.cmp-m-sheet__item--active {
  background: var(--cmp-rail-active-bg);
  color: var(--cmp-rail-active-color);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--cmp-rail-active-bar);
}
.cmp-m-sheet__item .cmp-rail__icon {
  width: 26px; height: 26px;
}
.cmp-m-sheet__num {
  font-size: 12px;
  color: var(--cmp-rail-num-color);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}
.cmp-m-sheet__name {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
