/* LibraryCraft requests and bounties (/library/requests…, /library/bounties…; builder E). Loaded after library.css.
   Tokens only, rem sizes (px for hairlines). Request rows .rq-*, bounty rows .bt-*. */

/* dl-cc rows wrapped in <div> (valid in <dl>) keep the account.css grid */
.bt-facts .dl-cc > div, .rq-detail .dl-cc > div { display: contents; }

/* ---------- Requests ---------- */
.rq-list { list-style: none; margin: 0; padding: 0; border-top: var(--pen-2) solid var(--ink); }
.rq-item {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: .5rem 1rem; padding: 1rem 0;
  border-bottom: var(--pen-1) solid var(--line); scroll-margin-top: 6rem;
}
.rq-item:target { border-left: var(--pen-3) solid var(--action); padding-left: .75rem; }
.rq-votes {
  display: flex; flex-direction: column; align-items: center; justify-content: center; align-self: start;
  border: var(--pen-1) solid var(--ink); border-radius: var(--radius); background: var(--sheet-2); padding: .4rem 0;
}
.rq-count { font-weight: 700; font-size: var(--fs-lg); font-stretch: 112%; line-height: 1.1; }
.rq-unit { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 600; text-align: center; }
.rq-votes.is-large { padding: .75rem 1rem; min-width: 8rem; }
.rq-title { font-size: var(--fs-md); margin: 0 0 .3rem; overflow-wrap: anywhere; }
.rq-title a { color: var(--ink); text-decoration: none; }
.rq-title a:hover { text-decoration: underline; text-underline-offset: .2em; }
.rq-meta { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.rq-status, .bt-status {
  display: inline-block; border: var(--pen-1) dashed var(--ink); border-radius: var(--radius); padding: 0 .5rem;
  color: var(--ink); font-weight: 600; font-size: var(--fs-sm);
}
.rq-status.is-bounty, .bt-status.is-open { border-style: solid; border-color: var(--action); color: var(--action); }
.rq-status.is-done, .bt-status.is-paid, .bt-status.is-awarded { border-style: solid; border-color: var(--layer-green); color: var(--layer-green); }
.rq-status.is-closed, .bt-status.is-closed { color: var(--ink-2); border-color: var(--line); }
.rq-action { grid-column: 2; }
.rq-action form { margin: 0; }
.rq-voted { display: inline-block; font-weight: 600; font-size: var(--fs-sm); color: var(--ink-2); padding: .5rem 0; }
@media (min-width: 576px) {
  .rq-item { grid-template-columns: 4.5rem minmax(0, 1fr) auto; align-items: start; }
  .rq-action { grid-column: auto; }
}
.rq-filters { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; margin: 0 0 1rem; }
.rq-filters > div { min-width: min(100%, 12rem); flex: 1 1 12rem; }
.rq-filters .btn-row { margin: 0; flex: 0 0 auto; }
.rq-detail { display: grid; gap: 1.25rem; }
@media (min-width: 768px) { .rq-detail { grid-template-columns: auto minmax(0, 1fr); gap: 2rem; align-items: start; } }
.rq-details, .bt-details { white-space: pre-wrap; overflow-wrap: anywhere; margin: 1rem 0 0; }
.rq-detail-action { margin-top: 1rem; }

/* ---------- Bounties ---------- */
.bt-list { list-style: none; margin: 0; padding: 0; border-top: var(--pen-2) solid var(--ink); }
.bt-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem 1.25rem; padding: 1rem 0; border-bottom: var(--pen-1) solid var(--line); }
@media (min-width: 576px) { .bt-item { grid-template-columns: 8rem minmax(0, 1fr); align-items: start; } }
.bt-item.is-closed .bt-reward, .bt-item.is-paid .bt-reward, .bt-item.is-awarded .bt-reward { border-style: dashed; }
.bt-reward {
  display: flex; flex-direction: column; align-self: start; padding: .5rem .75rem;
  border: var(--pen-2) solid var(--ink); border-radius: var(--radius); background: var(--sheet-2);
}
.bt-amount { font-weight: 700; font-size: var(--fs-lg); font-stretch: 112%; line-height: 1.1; }
.bt-unit { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 600; }
.bt-reward.is-large { margin-bottom: 1.25rem; display: inline-flex; }
.bt-reward.is-large .bt-amount { font-size: var(--fs-xl); }
.bt-title { font-size: var(--fs-md); margin: 0 0 .3rem; overflow-wrap: anywhere; }
.bt-title a { color: var(--ink); text-decoration: none; }
.bt-title a:hover { text-decoration: underline; text-underline-offset: .2em; }
.bt-meta { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.bt-page { display: grid; gap: 2rem; }
@media (min-width: 992px) { .bt-page { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2.5rem; align-items: start; } }
.bt-rules { margin-top: 1.5rem; }
.bt-rules ul { padding-left: 1.2rem; margin: .5rem 0 .75rem; }
.bt-rules li + li { margin-top: .3rem; }
.bt-awarded, .bt-mine { list-style: none; margin: 0 0 1rem; padding: 0; }
.bt-awarded li, .bt-mine li { padding: .5rem 0; border-bottom: var(--pen-1) solid var(--grid); overflow-wrap: anywhere; }
.bt-tag {
  display: inline-block; padding: 0 .45rem; border: var(--pen-1) solid var(--layer-green); border-radius: var(--radius);
  color: var(--layer-green); font-weight: 600; font-size: var(--fs-sm); white-space: nowrap;
}
.bt-claim .form-cc { max-width: none; }
