:root {
  --paper: #fbfaf4; --ink: #394335; --muted: #7c8671; --line: #dedfd1;
  --green: #5b7d52; --deep: #416744; --shade: #e0e8d6;
  --hand: 'Kalam', 'Comic Sans MS', cursive;
  --serif: 'Libre Baskerville', Georgia, serif; --sans: 'DM Sans', Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; padding: 24px; background: #efeee5; color: var(--ink); font: 14px/1.5 var(--sans); }
button, input, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
button, input, select, summary { touch-action: manipulation; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid #94ab7c; outline-offset: 5px; }
svg { display: block; overflow: visible; }
svg path, svg line { stroke-linecap: round; stroke-linejoin: round; }
svg text { font: 14px var(--sans); fill: var(--muted); }
h1, h2, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.board {
  max-width: 1380px; min-height: min(820px, calc(100svh - 48px)); margin: 0 auto;
  padding: 20px 38px 12px; background: var(--paper); border: 1px solid #d6dbc9;
  border-radius: 8px 5px 7px 6px; box-shadow: 0 4px 16px #46533606;
  display: grid; grid-template-rows: auto auto minmax(240px, 1fr) auto auto;
  background-image: radial-gradient(#6b74590a .6px, transparent .6px); background-size: 6px 6px;
}
.board-toolbar { display: flex; justify-content: space-between; align-items: center; min-height: 40px; }
.presets { display: flex; gap: 6px; padding: 4px; background: #f0f1e7; border: 1px solid #e0e4d3; border-radius: 6px; }
.preset { padding: 7px 16px; border-radius: 3px; font-size: 13px; color: #7e8773; }
.preset.active { color: var(--deep); background: #fcfcf7; box-shadow: 0 1px 4px #53654412; }
.board-tools { display: flex; align-items: center; gap: 20px; }
.icon-button { display: inline-grid; place-items: center; width: 32px; height: 32px; font-size: 23px; color: var(--muted); border-radius: 4px; }
.icon-button:hover { background: #eef1e4; color: var(--deep); }
.icon-button svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.info-button { width: 25px; height: 25px; border: 1px solid #adb89c; border-radius: 50%; font: italic 16px Georgia; color: #78846b; }
.info-button:hover { background: var(--shade); }
.hotspot { border-radius: 6px; transition: background .2s; }
.hotspot:hover { background: #e7eddd55; }
.transaction-area { position: relative; display: grid; grid-template-columns: 105px 212px 110px; gap: 18px; justify-content: center; align-items: center; height: 154px; margin-left: 29%; }
.arrival-source { display: flex; align-items: center; position: relative; min-height: 68px; padding: 8px; }
.source-tile { position: relative; z-index: 1; transform: rotate(-8deg); }
.tx { display: inline-grid; place-items: center; width: 28px; height: 29px; border: 1.5px solid #819a72; border-radius: 3px 5px 2px 4px; background: #cbddbd; color: #779568; font: 17px var(--hand); flex-shrink: 0; }
.source-tile.behind { position: absolute; left: -4px; top: 10px; opacity: .28; transform: rotate(9deg); z-index: 0; }
.arrival-source svg { fill: none; stroke: #a4af94; stroke-width: 1.4; width: 70px; margin-left: 6px; }
.candidate { padding: 12px; border: 1.5px solid #9ca98a; border-radius: 5px 7px 5px 4px; background: #f1f3e8; box-shadow: 3px 3px 0 #e5e9da; transform: rotate(-1deg); }
.object-label { display: block; font: 16px var(--hand); color: #7f8d70; margin-bottom: 9px; }
.block-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.block-tile { display: block; position: relative; height: 25px; border: 1px solid #bec8b4; border-radius: 2px; background: #e8ece2; overflow: hidden; }
.block-tile .fill { position: absolute; inset: 0 auto 0 0; background: #bbd3a8; border-right: 1px solid #8daa7c; }
.block-tile:after { content: ''; position: absolute; inset: 2px; background: repeating-linear-gradient(135deg, transparent, transparent 5px, #69835a20 5px, #69835a20 6px); }
.queue { min-height: 70px; padding: 12px 4px; }
.queue-tiles { display: flex; gap: 5px; flex-wrap: wrap; max-width: 108px; }
.queue-tiles .tx { width: 23px; height: 24px; font-size: 14px; transform: rotate(4deg); }
.queue-empty { display: block; width: 54px; height: 26px; border: 1px dashed #d3dbc8; border-radius: 4px; }
#transaction-flights { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 5; }
.flying-tx { position: absolute; left: 0; top: 0; box-shadow: 2px 3px 0 #8d9e7420; }
.displaced-tx { background: #e8ece2; border-color: #bec8b4; color: transparent; }
.main-stage { display: grid; grid-template-columns: 34% minmax(0, 1fr); gap: 20px; align-items: center; }
.miner-scene { position: relative; width: 100%; max-width: 355px; justify-self: center; padding: 25px 0 0; align-self: center; }
#miner-art { width: 100%; max-height: 285px; }
.speech { display: inline-block; position: absolute; top: -8px; left: 9%; min-width: 105px; padding: 9px 22px; border: 1px solid #bcc6ad; border-radius: 47% 44% 48% 42%; background: var(--paper); font: 20px var(--hand); transform: rotate(-4deg); }
.speech:after { content: ''; position: absolute; width: 10px; height: 13px; bottom: -7px; left: 28px; transform: skew(-30deg) rotate(-40deg); border-left: 1px solid #bcc6ad; border-bottom: 1px solid #bcc6ad; background: var(--paper); }
.chart-button { min-width: 0; padding: 0; text-align: left; border-radius: 5px; }
.chart-button:hover { background: #e9efdf33; }
.chart-heading { display: flex; justify-content: space-between; align-items: center; font: 19px var(--hand); color: #7b886b; padding: 0 18px 0 25px; }
.expand-mark { color: #a2ae93; font: 17px var(--sans); opacity: .55; }
.chart-button:hover .expand-mark { opacity: 1; color: var(--deep); }
.live-chart > svg { width: 100%; max-height: 285px; }
.bottom-stage { display: grid; grid-template-columns: 34% minmax(0, 1fr); gap: 20px; align-items: center; padding-top: 22px; margin-top: 8px; }
.investor-panel { display: flex; align-items: center; justify-content: center; gap: 8px; }
.investor-character { padding: 0; }
.investor-character svg { width: 106px; height: 128px; }
.investor-character > span { font: 15px var(--hand); color: var(--muted); }
.investor-character > span > span { margin-left: 6px; opacity: .6; }
.investor-actions { min-width: 0; }
.investor-thought { font: 18px var(--hand); color: #7c8b6c; margin-bottom: 12px; transform: rotate(-3deg); }
.equilibrium-button { padding: 8px 10px; border: 1px solid #bdc8aa; border-radius: 4px; font-size: 12px; color: #6c805b; background: #edf0e4; white-space: nowrap; }
.equilibrium-button > span { margin-left: 9px; }
.equilibrium-button:hover { background: #e1e9d4; }
.entry-motion { height: 23px; font: 17px var(--hand); color: var(--green); letter-spacing: 3px; margin-top: 5px; }
.entry-motion.moving { animation: entry .7s ease-in-out infinite alternate; }
.history { border-top: 1px solid #e4e7da; padding-top: 12px; }
.history .chart-heading { font-size: 16px; }
.history > svg { width: 100%; height: 155px; }
.transport { display: flex; align-items: center; gap: 16px; border-top: 1px solid #e4e7da; padding-top: 13px; margin-top: 16px; }
.play-controls { display: flex; align-items: center; gap: 8px; }
.play-button { display: grid; place-items: center; width: 35px; height: 32px; color: var(--paper); background: #52724b; border-radius: 4px; font-size: 18px; }
select { border: 0; border-bottom: 1px solid #ccd3bf; background: transparent; padding: 5px 8px; font-size: 12px; color: #79866d; }
.mining-key { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #839175; }
.mining-key i { display: inline-block; width: 13px; height: 10px; background: var(--shade); border: 1px solid #c8d7b8; border-radius: 1px; }
.transport > .mining-key { margin-left: auto; }
.art-line { fill: none; stroke: #57604f; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fan.spinning { transform-box: fill-box; transform-origin: center; animation: spin 1.2s linear infinite; }
.coin { animation: coinRise 1.1s ease-out infinite; }
.paused .fan, .paused .coin { animation-play-state: paused; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes coinRise { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-34px); } }
@keyframes entry { to { transform: translateX(7px); } }

/* Longer explanations and figures are only shown in opened cards. */
dialog { color: var(--ink); background: var(--paper); border: 1px solid #bdc8ac; border-radius: 7px; padding: 25px 30px; width: min(560px, calc(100% - 28px)); max-height: 88svh; box-shadow: 8px 14px 60px #273b242b; }
dialog::backdrop { background: #38463155; backdrop-filter: blur(3px); }
.dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
dialog h2 { font: 23px/1.5 var(--serif); }
.dialog-top > span { color: var(--muted); font: 16px var(--hand); }
.close-dialog { flex-shrink: 0; }
.text-button { padding: 6px 0; font-size: 12px; color: #718262; text-decoration: underline; text-underline-offset: 4px; }
.settings-tabs, .info-tabs { display: flex; gap: 14px; flex-wrap: wrap; }
.settings-tabs { border-bottom: 1px solid var(--line); margin: 18px 0 8px; }
.settings-tabs button, .info-tabs button { font-size: 12px; color: #829174; padding: 8px 0; }
.settings-tabs button.active, .info-tabs button.active { color: var(--deep); border-bottom: 2px solid #809768; }
.control-group { padding: 15px 0; }
.control-group[hidden] { display: none; }
.control-label { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; }
.control-label input { width: 75px; text-align: right; font-size: 13px; background: #eff2e6; border: 1px solid #d6dfc8; border-radius: 3px; padding: 5px; }
input[type=range] { width: 100%; display: block; appearance: none; height: 4px; margin: 17px 0 10px; background: linear-gradient(to right, #769064 var(--range,30%), #e0e6d6 var(--range,30%)); border-radius: 2px; cursor: pointer; }
input[type=range]::-webkit-slider-thumb { appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #71915e; border: 2px solid var(--paper); box-shadow: 0 0 0 1px #71915e; }
input[type=range]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: #71915e; border: 2px solid var(--paper); }
.control-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.settings-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; margin-top: 10px; border-top: 1px solid var(--line); }
.primary-button { background: #58784d; color: white; padding: 9px 16px; border-radius: 4px; font-size: 12px; }
#info-title { margin: 20px 0 15px; }
#info-body { font-size: 13px; line-height: 1.8; }
#info-body p { margin: 12px 0; }
#info-body ul { padding-left: 20px; }
.formula { padding: 12px 15px; background: #edf1e2; border-left: 2px solid #9daf86; font-family: Georgia, serif; font-size: 15px; }
.small { font-size: 11px; }
.chart-dialog { width: min(920px, calc(100% - 28px)); }
#expanded-chart { width: 100%; min-height: 240px; max-height: 55svh; margin: 25px 0 15px; }
.chart-dialog-footer { display: flex; justify-content: space-between; align-items: center; }
.notebook { background-image: repeating-linear-gradient(transparent, transparent 31px, #a7b69722 31px, #a7b69722 32px); border-left: 5px solid #c6bd9c; transform: rotate(-.4deg); }
.notebook h2 { margin: 17px 0 12px; }
.notebook-unit { font-size: 11px; color: var(--muted); margin-bottom: 18px; }
.ledger-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; font-size: 12px; }
.ledger-row b { font: 17px var(--hand); }
.ledger-row.total { border-top: 1.5px solid #899779; margin-top: 8px; padding-top: 13px; font-weight: 600; }
.notebook-verdict { font: 21px var(--hand); color: #658055; margin: 18px 0 24px; }
details { border-top: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; cursor: pointer; list-style: none; font-size: 12px; padding: 15px 0; }
summary::-webkit-details-marker { display: none; }
.notebook-links { display: flex; justify-content: space-between; padding-top: 15px; }
.negative { color: #a46349; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 10px); background: var(--ink); color: var(--paper); border-radius: 5px; padding: 12px 20px; font-size: 12px; opacity: 0; pointer-events: none; transition: .2s; z-index: 10; max-width: calc(100% - 30px); text-align: center; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 1600px) { .board { min-height: min(900px, calc(100svh - 48px)); } #miner-art { max-height: 330px; } .live-chart > svg { max-height: 330px; } }
@media (max-width: 1000px) {
  body { padding: 16px; }
  .board { padding: 16px 22px 12px; min-height: min(760px, calc(100svh - 32px)); }
  .main-stage, .bottom-stage { grid-template-columns: 35% minmax(0, 1fr); gap: 12px; }
  .transaction-area { margin-left: 20%; grid-template-columns: 85px 190px 85px; gap: 12px; height: 135px; }
  .speech { font-size: 17px; top: 0; }
  .investor-character svg { width: 85px; height: 112px; }
  .investor-thought { font-size: 16px; }
  .equilibrium-button { font-size: 11px; padding: 7px; }
  .chart-heading { font-size: 17px; }
}
@media (max-width: 600px) {
  body { padding: 8px; }
  .board { padding: 12px 12px 10px; min-height: min(690px, calc(100svh - 16px)); grid-template-rows: auto auto minmax(215px, 1fr) auto auto; }
  .preset { padding: 7px 10px; font-size: 12px; }
  .presets { gap: 2px; padding: 3px; }
  .board-tools { gap: 10px; }
  .info-button { width: 23px; height: 23px; }
  .transaction-area { margin-left: 0; grid-template-columns: 58px 156px 58px; gap: 9px; height: 135px; }
  .candidate { padding: 9px; }
  .object-label { font-size: 14px; margin-bottom: 7px; }
  .block-tiles { gap: 3px; }
  .block-tile { height: 22px; }
  .arrival-source { padding: 4px; }
  .source-tile { width: 23px; height: 25px; }
  .source-tile.behind { left: -3px; top: 14px; }
  .arrival-source svg { width: 30px; margin-left: 2px; }
  .queue-tiles { gap: 3px; }
  .queue-tiles .tx { width: 18px; height: 20px; font-size: 11px; }
  .queue-empty { width: 40px; height: 23px; }
  .main-stage { grid-template-columns: 35% minmax(0, 1fr); gap: 4px; }
  .miner-scene { padding-top: 28px; }
  #miner-art { width: 115%; margin-left: -7%; min-height: 135px; }
  .speech { min-width: 75px; left: 0; top: 0; padding: 6px 10px; font-size: 14px; }
  .chart-heading { padding: 0 3px 0 7px; font-size: 15px; }
  .live-chart > svg { height: 190px; }
  .bottom-stage { grid-template-columns: 35% minmax(0, 1fr); gap: 4px; padding-top: 5px; margin-top: 0; }
  .investor-panel { flex-direction: column; gap: 0; align-self: start; }
  .investor-character svg { width: 70px; height: 87px; }
  .investor-character > span { font-size: 12px; }
  .investor-actions { text-align: center; }
  .investor-thought { font-size: 13px; margin: 3px 0 6px; }
  .equilibrium-button { font-size: 10px; padding: 6px; }
  .equilibrium-button > span { margin-left: 3px; }
  .entry-motion { font-size: 12px; height: 16px; margin-top: 3px; }
  .history { align-self: start; margin-top: 6px; }
  .history .chart-heading { font-size: 14px; }
  .history > svg { height: 141px; }
  .transport { padding-top: 10px; margin-top: 8px; gap: 10px; }
  .play-controls { gap: 4px; }
  .transport .icon-button { width: 28px; font-size: 21px; }
  .play-button { width: 30px; height: 29px; font-size: 16px; }
  select, .mining-key { font-size: 11px; }
  .mining-key i { width: 11px; }
  dialog { padding: 20px; }
  dialog h2 { font-size: 20px; }
  .settings-tabs, .info-tabs { gap: 11px; }
  .settings-tabs button, .info-tabs button { font-size: 11px; }
  .chart-dialog { padding: 18px; }
  .notebook-verdict { font-size: 18px; }
}
@media (max-width: 360px) {
  .board { padding-left: 9px; padding-right: 9px; }
  .transaction-area { grid-template-columns: 48px 145px 43px; gap: 6px; }
  .board-tools { gap: 6px; }
  .preset { padding: 7px 8px; font-size: 11px; }
  .chart-heading { font-size: 13px; }
  .speech { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { animation: none !important; transition: none !important; } }

/* Paper, section labels, and a compact editorial header. */
body {
  background-color: #f1efe5;
  background-image: radial-gradient(#62704425 .65px, transparent .8px), radial-gradient(#aa967617 .5px, transparent .8px);
  background-size: 7px 7px, 5px 5px;
  background-position: 0 0, 2px 3px;
}
.site-header { max-width: 1380px; margin: 0 auto 22px; display: flex; align-items: center; justify-content: space-between; min-height: 94px; padding: 0 10px 17px; border-bottom: 1px solid #d6dacb; }
.site-identity { display: flex; gap: 22px; align-items: center; color: inherit; text-decoration: none; }
.monogram { border: 1px solid #6f7e62; border-radius: 48% 44% 47% 45%; width: 56px; height: 55px; font: italic 43px/.95 var(--serif); letter-spacing: -7px; padding-right: 9px; text-align: center; }
.monogram span, .title-dot { color: #7f976c; }
.eyebrow { display: block; font-size: 10px; letter-spacing: 2px; color: #758169; margin-bottom: 5px; }
.site-header h1 { font: 38px/1.25 var(--serif); letter-spacing: -1.4px; }
.header-note { text-align: right; font-size: 13px; color: #7d876f; }
.header-note .text-button { margin-top: 3px; font-size: 11px; }
.board { min-height: 0; padding-top: 16px; background-color: #fbfaf3; background-image: radial-gradient(#6c674a14 .55px, transparent .7px); background-size: 5px 5px; box-shadow: 0 3px 0 #d7d9c728, 0 8px 25px #53583e04; grid-template-rows: auto auto minmax(220px, 1fr) auto auto; }
.board-toolbar { padding-bottom: 13px; border-bottom: 1px solid #e0e3d6; gap: 20px; }
.section-heading { font: 500 10px var(--sans); letter-spacing: 1.8px; text-transform: uppercase; color: #717d63; }
.presets { margin-left: auto; }
.transaction-area { height: 193px; grid-template-columns: 126px 212px 126px; grid-template-rows: 126px 58px; gap: 3px 18px; align-items: center; margin-left: 23%; padding-top: 6px; }
.arrival-source { grid-column: 1; grid-row: 1; padding-top: 18px; }
.arrival-source .flow-label { position: absolute; top: -7px; left: 0; white-space: nowrap; }
.source-tile.behind { top: 25px; }
.flow-label { font: 11px var(--sans); color: #7e8b74; }
.candidate { grid-column: 2; grid-row: 1; }
.queue { grid-column: 3; grid-row: 1; }
.queue > .flow-label { display: block; margin-bottom: 12px; text-align: left; }
.low-fee-reservoir { grid-column: 2; grid-row: 2; align-self: center; display: flex; gap: 10px; align-items: center; justify-content: center; padding: 5px 8px; }
.reserve-stack { position: relative; display: flex; align-items: center; height: 37px; width: 90px; border-bottom: 1px dashed #a3b6bd; }
.low-tx, .displaced-tx { background: #bcd0dd; border-color: #8eabbc; color: #6e91a5; }
.reserve-stack .low-tx { width: 22px; height: 24px; margin-right: -9px; transform: rotate(-9deg); }
.reserve-stack .low-tx:nth-child(2) { transform: translateY(-3px) rotate(5deg); }
.reserve-stack .low-tx:nth-child(3) { transform: rotate(-3deg); }
.infinity { font: 28px Georgia; color: #8ea5b0; margin-left: 17px; }
.low-fee-reservoir .flow-label { white-space: nowrap; color: #7893a1; }
.block-tile { background: #bfd2df; border-color: #91aebf; }
.block-tile.high-fee { background: #bdd3ac; border-color: #91a47e; }
.block-tile .fill { display: none; }
.block-tile:after { background: repeating-linear-gradient(135deg, transparent, transparent 5px, #536e7c22 5px, #536e7c22 6px); }
.block-tile.high-fee:after { background: repeating-linear-gradient(135deg, transparent, transparent 5px, #69835a20 5px, #69835a20 6px); }
.chart-heading { font-family: var(--serif); font-size: 16px; color: #4d6044; }
.chart-caption { display: block; padding: 5px 25px 0; font-size: 11px; color: #89917d; }
.live-chart > svg { max-height: 235px; }
#miner-art { max-height: 235px; }
.bottom-stage { padding-top: 13px; margin-top: 5px; }
.investor-panel { position: relative; padding-top: 22px; }
.investor-heading { position: absolute; top: 0; left: 16%; }
.investor-character > span { font: 12px var(--hand); }
.history { padding-top: 12px; }
.history .chart-heading { font: 500 10px var(--sans); text-transform: uppercase; letter-spacing: 1.8px; }
.history > svg { height: 158px; }
.speed-label { font-size: 11px; color: #7d896f; margin-right: -10px; }
.site-footer { max-width: 1380px; margin: 14px auto 0; display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: #87927a; padding: 0 10px; }
.site-footer .text-button { font-size: 10px; }
@media (max-width: 1000px) {
  .site-header { min-height: 78px; margin-bottom: 16px; padding-bottom: 12px; }
  .site-header h1 { font-size: 31px; }
  .site-identity { gap: 14px; }
  .monogram { width: 46px; height: 46px; font-size: 36px; }
  .board { min-height: 0; }
  .board-toolbar { gap: 12px; }
  .section-heading { font-size: 9px; letter-spacing: 1.3px; }
  .transaction-area { grid-template-columns: 105px 190px 105px; margin-left: 15%; gap: 3px 12px; }
  .live-chart > svg { max-height: 220px; }
  #miner-art { max-height: 220px; }
  .chart-caption { font-size: 10px; }
  .header-note { font-size: 11px; }
}
@media (max-width: 600px) {
  .site-header { min-height: 78px; padding: 7px 8px 12px; margin-bottom: 12px; }
  .site-header h1 { font-size: 27px; letter-spacing: -.7px; }
  .site-identity { gap: 11px; }
  .monogram { font-size: 30px; width: 39px; height: 39px; letter-spacing: -5px; padding-right: 7px; }
  .eyebrow { font-size: 8px; letter-spacing: 1.5px; }
  .header-note p { display: none; }
  .header-note .text-button { font-size: 10px; max-width: 65px; }
  .board { min-height: 0; grid-template-rows: auto auto minmax(195px, 1fr) auto auto; }
  .board-toolbar { flex-wrap: wrap; gap: 9px; padding-bottom: 10px; }
  .board-toolbar > .section-heading { width: 100%; font-size: 9px; }
  .presets { margin-left: 0; }
  .board-tools { margin-left: auto; }
  .transaction-area { margin-left: 0; grid-template-columns: 63px 151px 63px; grid-template-rows: 116px 53px; height: 179px; gap: 3px 7px; }
  .flow-label { font-size: 9px; }
  .arrival-source .flow-label { white-space: normal; top: -12px; text-align: left; }
  .arrival-source { padding-top: 15px; }
  .source-tile.behind { top: 19px; }
  .queue { padding-left: 0; }
  .queue > .flow-label { margin-bottom: 9px; }
  .low-fee-reservoir { gap: 6px; padding: 4px 0; }
  .reserve-stack { width: 72px; }
  .reserve-stack .low-tx { width: 19px; height: 21px; }
  .infinity { font-size: 24px; margin-left: 16px; }
  .chart-heading { font-size: 13px; }
  .chart-caption { font-size: 9px; padding: 4px 7px 0; max-width: 180px; }
  .live-chart > svg { height: 170px; }
  .speech { top: 10px; }
  .bottom-stage { padding-top: 8px; }
  .investor-panel { padding-top: 25px; }
  .investor-heading { left: 0; width: 100%; text-align: center; font-size: 8px; }
  .history { margin-top: 0; }
  .history .chart-heading { font-size: 8px; letter-spacing: 1px; }
  .history > svg { height: 151px; }
  .investor-character > span { font-size: 10px; }
  .speed-label { font-size: 10px; margin-right: -7px; }
  .site-footer { font-size: 9px; gap: 8px; padding: 0 5px; }
  .site-footer .text-button { font-size: 9px; }
}
@media (max-width: 360px) {
  .transaction-area { grid-template-columns: 51px 141px 48px; gap: 3px 6px; }
  .site-header h1 { font-size: 24px; }
  .site-identity { gap: 8px; }
  .header-note .text-button { max-width: 53px; }
}

/* Keep the investor in view on shorter laptop and phone screens. */
@media (min-width: 601px) and (max-height: 820px) {
  body { padding: 14px; }
  .site-header { min-height: 68px; padding-bottom: 10px; margin-bottom: 13px; }
  .site-header h1 { font-size: 31px; }
  .board { padding-top: 12px; grid-template-rows: auto auto minmax(180px, 1fr) auto auto; }
  .board-toolbar { min-height: 36px; padding-bottom: 8px; }
  .transaction-area { height: 160px; grid-template-rows: 105px 48px; padding-top: 3px; }
  .candidate { padding: 9px 12px; }
  .object-label { margin-bottom: 5px; }
  .live-chart > svg, #miner-art { max-height: 180px; }
  .bottom-stage { margin-top: 2px; padding-top: 9px; }
  .history > svg { height: 125px; }
  .investor-character svg { height: 100px; }
  .transport { margin-top: 10px; padding-top: 9px; }
}
@media (max-width: 600px) and (max-height: 780px) {
  .site-header { min-height: 69px; margin-bottom: 9px; }
  .board { grid-template-rows: auto auto minmax(175px, 1fr) auto auto; }
  .transaction-area { height: 155px; grid-template-rows: 100px 45px; }
  .candidate { padding: 7px 9px; }
  .object-label { margin-bottom: 5px; }
  .live-chart > svg { height: 150px; }
  .investor-character svg { height: 76px; }
  .history > svg { height: 137px; }
}

/* Scene layout: miner / block, graph / investor, then shared history. */
.board { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 245px 225px auto auto; column-gap: 18px; }
.board-toolbar { grid-column: 1 / -1; grid-row: 1; }
.main-stage, .bottom-stage { display: contents; }
.transaction-area { grid-column: 5 / -1; grid-row: 2; margin: 0; height: 193px; align-self: center; }
.miner-scene { grid-column: 1 / 5; grid-row: 2; padding: 62px 0 0; max-width: 310px; align-self: center; }
.miner-heading { position: absolute; top: 0; left: 9%; }
.speech { top: 23px; left: 7%; font-size: 18px; min-width: 110px; }
.speech.waiting { min-width: 225px; padding: 10px 20px; white-space: nowrap; }
.speech:after { left: 40px; bottom: -8px; }
#miner-art { max-height: 178px; }
.live-chart { grid-column: 1 / 9; grid-row: 3; align-self: center; }
.live-chart > svg { max-height: 180px; }
.investor-panel { grid-column: 9 / -1; grid-row: 3; padding-top: 28px; align-self: center; flex-direction: row; }
.investor-heading { left: 8%; top: 0; }
.investor-character svg { transform: scaleX(-1); width: 115px; height: 133px; }
.history { grid-column: 1 / -1; grid-row: 4; border-top: 2px dashed #bec6b0; padding-top: 17px; margin-top: 12px; }
.history > svg { height: 155px; }
.history .chart-heading { font-size: 11px; }
.transport { grid-column: 1 / -1; grid-row: 5; }
.scenario-options { margin-left: auto; display: flex; gap: 20px; }
.scenario-options label { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #67765c; cursor: pointer; }
.scenario-options input { width: 16px; height: 16px; accent-color: #6b895a; cursor: pointer; }
.object-explanation { color: #748169; font-size: 13px; line-height: 1.8; margin: 17px 0 21px; }
#parameter-details { border-top: 1px solid #dce2d1; }
#parameter-details > summary { font-size: 12px; color: #607a52; }
#parameter-details .settings-tabs { margin-top: 0; }
.notebook .object-explanation { font-family: var(--sans); }
.our-win { filter: drop-shadow(0 0 3px #d8b960aa); stroke: #f7edc8; stroke-width: 1.5px; }
@media (min-width: 601px) and (max-height: 820px) {
  .board { grid-template-rows: auto 205px 195px auto auto; }
  .transaction-area { height: 160px; }
  .miner-scene { padding-top: 54px; }
  #miner-art { max-height: 146px; }
  .speech { font-size: 16px; }
  .speech.waiting { min-width: 200px; padding: 7px 15px; }
  .live-chart > svg { max-height: 155px; }
  .investor-character svg { height: 112px; width: 95px; }
  .history { margin-top: 9px; padding-top: 12px; }
  .history > svg { height: 124px; }
}
@media (max-width: 1000px) {
  .board { column-gap: 10px; }
  .scenario-options { gap: 12px; }
  .scenario-options label { font-size: 11px; }
  .transaction-area { grid-template-columns: 95px 180px 95px; gap: 3px 9px; }
  .investor-character svg { width: 88px; }
  .investor-actions { max-width: 145px; }
  .equilibrium-button { font-size: 11px; white-space: normal; }
}
@media (max-width: 600px) {
  .board { grid-template-rows: auto 214px 205px auto auto; column-gap: 5px; }
  .board-toolbar { gap: 8px; }
  .board-toolbar > .section-heading { width: 100%; }
  .scenario-options { margin: 0; gap: 10px; }
  .scenario-options label { font-size: 10px; gap: 4px; }
  .scenario-options input { width: 14px; height: 14px; margin: 0; }
  .board-tools { gap: 5px; }
  .board-tools .icon-button { width: 24px; }
  .board-tools .info-button { width: 21px; height: 21px; }
  .miner-scene { grid-column: 1 / 6; padding-top: 72px; align-self: center; }
  .miner-heading { font-size: 8px; left: 5%; top: 7px; }
  .speech { top: 26px; left: 0; font-size: 13px; }
  .speech.waiting { min-width: 0; width: 138px; white-space: normal; font-size: 14px; padding: 7px 9px; line-height: 1.3; }
  .speech:after { left: 30px; }
  #miner-art { max-height: 133px; min-height: 0; }
  .transaction-area { grid-column: 6 / -1; grid-template-columns: 33px minmax(0, 1fr) 25px; grid-template-rows: 112px 56px; height: 190px; gap: 3px 3px; padding-top: 10px; }
  .candidate { padding: 7px 5px; }
  .object-label { font-size: 11px; }
  .block-tiles { gap: 2px; }
  .block-tile { height: 19px; }
  .arrival-source { padding: 20px 0 0; min-height: 58px; }
  .arrival-source .flow-label { font-size: 8px; top: -15px; }
  .arrival-source svg { width: 13px; }
  .source-tile { width: 17px; height: 20px; font-size: 12px; }
  .source-tile.behind { top: 28px; }
  .queue { padding: 0; min-height: 50px; }
  .queue > .flow-label { font-size: 8px; overflow-wrap: normal; margin-bottom: 5px; }
  .queue-empty { width: 23px; height: 20px; }
  .queue-tiles .tx { width: 15px; height: 17px; }
  .low-fee-reservoir { grid-column: 1 / -1; flex-wrap: wrap; gap: 3px; }
  .low-fee-reservoir .flow-label { font-size: 8px; }
  .reserve-stack { width: 65px; }
  .reserve-stack .low-tx { width: 17px; height: 18px; }
  .infinity { margin-left: 15px; }
  .live-chart { grid-column: 1 / 9; grid-row: 3; }
  .live-chart > svg { height: 154px; max-height: none; }
  .chart-heading { font-size: 12px; }
  .chart-caption { font-size: 9px; padding-left: 7px; }
  .investor-panel { grid-column: 9 / -1; flex-direction: column; padding-top: 23px; }
  .investor-heading { left: 0; width: 100%; font-size: 7px; text-align: center; }
  .investor-character svg { width: 61px; height: 77px; }
  .investor-character > span { font-size: 9px; }
  .investor-thought { font-size: 12px; margin: 3px 0 5px; }
  .investor-actions { text-align: center; }
  .equilibrium-button { font-size: 10px; padding: 5px 7px; }
  .entry-motion { height: 12px; font-size: 10px; }
  .history { padding-top: 13px; margin-top: 12px; }
  .history .chart-heading { font-size: 9px; }
  .history > svg { height: 138px; }
  .transport { margin-top: 7px; }
}
@media (max-width: 360px) {
  .scenario-options { gap: 8px; }
  .scenario-options label { font-size: 9px; }
  .board-tools { gap: 2px; }
  .speech.waiting { width: 115px; font-size: 12px; }
  .object-label { font-size: 10px; }
}

/* Give the miner the space previously occupied by headings and the upper bubble. */
.board { grid-template-rows: auto 270px 225px auto auto; }
.board-toolbar { border-bottom: 0; padding-bottom: 0; min-height: 40px; }
.scenario-options { border-bottom: 1px solid #d6deca; padding-bottom: 10px; }
.miner-scene { grid-column: 1 / 7; width: 100%; max-width: 580px; padding: 0; min-height: 245px; }
#miner-art { width: calc(100% - 124px); height: 245px; max-height: 245px; margin: 0 0 0 124px; }
.speech, .speech.waiting { top: 25%; left: 0; width: 150px; min-width: 0; padding: 15px 13px; white-space: normal; font-size: 19px; line-height: 1.35; transform: rotate(-3deg); border-radius: 44% 48% 42% 46%; }
.speech:after { left: auto; right: -6px; top: 50%; bottom: auto; width: 12px; height: 12px; border: 0; border-top: 1px solid #bcc6ad; border-right: 1px solid #bcc6ad; transform: translateY(-50%) rotate(45deg); background: var(--paper); }
.transaction-area { grid-column: 7 / -1; grid-template-columns: 100px 205px 95px; column-gap: 12px; }
.investor-panel { padding-top: 0; }
.editing-parameters #parameter-details { border-top: 0; }
.editing-parameters #parameter-details > summary { display: none; }
.object-explanation[hidden] { display: none; }
@media (min-width: 601px) and (max-height: 820px) {
  .board { grid-template-rows: auto 235px 195px auto auto; }
  .miner-scene { min-height: 225px; }
  #miner-art { height: 225px; max-height: 225px; }
  .speech, .speech.waiting { font-size: 17px; width: 137px; padding: 13px 11px; }
}
@media (min-width: 601px) and (max-width: 1000px) {
  .miner-scene { min-height: 220px; }
  #miner-art { width: calc(100% - 90px); margin-left: 90px; height: 225px; max-height: 225px; }
  .speech, .speech.waiting { width: 113px; font-size: 16px; padding: 12px 9px; }
  .transaction-area { grid-template-columns: 62px minmax(130px, 180px) 57px; column-gap: 7px; }
  .transaction-area .flow-label { font-size: 9px; white-space: normal; }
  .arrival-source svg { width: 30px; }
}
@media (max-width: 600px) {
  .board { grid-template-rows: auto 193px 175px 205px auto auto; }
  .board-toolbar { padding: 0; min-height: 34px; }
  .scenario-options { padding-bottom: 8px; }
  .miner-scene { grid-column: 1 / -1; grid-row: 2; min-height: 190px; max-width: 370px; }
  #miner-art { width: calc(100% - 98px); margin-left: 98px; height: 195px; max-height: 195px; min-height: 0; }
  .speech, .speech.waiting { left: 0; top: 24%; width: 119px; font-size: 16px; padding: 12px 10px; }
  .speech:after { width: 12px; right: -6px; }
  .transaction-area { grid-column: 1 / -1; grid-row: 3; grid-template-columns: 65px minmax(135px, 175px) 57px; grid-template-rows: 110px 52px; height: 175px; padding-top: 0; column-gap: 7px; }
  .candidate { padding: 9px 7px; }
  .object-label { font-size: 13px; }
  .flow-label, .arrival-source .flow-label, .queue > .flow-label { font-size: 9px; }
  .arrival-source { padding-top: 10px; }
  .arrival-source svg { width: 31px; }
  .source-tile { width: 22px; height: 24px; font-size: 15px; }
  .queue-empty { width: 40px; height: 22px; }
  .block-tile { height: 23px; }
  .low-fee-reservoir .flow-label { font-size: 9px; }
  .live-chart, .investor-panel { grid-row: 4; }
  .investor-panel { padding-top: 0; }
  .history { grid-row: 5; }
  .transport { grid-row: 6; }
}
@media (max-width: 360px) {
  .transaction-area { grid-template-columns: 50px 142px 44px; column-gap: 5px; }
  .speech, .speech.waiting { width: 108px; font-size: 14px; }
  #miner-art { margin-left: 85px; width: calc(100% - 85px); }
}

/* One continuous outline keeps the speech tail joined at every bubble height. */
.speech, .speech.waiting { border: 0; background: transparent; isolation: isolate; }
.speech:after { display: none; }
.speech:before { content: ''; position: absolute; inset: -3px -12px -3px -3px; z-index: -1; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 210 100' preserveAspectRatio='none'%3E%3Cpath d='M185 42 L204 55 L184 64 C174 87 136 96 94 95 C40 94 5 81 5 53 C5 22 47 5 98 5 C141 5 174 17 185 42 Z' fill='%23fbfaf4' stroke='%23bcc6ad' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
@media (min-width: 1001px) {
  #miner-art { transform: translateX(-30px); }
  .speech, .speech.waiting { left: 24px; }
  .transaction-area { transform: translateX(-36px); }
}
.history-body { display: grid; grid-template-columns: minmax(0, 1fr) 245px; gap: 28px; align-items: center; }
.history-body > svg { width: 100%; height: 155px; }
.history-stats { display: grid; gap: 12px; text-align: left; font: 13px/1.6 var(--sans); color: var(--ink); }
.history-stats strong { font-weight: 500; color: #56794d; }
.history-stats small { font-size: 10px; color: #8b9682; }
@media (max-width: 700px) {
  .history-body { grid-template-columns: 1fr; gap: 12px; }
  .history-stats { font-size: 12px; gap: 4px; padding: 0 12px 6px; }
}

/* Keep the button itself as the click target while animated SVG nodes redraw. */
.chart-button > * { pointer-events: none; }
.chart-button { cursor: pointer; }

/* Beginner explanations stay inside the existing cards. */
#info-body h3 { font: 400 16px/1.4 var(--serif); margin: 24px 0 8px; }
#info-body h3:first-child { margin-top: 18px; }
.parameter-note { font-size: 12px; color: var(--muted); margin: 12px 0 18px; }
.equilibrium-button { white-space: normal; }
@media (max-width: 600px) {
  .scenario-options { flex-wrap: wrap; gap: 6px 12px; }
  .scenario-options label { white-space: normal; }
}
