/* ==========================================================================
   Transparency page, sign tint (plain slate). Loaded only on
   /transparency. Tokens, the --th-* theme variables, the .hud-pane family and
   the ax- utilities come from site.css (do not redefine them here).

   One pane ("ledger.log"): the intro is a readme window, every donation is a
   flat window (the h2 is its dark title strip, the status is a small
   square-bullet label at its right), the totals are readouts (a darker bar, a
   mono label and a big light figure), receipts are outlined buttons (dashed =
   not published yet). 8px grid, no gradients, shadows or radius.
   ========================================================================== */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--hdr-gap) var(--yh-g) 8px;
}
.ledger-pane {
  max-width: 960px;
}
.ledger-pane .hud-pane__body {
  --pane-pad: 24px;
}
.ledger-pane :focus-visible {
  outline: 2px solid var(--th-ink);
  outline-offset: 2px;
}

/* ---------- readme.txt: the intro window ---------- */

.page-header {
  position: relative;
  margin-bottom: 24px;
  padding: calc(32px + 24px) 24px 24px;
  border: 1px solid var(--th-ink);
  background: var(--th-bg2);
  color: var(--th-ink);
}
.page-header::before {
  content: "readme.txt";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 32px;
  padding: 0 12px 0 30px;
  background: var(--th-chrome-a);
  color: var(--th-chrome-ink);
  font-family: var(--hud-mono);
  font-size: 0.72rem;
  line-height: 1.2;
}
.page-header::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 12px;
  width: 6px;
  height: 6px;
  background: var(--th-tint-deep);
}
.page-header h1 {
  margin-bottom: 16px;
  color: var(--th-ink);
  font-family: var(--hud-display);
  font-size: clamp(1.25rem, 3.8vw, 1.9rem);
  font-weight: 300;
  letter-spacing: 0.1em;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}
.page-header p {
  max-width: 720px;
  color: var(--th-ink);
  font-size: 1rem;
  line-height: 1.7;
}

/* ---------- donation sections = windows (h2 is the title strip) ---------- */

.donation-section,
.info-box {
  --pad: 24px;
  margin-bottom: 24px;
  padding: var(--pad);
  overflow: hidden;
  border: 1px solid var(--th-ink);
  background: var(--th-panel);
  color: var(--th-ink);
}
.donation-section h2,
.info-box h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  min-height: 32px;
  margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) var(--pad);
  padding: 4px 12px;
  background: var(--th-chrome-a);
  color: var(--th-chrome-ink);
  font-family: var(--hud-display);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.donation-section h2::before,
.info-box h3::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--th-tint-deep);
}

/* status label: a hollow / filled square bullet and a mono word, at the right
   end of the title strip. The variants differ in the bullet AND in wording. */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 0 8px;
  border: 1px solid rgba(244, 247, 250, 0.55);
  color: var(--th-chrome-ink);
  font-family: var(--hud-mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.9;
  text-transform: none;
}
.status-badge::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border: 1px solid var(--led, var(--th-chrome-ink));
  background: var(--led-fill, transparent);
}
.status-completed {
  --led: var(--yh-green);
  --led-fill: var(--yh-green);
}
.status-ongoing {
  --led: var(--yh-blue);
  --led-fill: var(--yh-blue);
}
.status-upcoming {
  --led: var(--th-chrome-ink);
  --led-fill: transparent;
}

/* ---------- label / value rows ---------- */

.donation-info {
  margin-bottom: 16px;
}
.donation-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--th-rule);
  font-size: 1rem;
}
.donation-row:first-child {
  border-top: 1px solid var(--th-rule);
}
.donation-label {
  color: var(--th-ink-soft);
  font-family: var(--hud-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.donation-value {
  color: var(--th-ink);
  font-weight: 700;
  text-align: right;
}

/* the "total donated" line: an inverted bar with an accent edge */
.donation-info--grand {
  margin: 16px 0 0;
}
.donation-row--grand {
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--th-ink);
  background: var(--th-ink);
  box-shadow: inset 3px 0 0 var(--yh-accent-hi);
}
.donation-row--grand:first-child {
  border-top: 1px solid var(--th-ink);
}
.donation-row--grand .donation-label {
  color: var(--th-on-accent);
  font-size: 0.8rem;
}
.donation-row--grand .donation-value {
  color: var(--th-on-accent);
  font-family: var(--hud-display);
  font-size: 1.45rem;
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* ---------- donation totals: a darker bar, a mono label, a big light figure ---------- */

.donation-total {
  margin: 16px 0;
  padding: 16px 16px 16px 24px;
  position: relative;
  background: var(--th-soft);
  color: var(--th-ink);
}
.donation-total::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--th-tint-deep);
}
.donation-total-label {
  margin-bottom: 8px;
  color: var(--th-ink-soft);
  font-family: var(--hud-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}
.donation-total-amount {
  color: var(--th-ink);
  font-family: var(--hud-display);
  font-size: clamp(1.5rem, 5.2vw, 2.3rem);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

/* ---------- foundation block ---------- */

.foundation-info {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--th-rule);
  box-shadow: inset 3px 0 0 var(--th-ink);
  padding-left: 24px;
  background: var(--th-bg2);
}
.foundation-info h3 {
  margin-bottom: 8px;
  color: var(--th-ink-soft);
  font-family: var(--hud-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.foundation-info p {
  color: var(--th-ink);
  font-size: 1rem;
  line-height: 1.7;
}
.foundation-info a {
  color: var(--th-ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--yh-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.foundation-info a:hover {
  background: var(--th-ink);
  color: var(--th-on-accent);
}

/* ---------- receipt links: buttons (disabled = flat, dashed, dimmed) ---------- */

.receipt-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--th-rule);
}
.receipt-link,
.receipt-link-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8em;
  min-height: 40px;
  padding: 0.5em 16px;
  border: 1px solid var(--th-ink);
  border-radius: 0;
  font-family: var(--hud-mono);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.receipt-link::before,
.receipt-link-secondary::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  background: currentColor;
}
/* primary: filled ink, an accent square, hover = the accent */
.receipt-link {
  background: var(--th-ink);
  color: var(--th-on-accent);
}
.receipt-link::before {
  background: var(--yh-accent-hi);
}
.receipt-link:hover {
  border-color: var(--yh-accent);
  background: var(--yh-accent);
  color: var(--yh-on-accent);
}
.receipt-link:hover::before {
  background: currentColor;
}
/* secondary: outlined, hover = invert */
.receipt-link-secondary {
  background: transparent;
  color: var(--th-ink);
}
.receipt-link-secondary:hover {
  background: var(--th-ink);
  color: var(--th-on-accent);
}
/* disabled (declared last; hover/active repeated so they cannot undo it) */
.receipt-link-disabled,
.receipt-link-disabled:hover,
.receipt-link-disabled:active {
  border: 1px dashed var(--th-ink-soft);
  background: transparent;
  color: var(--th-ink-soft);
  cursor: not-allowed;
}
.receipt-link-disabled::before {
  background: transparent;
  border: 1px solid currentColor;
}

/* ---------- footer-of-page notes ---------- */

.last-updated {
  max-width: 560px;
  margin: 0 auto 24px;
  padding: 12px 16px;
  border: 1px dashed var(--th-ink-soft);
  background: transparent;
  color: var(--th-ink);
  font-family: var(--hud-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  text-align: center;
}

.info-box p {
  color: var(--th-ink);
  font-size: 1rem;
  line-height: 1.7;
}
.info-box p + p {
  margin-top: 0.8em;
}

/* ---------- small screens ---------- */

@media (max-width: 768px) {
  .ledger-pane .hud-pane__body { --pane-pad: 12px; }
  .page-header { padding: calc(32px + 16px) 16px 16px; }
  .donation-section,
  .info-box { --pad: 16px; }
}
@media (max-width: 560px) {
  .donation-row { flex-direction: column; gap: 2px; }
  .donation-value { text-align: left; }
  .status-badge { margin-left: 0; }
  .receipt-link,
  .receipt-link-secondary { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .receipt-link,
  .receipt-link-secondary {
    transition: none;
  }
}
