.list-shell {
  display: grid;
  gap: 24px;
}

.list-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 46%);
  gap: 30px;
  align-items: stretch;
  border: 1px solid #9aa7b8;
  background: rgba(236, 239, 242, 0.42);
  padding: 28px;
  --cut: 24px;
}

.list-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 430px;
}

.list-bars {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}

.list-bars span {
  width: 46px;
  height: 7px;
  background: var(--blue);
}

.list-hero h1 {
  max-width: 8ch;
  margin: 0;
  font-size: 82px;
  line-height: 0.9;
  font-weight: 950;
  letter-spacing: 0;
}

.list-description {
  max-width: 620px;
  margin: 22px 0 0;
  color: #657081;
  font-size: 17px;
  font-weight: 750;
}

.list-author {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  color: #657081;
  font-size: 13px;
  font-weight: 850;
}

.list-author::before {
  width: 18px;
  height: 18px;
  background: var(--blue);
  content: "";
}

.list-author a {
  color: var(--blue);
  font-weight: 950;
}

.list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.list-action,
.mode-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border: 1px solid #9aa7b8;
  background: #e8eaed;
  color: var(--ink);
  padding: 0 15px;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  text-decoration: none;
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}

.list-action.icon-only {
  width: 44px;
  padding: 0;
}

.list-action.danger,
.list-action.favorite {
  color: var(--red);
}

.mode-select {
  min-width: 132px;
  color: var(--blue);
}

.list-cover {
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  background: #c9d0da;
  clip-path: polygon(26px 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%, 0 26px);
}

.list-cover img,
.item-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.list-stat {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 96px;
  border: 1px solid #9aa7b8;
  background: #e8eaed;
  padding: 14px;
  --cut: 14px;
}

.stat-mark {
  width: 48px;
  height: 48px;
  background: var(--blue);
}

.list-stat span {
  display: block;
  color: #657081;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.list-stat strong {
  display: block;
  color: var(--ink);
  font-size: 25px;
  line-height: 1;
  font-weight: 950;
}

.list-tabs {
  display: flex;
  align-items: center;
  min-height: 62px;
  border: 1px solid #9aa7b8;
  background: #e8eaed;
  overflow-x: auto;
}

.list-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 62px;
  border: 0;
  background: transparent;
  color: #657081;
  padding: 0 24px;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.list-tab.active {
  min-width: 210px;
  background: var(--blue);
  color: #fff;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.item-card {
  display: grid;
  grid-template-rows: 280px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line-dark);
  background: #e8eaed;
  clip-path: polygon(24px 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%, 0 24px);
}

.item-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.item-body h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1;
  font-weight: 950;
}

.item-body p {
  margin: 0;
  color: #657081;
  font-size: 13px;
  font-weight: 750;
}

.role-box {
  border: 1px solid #9aa7b8;
  background: #eef1f4;
  padding: 10px 12px;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.role-box span {
  display: block;
  color: var(--blue);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.role-box strong {
  font-size: 14px;
  font-weight: 950;
}

.item-blue-bar {
  width: 72%;
  height: 22px;
  background: var(--blue);
}

@media (max-width: 1120px) {
  .list-hero {
    grid-template-columns: 1fr;
  }

  .list-stats,
  .item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .list-hero {
    padding: 18px;
  }

  .list-hero h1 {
    font-size: 48px;
  }

  .list-stats,
  .item-grid {
    grid-template-columns: 1fr;
  }

  .item-card {
    grid-template-rows: 230px minmax(0, 1fr);
  }
}

/* Goal mode picker and full-width tabs pass. */
.mode-picker {
  position: relative;
  display: inline-flex;
}

.mode-select-label {
  min-width: 0;
}

.mode-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 90;
  display: none;
  width: min(360px, calc(100vw - 32px));
  border: 1px solid var(--line-soft);
  background: #fff;
  padding: 8px;
  box-shadow: 0 18px 42px rgba(17, 23, 34, 0.14);
}

.mode-picker.is-open .mode-menu {
  display: grid;
  gap: 6px;
}

.mode-option {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line-soft);
  background: #f5f6f7;
  color: var(--ink);
  padding: 12px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.mode-option span,
.mode-option em {
  color: #657081;
  font-size: 12px;
  font-style: normal;
}

.mode-option:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.stat-mark {
  display: grid;
  place-items: center;
}

.stat-mark .ui-icon {
  width: 24px;
  height: 24px;
  color: #fff;
  stroke: #fff;
}

.list-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: visible;
}

.list-tab,
.list-tab.active {
  width: 100%;
  min-width: 0;
  justify-content: center;
  padding: 0 12px;
}

@media (max-width: 820px) {
  .list-tabs {
    grid-template-columns: 1fr;
  }
}
/* Current goal dropdown and owner action pass. */
.mode-menu {
  border: 1px solid var(--line-soft);
  background: #fff;
  padding: 8px;
  box-shadow: 0 18px 36px rgba(15, 18, 24, 0.12);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}

.mode-option {
  min-height: 54px;
  border: 1px solid var(--line-soft);
  background: #f7f8fa;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
}

.mode-option:not(:disabled):hover {
  background: #eef1f4;
}

.stat-mark,
.stat-mark .ui-icon {
  display: grid;
  place-items: center;
}

.list-tab.active {
  background: var(--red);
  color: #fff;
}

.item-blue-bar {
  background: var(--red);
}

[data-owner-list-action][hidden] {
  display: none !important;
}
/* Current goal list ratings panels pass. */
.list-panel[hidden] {
  display: none !important;
}

.list-panel-stack {
  display: grid;
  gap: 20px;
}

.rating-panel,
.discussion-panel,
.info-panel {
  border: 1px solid var(--line-soft);
  background: #e8eaed;
  padding: 20px;
}

.rating-panel h2,
.discussion-panel h2,
.info-panel h2 {
  margin: 0 0 16px;
  font-size: 28px;
  font-style: italic;
  font-weight: 950;
  text-transform: uppercase;
}

.rating-list {
  display: grid;
  gap: 12px;
}

.rating-row {
  display: grid;
  grid-template-columns: 42px 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line-soft);
  background: #f3f5f7;
  padding: 10px;
}

.rating-row > span {
  color: var(--blue);
  font-size: 18px;
  font-weight: 950;
  text-align: center;
}

.rating-row img {
  width: 72px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line-soft);
}

.rating-row strong,
.info-grid strong,
.discussion-thread strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  text-transform: uppercase;
}

.rating-row small,
.rating-panel p,
.discussion-thread p {
  color: #657081;
  font-size: 12px;
  font-weight: 800;
}

.rating-empty,
.discussion-composer,
.discussion-thread {
  border: 1px solid var(--line-soft);
  background: #f3f5f7;
  padding: 14px;
}

.friend-rating-select,
.discussion-composer textarea {
  width: 100%;
  border: 1px solid var(--line-soft);
  background: #f8f9fb;
  color: var(--ink);
  padding: 12px;
  font: inherit;
  font-weight: 800;
}

.discussion-composer {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.discussion-composer button,
.discussion-thread button {
  min-height: 38px;
  border: 1px solid var(--line-soft);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.discussion-thread {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

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

.info-grid span {
  color: #657081;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .rating-row {
    grid-template-columns: 34px 58px minmax(0, 1fr);
  }

  .rating-row img {
    width: 58px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}
/* Current goal persistent discussion pass. */
.discussion-thread.is-reply {
  margin-left: clamp(16px, 4vw, 42px);
  background: #f8f9fb;
}

.discussion-thread small {
  display: block;
  margin-top: 6px;
  color: #7a8493;
  font-size: 11px;
  font-weight: 800;
}

.discussion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.discussion-replies {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  width: 100%;
}

[data-discussion-body] {
  display: grid;
  gap: 12px;
}