/* ============================================================
   Underwrite Assist — page-specific rules.
   Built from the Figma mockup "Underwrite Assist — Case Study (Private)"
   (1280px frame). Measurements below are the mockup's own px values;
   shared site rules (nav, journey grid, pills, flags, NDA gate) come from
   ../styles.css and are only adjusted here where the mockup differs.
   ============================================================ */

.ua {
  --ua-gutter: var(--case-pad);   /* 102px at 1280 — the mockup's side padding */
  --ua-card-head: #e4f05e;        /* card header text, as drawn in the mockup */
}

/* ---- shared heading ---- */
.ua-h2 {
  font-family: var(--display-h1); font-weight: 700;
  font-size: 35.2px; line-height: 1.45; text-transform: uppercase;
  margin: 0; color: var(--ink);
}

/* nav is 67px tall in the mockup (19.2px padding + 29px wordmark) */
.ua .nav { min-height: 67px; }

/* ---- header ---- */
.ua .cs__head { padding: 76px var(--edge-pad) 72px; gap: 32px; }
.ua .ua-head__main {
  min-height: 195px; display: flex; flex-direction: column;
  justify-content: space-between; gap: 16px;
}
.ua .cs__head .back { margin-bottom: 25.6px; }
.ua .cs__head h1 { max-width: none; }
.ua .cs__head .cs__meta { margin: 4px 0 0; }
.ua .ua-flags { margin: 0; }
.ua .flag { font-weight: 400; }

/* NDA gate: 207px wide, 16px padding, 9.6px between rows */
.ua .nda-global {
  width: 207px; min-width: 0; padding: 16px; gap: 9.6px;
}
.ua .nda-global__row { gap: 8px; }
.ua .nda-global .nda__hint, .ua .nda-global__hint { font-size: 12.8px; }
.ua .nda__form { gap: 9.6px; }
.ua .nda__input { font-size: 13.6px; padding: 7.2px 11.2px; }
.ua .nda__input::placeholder { color: #757575; opacity: 1; }
.ua .nda__submit { font-weight: 400; font-size: 12.8px; padding: 7.2px 14.4px; }

/* ---- Context ---- */
.ua-context { padding: 84px 0 34px; }
.ua-h2--context { padding: 9.6px 0 16px; }
/* intro hugs the left edge, personas hug the right edge — at every width.
   Both shrink from their mockup sizes (382px / 606px) instead of overflowing. */
.ua-context__cols {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: clamp(32px, 6.9vw, 88px);
}
.ua-context__intro {
  flex: 0 1 382px; min-width: 0; padding-top: 25px;
  display: flex; flex-direction: column; gap: 20px;
}
.ua-context__intro p { margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 1.45; }
.ua-personas { display: flex; gap: 16px; flex: 0 1 606px; min-width: 0; }
.ua-personas__col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ua-personas__col--primary { flex: 302 1 0; }
.ua-personas__col--secondary { flex: 288 1 0; }
.ua-personas h3 {
  margin: 0; font-family: var(--display); font-weight: 700; font-size: 18px;
  line-height: 1.2; text-transform: uppercase; color: var(--ink);
}
.ua-persona-box { border: 1px solid var(--ink); padding: 16px; flex: 1 1 0; }
.ua-persona { display: flex; flex-direction: column; align-items: flex-start; gap: 5.6px; }
.ua-persona .p-highlight { font-size: 13.6px; }
.ua-persona__title { margin: 0; font-size: 14.72px; line-height: 1.45; color: var(--ink); }
.ua-persona__desc {
  margin: 0; font-family: var(--mono); font-size: 13.12px; line-height: 1.45;
  color: var(--ink-faint);
}
.ua-persona--secondary { gap: 8px; }
.ua-persona--secondary p {
  margin: 0; font-size: 15.2px; line-height: 1.5; color: var(--ink-soft);
}

/* ---- Underwriting journey (shared .journey rules, tuned to the mockup) ---- */
.ua .journey h2 { margin: 0; padding: 9.6px 0 16px; letter-spacing: 0; }
.ua .journey__intro { max-width: 711px; margin: 0 0 41.6px; line-height: 1.45; }
.ua .journey__band { font-weight: 400; font-size: 12.8px; letter-spacing: 0.04em; }
.ua .journey__col--3row .journey__goal { padding-bottom: 0; }
.ua .journey__legend { gap: 8px; margin: 12.8px 0 0; align-items: center; }
.ua .journey__legend > span { display: inline-flex; align-items: center; gap: 4.4px; }

/* ---- My Role ---- */
.ua-role { padding: 74px 0 34px; }
.ua-role__head { padding: 8px 0; margin-bottom: 16px; }
.ua-role__list { display: flex; flex-direction: column; gap: 26px; }
.ua-card { border: 1.5px solid var(--ink); background: var(--paper); }
.ua-card__head {
  margin: 0; background: var(--ink); color: var(--ua-card-head);
  padding: 18px 24px; text-align: center;
  font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1.2;
  letter-spacing: 0.03em; text-transform: uppercase;
}
.ua-card__body {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 27px; align-items: stretch; padding: 28px 24px 32px;
}
.ua-col { display: flex; flex-direction: column; gap: 15px; min-width: 0; }
.ua-stage { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ua-stage h4 {
  margin: 0; font-family: var(--display); font-weight: 700; font-size: 18px;
  line-height: 1.2; text-transform: uppercase; color: var(--ink);
}
.ua-box { background: var(--paper-deep); padding: 18px; }
.ua-box p { margin: 0; font-size: 15.2px; line-height: 1.5; color: var(--ink-soft); max-width: none; }
.ua-box--text { padding: 16px 18px 18px; }
.ua-stage--fill .ua-box { flex: 1; display: flex; flex-direction: column; }
.ua-box--spread { justify-content: space-between; gap: 15px; }
.ua-box--stack { gap: 20px; }
.ua-block { display: flex; flex-direction: column; gap: 5px; }
.ua-block__label {
  font-family: var(--mono) !important; font-size: 12px !important; line-height: 1.45 !important;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint) !important;
}
.ua-box .ua-block__text--ink { color: var(--ink); }

/* ---- Impact ---- */
.ua-impact { padding: 74px 0 34px; min-height: 557px; }
.ua-h2--impact { padding: 9.6px 0 16px; letter-spacing: -0.01em; }
.ua-impact__intro { margin: 0 0 41.6px; max-width: 711px; color: var(--ink-soft); font-size: 16px; line-height: 1.45; }
.ua-stats { display: flex; gap: 24px; }
.ua-stat {
  flex: 1 1 0; min-width: 0; border: 2px solid var(--ink); background: var(--paper-highlight);
  padding: 28px; display: flex; flex-direction: column; gap: 15px;
}
.ua-stat--accent { background: var(--accent); }
.ua-stat__value { display: flex; align-items: flex-end; gap: 7px; }
.ua-stat__num { font-family: var(--display); font-weight: 700; font-size: 88px; line-height: 1; color: var(--ink); }
.ua-stat__unit { font-family: var(--display); font-weight: 700; line-height: normal; color: var(--ink); }
.ua-stat__unit--word { font-size: 22px; padding-bottom: 5px; }
.ua-stat__unit--pct { font-size: 30px; padding-bottom: 2px; margin-left: -2px; }
.ua-stat p { margin: 0; font-size: 16px; line-height: 1.45; color: var(--ink); }

/* ---- Footer: "← Back to Home" left, "Email · LinkedIn" right (48px side padding, 97px tall) ---- */
.foot > span { display: flex; align-items: center; gap: 8px; }
.foot .foot__back { gap: 6.4px; padding-left: 4px; }

/* ---- narrower screens ---- */
@media (max-width: 960px) {
  .ua-context__cols { flex-direction: column; gap: 28px; }
  .ua-context__intro { flex: none; width: auto; max-width: 382px; padding-top: 0; }
  .ua-personas { flex: none; width: 100%; max-width: 606px; }
  .ua-stats { flex-direction: column; }
  .ua .ua-head__main { min-height: 0; }
}
@media (max-width: 640px) {
  /* phones only: two half-width columns get too narrow to read */
  .ua-card__body { grid-template-columns: 1fr; row-gap: 15px; }
  .ua-personas { flex-direction: column; max-width: none; }
  .ua-personas__col--primary, .ua-personas__col--secondary { flex: none; width: 100%; }
  .ua-stat__num { font-size: 64px; }
}
