/* Projects and events (projects.js, project.js, suggested.js), repeating work (repeatlist.js, repeatpanel.js) and
   Coming up on both Homes (comingup.js). Colors only from brand.css. */

.pad-x { padding: 0 12px 8px; }
.hero .btn { justify-self: start; margin-top: 16px; }
.hero .note { margin-top: 10px; max-width: 60ch; }

/* The scorecard: a card per row on a phone, columns on a laptop. */
.scores { list-style: none; padding: 0; display: grid; }
.scores li + li { border-top: 1px solid var(--hair); }
.score-head { display: none; }
.score-row {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas:
    "tile name go" "tile stage go" "tile date go" "tile done go" "tile gifts go";
  align-items: start; column-gap: 14px; row-gap: 4px; padding: 12px; border-radius: 14px; text-decoration: none;
  transition: background .15s var(--ease);
}
.score-row:hover { background: var(--off); }
.score-row[aria-current="true"] { background: var(--ice); }
.score-row .thumb { grid-area: tile; width: 52px; height: 52px; border-radius: 14px; }
.score-row .thumb .ic { width: 26px; height: 26px; }
.score-name { grid-area: name; display: grid; gap: 2px; min-width: 0; }
.score-name b { font-weight: 800; overflow-wrap: anywhere; }
.score-name small, .score-date, .score-done, .score-gifts { color: var(--slate); font-size: 17px; overflow-wrap: anywhere; }
.score-stage { grid-area: stage; padding: 4px 0; }
.score-date { grid-area: date; }
.score-done { grid-area: done; }
.score-gifts { grid-area: gifts; }
.score-gifts:empty { display: none; }
.score-row .row-go { grid-area: go; align-self: center; }
.tag.stage.done { background: var(--ok-bg); color: var(--ok); }
.finished { border-top: 1px solid var(--hair); margin-top: 4px; }
.finished summary {
  display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 12px; font-weight: 800; cursor: pointer; list-style: none;
}
.finished summary::-webkit-details-marker { display: none; }
.finished summary .ic { color: var(--slate); transition: transform .2s var(--ease); }
.finished[open] summary .ic { transform: rotate(90deg); }

/* Suggested projects and repeats: words, then their buttons. */
.sug-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px; }
.sug-row .row-main { flex: 1 1 260px; }
.row-link { color: var(--navy); text-decoration: none; }
.row-link:hover b, .row-link:focus-visible b { text-decoration: underline; }
.suggested { border-color: var(--slip); }
.suggested .eyebrow .ic { color: var(--slip); }

/* A project's page. */
.budget-card { display: grid; gap: 12px; justify-items: start; }
.budget-card .eyebrow { margin: 0; }
.budget-card .said { width: 100%; }
.small-note { font-size: 17px; }

/* A request's repeat. */
.repeat-card { display: grid; gap: 10px; }
.repeat-card.row-card { display: flex; }
.repeat-card .eyebrow { margin: 0; }
.repeat-card.row-card .note { flex: 1 1 260px; }
.repeat-line { font-weight: 800; overflow-wrap: anywhere; }
.repeat-card a { color: var(--navy); font-weight: 800; }
.input.short { max-width: 140px; }

/* Coming up. */
.coming-row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; text-decoration: none; }
.coming-row:hover { background: var(--off); }
.date-chip {
  flex: none; display: grid; place-items: center; align-content: center; width: 56px; height: 56px; border-radius: 14px;
  background: var(--ice); color: var(--navy); line-height: 1.05;
}
.date-chip small { font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.date-chip b { font-size: 22px; font-weight: 900; }
.coming .link-row, .coming .sug-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 8px 12px;
  border-top: 1px solid var(--hair); color: var(--navy); font-weight: 800;
}
.coming .sug-link { color: var(--slip); }

@media (min-width: 900px) {
  .score-head, .score-row {
    grid-template-columns: 52px minmax(0, 2.2fr) minmax(0, 1.2fr) minmax(0, 1.1fr) minmax(0, 1fr) 24px;
    grid-template-areas: "tile name stage date done go"; align-items: center; column-gap: 16px;
  }
  .score-head.with-gifts, .scores.with-gifts .score-row {
    grid-template-columns: 52px minmax(0, 2.2fr) minmax(0, 1.2fr) minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) 24px;
    grid-template-areas: "tile name stage date done gifts go";
  }
  .score-head {
    display: grid; padding: 4px 12px 8px; color: var(--slate); font-size: 12px; font-weight: 900; letter-spacing: .08em;
    text-transform: uppercase;
  }
  .score-head > span:nth-child(1) { grid-area: tile; }
  .score-stage { padding: 0; }
  .score-gifts:empty { display: block; }
  /* With a project open beside it, the list is narrow again: rows stack as on a phone. */
  .has-open .score-head { display: none; }
  .has-open .score-row, .has-open .scores.with-gifts .score-row {
    grid-template-columns: 52px minmax(0, 1fr) auto; align-items: start; column-gap: 14px;
    grid-template-areas: "tile name go" "tile stage go" "tile date go" "tile done go" "tile gifts go";
  }
  .has-open .score-stage { padding: 4px 0; }
  .has-open .score-gifts:empty { display: none; }
}
.said-link { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
