/* Trickle Down — a coin you carve. */

:root {
  --porcelain: #EDF1F2;
  --paper: #F7F9FA;
  --ink: #0F2430;
  --mud: #5A6B73;
  --line: #C9D4D9;
  --water: #1879A0;
  --water-deep: #125D7B;
  --shallow: #CDE4EB;
  --rise: #1E7A5B;
  --sink: #B0412E;
  --rise-tint: #D4EBDF;
  --sink-tint: #F1D8D2;
  --bill: #3F7D55;
  --bill-deep: #2B5A3C;
  --bill-light: #DCEBDF;

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 3px;
  --gutter: 16px;
  --max: 540px;
  --coin: min(86vw, 340px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--porcelain);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  font-feature-settings: "tnum" 1;
}
a { color: var(--water); }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; }
p { margin: 0 0 0.75em; }
.muted { color: var(--mud); }
[hidden] { display: none !important; }
.up { color: var(--rise); }
.down { color: var(--sink); }

/* Masthead ---------------------------------------------------------------- */

.masthead {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--gutter) 6px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.wordmark {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 900;
  font-size: 40px;
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  padding-bottom: 10px;
}
.wordmark-drip {
  position: absolute;
  right: -2px;
  bottom: -4px;
  width: 9px;
  height: 13px;
  fill: var(--water);
  transform-origin: 50% 0;
  animation: drip 2.6s ease-in 0.6s 1 both;
}
@keyframes drip {
  0%   { transform: translateY(0) scaleY(0.4); opacity: 0; }
  20%  { transform: translateY(0) scaleY(1); opacity: 1; }
  60%  { transform: translateY(0) scaleY(1.15); opacity: 1; }
  100% { transform: translateY(16px) scaleY(1); opacity: 0; }
}
.masthead-day { text-align: right; font-size: 14px; line-height: 1.3; padding-bottom: 12px; }
.masthead-day span { display: block; }
#day-number { font-family: var(--display); font-weight: 700; font-size: 20px; }

/* Tabs ---------------------------------------------------------------------- */

.tabs {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
}
.tabs a {
  padding: 8px 0 10px;
  text-decoration: none;
  color: var(--mud);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs a.active { color: var(--ink); border-color: var(--water); }
.tabs a:focus-visible { outline: 2px solid var(--water); outline-offset: 2px; }

/* Screens ------------------------------------------------------------------ */

main { max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter) 40px; }
.screen > h1 { font-family: var(--display); font-weight: 700; font-size: 30px; margin-bottom: 4px; }
.lede { color: var(--mud); max-width: 46ch; }

/* The coin ------------------------------------------------------------------- */

.coin-stage { display: flex; flex-direction: column; align-items: center; position: relative; perspective: 1200px; }
.coin {
  width: var(--coin);
  height: var(--coin);
  perspective: 1100px;
  margin: 4px 0 10px;
  filter: drop-shadow(0 6px 10px rgba(15, 36, 48, 0.18));
  transform-style: preserve-3d;
}
/* The day's first load: tossed in, spinning on its horizontal axis, lands with a bounce. */
.coin.landing { animation: toss 1500ms cubic-bezier(.25,.6,.25,1) both; }
@keyframes toss {
  0%   { transform: translateY(-160px) rotateX(0deg) rotateZ(-6deg) scale(0.55); opacity: 0; }
  12%  { opacity: 1; }
  58%  { transform: translateY(0) rotateX(1080deg) rotateZ(0deg) scale(1.03); }
  72%  { transform: translateY(-16px) rotateX(1080deg) scale(1); }
  86%  { transform: translateY(0) rotateX(1080deg) scale(1); }
  93%  { transform: translateY(-4px) rotateX(1080deg) scale(1); }
  100% { transform: translateY(0) rotateX(1080deg) rotateZ(0deg) scale(1); opacity: 1; }
}
.coin-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 780ms cubic-bezier(.3,.7,.2,1);
}
.coin.flipped .coin-inner { transform: rotateY(180deg); }
.coin-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 50%;
}
.coin-face.back { transform: rotateY(180deg); }
.coin-svg { width: 100%; height: 100%; display: block; }

/* The coin body: a milled edge, a raised rim, a field, and an inset centre. */
.coin-edge { fill: #D9E1E4; stroke: #9FB0B8; stroke-width: 1; }
.coin-reed { fill: none; stroke: #8EA3AC; stroke-width: 7; stroke-dasharray: 1.6 2.2; }
.coin-rim { fill: #E6ECEE; stroke: #B6C4CA; stroke-width: 1; }
.coin-field { fill: var(--paper); stroke: #C9D4D9; stroke-width: 1; }
.coin-hole { fill: #E3E9EB; stroke: #B6C4CA; stroke-width: 1; }
.coin-hole-inner { fill: var(--porcelain); stroke: #fff; stroke-width: 1; }
.coin-edge.back { fill: #1C3340; stroke: #0B1A22; }
.coin-reed.back { stroke: #0B1A22; }
.coin-rim.back { fill: #223B49; stroke: #0B1A22; }
.coin-field.back { fill: var(--ink); stroke: #2B4654; }
.coin-hole.back { fill: #1A2F3B; stroke: #2B4654; }
.coin-hole-inner.back { fill: var(--ink); stroke: #2B4654; }
.coin-empty-ring { fill: none; stroke: var(--line); stroke-width: 60; stroke-dasharray: 2 6; }
.coin-empty-ring.back { stroke: #2B4654; }

.wedge { stroke: var(--paper); stroke-width: 2; cursor: pointer; transition: opacity 150ms, stroke 150ms; }
.wedge.matured { stroke: #C9A227; stroke-width: 3; }
.wedge:hover, .wedge:focus-visible { opacity: 0.82; outline: none; }
.wedge-label { font-family: var(--display); font-weight: 700; pointer-events: none; fill: var(--ink); }
.wedge-label .wl-ticker { font-size: 18px; letter-spacing: 0.02em; }
.wedge-label .wl-sub { font-size: 15px; font-weight: 700; }
.wedge-label.light { fill: #fff; }
.wedge-label.back { fill: var(--shallow); }
.wedge-label.back .wl-ticker { font-size: 15px; font-weight: 700; }
.wedge-label.back .wl-sub { fill: #fff; font-size: 13px; }

.cash-sector { fill: var(--paper); cursor: pointer; outline: none; }
.cash-sector:hover, .cash-sector:focus-visible { fill: #F0F4F5; }

/* Hover card for a wedge or the bills */
.coin-tip {
  position: absolute; z-index: 5; pointer-events: none;
  transform: translate(-50%, calc(-100% - 10px));
  background: var(--ink); color: #fff; border-radius: 4px;
  padding: 8px 10px; font-size: 13px; line-height: 1.35; max-width: 220px;
  box-shadow: 0 2px 8px rgba(15, 36, 48, 0.25);
}
.coin-tip b { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: 0.02em; }
.coin-tip .tip-money { font-family: var(--display); font-weight: 700; font-size: 16px; }
.coin-tip .up { color: #8FE0BE; }
.coin-tip .down { color: #F0A290; }
.coin-tip .time { color: var(--shallow); }
.coin-tip .ready { color: #F2D06B; font-weight: 600; }
.bill rect { fill: var(--bill); stroke: var(--bill-deep); stroke-width: 1; }
.bill .bill-inner { fill: none; stroke: var(--bill-light); stroke-opacity: 0.55; stroke-width: 1; }
.bill .bill-text { fill: var(--bill-light); font-family: var(--display); font-weight: 900; font-size: 13px; pointer-events: none; }
.bill { pointer-events: none; }
.preview-slice {
  fill: rgba(24, 121, 160, 0.14);
  stroke: var(--water);
  stroke-width: 2.5;
  stroke-dasharray: 6 5;
  pointer-events: none;
  animation: march 900ms linear infinite;
}
@keyframes march { to { stroke-dashoffset: -11; } }

.bwedge { stroke: var(--ink); stroke-width: 2; }
.bwedge.b0 { fill: #1879A0; } .bwedge.b1 { fill: #2C9BC4; } .bwedge.b2 { fill: #0F5873; }
.bwedge.b3 { fill: #63B6D3; } .bwedge.b4 { fill: #1B6E8C; } .bwedge.b5 { fill: #9ED3E4; }
.back-emblem { fill: var(--water); opacity: 0.9; }

.coin-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; pointer-events: none;
  padding: 0 calc(var(--coin) * 0.28);
}
.coin-center b { font-family: var(--display); font-weight: 900; font-size: calc(var(--coin) * 0.115); line-height: 0.9; letter-spacing: 0.005em; }
.coin-center b small { font-size: 0.55em; vertical-align: top; font-weight: 700; }
.coin-center span { font-size: 12px; color: var(--mud); margin-top: 4px; line-height: 1.25; }
.coin-center .free { font-weight: 600; color: var(--ink); }
.coin-face.back .coin-center b { color: #fff; }
.coin-face.back .coin-center span { color: var(--shallow); }
.coin-tap { position: absolute; inset: 30% 30%; border-radius: 50%; background: none; border: 0; cursor: pointer; padding: 0; }
.coin-tap:focus-visible { outline: 2px solid var(--water); }

.coin-caption {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  width: 100%; font-size: 14px; color: var(--mud); margin-bottom: 14px;
}
.coin-caption .streak { color: var(--ink); font-weight: 500; }

/* Carving a slice ------------------------------------------------------------- */

.carve { border-top: 2px solid var(--ink); padding-top: 12px; margin-bottom: 18px; }
.carve h2 { font-family: var(--display); font-weight: 700; font-size: 24px; margin-bottom: 6px; }
.carve .hint { font-size: 14px; color: var(--mud); margin-bottom: 10px; }
.picker { position: relative; margin-bottom: 10px; }
.picker .asset-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 6; margin: 4px 0 0; box-shadow: 0 6px 16px rgba(15, 36, 48, 0.15); }
.picked {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "main change" "q change";
  gap: 2px 12px; align-items: center;
  border: 1.5px solid var(--water); border-radius: var(--radius); background: #fff; padding: 8px 12px;
}
.picked-main { grid-area: main; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.picked-main b { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: 0.02em; }
.picked-main .mood { font-size: 12px; color: var(--mud); }
.picked-main .mood.Spicy { color: #9A5A12; }
.picked-main .mood.Unhinged { color: var(--sink); }
.picked .q { grid-area: q; font-size: 14px; color: var(--mud); }
.picked .q b { color: var(--ink); font-family: var(--display); font-size: 18px; font-weight: 700; }
.picked .linkish { grid-area: change; font-size: 14px; }
.amount-zone { margin-bottom: 10px; animation: fade 220ms ease-out; }
.amount-row { position: relative; margin-bottom: 8px; }
.amount-prefix {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--mud); pointer-events: none;
}
.amount-row input[type="number"] { font-family: var(--display); font-weight: 700; font-size: 26px; padding-left: 32px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.chips button {
  padding: 6px 12px; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; cursor: pointer; font-size: 14px;
}
.chips button:hover, .chips button.on { border-color: var(--water); }
.chips button.on { background: var(--shallow); }
.asset-list {
  list-style: none; margin: 0 0 10px; padding: 0;
  max-height: 216px; overflow: auto;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff;
}
.asset-list li {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center;
  padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--porcelain);
}
.asset-list li:hover, .asset-list li[aria-selected="true"] { background: var(--shallow); }
.asset-list b { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: 0.02em; }
.asset-list .mood { font-size: 12px; color: var(--mud); }
.asset-list .mood.Spicy { color: #9A5A12; }
.asset-list .mood.Unhinged { color: var(--sink); }
.asset-list .nothing { padding: 12px; color: var(--mud); cursor: default; display: block; }
.quote-line {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  font-size: 14px; margin: 0 0 10px; color: var(--mud);
}
.quote-line b { color: var(--ink); font-family: var(--display); font-size: 18px; font-weight: 700; }
.all-in { border-top: 2px solid var(--ink); padding: 12px 0 0; margin-bottom: 18px; }
.all-in b { font-family: var(--display); font-weight: 700; font-size: 24px; display: block; }

/* Positions legend ------------------------------------------------------------- */

.legend { margin-bottom: 18px; }
.legend h2 { font-size: 14px; font-weight: 500; color: var(--mud); margin-bottom: 4px; }
.positions { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.position {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  grid-template-areas: "swatch ticker value" "swatch move action";
  gap: 4px 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.position .swatch { grid-area: swatch; width: 12px; height: 12px; border-radius: 2px; background: var(--shallow); }
.position.up .swatch { background: var(--rise-tint); box-shadow: inset 0 0 0 1.5px var(--rise); }
.position.down .swatch { background: var(--sink-tint); box-shadow: inset 0 0 0 1.5px var(--sink); }
.position.busted .swatch { background: var(--ink); }
.position.fresh { animation: settle 700ms ease-out; }
@keyframes settle { from { background: var(--shallow); } to { background: transparent; } }
.ticker { grid-area: ticker; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ticker b { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: 0.02em; }
.ticker span { color: var(--mud); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.value { grid-area: value; text-align: right; font-size: 14px; white-space: nowrap; }
.value b { font-family: var(--display); font-weight: 700; font-size: 20px; }
.move { grid-area: move; font-size: 13px; color: var(--mud); }
.move .arrow { margin: 0 3px; }
.move .yours { font-weight: 600; }
.action { grid-area: action; text-align: right; }
.position.busted .ticker b { text-decoration: line-through; text-decoration-color: var(--sink); }
.position.busted .value b { color: var(--sink); }
.position.stale .value { color: var(--mud); }
.position.matured .swatch { box-shadow: inset 0 0 0 1.5px #C9A227, 0 0 0 2px #F2D06B; }
.position .ready { color: #8A6A0C; font-weight: 600; }
.position .time { white-space: nowrap; }
.value .yours { font-size: 13px; font-weight: 600; margin-left: 2px; }

/* Lobbyists ---------------------------------------------------------------------- */

.lobbyists { display: inline-flex; flex-wrap: wrap; align-items: flex-start; gap: 3px; vertical-align: middle; }
.lobbyist { width: 15px; height: 30px; fill: var(--ink); flex: none; }
.lobbyist .tie { fill: var(--water); }
.lobbyist .case { fill: #6B4A1E; }
.lobbyists.mini .lobbyist { width: 10px; height: 20px; }
.lobbyists .more { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--mud); align-self: center; margin-left: 2px; }
.lobbyists.mini .more { font-size: 13px; }
.lobby-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 14px; }
.lobby-row b { font-family: var(--display); font-weight: 900; font-size: 34px; line-height: 1; }

/* Back of the coin: records ----------------------------------------------------- */

.records h2 { font-family: var(--display); font-weight: 700; font-size: 24px; margin: 4px 0 6px; }
.records .rank { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.records .rank b { font-family: var(--display); font-weight: 900; font-size: 30px; }
.rank-bar { height: 10px; background: var(--shallow); border-radius: 2px; overflow: hidden; margin: 6px 0 4px; }
.rank-bar i { display: block; height: 100%; width: var(--w, 0%); background: var(--water); transition: width 900ms cubic-bezier(.2,.8,.2,1); }
.rank-line { font-size: 14px; color: var(--mud); margin-bottom: 14px; }
.given { list-style: none; margin: 0 0 16px; padding: 0; font-size: 14px; }
.given li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); align-items: center; }
.given .sw { width: 12px; height: 12px; border-radius: 2px; margin-right: 8px; display: inline-block; vertical-align: -1px; }
.given b { font-family: var(--display); font-weight: 700; font-size: 18px; }
.history { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.history li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.history .tier { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: 0.02em; }
.history .to { color: var(--mud); text-align: right; }
.under { animation: fade 260ms ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

/* Buttons -------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 14px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn.primary { background: var(--water); border-color: var(--water); color: #fff; }
.btn.primary:hover { background: var(--water-deep); border-color: var(--water-deep); }
.btn.small { padding: 6px 10px; font-size: 14px; }
.btn.wide { width: 100%; padding: 12px 14px; font-size: 17px; }
.btn.quiet { border-color: var(--line); color: var(--ink); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible, .linkish:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--water); outline-offset: 2px; }
.linkish { background: none; border: 0; padding: 0; color: var(--water); text-decoration: underline; cursor: pointer; }
.linkish.center { display: block; margin: 10px auto 0; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

/* Sheets (dialogs) ----------------------------------------------------------- */

.sheet {
  border: 0; padding: 0; margin: auto auto 0;
  width: 100%; max-width: var(--max);
  background: var(--paper); color: var(--ink);
  border-radius: 10px 10px 0 0;
  box-shadow: 0 -2px 0 var(--water);
  max-height: 92vh;
}
.sheet::backdrop { background: rgba(15, 36, 48, 0.45); }
.sheet-body { padding: 18px var(--gutter) 22px; overflow: auto; max-height: 92vh; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-head h2 { font-family: var(--display); font-weight: 700; font-size: 26px; }
.close { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: var(--mud); padding: 4px 8px; }
@media (min-width: 600px) {
  .sheet { margin: auto; border-radius: 6px; box-shadow: 0 0 0 2px var(--water); }
}

.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 14px; color: var(--mud); margin-bottom: 4px; }
input[type="search"], input[type="number"], input[type="text"], input[type="password"], input:not([type]), select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font: inherit;
  color: var(--ink);
}
input:focus { border-color: var(--water); }
.form-error { color: var(--sink); font-size: 14px; margin: 4px 0 10px; }

/* Receipt (lock-in sheet) */
.receipt-tier { font-family: var(--display); font-weight: 900; font-size: 44px; line-height: 0.95; margin: 2px 0 10px; }
.receipt-tier.loss { color: var(--sink); }
.receipt-tier.win { color: var(--rise); }
.receipt { list-style: none; margin: 0 0 14px; padding: 0; }
.receipt li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.receipt li.total { border-top: 2px solid var(--ink); font-weight: 600; }
.receipt li b { font-family: var(--display); font-weight: 700; font-size: 20px; white-space: nowrap; }
.receipt .charity-pick { display: block; margin: 8px 0 14px; }
.ride-box {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "head btn" "body btn"; gap: 2px 12px; align-items: center;
  border: 1.5px dashed #C9A227; border-radius: var(--radius); padding: 10px 12px; margin: 4px 0 12px; font-size: 13px; color: var(--mud);
}
.ride-box b { grid-area: head; color: var(--ink); font-family: var(--display); font-size: 18px; font-weight: 700; }
.ride-box span { grid-area: body; }
.ride-box .btn { grid-area: btn; border-color: #C9A227; }
.position .action .btn + .btn { margin-left: 6px; }

/* Trickle page ----------------------------------------------------------------- */

.trickle-head { margin: 8px 0 18px; }
.trickle-head .big { font-family: var(--display); font-weight: 900; font-size: 54px; line-height: 0.9; }
.trickle-head .big small { font-size: 0.5em; vertical-align: top; }
.pool { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 18px; }
.pool div { border-top: 2px solid var(--ink); padding-top: 6px; }
.pool b { display: block; font-family: var(--display); font-weight: 700; font-size: 26px; }
.pool span { font-size: 13px; color: var(--mud); }
.charities { list-style: none; margin: 0; padding: 0; }
.charity { padding: 12px 0; border-top: 1px solid var(--line); }
.charity-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.charity-top .name { color: var(--ink); font-weight: 600; }
.charity-top b { font-family: var(--display); font-weight: 700; font-size: 22px; }
.charity-bar { height: 10px; background: var(--shallow); border-radius: 2px; margin: 8px 0 6px; overflow: hidden; }
.charity-bar i { display: block; height: 100%; width: var(--w, 0%); background: var(--water); transition: width 700ms ease-out; }
.charity-sub { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--mud); flex-wrap: wrap; }
.charity .blurb { font-size: 14px; color: var(--mud); margin: 4px 0 0; }
.note { border-left: 3px solid var(--water); padding: 6px 12px; margin: 18px 0; font-size: 14px; color: var(--mud); }
.note.warn { border-color: var(--sink); color: var(--ink); background: var(--sink-tint); }

/* Leaders --------------------------------------------------------------------- */

.board { width: 100%; border-collapse: collapse; margin: 6px 0 24px; font-size: 15px; }
.board th { text-align: left; font-weight: 500; color: var(--mud); font-size: 13px; padding: 4px 0; border-bottom: 2px solid var(--ink); }
.board td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.board td.num, .board th.num { text-align: right; white-space: nowrap; }
.board td.rank { width: 32px; font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--mud); }
.board td.me { font-weight: 600; }
.board .tier { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: 0.02em; display: block; }

/* How ------------------------------------------------------------------------- */

.rules { max-width: 52ch; }
.rules h2 { font-family: var(--display); font-size: 24px; font-weight: 700; margin: 22px 0 6px; }
.rules p { margin-bottom: 10px; }
.badges { list-style: none; margin: 10px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.badges li { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 8px 10px; font-size: 13px; color: var(--mud); }
.badges li.earned { border-color: var(--water); background: var(--shallow); color: var(--ink); }
.badges b { display: block; font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--ink); }

/* Welcome --------------------------------------------------------------------- */

.welcome { padding-top: 10px; }
.welcome .hero { font-family: var(--display); font-weight: 900; font-size: 64px; line-height: 0.88; margin: 6px 0 18px; max-width: 9ch; }
.welcome p { max-width: 46ch; font-size: 17px; }
.welcome .row-actions { margin-top: 18px; }

/* Footer, banner, toast ------------------------------------------------------- */

.foot { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 40px; }
.ad-slot {
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  padding: 22px 12px; text-align: center; color: var(--mud); font-size: 13px;
}
.foot-line { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--mud); margin-top: 14px; }
.foot-line .linkish { font-size: 13px; }
.demo-banner { background: var(--ink); color: var(--shallow); font-size: 13px; text-align: center; padding: 6px var(--gutter); }
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  font-size: 14px; max-width: calc(100% - 32px); z-index: 50;
  animation: toast-in 250ms ease-out;
}
@keyframes toast-in { from { transform: translate(-50%, 8px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .wordmark-drip { animation: none; opacity: 1; }
  .position.fresh, .under { animation: none; }
  .preview-slice { animation: none; }
  .coin-inner { transition: none; }
  .coin.landing { animation: none; }
  .rank-bar i, .charity-bar i { transition: none; }
  .toast { animation: none; }
}
@media (max-width: 380px) {
  .wordmark { font-size: 34px; }
}
