/* Hallmark · macrostructure: floating-island nav over a task cards on black with halftone spheres cropped at the viewport edges, ledger sheets, deep-blue band · genre: atmospheric · nav: island · footer: lockup with fine print · critique: P5 H4 E4 S5 R4 V4 */
@font-face { font-family: 'DM Sans'; src: url('/assets/fonts/dm-sans.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }

:root {
  color-scheme: dark;
  --black: #05070d;
  --surface: #0f1524;
  --raised: #182136;
  --line: #232c40;
  --edge: #5a6985;
  --cream: #ede6d6;
  --ink: #dcd7ca;
  --muted: #a6b0c3;
  --blue: #0070e0;
  --btn: #0060c4;
  --link: #66aeff;
  --band: #081433;
  --band-up: #0b1d4c;
  --good: #57cf95;
  --bad: #ff9c92;
  --good-tint: #0c2419;
  --bad-tint: #2c1315;
  --off: #2a3650;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: 'DM Sans', system-ui, sans-serif;
  --shade-nav-up: rgba(0, 0, 0, .6);
  --shade-nav: rgba(0, 0, 0, .45);
  --shade-card: rgba(0, 0, 0, .55);
  --focus-halo: rgba(102, 174, 255, .28);
  --veil: rgba(255, 255, 255, .05);
  --veil-up: rgba(255, 255, 255, .09);
  --veil-line: rgba(255, 255, 255, .14);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { overflow-x: clip; font-size: clamp(15px, .92vw, 25px); scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { margin: 0; background: var(--black); color: var(--ink); font-family: var(--font); line-height: 1.5; overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: var(--link); }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: .4rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; z-index: 60; }
.skip:focus { left: 1rem; top: 1rem; }
.wrap { width: min(92vw, 96rem); margin-inline: auto; }

/* island nav */
.island { position: fixed; z-index: 40; top: .9rem; left: 50%; transform: translateX(-50%); width: min(96vw, 100rem); display: flex; align-items: center; gap: 1.25rem; padding: .5rem .75rem .5rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 1.1rem; box-shadow: 0 .3rem 1.6rem var(--shade-nav); transition: box-shadow .3s var(--ease); }
.island.tight { box-shadow: 0 .2rem 1rem var(--shade-nav-up); }
.brand img { height: 1.9rem; width: auto; }
.links { display: flex; gap: 1.5rem; margin-left: 1rem; }
.links a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; position: relative; }
.links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -.25rem; height: 2px; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .28s var(--ease); }
.links a:hover::after { transform: scaleX(1); }
.tools { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.ico { width: 2.35rem; height: 2.35rem; display: grid; place-items: center; color: var(--cream); border-radius: 50%; transition: background .2s; }
.ico:hover { background: var(--raised); }
.ico svg { width: 1.2rem; height: 1.2rem; }
.ca, .pair { font-size: .85rem; font-weight: 500; color: var(--muted); background: var(--raised); border: 0; padding: .5rem .75rem; border-radius: 99rem; white-space: nowrap; text-decoration: none; }
.ca:not(:disabled) { cursor: pointer; color: var(--cream); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: 99rem; border: 2px solid transparent; padding: .5rem 1.25rem; font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s, transform .2s var(--ease), border-color .2s; }
.btn:active { transform: scale(.98); }
.btn-solid { background: var(--btn); color: var(--cream); }
.btn-solid:hover { background: var(--link); color: var(--black); }
.btn-solid:disabled { background: var(--off); color: var(--muted); cursor: progress; }
.btn-line { background: transparent; color: var(--cream); border-color: var(--edge); }
.btn-line:hover { background: var(--cream); color: var(--black); }
.btn-line[aria-disabled='true'] { color: var(--muted); border-color: var(--line); }
.btn-line[aria-disabled='true']:hover { background: transparent; color: var(--muted); }
.btn-wide { width: 100%; padding: .75rem 1.25rem; font-size: 1.02rem; }

/* first view */
.hero { position: relative; overflow: hidden; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 33fr) minmax(0, 67fr); }
.hero-copy { position: relative; z-index: 1; padding: 8rem 3rem 3rem max(4vw, calc((100vw - 100rem) / 2)); display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; }
.hero h1 { font-weight: 700; font-size: clamp(2.5rem, 3.75vw, 5rem); line-height: 1.05; letter-spacing: -.022em; color: var(--cream); text-wrap: balance; overflow-wrap: normal; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 30rem; }
.totals { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; margin-top: .5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.totals dt { font-size: .88rem; color: var(--muted); }
.totals dd { font-size: 1.45rem; font-weight: 700; color: var(--cream); font-variant-numeric: tabular-nums; }

.hero-stage { position: relative; display: grid; grid-template-columns: minmax(0, 27rem) minmax(0, 1fr); gap: 1.5rem; align-items: stretch; align-content: center; z-index: 1; padding: 5.5rem max(4vw, calc((100vw - 100rem) / 2)) 2rem 2rem; }
.spheres { position: absolute; inset: 0; pointer-events: none; }
.sphere { position: absolute; width: var(--s); height: var(--s); max-width: none; transform: translateY(calc(var(--drift, 0) * var(--k))); }
.s1 { --s: 19rem; --k: -5rem; left: -8rem; top: -7rem; }
.s2 { --s: 15rem; --k: 4rem; left: -7rem; bottom: -9rem; }
.s3 { --s: 20rem; --k: -7rem; left: 37%; bottom: -15rem; }
.s4 { --s: 13rem; --k: 3rem; left: 56%; top: -9.5rem; }
.s5 { --s: 22rem; --k: -3rem; right: -9rem; top: -9rem; }
.s6 { --s: 26rem; --k: -9rem; right: -8rem; bottom: -16rem; }

.wallet-card, .recent { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 1.5rem; box-shadow: 0 1.4rem 3.2rem var(--shade-card); }
.wallet-card { padding: 1rem 1.25rem 1rem; }

.tabs { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--raised); border-radius: 99rem; padding: .25rem; margin-bottom: 1rem; }
.tabs button { position: relative; background: none; border: 0; font-weight: 700; padding: .5rem; border-radius: 99rem; cursor: pointer; color: var(--muted); transition: color .25s; }
.tabs button[aria-selected='true'] { color: var(--cream); }
.tab-mark { position: absolute; top: .25rem; bottom: .25rem; left: .25rem; width: calc((100% - .5rem) / 3); background: var(--btn); border-radius: 99rem; transition: transform .38s var(--ease); }

.panel { display: flex; flex-direction: column; gap: .75rem; }
.panel[hidden] { display: none; }
.panel form { display: flex; flex-direction: column; gap: .75rem; }
.field { display: flex; flex-direction: column; gap: .25rem; min-width: 0; flex: 1; }
.field > span { font-size: .84rem; font-weight: 500; color: var(--muted); }
.field input:not([type='file']) { width: 100%; border: 1.5px solid var(--edge); border-radius: .7rem; padding: .5rem .75rem; background: var(--black); transition: border-color .2s, box-shadow .2s; }
input:-webkit-autofill { -webkit-text-fill-color: var(--cream); box-shadow: 0 0 0 4rem var(--black) inset; }
.field input:focus { outline: 0; border-color: var(--link); box-shadow: 0 0 0 3px var(--focus-halo); }
.field input[aria-invalid='true'] { border-color: var(--bad); }
.field.narrow { flex: 0 0 38%; }
.row { display: flex; gap: .75rem; }
.person { display: flex; flex-direction: column; gap: .5rem; padding-bottom: .5rem; }
.person + .person { border-top: 1px solid var(--line); padding-top: .5rem; }
.person-line { display: flex; gap: .5rem; align-items: flex-end; }
.share { flex: 0 0 4.6rem !important; }
.remove { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .85rem; padding: .5rem .25rem; text-decoration: underline; }
.add { align-self: flex-start; border: 0; background: none; color: var(--link); font-weight: 700; font-size: .9rem; cursor: pointer; padding: .25rem 0; }
.add:hover { text-decoration: underline; }
.add[hidden] { display: none; }
.for-whom { background: var(--raised); border-radius: .8rem; padding: .5rem .75rem; font-size: .92rem; }
.file input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-face { display: flex; align-items: center; gap: .5rem; border: 1.5px dashed var(--edge); border-radius: .7rem; padding: .25rem .75rem; min-height: 2.58rem; cursor: pointer; transition: border-color .2s; overflow: hidden; }
.file:hover .file-face, .file input:focus-visible + .file-face { border-color: var(--link); }
.file-face b { font-weight: 500; font-size: .92rem; color: var(--link); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-face img { width: 1.7rem; height: 1.7rem; object-fit: cover; border-radius: .4rem; }
.costs { background: var(--raised); border-radius: .8rem; padding: .5rem .75rem; }
.costs summary { display: flex; justify-content: space-between; cursor: pointer; font-weight: 500; list-style: none; }
.costs summary::-webkit-details-marker { display: none; }
.costs summary strong { color: var(--cream); font-variant-numeric: tabular-nums; }
.costs dl { margin-top: .5rem; display: grid; gap: .25rem; font-size: .86rem; color: var(--muted); }
.costs dl div { display: flex; justify-content: space-between; gap: 1rem; }
.fine { font-size: .8rem; color: var(--muted); line-height: 1.35; }
.step-note { font-size: .95rem; color: var(--muted); }
.status { font-size: .92rem; padding: .5rem .75rem; border-radius: .7rem; background: var(--raised); color: var(--ink); overflow-wrap: anywhere; }
.status.bad { background: var(--bad-tint); color: var(--bad); }
.status.good { background: var(--good-tint); color: var(--good); }
.closed { background: var(--raised); border-radius: .9rem; padding: 1rem 1rem; }
.closed strong { color: var(--cream); }
.closed p { font-size: .95rem; color: var(--muted); }
.balance-mask { color: var(--muted); }
.balance { font-size: 2.3rem; font-weight: 700; color: var(--cream); line-height: 1.15; font-variant-numeric: tabular-nums; margin-bottom: .5rem; }
.book { margin-bottom: .75rem; }
.book li { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.past { margin: .75rem 0 0; }
#claimPaypal { margin-top: .5rem; }
.req-out { display: flex; gap: 1rem; align-items: center; }
.req-out[hidden] { display: none; }
.qr { flex: 0 0 7rem; width: 7rem; background: var(--cream); padding: .25rem; border-radius: .6rem; }
.qr img { width: 100%; image-rendering: pixelated; }

.recent { padding: 1rem 1.25rem; display: flex; flex-direction: column; min-height: 0; }
.recent-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.recent h2 { font-size: 1.12rem; color: var(--cream); }
.live { display: inline-flex; gap: .5rem; align-items: center; font-size: .85rem; color: var(--good); font-weight: 500; }
.live::before { content: ''; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }
.live.off { color: var(--muted); }
.live.off::before { animation: none; }
@keyframes pulse { 50% { opacity: .35; } }
.events li { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.events li:last-child { border-bottom: 0; }
.dot { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--raised); color: var(--cream); font-weight: 700; display: grid; place-items: center; overflow: hidden; }
.dot img { width: 100%; height: 100%; object-fit: cover; }
.ev-what { font-weight: 500; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-sub { font-size: .84rem; color: var(--muted); }
.ev-amt { font-weight: 700; color: var(--good); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.ev-amt a { color: inherit; text-decoration: none; }
.ev-amt a:hover { text-decoration: underline; }
.empty { color: var(--muted); padding: 1.5rem .25rem; }
.empty strong { display: block; color: var(--ink); margin-bottom: .25rem; }
.events { flex: 1; display: flex; flex-direction: column; }
.first { flex: 1; display: flex !important; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .5rem; border: 0 !important; padding: 1rem; }
.first img { width: 5.5rem; height: 5.5rem; border-radius: 1.3rem; border: 1px solid var(--line); margin-bottom: .5rem; }
.first strong { font-size: 1.3rem; color: var(--cream); }
.first p { color: var(--muted); max-width: 19rem; }
.first .btn { margin-top: .5rem; }

/* ledger */
.ledger { padding: 6rem 0 5.5rem; }
.ledger h2, .how h2, .questions h2 { font-weight: 700; letter-spacing: -.014em; line-height: 1.08; font-size: clamp(2.1rem, 2.8vw, 3.6rem); color: var(--cream); }
.sub { font-size: 1.12rem; color: var(--muted); margin-top: .75rem; max-width: 42rem; }
.ledger-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.sheet { border: 1px solid var(--line); border-radius: 1.4rem; padding: 1.25rem 1.5rem; background: var(--surface); }
#board:has(.empty) li { display: block; padding: 0; }
.sheet h3 { font-size: 1.15rem; color: var(--cream); margin-bottom: .5rem; }
.coin-row { display: grid; grid-template-columns: 2.8rem minmax(0, 1.2fr) minmax(0, 1.4fr) auto; gap: 1rem; align-items: center; padding: .75rem 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; transition: background .2s; }
.coin-row:first-child { border-top: 0; }
.coin-row:hover { background: var(--raised); }
.coin-row .dot { width: 2.8rem; height: 2.8rem; border-radius: .8rem; }
.coin-row small, .who small { display: block; color: var(--muted); font-size: .85rem; }
.coin-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-booked { font-weight: 700; color: var(--cream); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.unconfirmed { color: var(--muted); }
.confirmed { color: var(--good); }
#board li { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-top: 1px solid var(--line); align-items: center; }
#board li:first-child { border-top: 0; }
#board a { color: var(--ink); font-weight: 700; text-decoration: none; }
#board a:hover { color: var(--link); }

/* blue band */
.how { position: relative; overflow: hidden; background: linear-gradient(165deg, var(--band), var(--band-up)); color: var(--cream); padding: 6rem 0; width: min(97vw, 104rem); margin-inline: auto; border-radius: 2.2rem; }
.how > .wrap { position: relative; }
.how .sphere { --s: 22rem; --k: 0rem; right: -7rem; top: -11rem; }
.how h2 { color: var(--cream); }
.how-grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3rem; padding-top: 2rem; }
.how-line { position: absolute; left: 0; top: .5rem; width: 100%; height: 3px; border-radius: 3px; background: var(--link); transform-origin: left center; }
.how article { background: var(--veil); border: 1px solid var(--veil-line); border-radius: 1.4rem; padding: 1.5rem; display: flex; flex-direction: column; gap: .75rem; transition: transform .35s var(--ease), background .35s; }
.how article:hover { transform: translateY(-.35rem); background: var(--veil-up); }
.how h3 { font-size: 1.3rem; }
.how p { color: var(--ink); }
.proof { margin-top: auto; padding-top: .75rem; font-size: .95rem; }
.proof strong { font-size: 1.5rem; color: var(--cream); font-variant-numeric: tabular-nums; }

/* questions */
.questions { padding: 6rem 0; }
.qgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 3rem; }
.qlist details { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; margin-bottom: .5rem; padding: 1rem 1.25rem; }
.qlist summary { font-weight: 700; color: var(--cream); cursor: pointer; font-size: 1.05rem; }
.qlist details p { margin-top: .5rem; color: var(--muted); max-width: 46rem; }

/* recipient and coin pages */
.view { padding: 7.5rem 0 5rem; min-height: 80vh; }
.view h1 { font-size: clamp(2.1rem, 3.2vw, 3.6rem); color: var(--cream); letter-spacing: -.02em; line-height: 1.1; overflow-wrap: anywhere; }
.view .cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.5rem; margin-top: 2rem; }
.view .figs { display: flex; flex-wrap: wrap; gap: 2.5rem; margin-top: 1.5rem; }
.view .figs dt { color: var(--muted); font-size: .9rem; }
.view .figs dd { font-size: 1.7rem; font-weight: 700; color: var(--cream); }
.view .notice { margin-top: 1rem; background: var(--raised); padding: .75rem 1rem; border-radius: .9rem; max-width: 46rem; }
.view .acts { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.fee-row a { text-decoration: none; }
.fee-row { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-top: 1px solid var(--line); }

.foot { padding: 3rem 0; border-top: 1px solid var(--line); }
.foot-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2.5rem; align-items: center; }
.foot img { height: 2.3rem; width: auto; }
.foot p { color: var(--muted); font-size: .92rem; max-width: 40rem; }
.foot nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.foot nav a { color: var(--cream); font-weight: 500; text-decoration: none; padding-block: .25rem; display: inline-block; }
.foot nav a:hover { text-decoration: underline; }

.toast { position: fixed; z-index: 70; bottom: 1.4rem; left: 50%; transform: translateX(-50%); background: var(--raised); border: 1px solid var(--edge); color: var(--cream); padding: .75rem 1.25rem; border-radius: 99rem; font-weight: 500; max-width: 90vw; }

@media (max-width: 1240px) {
  .links { display: none; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { position: relative; z-index: 1; padding: 7rem 4vw 2rem; }
  .hero h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); }
  .lede { max-width: 40rem; }
  .totals { grid-template-columns: repeat(4, 1fr); }
  .hero-stage { padding: 1.5rem 4vw 2.5rem; }
  .s1, .s2, .s3, .s4 { display: none; }
  .s5 { --s: 15rem; right: -6rem; top: -6rem; }
  .s6 { --s: 18rem; right: -6rem; bottom: -9rem; }
}
@media (max-width: 820px) {
  .hero-stage { grid-template-columns: minmax(0, 1fr); }
  .ledger-grid, .how-grid, .qgrid, .view .cols { grid-template-columns: minmax(0, 1fr); }
  .how-line { display: none; }
  .how-grid { padding-top: 0; }
  .foot-in { grid-template-columns: 1fr; gap: 1rem; }
  .coin-row { grid-template-columns: 2.8rem minmax(0, 1fr) auto; }
  .coin-row .who { grid-column: 2 / -1; grid-row: 2; }
  .ledger, .how, .questions { padding: 4rem 0; }
  .how { border-radius: 1.6rem; }
  .how .sphere { --s: 10rem; right: -4.5rem; top: -6.5rem; }
}
@media (max-width: 620px) {
  .island { flex-wrap: wrap; gap: .5rem; padding: .5rem .5rem; top: .5rem; }
  .brand img { height: 1.6rem; }
  .tools { margin-left: 0; width: 100%; justify-content: space-between; gap: .25rem; }
  .ca { font-size: .74rem; padding: .5rem .5rem; }
  .btn { padding: .5rem .75rem; font-size: .84rem; }
  .btn-wide { padding: .75rem 1rem; font-size: 1rem; }
  .ico { width: 2rem; height: 2rem; }
  .hero-copy { padding-top: 7.5rem; }
  .totals { grid-template-columns: 1fr 1fr; }
  .wallet-card { padding-inline: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
