/* the pool page. everything scoped to .pool-page; shared pool classes live in style.css. */
.pool-page .pool-block { border-bottom: 3px solid #111; }
.pool-page .pool-block:last-child { border-bottom: 0; }
.pool-page .pool-hero-flat { display: inline-block; margin-top: 10px; font-weight: 400; text-decoration: underline; text-underline-offset: 5px; }
.pool-page .pool-hero-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 28px; }
.pool-page .page-hero-art { object-fit: contain; transform: rotate(3deg); }

/* 01 / complaints */
.pool-complaints { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 22px; counter-reset: complaint; }
.pool-complaints li { counter-increment: complaint; position: relative; min-width: 0; background: #fff9e7; border: 2px solid #111; border-radius: 6px 2px 9px 3px; padding: 40px 18px 20px; }
.pool-complaints li::before { content: "#0" counter(complaint); position: absolute; top: -2px; left: -2px; padding: 3px 10px; background: #ff7f27; border: 2px solid #111; border-radius: 4px 1px 8px 2px; font-size: 13px; }
.pool-complaints li:nth-child(odd) { transform: rotate(-1.2deg); }
.pool-complaints li:nth-child(even) { transform: rotate(.9deg); }
.pool-complaints li:nth-child(3n) { transform: rotate(-.4deg); margin-top: 12px; }
.pool-complaints strong { display: block; font-size: 21px; line-height: 1.2; }
.pool-complaints span { display: block; margin-top: 12px; font-size: 14px; line-height: 1.5; }
.pool-complaints .has-art img { width: 120px; margin: 12px 0 -6px auto; object-fit: contain; transform: rotate(-6deg); }
.pool-shrug { margin-top: 55px; font-size: 22px; line-height: 1.5; }
.pool-shrug strong { font-weight: 400; background: #fff9e7; border: 2px solid #111; padding: 0 8px; display: inline-block; transform: rotate(-1deg); margin-top: 6px; }

/* 02 / the plumbing */
.pool-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 46px; }
.pool-flow li { position: relative; background: white; border: 3px solid #111; border-radius: 3px 8px 2px 6px; padding: 18px 16px 20px; }
.pool-flow li:nth-child(even) { transform: rotate(1.4deg) translateY(14px); }
.pool-flow li:nth-child(odd) { transform: rotate(-1deg); }
.pool-flow li:last-child { background: #ff7f27; }
.pool-flow li:not(:last-child)::after { content: "\2192"; position: absolute; top: 34%; right: -44px; width: 40px; text-align: center; font-size: 42px; line-height: 1; transform: rotate(-8deg) scaleX(1.3); }
.pool-flow li:nth-child(even):not(:last-child)::after { transform: rotate(10deg) scaleX(1.2); }
.pool-flow b { display: inline-block; min-width: 34px; padding: 2px 8px; border: 2px solid #111; border-radius: 50% 40% 55% 45%; background: #fff9e7; text-align: center; font-size: 15px; }
.pool-flow strong { display: block; margin-top: 12px; font-size: 19px; line-height: 1.2; }
.pool-flow span { display: block; margin-top: 10px; font-size: 13px; line-height: 1.5; }
.pool-fineprint { margin-top: 70px; background: #fff9e7; border: 3px solid #111; border-radius: 4px 9px 3px 7px; padding: 28px 32px 30px; transform: rotate(-.4deg); }
.pool-fineprint h3 { font-size: 24px; }
.pool-fineprint ul { margin: 16px 0 0; padding-left: 22px; display: grid; gap: 12px; }
.pool-fineprint li { font-size: 16px; line-height: 1.55; }
.pool-fineprint strong { font-weight: 700; }

/* 03 / live. floating sprite is tall, so it is narrower here and sits behind the water. */
.pool-page .pool-illustration { height: 440px; margin-top: 0; }
.pool-page #pool-duck { object-fit: contain; }
.pool-page #pool-duck.is-floating { width: 140px; bottom: calc(var(--pool-level) - 100px); z-index: 1; }
.pool-page .pool-counters h3 { grid-column: 1 / -1; padding: 14px 25px; font-size: 18px; border-bottom: 2px solid #111; background: #fff9e7; }
.pool-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 22px; }
.pool-status-actions { display: flex; flex-wrap: wrap; gap: 10px; }
#pp-state { font-size: 16px; line-height: 1.5; }
#pp-refresh:disabled { cursor: progress; opacity: .6; }
/* every add, over time (pool.js drawChart): paint-flat svg, crisp edges, blue water under a black line */
.pool-chart { margin-top: 50px; }
.pool-chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 20px; }
.pool-chart h3 { font-size: 26px; }
.pool-chart-controls { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.pool-chart-keys { display: flex; flex-wrap: wrap; gap: 8px; }
.pool-chart-keys button { min-height: 36px; border: 2px solid #111; border-radius: 3px 1px 5px 2px; background: white; padding: 4px 14px; font: inherit; font-size: 14px; font-weight: bold; cursor: pointer; }
.pool-chart-keys button[aria-pressed="true"] { background: #ff7f27; }
.pool-chart-keys button:hover, .pool-chart-keys button:focus-visible { background: #fff9e7; }
.pool-chart-keys button[aria-pressed="true"]:hover { background: #ff7f27; }
.pool-chart-frame { margin-top: 16px; border: 3px solid #111; border-radius: 3px 8px 2px 6px; background: #fff9e7; overflow: hidden; }
.pool-chart-svg { display: block; max-width: 100%; height: auto; shape-rendering: crispEdges; touch-action: pan-y; cursor: crosshair; }
.pool-chart-svg:focus-visible { outline: 3px dashed #111; outline-offset: -6px; }
.pool-chart-svg .chart-grid { stroke: #111; stroke-opacity: .2; stroke-width: 2; stroke-dasharray: 6 6; }
.pool-chart-svg .chart-axis, .pool-chart-svg .chart-tick { stroke: #111; stroke-width: 3; }
.pool-chart-svg .chart-water { fill: #00a2e8; }
.pool-chart-svg .chart-line { fill: none; stroke: #111; stroke-width: 3; }
.pool-chart-svg .chart-bar { fill: #ff7f27; stroke: #111; stroke-width: 1; }
.pool-chart-svg .chart-pick { stroke: #111; stroke-width: 2; stroke-dasharray: 4 4; }
.pool-chart-svg .chart-dot { fill: #ff7f27; stroke: #111; stroke-width: 3; shape-rendering: auto; }
.pool-chart-svg .chart-label { fill: #111; font-size: 12px; font-weight: bold; shape-rendering: auto; }
.pool-chart-readout { min-height: 1.5em; margin-top: 10px; font-size: 15px; font-variant-numeric: tabular-nums; }
.pool-chart-readout a { text-underline-offset: 4px; }
.pool-receipts { margin-top: 50px; }
.pool-receipts h3 { font-size: 26px; }
.pool-receipts-count { margin-top: 8px; font-size: 14px; }
.pool-receipts-wallet { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 6px; font-size: 14px; }
.pool-receipts-wallet code { min-width: 0; max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all; }
.pool-now { margin-bottom: 50px; }
.pool-now > h3 { font-size: 26px; }
.pool-now-lead { margin: 8px 0 22px; font-size: 16px; max-width: 760px; }
.pool-dev-supply { display: block; margin: 18px 0 30px; font-size: 15px; max-width: 760px; }
.pool-reserve { margin: 0 0 18px; font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.pool-now-table-title { margin: 0; font-size: 20px; }
.pool-table-wrap { margin-top: 18px; overflow-x: auto; border: 2px solid #111; border-radius: 3px 7px 2px 5px; background: #fff9e7; }
.pool-table-wrap:focus-visible { outline: 3px dashed #111; outline-offset: 5px; }
.pool-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pool-table th { text-align: left; font-weight: 700; padding: 12px 16px; border-bottom: 2px solid #111; background: #ff7f27; white-space: nowrap; }
.pool-table td { padding: 12px 16px; border-top: 1px solid #111; font-variant-numeric: tabular-nums; }
.pool-table tbody tr:first-child td { border-top: 0; }
.pool-table td:last-child { white-space: nowrap; }
.pool-table a { text-underline-offset: 4px; }
.pool-table .pool-empty-row td { padding: 22px 16px; text-align: left; }

/* 04 / fee wallet */
.pool-wallet { display: grid; grid-template-columns: 1fr 1.3fr; gap: 50px; align-items: center; }
.pool-wallet h2 { font-size: clamp(40px, 4.5vw, 62px); letter-spacing: -2.5px; }
.pool-wallet-lead { margin-top: 20px; font-size: 18px; line-height: 1.6; max-width: 440px; }
.pool-wallet-box { background: white; border: 3px solid #111; border-radius: 6px 2px 8px 3px; padding: 26px 26px 22px; transform: rotate(.6deg); min-width: 0; }
.pool-wallet-box label { display: block; font-size: 14px; margin-bottom: 10px; }
.pool-wallet-box input { width: 100%; min-width: 0; font: 15px/1.4 "Courier New", monospace; color: #111; background: #fff9e7; border: 2px solid #111; border-radius: 2px; padding: 12px; }
.pool-wallet-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.pool-copy-status { min-height: 1.5em; margin-top: 10px; font-size: 14px; }
.pool-wallet-note { font-size: 12px; margin-top: 4px; }

/* 05 / is, isn't */
.pool-isnt { display: grid; grid-template-columns: 1fr 1fr; border: 3px solid #111; border-radius: 4px 9px 3px 6px; background: #fff9e7; }
.pool-isnt > div { padding: 28px 30px 32px; min-width: 0; }
.pool-is-not { border-left: 3px solid #111; }
.pool-isnt h3 { display: inline-block; font-size: 28px; padding: 0 10px; border: 2px solid #111; transform: rotate(-2deg); background: white; }
.pool-is-not h3 { background: #ff7f27; transform: rotate(1.5deg); }
.pool-isnt ul { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.pool-isnt li { position: relative; padding-left: 32px; font-size: 17px; line-height: 1.5; }
.pool-isnt li::before { position: absolute; left: 0; top: -1px; font-weight: 700; font-size: 20px; }
.pool-is li::before { content: "+"; }
.pool-is-not li::before { content: "x"; }

/* 06 / faq */
.pool-faq { display: grid; gap: 14px; max-width: 900px; }
.pool-faq details { background: white; border: 2px solid #111; border-radius: 3px 7px 2px 6px; }
.pool-faq details:nth-child(even) { transform: rotate(.5deg); }
.pool-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 16px 20px; font-size: 19px; font-weight: 700; }
.pool-faq summary::-webkit-details-marker { display: none; }
.pool-faq summary::after { content: "+"; flex: none; font-size: 24px; line-height: 1; }
.pool-faq details[open] summary { border-bottom: 2px solid #111; background: #ff7f27; }
.pool-faq details[open] summary::after { content: "\2212"; }
.pool-faq summary:focus-visible { outline: 3px dashed #111; outline-offset: 4px; }
.pool-faq details p { padding: 16px 20px 20px; font-size: 16px; line-height: 1.6; }

/* 07 / memes */
.pool-memes-status { margin: 30px 0 18px; font-size: 14px; }

@media (max-width: 1000px) {
  .pool-complaints { grid-template-columns: repeat(2, 1fr); }
  .pool-complaints li:nth-child(3n) { margin-top: 0; }
  .pool-flow { grid-template-columns: 1fr; gap: 52px; max-width: 560px; }
  .pool-flow li:nth-child(even) { transform: rotate(1deg); margin-left: 40px; }
  .pool-flow li:not(:last-child)::after,
  .pool-flow li:nth-child(even):not(:last-child)::after { content: "\2193"; top: auto; right: auto; bottom: -50px; left: 44%; width: 40px; transform: rotate(-6deg) scaleY(1.2); }
  .pool-wallet { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 700px) {
  .pool-page .pool-hero-jump { gap: 12px 18px; margin-top: 20px; }
  .pool-page .page-hero-art { transform: rotate(2deg); }
  .pool-complaints { grid-template-columns: 1fr; gap: 18px; }
  .pool-complaints li { padding: 36px 16px 16px; }
  .pool-complaints strong { font-size: 19px; }
  .pool-complaints .has-art img { width: 96px; }
  .pool-shrug { margin-top: 36px; font-size: 17px; }
  .pool-flow { gap: 46px; }
  .pool-flow li:nth-child(even) { margin-left: 22px; }
  .pool-flow li:not(:last-child)::after,
  .pool-flow li:nth-child(even):not(:last-child)::after { bottom: -46px; font-size: 36px; }
  .pool-flow strong { font-size: 18px; }
  .pool-fineprint { margin-top: 46px; padding: 20px 18px 22px; }
  .pool-fineprint h3 { font-size: 20px; }
  .pool-fineprint li { font-size: 14px; }
  .pool-page .pool-illustration { height: 340px; }
  .pool-page #pool-duck.is-floating { width: 112px; bottom: calc(var(--pool-level) - 80px); }
  .pool-page .pool-counters h3 { padding: 12px 10px; font-size: 15px; }
  .pool-page .pool-counters strong { font-size: 20px; }
  #pp-state { font-size: 14px; }
  .pool-chart { margin-top: 36px; }
  .pool-chart h3 { font-size: 21px; }
  .pool-chart-readout { font-size: 13px; }
  .pool-receipts { margin-top: 36px; }
  .pool-receipts h3 { font-size: 21px; }
  .pool-now { margin-bottom: 36px; }
  .pool-now > h3 { font-size: 21px; }
  .pool-now-lead, .pool-dev-supply { font-size: 14px; }
  .pool-page .pool-now .pool-counters strong { font-size: 16px; }
  .pool-table-wrap { overflow-x: visible; }
  .pool-table, .pool-table tbody, .pool-table tr, .pool-table td { display: block; }
  .pool-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pool-table tr { padding: 10px 14px; border-top: 2px solid #111; }
  .pool-table tbody tr:first-child { border-top: 0; }
  .pool-table td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-top: 0; font-size: 13px; overflow-wrap: anywhere; }
  .pool-table td[data-label]::before { content: attr(data-label); flex: none; }
  .pool-table .pool-empty-row td { padding: 10px 0; }
  .pool-wallet-lead { font-size: 16px; }
  .pool-wallet-box { padding: 18px 14px 16px; transform: rotate(.4deg); }
  .pool-wallet-box input { font-size: 11px; padding: 10px 8px; }
  .pool-isnt { grid-template-columns: 1fr; }
  .pool-is-not { border-left: 0; border-top: 3px solid #111; }
  .pool-isnt > div { padding: 22px 16px 24px; }
  .pool-isnt h3 { font-size: 23px; }
  .pool-isnt li { font-size: 15px; padding-left: 26px; }
  .pool-faq summary { font-size: 16px; padding: 14px 14px; }
  .pool-faq details p { font-size: 14px; padding: 14px 14px 16px; }
}

/* phones: three numbers side by side wrap mid-number, so each counter becomes a row (label left, number right). */
@media (max-width: 480px) {
  .pool-page .pool-counters { grid-template-columns: 1fr; }
  .pool-page .pool-counters > div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 12px 14px; }
  .pool-page .pool-counters > div + div { border-left: 0; border-top: 2px solid #111; }
  .pool-page .pool-counters strong, .pool-page .pool-now .pool-counters strong { font-size: 22px; line-height: 1.3; text-align: right; overflow-wrap: normal; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .pool-page .pool-water, .pool-page #pool-duck { transition: none; }
}
