.icon-sprite {
  position: absolute;
  overflow: hidden;
}

.index-shell {
  width: min(1120px, calc(100% - 44px));
  margin: 48px auto;
}

.index-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 40px;
  align-items: end;
  padding: 44px;
  box-shadow: 8px 8px 0 #d0d0d0;
}

.index-hero__intro {
  max-width: 760px;
  margin: 20px 0 0;
  color: #555;
  font-size: 21px;
}

.index-count {
  min-width: 0;
  padding-left: 28px;
  border-left: 2px dashed var(--wfr-ink);
}

.index-count strong,
.index-count > span,
.index-count__value {
  display: block;
  font-family: "Patrick Hand", cursive;
  line-height: 1;
}

.index-count__value {
  display: flex;
  gap: 10px;
  align-items: baseline;
  white-space: nowrap;
}

.index-count__value strong {
  font-size: 68px;
}

.index-count__value span {
  color: #777;
  font-size: 40px;
}

.index-count > span {
  margin-top: 8px;
  color: #555;
  font-size: 18px;
  line-height: 1.15;
}

.index-count__breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px dashed #888;
}

.index-count__breakdown div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: baseline;
}

.index-count__breakdown dt,
.index-count__breakdown dd {
  margin: 0;
  font-family: "Patrick Hand", cursive;
  line-height: 1.1;
}

.index-count__breakdown dt {
  color: #555;
  font-size: 15px;
}

.index-count__breakdown dd {
  font-size: 21px;
  font-weight: 700;
}

.index-note {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  margin: 32px 0 56px;
  padding: 20px 22px;
  border: 2px dashed var(--wfr-ink);
  background: #ededed;
}

.index-note .wfr-icon {
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  margin-top: 1px;
}

.index-note p {
  margin: 0;
}

.index-legend {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
  gap: 34px;
  margin: 0 0 64px;
  padding: 30px;
  border-block: 2px dashed #888;
}

.index-legend__heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.index-legend__heading .wfr-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  margin-top: 7px;
}

.index-legend__items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  margin: 0;
}

.index-legend__items div {
  padding-left: 14px;
  border-left: 5px solid #bbb;
}

.index-legend__items [data-legend-status="ready"] {
  border-left-color: #777;
}

.index-legend__items [data-legend-status="review"] {
  border-left-color: #d2ad24;
}

.index-legend__items [data-legend-status="draft"] {
  border-left-color: #aaa;
}

.index-legend__items [data-legend-status="missing"] {
  border-left-style: dashed;
  border-left-color: #ccc;
}

.index-legend__items dt {
  font: 700 18px/1.15 "Patrick Hand", cursive;
}

.index-legend__items dd {
  margin: 5px 0 0;
  color: #555;
  font-size: 15px;
}

.index-search {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 1fr) auto;
  gap: 14px 24px;
  align-items: center;
  margin: 0 0 64px;
  padding: 24px 28px;
  border: 2px dashed var(--wfr-ink);
  background: #fff;
}

.index-search > label {
  font: 25px/1.1 "Patrick Hand", cursive;
  font-weight: 700;
}

.index-search__control {
  position: relative;
  min-width: 0;
}

.index-search__control .wfr-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  pointer-events: none;
}

.index-search input {
  width: 100%;
  min-height: 48px;
  padding: 10px 44px 10px 48px;
  border: 2px solid var(--wfr-ink);
  border-radius: 0;
  background: #fff;
  color: var(--wfr-ink);
  font: 19px/1.2 "Comic Neue", sans-serif;
}

.index-search input:focus-visible {
  outline: 3px dashed var(--wfr-link);
  outline-offset: 3px;
}

.index-search__result,
.index-search__empty {
  margin: 0;
  font: 17px/1.2 "Patrick Hand", cursive;
}

.index-status-filter {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.index-status-filter > span {
  margin-right: 4px;
  font: 700 18px/1.1 "Patrick Hand", cursive;
}

.index-status-filter button {
  min-height: 38px;
  padding: 7px 14px;
  border: 2px solid #777;
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  background: #fff;
  color: var(--wfr-ink);
  cursor: pointer;
  font: 17px/1 "Patrick Hand", cursive;
}

.index-status-filter button[aria-pressed="true"] {
  border-color: var(--wfr-ink);
  background: var(--wfr-ink);
  color: #fff;
}

.index-status-filter button:hover,
.index-status-filter button:focus-visible {
  transform: rotate(-0.5deg);
}

.index-status-filter button:focus-visible {
  outline: 3px dashed var(--wfr-link);
  outline-offset: 3px;
}

.index-search__empty {
  grid-column: 2 / -1;
  color: #555;
}

[hidden] {
  display: none !important;
}

.index-group,
.index-branch {
  margin-top: 58px;
}

.index-branch .index-branch {
  margin: 42px 0 0;
}

.index-children {
  margin: 32px 0 0 32px;
  padding: 22px 0 0 24px;
  border-left: 3px solid #999;
}

.index-children > .index-branch:first-of-type {
  margin-top: 24px;
}

.index-hierarchy-label {
  margin: 0 0 18px;
  color: #555;
  font: 700 18px/1.2 "Patrick Hand", cursive;
}

.index-grid.index-parent-grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 720px;
}

.index-parent-grid .index-card {
  border-left: 4px solid var(--wfr-ink);
}

.index-branch--depth-2,
.index-branch--depth-3 {
  background: rgba(255, 255, 255, 0.34);
}

.index-group__heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.index-group__heading > .wfr-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  margin-top: 8px;
}

.index-tree-toggle {
  min-height: 44px;
  padding: 8px 14px;
  border: 2px dashed var(--wfr-ink);
  background: #fff;
  color: var(--wfr-ink);
  cursor: pointer;
  font: 18px/1.2 "Patrick Hand", cursive;
}

.index-tree-toggle:focus-visible {
  outline: 3px dashed var(--wfr-link);
  outline-offset: 3px;
}

.index-group__heading {
  align-items: center;
}

.index-group__heading > div {
  flex: 1;
  min-width: 0;
}

.index-group__heading > .index-tree-toggle {
  margin-left: auto;
}

.index-tree-arrow {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 6px;
  border: 0;
  background: transparent;
}

.index-tree-arrow svg {
  display: block;
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.index-tree-arrow[aria-expanded="false"] svg {
  transform: rotate(-90deg);
}

.index-tree-controls {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.index-branch + .index-grid {
  margin-top: 34px;
}

.index-card {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 278px;
  padding: 28px;
  box-shadow: 6px 6px 0 #ddd;
}

.index-card__content {
  width: 100%;
  min-height: 220px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 16px;
}

.index-card__icon {
  width: 36px;
  height: 36px;
  margin-top: 3px;
}

.index-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.index-card__type {
  margin: 0 0 7px;
  color: #666;
  font: 18px/1.1 "Patrick Hand", cursive;
}

.index-card__status {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 8px;
  border: 1px dashed var(--wfr-ink);
  background: #f2f2f2;
  font: 15px/1 "Patrick Hand", cursive;
}

.index-card__status[data-status="draft"] {
  background: #ddd;
}

.index-card__status[data-status="missing"] {
  border-style: dotted;
  background: #f5f5f5;
  color: #666;
}

.index-card[data-wireframe-status="missing"] {
  border-style: dashed;
  background: rgba(245, 245, 245, 0.72) !important;
  box-shadow: 4px 4px 0 #e3e3e3;
}

.index-card__unavailable {
  margin-top: auto;
  padding: 8px 0;
  color: #777;
  font: 17px/1.1 "Patrick Hand", cursive;
}

.index-card h3 {
  max-width: 100%;
  overflow-wrap: break-word;
  hyphens: none;
}

.index-card__body > p:not(.index-card__type) {
  margin: 14px 0 24px;
  color: #555;
  font-size: 17px;
}

.index-card .wfr-button {
  margin-top: auto;
  color: var(--wfr-link);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.index-card .wfr-button:hover,
.index-card .wfr-button:focus-visible {
  transform: rotate(-0.5deg);
}

.index-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 64px;
  padding-top: 22px;
  border-top: 2px dashed #888;
  color: #666;
  font-size: 15px;
}

.index-footer p {
  margin: 0;
}

@media (max-width: 760px) {
  .index-shell {
    width: min(100% - 32px, 1120px);
    margin: 20px auto 36px;
  }

  .index-hero {
    grid-template-columns: 1fr;
    padding: 30px 26px;
  }

  .index-count {
    padding: 20px 0 0;
    border-top: 2px dashed var(--wfr-ink);
    border-left: 0;
  }

  .index-count__value strong {
    font-size: 52px;
  }

  .index-count__value span {
    font-size: 32px;
  }

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

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

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

  .index-search__empty {
    grid-column: 1;
  }

  .index-status-filter {
    grid-column: 1;
  }

  .index-branch .index-branch {
    margin-left: 0;
  }

  .index-children {
    margin-left: 12px;
    padding-left: 12px;
  }

  .index-card {
    min-height: 0;
  }

  .index-card__content {
    min-height: 220px;
  }

  .index-footer {
    display: block;
  }

  .index-footer p + p {
    margin-top: 6px;
  }
}

@media (max-width: 440px) {
  .index-count__breakdown,
  .index-legend__items {
    grid-template-columns: 1fr;
  }

  .index-card__content {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .index-card__icon {
    margin-bottom: 2px;
  }
}
