/* burns.self.app. One stylesheet for the page and the not-found page.
   Light is the base. Dark applies when the system asks for it, or when the visitor picks it (theme.js sets data-theme). */

:root {
  color-scheme: light;
  --accent: #0052ff;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --text: #1d1d1f;
  --text-2: #555c66;
  --border: #e0e0e0;
  --link: #0052ff;
  --good: #1f9d4e;
  --good-soft: rgba(31, 157, 78, 0.1);
  --grid: rgba(0, 0, 0, 0.08);
  --glow: 10%;
  --shadow: 0 8px 24px rgba(17, 24, 39, 0.12);
  /* Chart and kind colours, checked for colour-blind safety. Always shown with a word beside them. */
  --series-total: #2a78d6;
  --series-prize: #eb6834;
  --series-buyback: #1baf7a;
}
/* The same dark values twice: once for the system setting when the script has not run, once for data-theme. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0d1827;
    --surface: #091420;
    --surface-2: #0d1c2e;
    --text: #e6f3ff;
    --text-2: #8aa0b8;
    --border: #1c3a5e;
    --link: #7aa7ff;
    --good: #3ecf6e;
    --good-soft: rgba(62, 207, 110, 0.12);
    --grid: rgba(138, 160, 184, 0.18);
    --glow: 30%;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    --series-total: #3987e5;
    --series-prize: #d95926;
    --series-buyback: #199e70;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1827;
  --surface: #091420;
  --surface-2: #0d1c2e;
  --text: #e6f3ff;
  --text-2: #8aa0b8;
  --border: #1c3a5e;
  --link: #7aa7ff;
  --good: #3ecf6e;
  --good-soft: rgba(62, 207, 110, 0.12);
  --grid: rgba(138, 160, 184, 0.18);
  --glow: 30%;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  --series-total: #3987e5;
  --series-prize: #d95926;
  --series-buyback: #199e70;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { background: var(--bg); }
body { background: var(--bg); color: var(--text); font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--link); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sprite { position: absolute; }
.icon { display: inline-block; flex: 0 0 auto; vertical-align: middle; }
#i-check .tick { stroke: var(--surface); }

.page { position: relative; z-index: 0; max-width: 1120px; margin: 0 auto; padding: 0 24px 56px; }
.page::before { content: ""; position: absolute; z-index: -1; inset: 0 0 auto 0; height: 440px; pointer-events: none; background: radial-gradient(52% 100% at 50% 0%, color-mix(in srgb, var(--accent) var(--glow), transparent), transparent 72%); }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* The full SELF logo, 1819 by 566 with its own margin: black for light, white for dark. Only the one in use is fetched. */
.logo { display: block; flex: 0 0 auto; width: 116px; height: 36px; margin-left: -4px; border-radius: 6px; background: url("/SELF-FULL-BLACK.png") center / contain no-repeat; }
.brand .bar { flex: 0 0 auto; width: 1px; height: 20px; background: var(--border); }
.brand h1, .brand-title { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.top-nav { display: flex; align-items: center; gap: 16px; }
.top-nav a { color: var(--text-2); font-size: 14px; font-weight: 500; text-decoration: none; }
.top-nav a:hover { color: var(--text); }
.theme-btn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); cursor: pointer; }
.theme-btn:hover { color: var(--text); border-color: var(--link); }
.icon-sun { display: none; }
/* In dark: the white logo, and a sun on the switch. Twice, for the same reason as the colours above. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .logo { background-image: url("/SELF-FULL-WHITE.png"); }
  :root:not([data-theme]) .icon-moon { display: none; }
  :root:not([data-theme]) .icon-sun { display: block; }
}
:root[data-theme="dark"] .logo { background-image: url("/SELF-FULL-WHITE.png"); }
:root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }

/* Totals. The three layouts are all in the page; data-layout on <html> shows one. */
.mast { padding: 36px 0 0; }
.mast-a, .mast-c { display: none; }
:root[data-layout="a"] .mast-b, :root[data-layout="c"] .mast-b { display: none; }
:root[data-layout="a"] .mast-a { display: block; }
:root[data-layout="c"] .mast-c { display: grid; }
.share-off { display: none; }
:root[data-share="off"] .share { display: none; }
:root[data-share="off"] .share-off { display: inline; }

.eyebrow { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--link); }
.hero-num { margin: 10px 0 0; font-size: clamp(34px, 10.5vw, 88px); font-weight: 700; line-height: 1.04; letter-spacing: -0.035em; }
.hero-num .fig { white-space: nowrap; }
.hero-num small { font-size: 0.32em; font-weight: 600; letter-spacing: 0; color: var(--text-2); }
.hero-share { margin: 12px 0 0; font-size: 17px; color: var(--text-2); }
.hero-share b { color: var(--text); font-weight: 600; }
.lede { max-width: 560px; margin: 14px 0 0; color: var(--text-2); }
.dot { display: inline-block; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--text-2); }
.dot.prize { background: var(--series-prize); }
.dot.buyback { background: var(--series-buyback); }

.mast-a { text-align: center; }
.mast-a .lede { margin-left: auto; margin-right: auto; }
.split-inline { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.split-inline li { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 15px; color: var(--text-2); }
.split-inline b { color: var(--text); font-weight: 600; }

.mast-b .lede { max-width: none; margin: 0; font-size: 18px; }
.tiles { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 16px; margin-top: 22px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; }
.tile.total { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); }
.tile-label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 500; color: var(--text-2); }
.tile-value { margin: 8px 0 0; font-size: clamp(26px, 3.1vw, 36px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; white-space: nowrap; }
.tile-value small { font-size: 0.45em; font-weight: 600; letter-spacing: 0; color: var(--text-2); }
.tile-note { margin: 8px 0 0; font-size: 14px; color: var(--text-2); }

.mast-c { grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr); gap: 36px; align-items: center; }
.mast-c .hero-num { font-size: clamp(34px, 5.2vw, 60px); }
.split-rows { max-width: 420px; margin: 22px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.split-rows li { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 15px; color: var(--text-2); }
.split-rows b { margin-left: auto; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

.chart-card { margin: 0; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 18px 10px; }
.chart-title { margin-bottom: 8px; font-size: 15px; font-weight: 600; }
.chart-wrap { position: relative; }
.chart-wrap svg { display: block; width: 100%; height: 250px; outline-offset: 4px; border-radius: 8px; touch-action: pan-y; }
.chart-wrap .axis { font-size: 12px; fill: var(--text-2); font-variant-numeric: tabular-nums; }
.chart-wrap .grid { stroke: var(--grid); stroke-width: 1; }
.chart-wrap .line { fill: none; stroke: var(--series-total); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-wrap .area { fill: var(--series-total); opacity: 0.1; }
.chart-wrap .pt { fill: var(--series-total); stroke: var(--surface); stroke-width: 2; }
.chart-wrap .cross { stroke: var(--text-2); stroke-width: 1; }
.chart-wrap .hover.off { display: none; }
.chart-wrap .end-label { font-size: 12px; font-weight: 600; fill: var(--text); }
.chart-wrap .empty-note { font-size: 14px; fill: var(--text-2); }
.tip { position: absolute; top: 6px; left: 0; z-index: 2; pointer-events: none; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tip-date, .tip-total, .tip-row { color: var(--text-2); }
.tip-total b, .tip-row b { font-weight: 600; color: var(--text); }
.tip-row { display: flex; align-items: center; gap: 6px; }
.tip-row .key { width: 10px; height: 0; border-top: 2px solid var(--text-2); }
.tip-row .key.prize { border-top-color: var(--series-prize); }
.tip-row .key.buyback { border-top-color: var(--series-buyback); }

/* Figures while the list is on its way, and when it could not be loaded. */
main[data-state="loading"] .v { opacity: 0.35; animation: wait 1.4s ease-in-out infinite; }
main[data-state="error"] .v { color: var(--text-2); }
/* The two list controls keep their place while the list loads, so it does not jump when they appear. */
main[data-state="loading"] .controls { visibility: hidden; }
@keyframes wait { 50% { opacity: 0.15; } }

/* The burn address and the check against Ethereum. */
.proof { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 28px; align-items: start; margin-top: 40px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.proof h2 { margin: 0; font-size: 18px; font-weight: 700; }
.addr { display: block; margin-top: 12px; font-size: 16px; color: var(--text-2); }
.addr b { color: var(--text); font-weight: 600; }
.addr .gap { display: none; }
.addr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; }
.pill-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.pill-btn:hover { border-color: var(--link); }
.proof-text { margin: 14px 0 0; font-size: 14px; color: var(--text-2); max-width: 560px; }
.tally { padding: 6px 18px 16px; background: var(--surface-2); border-radius: 12px; }
.tally dl { margin: 0; }
.tally-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.tally dt { font-size: 14px; color: var(--text-2); }
.tally dd { margin: 0; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.verdict { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; padding: 9px 12px; border-radius: 10px; background: color-mix(in srgb, var(--text-2) 12%, transparent); font-size: 14px; color: var(--text-2); }
.verdict .icon { display: none; margin-top: 1px; color: var(--good); }
.verdict.is-match { background: var(--good-soft); color: var(--text); font-weight: 600; }
.verdict.is-match .icon { display: block; }
.verdict.is-waiting { visibility: hidden; }

/* The list of burns. */
.burns { margin-top: 44px; }
.burns-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 14px; }
.burns-head h2, .how h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.count { margin: 2px 0 0; font-size: 14px; color: var(--text-2); }
.controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 20px; }
.control { display: flex; align-items: center; gap: 8px; }
.control-label { font-size: 13px; color: var(--text-2); }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.seg button { padding: 6px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--text); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.kind { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.tx { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; text-decoration: none; white-space: nowrap; }
a.tx:hover { text-decoration: underline; }
.h-short { display: none; }

.sk-row { height: 72px; border-bottom: 1px solid var(--border); background: linear-gradient(var(--grid), var(--grid)) 20px 22px / 34% 12px no-repeat, linear-gradient(var(--grid), var(--grid)) 20px 44px / 22% 10px no-repeat; animation: wait 1.4s ease-in-out infinite; }
.sk-row:last-child { border-bottom: 0; }

.ledger { width: 100%; border-collapse: collapse; }
.ledger thead th { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.ledger thead th.num { text-align: right; }
.ledger td { padding: 14px; border-bottom: 1px solid var(--border); vertical-align: baseline; }
.ledger thead th:first-child, .ledger td:first-child { padding-left: 20px; }
.ledger thead th:last-child, .ledger td:last-child { padding-right: 20px; }
.ledger tbody:last-child tr:last-child td, .ledger tbody:last-child tr.month-row:last-child th { border-bottom: 0; }
.ledger tr.row:hover td { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.c-date, .c-amt, .c-usd, .c-tx { white-space: nowrap; }
.c-date, .c-usd { color: var(--text-2); }
.cov-main, .cov-extra { display: block; }
.cov-extra { font-size: 14px; color: var(--text-2); }
.c-amt { font-weight: 600; }
.c-amt .unit { display: none; }
.month-row th { padding: 0; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.month-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 20px; border: 0; background: transparent; color: var(--text); font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.month-btn .icon { color: var(--text-2); transition: transform 160ms ease; }
.month-btn[aria-expanded="true"] .icon { transform: rotate(90deg); }
.month-btn .m-count { font-weight: 500; color: var(--text-2); }
.month-btn .m-sum { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }

.feed { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.burn-card { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto auto; grid-template-areas: "date body nums tx"; gap: 4px 22px; align-items: center; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.burn-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.b-date { grid-area: date; font-size: 14px; color: var(--text-2); }
.b-body { grid-area: body; min-width: 0; }
.b-body .kind { font-size: 16px; }
.b-cov { margin: 2px 0 0; font-size: 14px; color: var(--text-2); }
.b-nums { grid-area: nums; }
.b-amt { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.b-amt small { font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--text-2); }
.b-usd { font-size: 14px; color: var(--text-2); white-space: nowrap; }
.b-tx { grid-area: tx; text-align: right; }
.month-group + .month-group { margin-top: 10px; }
.month-group .month-btn { margin-bottom: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.month-group .month-btn[aria-expanded="false"] { margin-bottom: 0; }

.more { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; margin-top: 16px; font-size: 14px; color: var(--text-2); }
.more .pill-btn { padding: 8px 18px; font-size: 14px; }
.link-btn { padding: 0; border: 0; background: none; color: var(--link); font-size: 14px; font-weight: 600; cursor: pointer; }
.list-note { margin: 14px 0 0; font-size: 13px; color: var(--text-2); }
.empty { padding: 40px 24px; text-align: center; }
.empty strong { display: block; font-size: 18px; font-weight: 700; }
.empty p { max-width: 440px; margin: 8px auto 0; color: var(--text-2); }

/* The two explanations and the footer. */
.how { margin-top: 48px; }
.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.how article { padding: 20px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.how h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; font-weight: 700; }
.how p { margin: 8px 0 0; color: var(--text-2); }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 24px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 14px; }
.foot a { color: var(--text-2); text-decoration: none; font-weight: 500; }
.foot a:hover { color: var(--text); }

/* The not-found page. */
.notfound { padding: 72px 0 24px; text-align: center; }
.notfound h1 { margin: 0; font-size: clamp(30px, 5vw, 44px); font-weight: 700; letter-spacing: -0.025em; }
.notfound p { margin: 12px 0 0; color: var(--text-2); }
.notfound .pill-btn { margin-top: 12px; padding: 8px 18px; font-size: 14px; }

@media (max-width: 1040px) {
  .h-long { display: none; }
  .h-short { display: inline; }
  .burn-card { grid-template-columns: 140px minmax(0, 1fr) auto auto; }
}
@media (max-width: 900px) {
  .mast-c { grid-template-columns: 1fr; gap: 28px; }
  .mast-c .hero-num { font-size: clamp(34px, 10.5vw, 64px); }
  .proof { grid-template-columns: 1fr; gap: 18px; }
  .tiles { grid-template-columns: 1fr; gap: 12px; }
  .tile.part { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding: 16px 18px; }
  .tile.part .tile-label { grid-column: 1; grid-row: 1; }
  .tile.part .tile-note { grid-column: 1; grid-row: 2; margin: 0; font-size: 13px; }
  .tile.part .tile-value { grid-column: 2; grid-row: 1 / 3; margin: 0; font-size: 22px; }

  /* The table turns into stacked rows. Its roles are set in the markup, so it is still read out as a table. */
  .ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ledger, .ledger tbody { display: block; }
  .ledger tr.month-row, .ledger tr.month-row th { display: block; }
  .ledger tr.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "kind amt" "cov usd" "date tx"; gap: 2px 14px; align-items: baseline; padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .ledger tbody:last-child tr.row:last-child { border-bottom: 0; }
  .ledger td, .ledger td:first-child, .ledger td:last-child { display: block; padding: 0; border: 0; }
  .ledger tr.row:hover td { background: none; }
  .c-kind { grid-area: kind; }
  .c-cov { grid-area: cov; font-size: 14px; color: var(--text-2); }
  .c-amt { grid-area: amt; }
  .c-amt .unit { display: inline; font-size: 12px; color: var(--text-2); }
  .c-usd { grid-area: usd; font-size: 14px; }
  .c-date { grid-area: date; margin-top: 8px; font-size: 13px; }
  .c-tx { grid-area: tx; margin-top: 8px; }
  .month-btn { padding: 11px 16px; }
  .sk-row { height: 104px; }

  .burn-card { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "body nums" "date tx"; gap: 8px 14px; align-items: baseline; padding: 14px 16px; }
  .b-nums { text-align: right; }
  .b-cov span { display: block; }
  .b-cov .b-sep { display: none; }
  .b-extra::first-letter { text-transform: uppercase; }
  .b-date { font-size: 13px; }
  .b-amt { font-size: 16px; }
}
@media (max-width: 640px) {
  .page { padding: 0 16px 44px; }
  .top { padding: 16px 0; }
  .top-nav { gap: 12px; }
  .mast { padding-top: 24px; }
  .hero-share { font-size: 15px; }
  .split-inline li { font-size: 14px; padding: 8px 14px; }
  .chart-wrap svg { height: 200px; }
  .proof { margin-top: 32px; padding: 18px 16px; }
  .addr .zeros { display: none; }
  .addr .gap { display: inline; }
  .tally { padding: 4px 14px 14px; }
  .tally-row { gap: 0 10px; }
  .tally dt { font-size: 13px; }
  .tally dd { font-size: 15px; }
  .burns { margin-top: 36px; }
  .burns-head h2, .how h2 { font-size: 20px; }
  .mast-b .lede { font-size: 16px; }
  .logo { width: 103px; height: 32px; }
  .brand { gap: 10px; }
  .brand h1, .brand-title { font-size: 18px; }
  .controls { width: 100%; justify-content: flex-start; }
  .control { width: 100%; }
  .control-label { flex: 0 0 34px; }
  .seg { flex: 1; }
  .seg button { flex: 1; padding: 7px 6px; }
  .how { margin-top: 40px; }
  .how-grid { grid-template-columns: 1fr; gap: 12px; }
  .how article, .tile { padding: 16px 18px; }
  .empty { padding: 32px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
