.res-hero { padding: 48px 0 20px; }

.res-hero h1 {
  max-width: none;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1;
}

.res-lede {
  max-width: 62ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15.5px;
}

.res-total {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
}

.res-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11.5px;
}

.res-banner.is-visible { display: flex; }

.res-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  margin-top: 28px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > span {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
}

.field input,
.field select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--bg);
  color: var(--ink);
}

.field input {
  font-family: var(--sans);
  font-size: 14px;
}

.field select {
  font-family: var(--mono);
  font-size: 11.5px;
}

.field input::placeholder {
  color: var(--faint);
  opacity: 1;
}

.field input:focus,
.field select:focus {
  border-color: var(--ink);
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.res-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.res-meta p {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
}

.res-groups { border-bottom: 1px solid var(--line); }

.res-group { border-top: 1px solid var(--line); }

.res-group:first-child { border-top: 0; }

.res-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  list-style: none;
  cursor: pointer;
}

.res-group-head::-webkit-details-marker { display: none; }

.res-group-head:hover { background: var(--surface); }

.res-group-main {
  flex: 1;
  min-width: 0;
}

.res-group-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.res-group-parent {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
}

.res-count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.res-toggle {
  width: 1rem;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
  color: var(--faint);
  text-align: right;
}

.res-toggle::before { content: '+'; }

details[open] .res-toggle::before { content: '-'; }

.res-opt {
  flex: none;
  border: 1px solid var(--line-strong);
  padding: 1px 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
  white-space: nowrap;
}

.res-items {
  margin: 0;
  padding: 0 0 12px;
  list-style: none;
}

.res-item { border-top: 1px solid var(--line); }

.res-item a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: baseline;
  padding: 9px 0;
  color: var(--ink);
  text-decoration: none;
}

.res-item a:hover { background: var(--surface); }

.res-item a:hover .res-label {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.res-label {
  font-size: 13.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.res-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  white-space: nowrap;
}

.res-week { color: var(--muted); }

.is-week-filtered .res-week { display: none; }

@media (max-width: 760px) {
  .res-hero { padding-top: 40px; }

  .res-controls {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .res-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .res-group-head {
    gap: 10px;
    padding: 12px 0;
  }

  .res-group-title { font-size: 15px; }

  .res-item a {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 9px 0;
  }

  .res-info {
    flex-wrap: wrap;
    white-space: normal;
  }
}
