/* Institution pages generated by scripts/build-institution-pages.mjs.
   Loaded after intel-steel.css: steel-navy ground, Edict Display for names and figures,
   Inter for reading, ice blue as the single accent. Stage and band shades step from a
   faint ice tint (lowest) to near-white (highest), so brightness always means "further along". */

.inst-page {
  --i-ground: var(--paper, #080b11);
  --i-raised: var(--raised, #151c28);
  --i-well: #0c111a;
  --i-rule: rgba(160, 186, 226, 0.14);
  --i-rule-soft: rgba(160, 186, 226, 0.08);
  --i-ink: var(--ink, #eef1f6);
  --i-muted: var(--muted, #a1aaba);
  --i-quiet: #6f7a8e;
  --i-ice: var(--ice, #a0bae2);
  --i-s0: rgba(160, 186, 226, 0.07);
  --i-s1: rgba(160, 186, 226, 0.24);
  --i-s2: rgba(160, 186, 226, 0.46);
  --i-s3: #a0bae2;
  --i-s4: #eef1f6;
  --i-read: 680px;
  --i-wide: 1040px;
}

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

.inst {
  padding: 132px 0 96px;
  color: var(--i-ink);
}

.inst-wrap {
  width: min(var(--i-wide), calc(100% - 48px));
  margin: 0 auto;
}

.inst-hero > *,
.inst-section:not(.inst-wide) > *,
.inst-section-head {
  max-width: var(--i-read);
}

/* Hero */
.inst-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
  font-size: 13px;
  color: var(--i-quiet);
}

.inst-crumbs a {
  color: var(--i-muted);
  transition: color 0.2s ease;
}

.inst-crumbs a:hover,
.inst-crumbs [aria-current] {
  color: var(--i-ink);
}

.inst-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(44px, 6.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--i-ink);
  text-wrap: balance;
}

.inst-hero > .inst-title {
  max-width: 15ch;
}

.inst-hero > .inst-title-question {
  max-width: 18ch;
  font-size: clamp(40px, 5.4vw, 70px);
}

.inst-subtitle {
  margin-top: 20px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--i-muted);
}

.inst-hero-lede {
  margin-top: 28px;
}

.inst-byline {
  margin-top: 28px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--i-quiet);
}

.inst-byline a {
  color: var(--i-muted);
  border-bottom: 1px solid var(--i-rule);
}

.inst-byline a:hover {
  color: var(--i-ink);
}

.inst-lede {
  font-size: 19px;
  line-height: 1.62;
  color: var(--i-muted);
  text-wrap: pretty;
}

.inst-lede strong {
  font-weight: 500;
  color: var(--i-ink);
}

/* Score: the one large figure on a profile. */
.inst-score {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 56px;
  margin-top: 72px;
  padding-top: 48px;
  border-top: 1px solid var(--i-rule);
}

.inst-score-num {
  font-family: var(--display);
  font-size: clamp(112px, 13vw, 168px);
  line-height: 0.82;
  letter-spacing: -0.04em;
  color: var(--i-ink);
  font-variant-numeric: lining-nums;
}

.inst-score-num span {
  margin-left: 6px;
  font-size: 0.22em;
  letter-spacing: 0;
  color: var(--i-quiet);
}

.inst-score-band {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  font-size: 15px;
  color: var(--i-ink);
}

.inst-score-band::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--band, var(--i-s3));
}

.inst-score-body {
  padding-top: 6px;
}

.inst-score-body .inst-lede {
  max-width: 60ch;
}

/* Band scale: 0 to 100 split into the four bands, marker at the score. */
.inst-scale {
  position: relative;
  margin: 36px 0 0;
  padding-bottom: 26px;
}

.inst-scale-track {
  display: flex;
  gap: 3px;
}

.inst-scale-track span {
  position: relative;
  flex: var(--w) 1 0;
  height: 6px;
  border-radius: 1px;
  background: var(--i-s0);
}

.inst-scale-track span.is-current {
  background: var(--band);
}

.inst-scale-track em {
  position: absolute;
  top: 16px;
  left: 0;
  font-style: normal;
  font-size: 12px;
  color: var(--i-quiet);
  white-space: nowrap;
}

.inst-scale-track .is-current em {
  color: var(--i-ink);
}

.inst-scale-marker {
  position: absolute;
  top: -7px;
  left: var(--at);
  width: 2px;
  height: 20px;
  margin-left: -1px;
  background: var(--i-ink);
  box-shadow: 0 0 0 3px var(--i-ground);
  animation: inst-marker 1.1s cubic-bezier(0.2, 0.7, 0.1, 1) 0.15s both;
}

@keyframes inst-marker {
  from {
    left: 0;
    opacity: 0;
  }
}

.inst-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 20px 32px;
  margin: 40px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--i-rule-soft);
}

.inst-facts dt {
  font-size: 13px;
  color: var(--i-quiet);
}

.inst-facts dd {
  margin: 6px 0 0;
  font-size: 16px;
  color: var(--i-ink);
}

/* Band and stage shades */
.inst-page .band-early {
  --band: var(--i-s1);
}
.inst-page .band-developing {
  --band: var(--i-s2);
}
.inst-page .band-advanced {
  --band: var(--i-s3);
}
.inst-page .band-leader {
  --band: var(--i-s4);
}
.inst-page .stage-0 {
  --stage: var(--i-s0);
}
.inst-page .stage-1 {
  --stage: var(--i-s1);
}
.inst-page .stage-2 {
  --stage: var(--i-s2);
}
.inst-page .stage-3 {
  --stage: var(--i-s3);
}
.inst-page .stage-4 {
  --stage: var(--i-s4);
}

/* Sections */
.inst-section {
  margin-top: 104px;
}

.inst-section.inst-first {
  margin-top: 80px;
  padding-top: 48px;
  border-top: 1px solid var(--i-rule);
}

.inst-section-head {
  margin-bottom: 36px;
}

.inst-section-head h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--i-ink);
}

.inst-section-head p {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--i-muted);
}

.inst-prose p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--i-muted);
}

.inst-prose p + p {
  margin-top: 18px;
}

.inst-page .inst-fine {
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--i-quiet);
}

.inst-fine a,
.inst-prose a {
  color: var(--i-muted);
  border-bottom: 1px solid var(--i-rule);
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.inst-fine a:hover,
.inst-prose a:hover {
  color: var(--i-ink);
  border-color: var(--i-ice);
}

/* Stage ladder */
.inst-ladder-wrap {
  overflow-x: auto;
}

.inst-ladder {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.inst-ladder thead th {
  padding: 0 2px 14px;
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  color: var(--i-quiet);
}

.inst-ladder thead th:first-child {
  width: 30%;
}

.inst-ladder tbody th {
  padding: 0 16px 0 0;
  font-family: var(--brand);
  font-size: 16px;
  font-weight: 400;
  text-align: left;
  color: var(--i-ink);
  white-space: nowrap;
}

.inst-ladder tbody td,
.inst-ladder tbody th {
  height: 56px;
  border-top: 1px solid var(--i-rule-soft);
}

.inst-ladder tbody tr:last-child td,
.inst-ladder tbody tr:last-child th {
  border-bottom: 1px solid var(--i-rule-soft);
}

.inst-ladder tbody td {
  position: relative;
}

.inst-ladder tbody td::after {
  content: '';
  position: absolute;
  inset: 22px 2px;
  border-radius: 1px;
  background: var(--i-s0);
}

.inst-ladder tr.is-open td.on::after {
  background: var(--stage);
}

.inst-ladder tr.is-open td.is-stage::before {
  content: '';
  position: absolute;
  top: 16px;
  right: 1px;
  width: 2px;
  height: 24px;
  background: var(--i-ink);
}

.inst-ladder tr.is-veiled th {
  color: var(--i-quiet);
}

.inst-ladder tr.is-veiled td::after {
  background: repeating-linear-gradient(
    90deg,
    rgba(160, 186, 226, 0.09) 0 6px,
    transparent 6px 10px
  );
}

.inst-veiled-cell {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-left: 12px;
  padding: 3px 10px;
  border-radius: 3px;
  background: var(--i-ground);
  font-size: 13px;
  color: var(--i-quiet);
  transition: color 0.2s ease;
}

.inst-veiled-cell:hover {
  color: var(--i-ink);
}

.inst-short {
  display: none;
}

/* Evidence quote for the sample capability */
.inst-evidence {
  max-width: var(--i-read);
  margin: 40px 0 0;
  padding-left: 24px;
  border-left: 2px solid var(--i-s3);
}

.inst-evidence blockquote {
  margin: 0;
}

.inst-evidence blockquote p {
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.42;
  color: var(--i-ink);
  text-wrap: pretty;
}

.inst-evidence figcaption {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--i-quiet);
}

.inst-evidence figcaption a {
  color: var(--i-muted);
  border-bottom: 1px solid var(--i-rule);
}

.inst-evidence figcaption a:hover {
  color: var(--i-ink);
}

/* Veil: what members see, without any of the data. */
.inst-veil {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 40px;
  align-items: center;
  margin-top: 48px;
  padding: 32px;
  border: 1px solid var(--i-rule);
  border-radius: 6px;
  background:
    linear-gradient(160deg, rgba(160, 186, 226, 0.06), rgba(160, 186, 226, 0) 60%), var(--i-well);
}

.inst-veil-ghosts {
  display: grid;
  gap: 12px;
}

.inst-veil-ghosts i {
  display: block;
  height: 10px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(160, 186, 226, 0.16), rgba(160, 186, 226, 0.03));
}

.inst-veil-ghosts i:nth-child(2) {
  width: 78%;
}

.inst-veil-ghosts i:nth-child(3) {
  width: 56%;
}

.inst-veil-title {
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.25;
  color: var(--i-ink);
}

.inst-veil-copy p:not(.inst-veil-title) {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--i-muted);
}

.inst-veil-copy .inst-link {
  margin-top: 18px;
}

.inst-link {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--i-ice);
  font-size: 15px;
  color: var(--i-ink);
  transition:
    border-color 0.2s ease,
    color 0.2s ease;
}

.inst-link:hover {
  color: var(--i-ice);
}

/* Bar lists: peers and the full hub list */
.inst-bars {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--i-rule-soft);
}

.inst-bars li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.2fr) 112px;
  gap: 24px;
  align-items: center;
  min-height: 60px;
  padding: 10px 0;
  border-bottom: 1px solid var(--i-rule-soft);
}

.inst-bars li[hidden] {
  display: none;
}

.inst-bars-name {
  font-size: 16px;
  color: var(--i-ink);
}

.inst-bars-name a {
  transition: color 0.2s ease;
}

.inst-bars-name a:hover {
  color: var(--i-ice);
}

.inst-bars .is-self .inst-bars-name {
  font-weight: 500;
}

.inst-bars .is-self::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  width: 8px;
  height: 1px;
  background: var(--i-ink);
}

.inst-bars-meta {
  font-size: 14px;
  color: var(--i-quiet);
}

.inst-bars-bar {
  position: relative;
  height: 4px;
  border-radius: 1px;
  background: var(--i-s0);
}

.inst-bars-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--v);
  border-radius: 1px;
  background: var(--band);
}

.inst-bars-num {
  font-family: var(--display);
  font-size: 22px;
  line-height: 1;
  text-align: right;
  color: var(--i-ink);
  font-variant-numeric: tabular-nums lining-nums;
}

.inst-bars-num small {
  display: block;
  margin-top: 4px;
  font-family: var(--brand);
  font-size: 12px;
  color: var(--i-quiet);
}

/* Unit chart: one square per institution. */
.inst-units {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(22px, 1fr));
  gap: 5px;
}

.inst-units i {
  aspect-ratio: 1;
  border-radius: 2px;
  background: var(--stage, var(--band));
  animation: inst-unit 0.5s ease both;
  animation-delay: calc(var(--i) * 9ms);
}

.inst-units i.stage-0 {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--i-rule);
}

@keyframes inst-unit {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
}

.inst-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.inst-legend li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  color: var(--i-muted);
}

.inst-legend i {
  align-self: center;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--stage, var(--band));
}

.inst-legend i.stage-0 {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--i-rule);
}

.inst-legend strong {
  font-family: var(--display);
  font-weight: 400;
  font-size: 20px;
  color: var(--i-ink);
}

/* Leader rows on question pages */
.inst-rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--i-rule-soft);
}

.inst-rows li {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 64px;
  border-bottom: 1px solid var(--i-rule-soft);
}

.inst-rows-name {
  font-family: var(--display);
  font-size: 22px;
  color: var(--i-ink);
}

.inst-rows-name a {
  transition: color 0.2s ease;
}

.inst-rows-name a:hover {
  color: var(--i-ice);
}

.inst-rows-meta {
  font-size: 14px;
  color: var(--i-quiet);
}

.inst-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--i-ink);
}

.inst-tag::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--stage);
}

/* Question index */
.inst-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--i-rule-soft);
}

.inst-index li {
  border-bottom: 1px solid var(--i-rule-soft);
}

.inst-index a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 20px 0;
}

.inst-index-q {
  font-size: 16px;
  line-height: 1.45;
  color: var(--i-ink);
  transition: color 0.2s ease;
}

.inst-index a:hover .inst-index-q {
  color: var(--i-ice);
}

.inst-index-n {
  flex: none;
  font-size: 13px;
  color: var(--i-quiet);
}

/* Questions */
.inst-faq {
  border-top: 1px solid var(--i-rule-soft);
}

.inst-faq details {
  border-bottom: 1px solid var(--i-rule-soft);
}

.inst-faq summary {
  position: relative;
  padding: 22px 40px 22px 0;
  font-size: 17px;
  line-height: 1.45;
  color: var(--i-ink);
  cursor: pointer;
  list-style: none;
}

.inst-faq summary::-webkit-details-marker {
  display: none;
}

.inst-faq summary::after,
.inst-faq summary::before {
  content: '';
  position: absolute;
  right: 4px;
  top: 50%;
  width: 12px;
  height: 1px;
  background: var(--i-muted);
  transition: transform 0.25s ease;
}

.inst-faq summary::before {
  transform: rotate(90deg);
}

.inst-faq details[open] summary::before {
  transform: rotate(0deg);
}

.inst-faq details p {
  padding: 0 40px 24px 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--i-muted);
}

/* Closing call to action */
.inst-cta {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 48px;
  align-items: end;
  margin-top: 120px;
  padding: 48px;
  border: 1px solid var(--i-rule);
  border-radius: 8px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(96, 134, 190, 0.14), rgba(96, 134, 190, 0) 55%),
    var(--i-raised);
}

.inst-cta h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.12;
  color: var(--i-ink);
  text-wrap: balance;
}

.inst-cta p {
  max-width: 54ch;
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--i-muted);
}

.inst-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.inst-button {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 22px;
  border-radius: 4px;
  background: var(--i-ink);
  color: #080b11;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.2s ease;
}

.inst-button:hover {
  background: #ffffff;
}

/* Filter on the hub */
.inst-filter {
  display: block;
  max-width: 420px;
  margin-bottom: 20px;
}

.inst-filter input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--i-rule);
  border-radius: 4px;
  background: var(--i-well);
  color: var(--i-ink);
  font-size: 15px;
}

.inst-filter input::placeholder {
  color: var(--i-quiet);
}

.inst-filter input:focus-visible {
  outline: none;
  border-color: var(--i-ice);
}

@media (max-width: 860px) {
  .inst {
    padding-top: 112px;
  }

  .inst-wrap {
    width: calc(100% - 32px);
  }

  .inst-score {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .inst-scale-track span:not(.is-current) em {
    display: none;
  }

  .inst-bars li {
    grid-template-columns: minmax(0, 1fr) 72px;
    grid-template-areas:
      'name num'
      'meta num'
      'bar bar';
    gap: 6px 16px;
    padding: 16px 0;
  }

  .inst-bars-name {
    grid-area: name;
  }

  .inst-bars-meta {
    grid-area: meta;
  }

  .inst-bars-bar {
    grid-area: bar;
    margin-top: 8px;
  }

  .inst-bars-num {
    grid-area: num;
  }

  .inst-bars .is-self::before {
    display: none;
  }

  .inst-rows li {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 16px;
    padding: 14px 0;
  }

  .inst-rows-meta {
    grid-row: 2;
  }

  .inst-rows .inst-tag {
    grid-row: 1 / span 2;
    grid-column: 2;
  }

  .inst-index {
    grid-template-columns: 1fr;
  }

  .inst-veil {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }

  .inst-cta {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px 24px;
  }

  .inst-ladder thead th:first-child {
    width: 34%;
  }

  .inst-ladder tbody th {
    font-size: 14px;
    white-space: normal;
  }

  .inst-long {
    display: none;
  }

  .inst-short {
    display: inline;
    font-size: 11px;
  }

  .inst-veiled-cell {
    margin-left: 6px;
    font-size: 12px;
  }

  .inst-units {
    grid-template-columns: repeat(auto-fill, minmax(16px, 1fr));
    gap: 4px;
  }

  .inst-evidence blockquote p {
    font-size: 20px;
  }

  .inst-section {
    margin-top: 80px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .inst-scale-marker,
  .inst-units i {
    animation: none;
  }
}

/* State of adoption: quotable statistics and stage table */
.inst-facts {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: fact;
  display: grid;
  gap: 0;
}
.inst-facts li {
  counter-increment: fact;
  position: relative;
  padding: 18px 0 18px 48px;
  border-top: 1px solid var(--i-rule-soft);
  line-height: 1.55;
}
.inst-facts li::before {
  content: counter(fact, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 19px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  opacity: 0.6;
}
.inst-table-wrap {
  overflow-x: auto;
}
.inst-stats {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.inst-stats th,
.inst-stats td {
  padding: 12px 10px;
  text-align: right;
  border-top: 1px solid var(--i-rule-soft);
  white-space: nowrap;
}
.inst-stats th:first-child {
  text-align: left;
}
.inst-stats thead th {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  font-weight: 400;
}

/* Comparison pages */
.inst-compare th,
.inst-compare td {
  text-align: left;
  white-space: normal;
  vertical-align: top;
  min-width: 180px;
  line-height: 1.5;
}
.inst-compare th[scope='row'] {
  min-width: 140px;
  font-weight: 500;
}
.inst-bullets {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: 10px;
  line-height: 1.55;
}
.inst-sub {
  margin: 24px 0 10px;
  font-size: 1.05rem;
  font-weight: 500;
}
.inst-sources {
  margin: 0 0 12px;
  padding-left: 1.2em;
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
  line-height: 1.5;
}
.cmp-quote {
  font-style: italic;
}
