.cohort-overview {
  --cohort-life: #154c72;
  --cohort-activity: #80602d;
  --cohort-line: #dae4ea;
}

.cohort-institution {
  font-size: 1.16rem;
}

.cohort-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
  gap: .8rem;
  margin-block: 1.6rem 1.25rem;
}

.cohort-summary > div {
  padding: .75rem .9rem;
  border-block-start: 2px solid var(--cohort-line);
  background: #f2f6f8;
}

.cohort-summary dd {
  margin-inline: 0;
  font-size: 1.45rem;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}

.cohort-distributions {
  margin-block-end: 1.5rem;
  border: 1px solid var(--cohort-line);
  padding: .9rem 1rem;
  border-radius: .45rem;
}

.cohort-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr));
  gap: .7rem 1.4rem;
}

.cohort-groups h3 {
  font-size: 1rem;
  margin-block: .6rem .45rem;
}

.cohort-groups ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cohort-groups li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4rem minmax(3.25em, auto);
  align-items: baseline;
  gap: .5rem;
  font-size: .9rem;
  padding-block: .18rem;
}

.cohort-groups meter {
  width: 100%;
  accent-color: var(--cohort-life);
}

.cohort-groups li span {
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.cohort-compare {
  margin-block: .55rem .3rem;
}

.cohort-compare form {
  display: grid;
  gap: .45rem;
  margin-top: .45rem;
}

.cohort-compare label {
  display: grid;
  gap: .12rem;
}

.cohort-compare :is(select,button) {
  width: 100%;
  max-width: 100%;
}

.cohort-period-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(29rem, 100%), 1fr));
  gap: 1rem;
}

.cohort-period-grid h3 {
  margin-block: .25rem .55rem;
  font-size: 1rem;
}

.cohort-periods {
  width: 100%;
  border-collapse: collapse;
  font-size: .87rem;
}

.cohort-periods :is(th, td) {
  padding-block: .28rem;
  border-block-end: 1px solid var(--cohort-line);
  text-align: start;
}

.cohort-periods td {
  width: 38%;
  font-variant-numeric: tabular-nums;
}

.cohort-periods meter {
  width: calc(100% - 4.3em);
  min-width: .8em;
  margin-inline-end: .4em;
  vertical-align: middle;
  --cohort-bar: var(--cohort-life);
}

.cohort-periods .documented_activity meter {
  --cohort-bar: var(--cohort-activity);
}

.cohort-periods meter::-webkit-meter-optimum-value {
  background: var(--cohort-bar);
}

.cohort-periods meter::-moz-meter-bar {
  background: var(--cohort-bar);
}

.cohort-zoom,
.cohort-anniversary form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .5rem .7rem;
  margin-block: 1rem;
}

.cohort-zoom label,
.cohort-anniversary label {
  display: grid;
  gap: .15rem;
  font-size: .88rem;
}

.cohort-zoom input,
.cohort-anniversary input {
  width: 7.2em;
}

.cohort-zoom :is(input, button),
.cohort-anniversary :is(input, button, select) {
  min-height: 2.5rem;
}

.cohort-zoom button[type="button"] {
  background: transparent;
  color: var(--cohort-life);
  border: 1px solid var(--cohort-life);
}

.cohort-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .85rem;
  font-size: .86rem;
}

.cohort-legend .life,
.cohort-legend .activity {
  font-weight: 700;
}

.cohort-legend .life {
  color: var(--cohort-life);
}

.cohort-legend .activity {
  color: var(--cohort-activity);
}

.cohort-chart-scroll,
.cohort-table-wrap {
  overflow-x: auto;
}

.cohort-chart {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(24rem, 4fr);
  align-items: center;
  min-width: 33rem;
  border: 1px solid var(--cohort-line);
}

.cohort-chart a {
  padding-inline: .5rem;
  font-size: .9rem;
  overflow-wrap: anywhere;
}

.cohort-chart svg {
  width: 100%;
  height: 2.55rem;
}

.cohort-chart svg:first-of-type {
  height: 1.6rem;
}

.cohort-chart svg text {
  fill: #364956;
  font-size: .75rem;
}

.cohort-chart .gridline {
  stroke: var(--cohort-line);
}

.cohort-chart .life {
  fill: var(--cohort-life);
}

.cohort-chart .activity {
  fill: var(--cohort-activity);
}

.cohort-chart .wide {
  opacity: .24;
}

.cohort-chart .inside {
  opacity: .64;
}

.cohort-chart :is(.range, .qualified) {
  fill: none;
  stroke-width: 1.3px;
}

.cohort-chart .life:is(.range, .qualified) {
  stroke: var(--cohort-life);
}

.cohort-chart .activity:is(.range, .qualified) {
  stroke: var(--cohort-activity);
}

.cohort-chart .qualified {
  fill: #f7fafb;
}

.cohort-table-wrap {
  margin-block: 1rem .6rem;
}

.cohort-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: .9rem;
}

.cohort-table :is(th, td) {
  text-align: start;
  vertical-align: top;
  padding: .55rem .65rem;
  border-block-end: 1px solid var(--cohort-line);
}

.cohort-table thead {
  background: #f2f6f8;
}

.cohort-table th[scope="row"] {
  min-width: 7.5rem;
}

.cohort-table ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cohort-table li + li {
  margin-block-start: .55rem;
}

.cohort-table details {
  margin-block: .15rem 0;
}

@media (max-width: 36rem) {
  .cohort-summary {
    grid-template-columns: 1fr;
    gap: .45rem;
  }

  .cohort-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
}
