/* Treasury read-only pages (#/roster-audit, #/fundraising, #/team-fees, #/treasurer-guide). Prefix tx-.
   Builds on the BOOST Statements hero / tool classes in treasury.css (bs-hero, bs-legs, bb-tools, bs-none). */
.tx { container-type: inline-size; }
.tx-hero .tx-verdict { font-size: 26px; line-height: 1.15; }
.tx-hero .tx-verdict.bad { color: #FCA5A5; }
.tx-hero-sm .bs-hero-main b { font-size: 30px; }
.tx-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; margin: 0 0 10px; font-size: var(--fs-sm); color: var(--text-2); }
.tx-note.bad { border-left: 4px solid var(--coral-strong); } .tx-note.bad .ico { color: var(--coral-strong); }
.tx-note.warn { border-left: 4px solid var(--gold); } .tx-note.warn .ico { color: var(--amber); }
.tx-guide { padding: 0; margin: 0 0 10px; }
.tx-guide > summary { cursor: pointer; list-style: none; padding: 12px 16px; font-weight: 800; color: var(--ink); display: flex; gap: 8px; align-items: center; }
.tx-guide > summary::-webkit-details-marker { display: none; }
.tx-guide ul { margin: 0; padding: 0 22px 14px 36px; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.55; }
.tx-guide li { margin-bottom: 6px; }
.tx-card { padding: 0; overflow: hidden; margin: 0 0 12px; }
.tx-cap { display: flex; gap: 8px; align-items: center; padding: 11px 16px; background: var(--surface-2); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink); border-bottom: 1px solid var(--line); }
.tx-foot { color: var(--muted); font-size: 12px; font-weight: 600; margin: 4px 2px 24px; line-height: 1.5; }
.tx-chips { margin-bottom: 10px; }

/* Roster audit table: cards on a narrow panel, a 6-column table on a wide one */
.tx-ra { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.tx-ra.is-bad { background: color-mix(in srgb, var(--coral-soft) 45%, transparent); }
.tx-ra-head { display: none; }
.tx-ra-name { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tx-ra-name > a { color: var(--ink); text-decoration: none; } .tx-ra-name > a:hover b { text-decoration: underline; }
.tx-ra-tags { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.tx-ra-audit { display: inline-flex; gap: 4px; align-items: center; font-size: 11.5px; font-weight: 700; color: var(--muted); text-decoration: none; margin-left: 2px; }
.tx-ra-audit:hover { color: var(--ink); }
.tx-n { display: flex; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.tx-n::before { content: attr(data-l); color: var(--muted); font-size: 11.5px; font-weight: 700; }
.tx-ra-tot { background: var(--surface-2); font-weight: 800; border-bottom: 0; }
.tx-ra-tot > span:first-child { grid-column: 1 / -1; color: var(--ink); } .tx-ra-tot small { color: var(--muted); font-weight: 600; }
.tx .tx-n .pos { color: #166534; } .tx .tx-n .neg { color: #B91C1C; }
:root[data-theme="dark"] .tx .tx-n .pos { color: #4ADE80; } :root[data-theme="dark"] .tx .tx-n .neg { color: #F87171; }
@container (min-width: 760px) {
  .tx-ra { grid-template-columns: minmax(0, 2.2fr) repeat(5, minmax(84px, 1fr)); align-items: center; }
  .tx-ra-head { display: grid; background: var(--surface-2); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
  .tx-ra-head > span:not(:first-child) { text-align: right; }
  .tx-ra-name, .tx-ra-tot > span:first-child { grid-column: auto; }
  .tx-n { justify-content: flex-end; } .tx-n::before { display: none; }
}

/* Fundraising */
.tx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-bottom: 20px; }
.tx-grid > .card { margin: 0; }
.tx-fr { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.tx-fr-img { position: relative; height: 180px; border: 0; padding: 0; margin: 0; cursor: pointer; background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tx-fr-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.tx-fr-ph { width: 54px; height: 54px; color: var(--faint); opacity: .5; }
.tx-fr-pill { position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--ink); color: #fff; text-transform: uppercase; letter-spacing: .04em; }
.tx-fr-pill.upcoming { background: var(--gold); color: #3a2a00; } .tx-fr-pill.complete, .tx-fr-pill.other { background: var(--surface-3); color: var(--text-2); }
.tx-frm-meta .tx-fr-pill { position: static; }
.tx-fr-body { padding: 14px 16px 6px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.tx-fr-body h3 { margin: 0; font-family: var(--font-display); color: var(--ink); font-size: 18px; line-height: 1.25; }
.tx-fr-body p { margin: 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.6; }
.tx-fr-dates, .tx-frm-meta span:not(.pill) { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.tx-fr-foot { padding: 10px 16px 14px; display: flex; justify-content: flex-end; }
.tx-frm-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.tx-gal-main { border-radius: 14px; overflow: hidden; background: var(--surface-2); display: flex; justify-content: center; }
.tx-gal-main img { max-width: 100%; max-height: 380px; object-fit: contain; display: block; }
.tx-gal-thumbs { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 0; }
.tx-gal-thumbs button { border: 2px solid transparent; border-radius: 9px; padding: 0; background: none; cursor: pointer; flex: 0 0 auto; overflow: hidden; }
.tx-gal-thumbs button.on { border-color: var(--ink); }
.tx-gal-thumbs img { width: 78px; height: 54px; object-fit: cover; display: block; }
.tx-sec { margin: 16px 0 6px; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }

/* Team fees: a real table on a wide panel, labelled rows on a phone */
.tx-fee-row { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.tx-fee-row:last-child { border-bottom: 0; }
.tx-fee-row > span { display: flex; justify-content: space-between; gap: 10px; color: var(--text); font-weight: 600; }
.tx-fee-row > span::before { content: attr(data-l); color: var(--muted); font-size: 11.5px; font-weight: 700; }
.tx-fee-row > span:first-child { font-weight: 800; color: var(--ink); } .tx-fee-row > span:first-child::before { display: none; }
.tx-fee-head { display: none; }
@container (min-width: 700px) {
  .tx-fee-row { grid-template-columns: minmax(0, 2fr) repeat(calc(var(--c) - 1), minmax(0, 1fr)); gap: 10px; align-items: center; }
  .tx-fee-row > span { display: block; } .tx-fee-row > span::before { display: none; }
  .tx-fee-head { display: grid; background: var(--surface-2); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
  .tx-fee-head > span { color: var(--muted) !important; font-weight: 800 !important; }
}

/* Guides */
.tx-doc { padding: 22px 24px 28px; }
.tx-doc .prose { max-width: 820px; }
.tx-doc header { background: linear-gradient(135deg, #1B2159 0%, #2A327A 100%); color: #fff; border-radius: 16px; padding: 20px 22px; margin: 0 0 18px; }
.tx-doc header h1 { color: #fff; margin: 4px 0 0; font-family: var(--font-display); }
.tx-doc .kicker { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.tx-doc .prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); margin: 10px 0 16px; display: block; overflow-x: auto; }
.tx-doc .prose th, .tx-doc .prose td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: normal; word-break: normal; min-width: 72px; }
.tx-doc .prose td:first-child, .tx-doc .prose th:first-child { white-space: nowrap; }
.tx-doc .prose th { background: var(--surface-2); color: var(--ink); }
.tx-doc .prose blockquote { margin: 12px 0; padding: 10px 16px; border-left: 4px solid var(--ink); background: var(--surface-2); border-radius: 0 12px 12px 0; }
.tx-doc .prose hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0 6px; }
.tx-doc .prose main > hr:first-child { display: none; }
.tx-doc footer { margin-top: 22px; color: var(--muted); font-size: 12px; font-weight: 700; }
@media (max-width: 600px) { .tx-doc { padding: 14px 14px 20px; } .tx-doc header { padding: 16px; } }

@media print {
  .tx-chips, .bb-tools, .tx-ra-audit { display: none !important; }
  .tx-ra, .tx-fee-row, .tx-fr { break-inside: avoid; }
  .tx-doc { box-shadow: none; border: 0; padding: 0; }
}

/* Account Audit (#/acct-audit) - the live page's report in a monospace panel */
.aa-search { margin-bottom: 10px; }
.aa-picks { padding: 4px 0; margin: 0 0 12px; }
.aa-pick { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 16px; text-align: left; color: var(--text); background: none; border-bottom: 1px solid var(--line); }
.aa-pick:last-child { border-bottom: 0; }
.aa-pick b { flex: 1; } .aa-pick small { color: var(--muted); font-weight: 700; }
.aa-links { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-end; }
.aa-report { padding: 18px 20px; margin: 0 0 10px; background: #1B2159; color: #DCE3F5; overflow-x: auto; }
.aa-report pre { margin: 0; white-space: pre; font: 12.5px/1.5 ui-monospace, Menlo, Consolas, monospace; color: inherit; background: none; border: 0; padding: 0; }
.aa-report h2 { display: block; margin: 22px 0 6px; font: 800 12px/1.3 var(--font-body, system-ui); letter-spacing: .07em; text-transform: none; color: #A9B4FF; }
.aa-report .p { color: #7DD3FC; font-weight: 700; } .aa-report .f { color: #FCA5A5; font-weight: 800; }
@media print { .aa-report { background: #fff; color: #111; box-shadow: none; } .aa-report h2 { color: #1B2159; } .aa-report .p { color: #1B2159; } .aa-report .f { color: #B91C1C; } .aa-search, [data-picks] { display: none; } }
/* Account Audit picker (owner 11/13): status pills + gymnast list */
.aa-pills { margin: 0 0 12px; flex-wrap: wrap; }
.aa-n { opacity: .7; font-weight: 600; margin-left: 2px; }
.aa-grid { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0 0 16px; }
@media (min-width: 760px) { .aa-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .aa-grid { grid-template-columns: repeat(3, 1fr); } }
.aa-grid > .card { margin: 0; }
.aa-gym { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; text-align: left; color: var(--text); }
.aa-gym-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.aa-gym-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aa-gym-main small { color: var(--muted); font-size: var(--fs-sm); }
.aa-bal { font-weight: 800; white-space: nowrap; }
.aa-bal.neg { color: #E11D48; }
.aa-bal.pos { color: #059669; }
.aa-intro { margin-bottom: 12px; }
