/* fee.market: one screen of live numbers, in the look of the app's onboarding: flat brand colours, an isometric grid,
   ink outlines, hard shadows and an extruded headline. On a desktop the whole page fits the window and does not scroll. */
:root {
  color-scheme: light;
  --peri: #6B5BE6;
  --peri-deep: #2B2290;
  --cream: #FDF5E5;
  --orange: #FE782D;
  --mint: #7AEEC6;
  --ink: #14131A;
  --line: 2.5px;
  --gap: clamp(12px, 1.9vh, 22px);
  --display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--peri); }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--cream);
  font: 600 16px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* the isometric grid, drifting very slowly */
  background-color: var(--peri);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='104' height='60'%3E%3Cpath d='M0 0 104 60M0 60 104 0M0 0V60M52 0V60' stroke='%23fff' stroke-opacity='.09' stroke-width='1.2' fill='none'/%3E%3C/svg%3E");
  animation: grid 60s linear infinite;
}
@keyframes grid { to { background-position: 104px 60px; } }
a { color: inherit; }
img { display: block; }

.page {
  min-height: 100dvh;
  max-width: 1680px;
  margin: 0 auto;
  padding: clamp(14px, 2.2vh, 26px) clamp(16px, 2.6vw, 44px) clamp(12px, 1.8vh, 20px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: var(--gap);
}

/* ── top bar ── */
.top { display: flex; align-items: center; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font: 700 21px/1 var(--display); letter-spacing: -0.03em; }
.brand img { border-radius: 11px; border: var(--line) solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.brand b { color: var(--mint); }
.badge { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 2px solid var(--cream); border-radius: 999px; font: 700 13.5px/1 var(--display); letter-spacing: -0.01em; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 2px var(--ink); }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; border: var(--line) solid var(--ink); background: var(--cream); color: var(--ink); font: 800 14.5px/1 var(--font); text-decoration: none; box-shadow: 4px 5px 0 var(--ink); transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.15s ease; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 7px 0 var(--ink); background: #fff; }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translate(3px, 4px); box-shadow: 1px 1px 0 var(--ink); }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }

/* ── the board ── */
.board { display: grid; gap: var(--gap); grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 9px 10px 0; /* room for the hard shadows */ }

/* the headline: heavy caps, an ink outline, a stepped extrusion and an outline echo behind */
.title { position: relative; container-type: inline-size; grid-column: 1 / -1; display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 4px 0 8px; }
.xh { isolation: isolate; margin: 0; font: 800 min(15.2cqw, 132px)/0.92 var(--font); text-transform: uppercase; letter-spacing: 0.006em; color: var(--cream); -webkit-text-stroke: 0.034em var(--ink); paint-order: stroke fill;
  text-shadow: 0.006em 0.006em 0 var(--peri-deep), 0.012em 0.012em 0 var(--peri-deep), 0.018em 0.018em 0 var(--peri-deep), 0.024em 0.024em 0 var(--peri-deep), 0.03em 0.03em 0 var(--peri-deep), 0.036em 0.036em 0 var(--peri-deep), 0.042em 0.042em 0 var(--peri-deep), 0.048em 0.048em 0 var(--peri-deep), 0.054em 0.054em 0 var(--peri-deep), 0.06em 0.06em 0 var(--peri-deep), 0.066em 0.066em 0 var(--peri-deep), 0.072em 0.072em 0 var(--peri-deep), 0.078em 0.078em 0 var(--peri-deep), 0.084em 0.084em 0 var(--peri-deep); }
.xh span { display: block; position: relative; white-space: nowrap; width: max-content; animation: slam 0.7s cubic-bezier(0.2, 0.9, 0.2, 1.15) backwards; }
.xh span:nth-child(2) { color: var(--mint); animation-delay: 0.09s; }
.xh span::after { content: attr(data-t); position: absolute; left: 0; top: 0; z-index: -1; color: transparent; text-shadow: none; -webkit-text-stroke: 0.017em var(--cream); transform: translate(0.15em, 0.15em); }
/* Entrances move and never fade: a page caught on its first frame (a link preview, a crawler) still shows everything. */
@keyframes slam { from { transform: translate(-0.14em, -0.14em) scale(1.07); } }
.title p { margin: 22px 0 0; max-width: 34ch; font: 600 clamp(14px, 2.5cqw, 19px)/1.4 var(--font); opacity: 0.92; text-wrap: balance; }
.mark { position: absolute; width: 22px; height: 22px; fill: none; stroke: rgba(255, 255, 255, 0.6); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; translate: calc(var(--mx, 0) * 14px) calc(var(--my, 0) * 14px); transition: translate 0.5s ease-out; }
.m1 { right: 9%; top: 8%; width: 26px; height: 26px; }
.m2 { right: 3%; top: 46%; width: 18px; height: 18px; }
.m3 { right: 17%; bottom: 6%; rotate: 18deg; }

/* a tile: one number */
.tile { position: relative; container-type: inline-size; min-width: 0; min-height: 168px; display: flex; flex-direction: column; padding: clamp(14px, 2.1vh, 22px) clamp(15px, 1.4vw, 24px) clamp(13px, 1.9vh, 20px); border: var(--line) solid var(--ink); border-radius: clamp(18px, 2.6vh, 28px); box-shadow: 7px 8px 0 var(--peri-deep);
  animation: pop 0.6s cubic-bezier(0.2, 0.9, 0.25, 1.1) backwards; animation-delay: calc(var(--i) * 70ms + 120ms); transition: transform 0.18s ease, box-shadow 0.18s ease; }
.tile:hover { transform: translate(-3px, -3px); box-shadow: 10px 11px 0 var(--peri-deep); }
@keyframes pop { from { transform: translate(5px, 26px) scale(0.94) rotate(-1.2deg); box-shadow: 0 0 0 var(--peri-deep); } }
.t-cream { background: var(--cream); color: var(--ink); }
.t-mint { background: var(--mint); color: var(--ink); }
.t-orange { background: var(--orange); color: var(--ink); }
.t-ink { color: var(--cream); background-color: var(--ink);
  background-image: radial-gradient(85% 46% at 50% 100%, rgba(254, 120, 45, 0.3), rgba(254, 120, 45, 0) 72%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='104' height='60'%3E%3Cpath d='M0 0 104 60M0 60 104 0M0 0V60M52 0V60' stroke='%23fff' stroke-opacity='.05' stroke-width='1.2' fill='none'/%3E%3C/svg%3E"); }
.tile h2 { margin: 0; padding-right: 56px; font: 800 clamp(11px, 1.45vh, 13.5px)/1.25 var(--font); letter-spacing: 0.09em; text-transform: uppercase; opacity: 0.72; }
.t-ink h2 { color: var(--mint); opacity: 1; }
.num { margin: auto 0 0; font: 700 clamp(44px, 26cqw, 84px)/0.9 var(--display); letter-spacing: -0.045em; white-space: nowrap; }
.num small { font-size: 0.3em; font-weight: 700; letter-spacing: 0; margin-left: 0.3em; opacity: 0.6; }
.sub { margin: 0.55em 0 0; min-height: 1.3em; font: 600 clamp(12px, 1.5vh, 14px)/1.3 var(--font); opacity: 0.74; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash { opacity: 0.35; }
.loading .num span { opacity: 0.3; animation: wait 1.1s ease-in-out infinite alternate; }
@keyframes wait { to { opacity: 0.12; } }
.tile.bump .num { animation: bump 0.6s cubic-bezier(0.2, 0.9, 0.25, 1.3); }
@keyframes bump { 35% { transform: translateY(-0.07em) scale(1.04); } }

/* the round-cornered icon in a tile's corner */
.ico { position: absolute; right: clamp(13px, 1.2vw, 20px); top: clamp(12px, 1.8vh, 18px); width: clamp(38px, 15cqw, 50px); aspect-ratio: 1; display: grid; place-items: center; border: var(--line) solid var(--ink); border-radius: 32%; box-shadow: 3px 3px 0 var(--ink); transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.25, 1.4); }
.tile:hover .ico { transform: rotate(-8deg) scale(1.08); }
.ico svg { width: 58%; height: 58%; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-mint { background: var(--mint); } .i-cream { background: var(--cream); } .i-peri { background: var(--peri); }
.i-peri svg { stroke: var(--cream); }

/* isometric cubes perched on tile corners */
.cube { position: absolute; z-index: 2; pointer-events: none; stroke: var(--ink); stroke-width: 0.075; stroke-linejoin: round; animation: bob 4.6s ease-in-out infinite alternate; translate: calc(var(--mx, 0) * var(--depth, 10px)) calc(var(--my, 0) * var(--depth, 10px)); transition: translate 0.45s ease-out; }
@keyframes bob { from { transform: translateY(-5px) rotate(-2deg); } to { transform: translateY(5px) rotate(2deg); } }
.c-cream .t { fill: #FFFDF6; } .c-cream .l { fill: #E9DFC9; } .c-cream .r { fill: #C9BDA3; }
.c-orange .t { fill: #FF9A5C; } .c-orange .l { fill: var(--orange); } .c-orange .r { fill: #C4551A; }
.c-peri .t { fill: #9A8CFF; } .c-peri .l { fill: var(--peri); } .c-peri .r { fill: #4336B8; }
.c-mint .t { fill: #B4F7E0; } .c-mint .l { fill: var(--mint); } .c-mint .r { fill: #3FBE97; }
.p1 { width: 46px; right: -20px; bottom: -22px; --depth: 12px; }
.p2 { width: 40px; left: -18px; top: -20px; --depth: -9px; animation-delay: -1.6s; }
.p3 { width: 52px; left: -24px; bottom: 16%; --depth: 16px; animation-delay: -2.8s; }
.p4 { width: 38px; right: 30%; top: -19px; --depth: -12px; animation-delay: -0.8s; }

/* gas saved: the tall dark tile with the drop */
.a-gas .num { margin-top: 0.34em; font-size: clamp(46px, 21cqw, 92px); }
.a-gas .art { flex: 1; min-height: 150px; display: flex; align-items: center; justify-content: center; margin-top: 10px; }
.a-gas .art img { width: auto; height: auto; max-width: 96%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 0 40px rgba(254, 120, 45, 0.3)); }
.float { animation: float 5.2s ease-in-out infinite alternate; }
.float.slow { animation-duration: 6.4s; animation-delay: -2s; }
@keyframes float { from { transform: translateY(-6px) rotate(-1.4deg); } to { transform: translateY(6px) rotate(1.4deg); } }

/* escrow: the number, a bar against the cap, and the shield */
.a-escrow { flex-direction: row; align-items: stretch; gap: clamp(12px, 2vw, 30px); }
.escrow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.a-escrow h2 { padding-right: 0; }
.a-escrow .num { font-size: clamp(44px, 13cqw, 84px); }
.meter { height: 14px; margin: 0.9em 0 0; border: var(--line) solid var(--ink); border-radius: 99px; background: #fff; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: repeating-linear-gradient(-45deg, var(--peri) 0 9px, #8173F0 9px 18px); background-size: 200% 100%; animation: stripes 1.4s linear infinite; transition: width 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s; }
@keyframes stripes { to { background-position: -25.5px 0; } }
.a-escrow .sub { white-space: normal; text-wrap: balance; }
.a-escrow .art { flex: 0 0 auto; width: clamp(96px, 24cqw, 190px); display: flex; align-items: center; justify-content: center; }
.a-escrow .art img { width: 100%; height: auto; max-height: 100%; object-fit: contain; }

/* ── footer ── */
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font: 700 13px/1.2 var(--font); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; }
.chips li { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border: 1.8px solid rgba(253, 245, 229, 0.55); border-radius: 999px; font: 700 12.5px/1 var(--display); }
.chips li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(253, 245, 229, 0.6); }
.chips li.ok::before { background: var(--mint); }
.chips li.bad { background: var(--orange); border-color: var(--ink); color: var(--ink); }
.chips li.bad::before { background: var(--ink); }
.live { display: inline-flex; align-items: center; gap: 9px; margin: 0 auto 0 0; opacity: 0.95; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: rgba(253, 245, 229, 0.5); }
.pulse.on { background: var(--mint); animation: ping 2.2s ease-out infinite; }
.pulse.err { background: var(--orange); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(122, 238, 198, 0.7); } 80%, 100% { box-shadow: 0 0 0 10px rgba(122, 238, 198, 0); } }
.retry { border: 2px solid var(--ink); background: var(--cream); color: var(--ink); border-radius: 999px; padding: 4px 12px; font: 800 12px var(--font); cursor: pointer; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { text-decoration: none; opacity: 0.85; }
.foot a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
#f-registry { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 600; letter-spacing: -0.02em; }

/* ── a desktop window: everything on one screen, nothing scrolls ── */
@media (min-width: 1000px) and (min-height: 600px) {
  html, body { height: 100%; overflow: hidden; }
  .page { height: 100dvh; min-height: 0; }
  .board { min-height: 0; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.22fr); grid-template-rows: repeat(3, minmax(0, 1fr));
    grid-template-areas: "title title sponsors gas" "plans subs txs gas" "escrow escrow escrow gas"; }
  .title { grid-area: title; container-type: size; padding: 0; }
  .xh { font-size: min(35cqh, 15.4cqw); }
  .title p { font-size: clamp(13px, min(7.2cqh, 2.5cqw), 19px); margin-top: max(16px, 8.5cqh); }
  .a-sponsors { grid-area: sponsors; } .a-plans { grid-area: plans; } .a-subs { grid-area: subs; } .a-txs { grid-area: txs; } .a-gas { grid-area: gas; } .a-escrow { grid-area: escrow; }
  .tile { container-type: size; min-height: 0; }
  .num { font-size: clamp(34px, min(46cqh, 30cqw), 132px); }
  .ico { width: clamp(34px, min(24cqh, 15cqw), 54px); }
  .a-gas .num { font-size: clamp(40px, min(15cqh, 23cqw), 120px); }
  .a-gas .art { min-height: 0; }
  .a-escrow .num { font-size: clamp(36px, min(40cqh, 13cqw), 132px); }
  .a-escrow .art { width: auto; height: 100%; aspect-ratio: 560 / 733; }
  .a-escrow .art img { width: auto; height: 108%; max-height: none; margin-top: -4%; }
  .meter { height: clamp(10px, 7cqh, 16px); margin-top: min(0.9em, 6cqh); }
}
/* very short desktop windows: the subtitles go first */
@media (min-width: 1000px) and (min-height: 600px) and (max-height: 700px) {
  .tile:not(.a-gas):not(.a-escrow) .sub { display: none; }
}

/* ── phones and narrow windows: the same tiles, stacked, and the page scrolls ── */
@media (max-width: 999px), (max-height: 599px) {
  .a-gas, .a-escrow { grid-column: 1 / -1; }
  .a-gas { min-height: 420px; }
  .a-gas .art img { max-height: 250px; }
  .a-escrow { min-height: 190px; }
  .title { padding: 14px 0 18px; }
  .live { margin-left: 0; }
}
@media (max-width: 560px) {
  .top { flex-wrap: wrap; row-gap: 12px; }
  .badge { order: 3; margin-left: 0; }
  #open-app { margin-left: auto; }
  .board { grid-template-columns: 1fr; padding-right: 8px; }
  .tile { min-height: 150px; }
  .num { font-size: clamp(48px, 19cqw, 76px); }
  .a-escrow .art { width: 96px; }
  .foot { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  body, .tile, .xh span, .cube, .float, .pulse.on, .meter i, .loading .num span, .tile.bump .num { animation: none; }
  .meter i, .cube, .mark, .tile, .btn, .ico { transition: none; }
}
