/* A bounty bill's page (GET /bill/<id>, lib/pilot/bills.mjs; Wave 33). Built on site.css's tokens: one card, a
   receipt's calm. No inline style or script anywhere on the page (CSP style-src 'self', script-src 'self'). */
.bill { padding-top: 1.6rem; padding-bottom: 2rem; }
.bill-card { max-width: 46rem; background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: 1.6rem 1.4rem 1.2rem; }
@media (min-width: 720px) { .bill-card { padding: 2.2rem 2.4rem 1.6rem; } }
.bill-card section { border-top: 1px solid var(--rule); padding: 1.3rem 0 0.4rem; }
.bill-card h1 { font-size: clamp(1.6rem, 5.4vw, 2.4rem); margin-bottom: 0.6rem; overflow-wrap: anywhere; }
.bill-card h2 { font: 400 0.75rem/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dust); margin: 0 0 0.6rem; }
.bill-card h3 { font: 400 0.75rem/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dust); margin: 1.2rem 0 0.6rem; }
.bill-card p { overflow-wrap: anywhere; }

/* the head: what it pays, for what, where */
.bill-head { padding-bottom: 1rem; }
.bill-head .eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6em; }
.stage { font: 400 0.72rem/1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; border: 1px solid var(--rule-strong); border-radius: 999px; padding: 0.2em 0.7em; color: var(--line); }
.stage-open { border-color: var(--live); color: var(--live); }
.stage-awarded, .stage-transferred_second_hand, .stage-redeemed_at_counter { border-color: var(--work); color: var(--work); }
.stage-withdrawn, .stage-expired { color: var(--dust); }
.amount { font: 300 clamp(2.6rem, 11vw, 4.2rem)/1 var(--sans); letter-spacing: -0.02em; margin: 0.2rem 0 0.9rem; font-variant-numeric: tabular-nums; }
.ref { color: var(--dust); margin: 0; }
.ref a { font-family: var(--mono); font-size: 0.95em; }

/* the facts, as a receipt's lines */
.bill-card .facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; padding: 0.4rem 0; border-top: 1px solid var(--rule); }
.bill-card .facts div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1rem; padding: 0.55rem 0; border-bottom: 1px dashed var(--rule); }
.bill-card .facts div:last-child { border-bottom: 0; }
.bill-card .facts dt { font: 400 0.75rem/1.6 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dust); margin: 0; }
.bill-card .facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .bill-card .facts div { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; } }

/* the counter and the cover */
.badges { list-style: none; margin: 1rem 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .badges { grid-template-columns: minmax(0, 1fr); } }
.badge { border: 1px solid var(--rule-strong); border-radius: 4px; padding: 0.7rem 0.9rem; display: flex; flex-direction: column; gap: 0.2rem; }
.badge .label { font: 400 0.72rem/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dust); }
.badge .value { font-size: 0.98rem; }
.badge.counter:not(.none) { border-color: var(--live); }
.badge.cover:not(.none) { border-color: var(--work); }
.badge.none .value { color: var(--dust); }

/* the lifecycle: four steps, done or not yet */
.lifecycle { list-style: none; margin: 1.2rem 0 1.4rem; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; counter-reset: step; }
.lifecycle li { position: relative; display: flex; flex-direction: column; gap: 0.45rem; font-size: 0.88rem; color: var(--dust); padding-top: 0.2rem; }
.lifecycle li::before { content: ""; position: absolute; top: 0.62rem; left: 0.75rem; right: -8px; height: 2px; background: var(--rule); }
.lifecycle li:last-child::before { display: none; }
.lifecycle .dot { position: relative; width: 0.95rem; height: 0.95rem; border-radius: 50%; border: 2px solid var(--rule-strong); background: var(--space); }
.lifecycle li.done { color: var(--line); }
.lifecycle li.done .dot { border-color: var(--live); background: var(--live); }
.lifecycle li.done::before { background: var(--live); }
@media (max-width: 560px) { .lifecycle { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; } .lifecycle li::before { display: none; } }
.ended { color: var(--caution); }

/* commands to copy: one click selects the whole command */
.bill-cmd { margin: 0 0 1rem; background: var(--space); color: var(--line); border: 1px solid var(--rule); border-radius: 3px; padding: 12px 14px; overflow-x: auto; font-size: 0.86rem; line-height: 1.5; }
.bill-cmd code { user-select: all; -webkit-user-select: all; white-space: pre; }

/* the disclosure and where it comes from */
.honesty { border-top: 1px solid var(--rule); padding-top: 1rem; margin-top: 1.2rem; color: var(--dust); font-size: 0.88rem; }
.bill-card .provenance { color: var(--dust); font-size: 0.85rem; margin: 0; overflow-wrap: anywhere; }
.bill-card .provenance a { color: var(--dust); }
.bill .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* the index of bills (GET /bills, lib/pilot/discovery.mjs; Wave 35): one card, a list of bills; a filter row; who runs
   each issuer as site.css's .tag */
.bill-card.index-card { max-width: 60rem; }
.index .notice { color: var(--line); border-left: 2px solid var(--rule-strong); padding: 0.2rem 0 0.2rem 0.9rem; margin: 1rem 0 0.8rem; }
.index .notice .toggle { white-space: nowrap; }
.index .filters ul { list-style: none; margin: 0.4rem 0 0.6rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.9rem; }
.index .filters a { color: var(--dust); display: inline-block; padding: 0.35rem 0; }
.index .filters a[aria-current="page"] { color: var(--line); text-decoration-color: var(--dust); }
.index .summary { color: var(--dust); font-size: 0.9rem; margin: 0; }
.index .empty { color: var(--dust); border-top: 1px solid var(--rule); padding-top: 1rem; }
.index-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.index-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.4rem 1.2rem; padding: 1.1rem 0; border-bottom: 1px dashed var(--rule); }
.index-item:last-child { border-bottom: 0; }
@media (max-width: 560px) { .index-item { grid-template-columns: minmax(0, 1fr); } }
.index-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5em; margin: 0 0 0.5rem; }
.bill-card .index-title { font: 400 1.15rem/1.35 var(--sans); letter-spacing: 0; text-transform: none; color: var(--line); margin: 0 0 0.3rem; overflow-wrap: anywhere; }
.index-title a { color: var(--line); }
.index-redeem, .index-cover { margin: 0.3rem 0 0; font-size: 0.94rem; }
.index-redeem .label { font: 400 0.72rem/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dust); margin-right: 0.4em; }
.index-cover { color: var(--dust); }
.index-cover.active { color: var(--work); }
.index-amount { font: 300 1.6rem/1.1 var(--sans); font-variant-numeric: tabular-nums; margin: 0; white-space: nowrap; }

/* the badge to embed (Wave 36): a live preview of /badge/bill/<id>.svg above the Markdown that embeds it */
.bill-card .badge-wrap { margin: 0.2rem 0 0.8rem; line-height: 0; }
.badge-preview { display: inline-block; height: 20px; width: auto; max-width: 100%; vertical-align: middle; }

/* Public PR pre-flight: ordinary HTML forms, usable without scripts. */
.pr-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 1rem 0 1.4rem; }
.pr-form label { flex-basis: 100%; font-size: 0.9rem; color: var(--dust); }
.pr-input { flex: 1 1 20rem; min-width: 0; padding: 0.65rem 0.8rem; border: 1px solid var(--rule-strong); border-radius: 3px; background: var(--space); color: var(--line); font: inherit; }
.pr-form button { padding: 0.65rem 1rem; border: 1px solid var(--live); border-radius: 3px; background: var(--space); color: var(--live); font: inherit; cursor: pointer; }
.pr-input:focus-visible, .pr-form button:focus-visible { outline: 2px solid var(--live); outline-offset: 3px; }
.verdict-clean { color: var(--live); }
.verdict-flagged { color: var(--caution); }
