/* A Standing Redemption Counter's page (GET /counter/<handle>, lib/pilot/badges.mjs; Wave 34). Built on site.css's
   tokens, the bill page's card. No inline style or script anywhere on the page (CSP style-src 'self', script-src 'self'). */
.counter { padding-top: 1.6rem; padding-bottom: 2rem; }
.counter-card { max-width: 52rem; background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: 1.6rem 1.4rem 1.2rem; }
@media (min-width: 720px) { .counter-card { padding: 2.2rem 2.4rem 1.6rem; } }
.counter-card section { border-top: 1px solid var(--rule); padding: 1.3rem 0 0.4rem; }
.counter-card h1 { font-size: clamp(1.6rem, 5.4vw, 2.4rem); margin-bottom: 0.6rem; overflow-wrap: anywhere; }
.counter-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; }
.counter-card p { overflow-wrap: anywhere; }

/* the head: whose counter, its state, what it costs */
.counter-head { padding-bottom: 1rem; }
.counter-head .eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6em; }
.counter .state { 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(--dust); }
.counter .state-active { border-color: var(--live); color: var(--live); }
.counter .amount { font: 300 clamp(2.4rem, 10vw, 3.8rem)/1 var(--sans); letter-spacing: -0.02em; margin: 0.2rem 0 0.9rem; font-variant-numeric: tabular-nums; }
.counter .lede { color: var(--line); margin: 0; }
.counter .ended { color: var(--caution); margin: 0.8rem 0 0; }

/* the services: a table that scrolls on its own on a narrow screen */
.counter .table-wrap { overflow-x: auto; }
.services-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.services-table th, .services-table td { text-align: left; vertical-align: top; padding: 0.55rem 0.8rem 0.55rem 0; border-bottom: 1px dashed var(--rule); overflow-wrap: anywhere; }
.services-table thead th { font: 400 0.72rem/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dust); border-bottom: 1px solid var(--rule); }
.services-table tbody tr:last-child th, .services-table tbody tr:last-child td { border-bottom: 0; }
.services-table .price { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* the record: queue, honored, dishonored */
.counter .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0.2rem 0 1rem; }
@media (max-width: 560px) { .counter .stats { grid-template-columns: minmax(0, 1fr); } }
.counter .stats div { border: 1px solid var(--rule-strong); border-radius: 4px; padding: 0.7rem 0.9rem; }
.counter .stats dt { font: 400 0.72rem/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dust); margin: 0 0 0.2rem; }
.counter .stats dd { margin: 0; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.counter .stats .honored { color: var(--live); }
.counter .stats .dishonored { color: var(--caution); }

/* the command to copy: one click selects all of it */
.counter-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; }
.counter-cmd code { user-select: all; -webkit-user-select: all; white-space: pre; }

/* what a verifier checks */
.counter .proof { margin: 0 0 1rem; }
.counter .proof div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem; padding: 0.45rem 0; border-bottom: 1px dashed var(--rule); }
.counter .proof div:last-child { border-bottom: 0; }
.counter .proof dt { font: 400 0.75rem/1.6 var(--mono); color: var(--dust); margin: 0; }
.counter .proof dd { margin: 0; overflow-wrap: anywhere; font-size: 0.86rem; }
@media (max-width: 560px) { .counter .proof div { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; } }

/* the disclosure and where it comes from */
.counter .honesty { border-top: 1px solid var(--rule); padding-top: 1rem; margin-top: 1.2rem; color: var(--dust); font-size: 0.88rem; }
.counter .provenance { color: var(--dust); font-size: 0.85rem; margin: 0; }
.counter .provenance a { color: var(--dust); }

/* the index of counters (GET /counters, lib/pilot/discovery.mjs; Wave 35): one card, a list of counters; a filter row;
   who runs each issuer as site.css's .tag */
.counter-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 { padding: 1.1rem 0; border-bottom: 1px dashed var(--rule); }
.index-item:last-child { border-bottom: 0; }
.index-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5em; margin: 0 0 0.5rem; }
.counter-card .index-title { font: 400 1.15rem/1.35 var(--sans); letter-spacing: 0; text-transform: none; color: var(--line); margin: 0 0 0.4rem; overflow-wrap: anywhere; }
.index-title a { color: var(--line); }
.index-services { list-style: none; margin: 0 0 0.6rem; padding: 0; font-size: 0.94rem; }
.index-services li { padding: 0.2rem 0; overflow-wrap: anywhere; }
.index-services .price { font-variant-numeric: tabular-nums; white-space: nowrap; margin: 0 0.5em; }
.index-services .svc-title { color: var(--dust); }
.index-stats { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; margin: 0 0 0.7rem; }
.index-stats div { display: flex; gap: 0.5em; align-items: baseline; }
.index-stats dt { font: 400 0.72rem/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dust); margin: 0; }
.index-stats dd { margin: 0; font-variant-numeric: tabular-nums; }
.index-stats .honored { color: var(--live); }
.index-stats .dishonored { color: var(--caution); }
.index .counter-cmd { margin-bottom: 0.4rem; }
.index-id { margin: 0; font-size: 0.8rem; color: var(--dust); overflow-wrap: anywhere; }

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