/* Use case library page. */

.ucl-page {
  --ucl-line: #E3E6EE;
  --ucl-line-soft: #EEF0F5;
  --ucl-tint: #EEF2FA;
  --ucl-surface: #F7F8FA;
  --ucl-sketch: #9AA8CC;
  --ucl-sketch-light: #DDE1E8;
  background: var(--ucl-surface);
}

.ucl-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ucl-icon {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ucl-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* These containers space their children with gap, so the site's p + p and
   h2 + p margins would double it. */
.ucl-filter__head > *,
.ucl-empty > *,
.ucl-card > *,
.ucl-detail__about > *,
.ucl-detail__result > *,
.ucl-form > *,
.ucl-done > * { margin: 0; }

.ucl-eyebrow,
.ucl-detail__subheading {
  font-family: 'Lexend', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ========== HERO ========== */
.ucl-hero {
  padding: calc(var(--nav-height) + clamp(32px, 5vw, 52px)) 0 clamp(36px, 5vw, 56px);
  background: var(--navy);
  color: #fff;
}
.ucl-hero h1 {
  max-width: 760px;
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.ucl-hero__lede {
  max-width: 640px;
  margin-top: 16px;
  color: rgb(255 255 255 / 80%);
}

.ucl-search {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 680px;
  height: 58px;
  margin-top: 22px;
  padding: 0 16px;
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  box-shadow: 0 16px 40px rgb(0 0 0 / 25%);
}
.ucl-search:focus-within { outline: 3px solid var(--sky); }
.ucl-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 17px;
}
.ucl-search input::-webkit-search-cancel-button { display: none; }
.ucl-search__clear {
  flex: none;
  padding: 7px 11px;
  border: 0;
  border-radius: 6px;
  background: var(--cool-grey);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

/* ========== DEPARTMENT FILTER ========== */
.ucl-filter {
  padding: clamp(20px, 3vw, 28px) 0;
  border-bottom: 1px solid var(--ucl-line);
  background: #fff;
}
.ucl-filter__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
  margin-bottom: 12px;
}
.ucl-filter__head h2 { color: var(--navy); }
.ucl-filter__head p {
  font-size: 13px;
  color: var(--text-muted);
}
.ucl-departments {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(46%, 200px), 1fr));
  gap: 8px;
}
.ucl-department {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--ucl-line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.ucl-department .ucl-icon {
  width: 22px;
  height: 22px;
  color: var(--navy);
}
.ucl-department:hover { border-color: var(--navy); }
.ucl-department[aria-pressed="true"] {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}
.ucl-department[aria-pressed="true"] .ucl-icon { color: #fff; }

/* ========== RESULTS ========== */
.ucl-results { padding: clamp(20px, 3vw, 28px) 0 clamp(48px, 6vw, 72px); }

.ucl-showing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  min-height: 34px;
  margin-bottom: 28px;
}
.ucl-showing p {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.ucl-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px 6px 10px;
  border: 1px solid var(--navy);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.ucl-chip .ucl-icon {
  width: 14px;
  height: 14px;
}
.ucl-chip__cross {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cool-grey);
  line-height: 1;
}

.ucl-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 28px;
  padding: 28px;
  border: 1.5px dashed #C9D0DD;
  border-radius: 12px;
  background: #fff;
}
.ucl-empty[hidden] { display: none; }
.ucl-empty h2 { font-size: 19px; }
.ucl-empty p { font-size: 15px; }
.ucl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ucl-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1.5px solid var(--blue);
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  font-family: 'Lexend', sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s;
}
.ucl-btn:hover { background: #EEF3FB; }

/* ========== GROUPS AND CARDS ========== */
.ucl-group + .ucl-group {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--ucl-line);
}
.ucl-group__head { margin-bottom: 16px; }
.ucl-group__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.ucl-count {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--ucl-line-soft);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}
.ucl-group__strapline {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.ucl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}

.ucl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--ucl-line);
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.ucl-card:hover {
  border-color: var(--navy);
  box-shadow: 0 10px 24px rgb(0 8 32 / 8%);
  transform: translateY(-2px);
}
.ucl-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--ucl-tint);
  color: var(--navy);
}
.ucl-card__icon .ucl-icon {
  width: 32px;
  height: 32px;
}
.ucl-card__name {
  font-size: 18px;
  line-height: 1.3;
}
.ucl-card__open {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
/* The button's click area covers the whole card. */
.ucl-card__open::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
}
.ucl-card__open:focus-visible { outline: 0; }
.ucl-card__open:focus-visible::after {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
.ucl-card__open[aria-expanded="true"]::after { box-shadow: inset 0 0 0 1.5px var(--navy); }
.ucl-card__description {
  flex: 1;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
}
.ucl-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--ucl-line-soft);
  font-size: 12px;
}
.ucl-card__job {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
  color: var(--ink);
}
.ucl-card__job .ucl-icon {
  width: 15px;
  height: 15px;
}
.ucl-card__more {
  flex: none;
  font-weight: 600;
  color: var(--blue);
  white-space: nowrap;
}

/* ========== OVERVIEW PANEL ========== */
.ucl-detail {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  align-items: start;
  gap: 24px 44px;
  padding: clamp(22px, 3vw, 30px) clamp(20px, 3vw, 34px);
  border: 1.5px solid var(--navy);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 34px rgb(0 8 32 / 10%);
  scroll-margin: calc(var(--nav-height) + 16px) 0 16px;
}
.ucl-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--cool-grey);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.ucl-detail__close {
  position: absolute;
  top: 16px;
  right: 16px;
}
.ucl-detail__about,
.ucl-detail__result {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.ucl-detail__result { padding-top: clamp(0px, 3vw, 36px); }
.ucl-detail .ucl-detail__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 44px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ucl-detail__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--ucl-tint);
  color: var(--navy);
}
.ucl-detail__badge .ucl-icon {
  width: 17px;
  height: 17px;
}
.ucl-detail__title {
  margin-top: 8px;
  font-size: 26px;
  letter-spacing: -0.01em;
}
.ucl-detail__title:focus { outline: 0; }
.ucl-detail__title:focus-visible { outline: 3px solid var(--blue); }
.ucl-detail .ucl-detail__meta {
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.ucl-detail__subheading {
  margin-top: 10px;
  color: var(--blue);
}
.ucl-detail p,
.ucl-detail li {
  font-size: 15px;
  line-height: 1.65;
}
.ucl-detail__signals {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 18px;
  list-style: disc;
}
.ucl-detail .ucl-detail__signals li {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}
.ucl-detail__about .btn { margin-top: 14px; }
.ucl-detail .ucl-detail__note {
  font-size: 12px;
  color: var(--text-muted);
}
.ucl-detail .ucl-detail__output { color: var(--ink); }

/* Input to output sketch, for the use cases with their own detail */
.ucl-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1.25fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--ucl-line);
  border-radius: 10px;
  background: var(--ucl-surface);
}
.ucl-flow__input {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 14px 8px;
  border: 1px dashed #C9D0DD;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}
.ucl-flow__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ucl-tint);
  color: var(--navy);
}
.ucl-detail .ucl-flow__label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}
.ucl-flow__output .ucl-flow__label {
  font-weight: 700;
  color: var(--navy);
}
.ucl-flow__arrow {
  display: flex;
  justify-self: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--navy);
}
.ucl-flow__arrow::before {
  content: "";
  width: 7px;
  height: 7px;
  margin: auto;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: translateX(-2px) rotate(45deg);
}
.ucl-flow__output {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 118px;
  padding: 14px 16px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(0 8 32 / 10%);
}

.ucl-sketch > span {
  display: block;
  border-radius: 4px;
  background: var(--ucl-sketch-light);
}
.ucl-sketch--wave {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}
.ucl-sketch--wave > span {
  width: 3px;
  border-radius: 2px;
  background: var(--ucl-sketch);
}
.ucl-sketch--wave > span:nth-child(5n + 1) { height: 8px; }
.ucl-sketch--wave > span:nth-child(5n + 2) { height: 16px; }
.ucl-sketch--wave > span:nth-child(5n + 3) { height: 11px; }
.ucl-sketch--wave > span:nth-child(5n + 4) { height: 20px; }
.ucl-sketch--wave > span:nth-child(5n) { height: 13px; }
.ucl-sketch--pages {
  position: relative;
  width: 40px;
  height: 24px;
}
.ucl-sketch--pages > span {
  position: absolute;
  top: 2px;
  width: 26px;
  height: 20px;
  border: 1px solid #C9D0DD;
  border-radius: 2px;
  background: #fff;
}
.ucl-sketch--pages > span:nth-child(1) { left: 0; transform: rotate(-8deg); }
.ucl-sketch--pages > span:nth-child(2) { left: 7px; }
.ucl-sketch--pages > span:nth-child(3) { left: 14px; border-color: var(--ucl-sketch); transform: rotate(7deg); }
.ucl-sketch--many {
  display: grid;
  grid-template-columns: repeat(6, 8px);
  gap: 3px;
}
.ucl-sketch--many > span {
  height: 6px;
  border-radius: 2px;
  background: var(--ucl-sketch);
}
.ucl-sketch--many > span:nth-child(3n + 2) { background: #C9D0DD; }
.ucl-sketch--doc,
.ucl-sketch--table,
.ucl-sketch--grades {
  display: flex;
  flex-direction: column;
  gap: 7px;
  filter: blur(2px);
}
.ucl-sketch--doc > span { height: 7px; }
.ucl-sketch--doc > span:nth-child(odd) { width: 88%; }
.ucl-sketch--doc > span:nth-child(even) { width: 68%; }
.ucl-sketch--doc > span.is-strong {
  width: 40%;
  background: var(--ucl-sketch);
}
.ucl-sketch--table > span {
  height: 7px;
  background: linear-gradient(90deg, var(--ucl-sketch-light) 0 70%, transparent 70% 76%, var(--navy) 76%);
}
.ucl-sketch--grades > span {
  height: 12px;
  background: linear-gradient(90deg, var(--ucl-sketch-light) 0 74%, transparent 74% 80%, var(--ucl-sketch) 80%);
}
.ucl-sketch--grades > .is-strong { background: linear-gradient(90deg, var(--ucl-sketch-light) 0 74%, transparent 74% 80%, var(--navy) 80%); }
.ucl-sketch--grades > .is-light { background: linear-gradient(90deg, var(--ucl-sketch-light) 0 74%, transparent 74% 80%, #C9D0DD 80%); }

.ucl-promises {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  list-style: none;
}
.ucl-detail .ucl-promises li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
}
.ucl-promises__tick {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ucl-tint);
  color: var(--navy);
}
.ucl-promises__tick .ucl-icon {
  width: 12px;
  height: 12px;
}

/* Generic document preview, for the use cases without their own detail */
.ucl-preview {
  position: relative;
  width: 100%;
  height: 200px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--ucl-line);
  border-top: 4px solid var(--navy);
  border-radius: 10px;
  background: var(--ucl-surface);
}
.ucl-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(247 248 250 / 0%) 35%, rgb(247 248 250 / 85%) 100%);
}
.ucl-preview__sheet {
  position: absolute;
  inset: 28px 14% -24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 22px 24px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 6px 18px rgb(0 8 32 / 10%);
  filter: blur(1.5px);
}
.ucl-preview__sheet > span {
  display: block;
  flex: none;
  width: 92%;
  height: 5px;
  border-radius: 2px;
  background: var(--ucl-sketch-light);
}
.ucl-preview__sheet > .is-title {
  width: 38%;
  height: 10px;
  background: var(--navy);
}
.ucl-preview__sheet > .is-heading {
  width: 30%;
  height: 7px;
  background: var(--blue);
}
.ucl-preview__sheet > .is-meta { width: 60%; }
.ucl-preview__sheet > .is-table,
.ucl-preview__sheet > .is-box,
.ucl-preview__sheet > .is-fields {
  height: 26px;
  border: 1px solid var(--ucl-sketch-light);
  background: transparent;
}
.ucl-preview__sheet > .is-band {
  height: 18px;
  background: var(--ucl-surface);
}
.ucl-preview__sheet > .is-rag {
  width: 70%;
  background: linear-gradient(90deg, var(--ucl-sketch-light) 0 80%, transparent 80% 88%, var(--sky) 88%);
}
.ucl-preview__caption {
  position: absolute;
  bottom: 22px;
  left: 50%;
  z-index: 1;
  padding: 6px 12px;
  border: 1px solid var(--ucl-sketch-light);
  border-radius: 999px;
  background: rgb(255 255 255 / 94%);
  color: var(--navy);
  width: max-content;
  max-width: calc(100% - 32px);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transform: translateX(-50%);
}

/* ========== SUGGEST BAND ========== */
.ucl-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding: 22px 26px;
  border-radius: 14px;
  background: var(--navy);
}
.ucl-band > div { max-width: 560px; }
.ucl-band h2 {
  color: #fff;
  font-size: 18px;
}
.ucl-band p {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.55;
  color: rgb(255 255 255 / 80%);
}
.ucl-band__button { box-shadow: 0 0 0 1.5px var(--sky); }

/* ========== FORM DIALOG ========== */
.ucl-dialog {
  width: min(560px, calc(100% - 24px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 30px 60px rgb(0 8 32 / 25%);
}
.ucl-dialog::backdrop { background: rgb(0 8 32 / 55%); }
.ucl-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(20px, 5vw, 28px) 0;
}
.ucl-dialog__head h2 { font-size: 22px; }
.ucl-form,
.ucl-done {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px clamp(20px, 5vw, 28px) 28px;
}
.ucl-done { align-items: flex-start; }
.ucl-form[hidden],
.ucl-done[hidden] { display: none; }
.ucl-form__intro,
.ucl-form__notice {
  line-height: 1.6;
  color: var(--text-muted);
}
.ucl-form__intro { font-size: 14px; }
.ucl-form__notice { font-size: 12px; }
.ucl-done p {
  font-size: 15px;
  line-height: 1.65;
}
.ucl-done p:focus { outline: 0; }
.ucl-form__pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 16px 14px;
}
.ucl-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ucl-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.ucl-field label i {
  font-style: normal;
  color: #B42318;
}
.ucl-field input,
.ucl-field textarea {
  width: 100%;
  border: 1px solid #D4D9E3;
  border-radius: 6px;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
}
.ucl-field input {
  height: 44px;
  padding: 0 12px;
}
.ucl-field textarea {
  padding: 10px 12px;
  line-height: 1.5;
  resize: vertical;
}
.ucl-field input:focus,
.ucl-field textarea:focus {
  border-color: var(--blue);
  outline: 2px solid rgb(0 71 187 / 25%);
}
.ucl-field [aria-invalid="true"] { border-color: #B42318; }
.ucl-field__error {
  display: none;
  font-size: 13px;
  color: #B42318;
}
.ucl-field [aria-invalid="true"] + .ucl-field__error { display: block; }
.ucl-form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.ucl-form__submit:disabled {
  opacity: 0.7;
  cursor: wait;
}
.ucl-form__fail {
  font-size: 14px;
  color: #B42318;
}
