/* Splitpot's own look, on top of base.css: the walnut table, the pot, place cards, cheese gold for money.
   Everything reads tokens.css. One motion moment per page: the bubble on the pot. */

body { background: radial-gradient(1100px 520px at 50% -140px, rgba(244, 182, 63, 0.07), transparent 70%) no-repeat, var(--bg); }
h1, h2, .display { font-variation-settings: "SOFT" 100; }
h1.display { font-size: clamp(40px, 5.2vw, 74px); line-height: 1; }
h1.display > span { display: block; }
.gold, .num.gold, b.gold { color: var(--accent); }
.lede b { color: var(--ink); font-weight: 500; }
.center { text-align: center; }

/* ---------- header ---------- */
#top { background: color-mix(in srgb, var(--bg) 88%, transparent); }
.top-bar { gap: 22px; }
.brand { flex: none; }
.brand svg { display: block; height: 34px; width: auto; margin-top: 6px; }
.nav { gap: 2px; }
.nav a { position: relative; border-radius: var(--r-sm); padding: 8px 11px; font-size: 14.5px; }
.nav a:hover { background: none; color: var(--ink); }
.nav a[aria-current] { background: none; color: var(--ink); }
.nav a[aria-current]::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 1px; height: 2px; border-radius: 2px; background: var(--accent); }
.ca.small { border-style: solid; border-color: var(--line-2); }
.ca.small .ca-soon { color: var(--ink-2); }
.x-link { width: 44px; padding: 0; flex: none; color: var(--ink-2); }
.x-link:hover { color: var(--ink); border-color: var(--line-2); }

/* ---------- buttons ---------- */
.btn { border-radius: 12px; }
.btn.primary { box-shadow: 0 2px 0 #a8731a, 0 10px 24px -14px rgba(244, 182, 63, 0.6); }
.btn.primary:active { transform: translateY(2px); box-shadow: 0 0 0 #a8731a; }
.btn.sm { border-radius: 10px; }
.chip.gold { color: var(--on-accent); background: var(--accent); border-color: transparent; }
.chip.sm { height: 20px; padding: 0 7px; font-size: 11px; }
.chip.demo { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.chips-inline { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: middle; }
.chips-inline .chip { height: 20px; padding: 0 7px; font-size: 11px; }

/* ---------- the pot of coins ---------- */
.pot-box svg, .pot-art svg { display: block; width: 100%; height: auto; overflow: visible; }
.pot-box.big { width: min(100%, 540px); margin-inline: auto; }
/* the one motion: a coin drops onto the heap every few seconds, then fades into it. Motion off: no coin at all. */
.coin-drop { opacity: 0; animation: coin-drop 3.4s cubic-bezier(0.55, 0, 0.85, 0.4) infinite; }
@keyframes coin-drop {
  0% { transform: translateY(var(--fall)); opacity: 0; }
  8% { opacity: 1; }
  30% { transform: translateY(0); opacity: 1; }
  36% { transform: translateY(2px); opacity: 0; }
  100% { transform: translateY(2px); opacity: 0; }
}
/* the split, labelled: the same slices as the rim band, lined up under it */
.split-strip { display: flex; gap: 3px; margin-top: 6px; }
.split-seg { flex: 1 1 0; min-width: 0; container-type: inline-size; display: grid; gap: 1px; padding: 6px 4px 7px; border-radius: 5px; background: var(--card); color: #2a1a10; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35); text-align: center; }
.split-seg.alt { background: #cdb994; }
.split-seg.you { background: var(--accent); }
.split-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.split-pct { font-size: 11.5px; white-space: nowrap; }
@container (max-width: 26px) { .split-name { display: none; } }
@container (max-width: 18px) { .split-pct { font-size: 0; } }
.pot-box.mini .split-strip { display: none; }

/* ---------- home ---------- */
/* the hero: the words on the left, the pot on the table on the right, its live numbers under the words */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(20px, 3vw, 48px); align-items: center; padding-top: clamp(28px, 4vw, 56px); }
.hero-copy { display: grid; justify-items: start; }
.hero-copy .lede { margin-top: 18px; }
.hero-stats { gap: 10px 34px; margin-top: 24px; }
.stage { position: relative; }
.stage::before { content: ""; position: absolute; inset: 6% 4%; border-radius: 50%; background: radial-gradient(closest-side, rgba(247, 236, 217, 0.06), transparent); pointer-events: none; }
.stage-pot { position: relative; }
.note-card { display: grid; gap: 10px; width: 100%; max-width: 520px; margin-top: 24px; padding: 18px 20px; border-radius: var(--r-lg); border: var(--border); background: var(--surface); box-shadow: var(--shadow); transition: transform var(--t) var(--ease), border-color var(--t) var(--ease); }
a.note-card:hover { transform: translateY(-3px); border-color: var(--line-3); }
.note-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.note-top .link-arrow { font-size: 13.5px; }
.note-card h3 { font: var(--display-weight) 24px/1.1 var(--font-display); font-variation-settings: "SOFT" 100; letter-spacing: var(--display-tracking); }
.note-card h3 .sym { font: 500 14px var(--font-mono); letter-spacing: 0; }
.note-card.static h3 { font-size: 21px; }
.note-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 10px 0; border-block: var(--border); }
.note-nums > div { display: grid; gap: 2px; }
.note-nums .num { font-size: 16px; }
.note-crew { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 500; }
a.note-card:hover .link-arrow { color: var(--ink); }

.steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step { position: relative; padding: 24px; gap: 10px; }
.step-pot { width: 136px; margin-bottom: 6px; }
.step-pot svg { width: 100%; height: auto; display: block; }
.step-n { color: var(--accent); }
.band .ca { margin-top: 6px; max-width: 560px; justify-content: center; text-align: center; }

.controls { margin-bottom: 20px; }
.live-line { margin-top: 10px; font-size: 14px; }
.grid-pots { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.pot-card { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px 18px 16px 14px; border-radius: var(--r-lg); border: var(--border); background: var(--surface); box-shadow: var(--shadow); transition: transform var(--t) var(--ease), border-color var(--t) var(--ease); }
a.pot-card:hover { transform: translateY(-3px); border-color: var(--line-3); }
.pot-card-art { width: 108px; }
.pot-card-main { display: grid; gap: 12px; min-width: 0; }
.pot-card-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pot-card-id { min-width: 0; flex: 1; }
.pot-card-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pot-card-nums > div { display: grid; gap: 2px; min-width: 0; }
.pot-card-nums .num { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pot-card-crew { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-sym { font-size: 13px; color: var(--muted); }
.coin-pic { border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.pot-card.skeleton { min-height: 140px; }
.sk-pot { width: 108px; height: 108px; border-radius: 50% !important; }
.sk-col { display: grid; gap: 12px; }
.skeleton .sk { border-radius: 8px; background: linear-gradient(90deg, var(--surface-2), var(--bg-2), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.6s infinite linear; }

.feed-card { padding: 6px 22px; }
.feed-row:last-child { border-bottom: 0; }
.feed-sym { color: var(--ink-2); }
.feed-sym:hover { color: var(--ink); }
.feed-row.k-serve .feed-text { color: var(--ink); }

.band { justify-items: center; text-align: center; padding-bottom: 20px; }
.band-pot { width: 150px; }
.band-pot svg { width: 100%; height: auto; display: block; }

/* ---------- empty states, 404 ---------- */
.empty-pot { width: 112px; opacity: 0.9; }
.empty-pot svg, .lost-pot svg { width: 100%; height: auto; display: block; }
.lost-pot { width: min(220px, 60vw); margin-bottom: 8px; }
.page-head.empty { justify-items: center; }

/* ---------- launch ---------- */
.launch-grid { grid-template-columns: minmax(0, 1fr) 420px; }
.crew-head, .crew-row { display: grid; grid-template-columns: 26px minmax(90px, 0.8fr) minmax(0, 2fr) 104px 36px; gap: 8px; align-items: center; }
.crew-head { margin-top: 18px; padding: 0 0 6px; }
.crew-rows { display: grid; gap: 8px; }
.crew-n { color: var(--muted); font-size: 13px; text-align: center; }
.crew-row .input { height: 44px; }
.crew-wallet { font-size: 14px; }
.crew-share-box .input { text-align: right; padding-right: 2px; }
.crew-problem { grid-column: 2 / -1; }
.crew-x[disabled] { opacity: 0.3; cursor: default; }
.crew-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.crew-sum { display: flex; align-items: baseline; gap: 10px; }
.crew-total { font-size: 18px; color: var(--good); }
.crew-total.bad { color: var(--bad); }
.preview-card { display: grid; gap: 10px; }
.preview-head { display: flex; align-items: center; gap: 10px; }
.preview-pot { width: 100%; }
.per-sol { font-size: 14px; color: var(--ink-2); }
.per-sol b { color: var(--ink); font-weight: 600; }
.confirm-crew ul { display: grid; gap: 6px; margin-top: 8px; }
.confirm-crew li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; font-size: 14px; }
.confirm-crew li > :last-child { grid-column: 1 / -1; font-size: 12.5px; margin-top: -4px; }

/* ---------- a pot's page ---------- */
.coin-head { padding-top: 36px; }
.head-pot { width: 76px; }
.coin-title h1 { font-size: clamp(30px, 4vw, 50px); }
.coin-title .sym { font-family: var(--font-mono); font-size: 0.42em; letter-spacing: 0; vertical-align: middle; }
.pot-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); gap: 22px; margin-top: 22px; align-items: start; }
.pot-stage { border-radius: 28px; border: var(--border); padding: clamp(8px, 2vw, 22px);
  background: repeating-linear-gradient(97deg, rgba(247, 236, 217, 0.016) 0 2px, transparent 2px 11px), #1e150f; }
.pot-right { display: grid; gap: 18px; }
.serve-card { display: grid; gap: 14px; }
.serve-top { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; }
.serve-top > div { display: grid; gap: 2px; }
.serve-top > div:last-child { text-align: right; justify-items: end; }
.pot-big { font: var(--display-weight) clamp(40px, 5vw, 60px)/1 var(--font-display); font-variation-settings: "SOFT" 100; color: var(--accent); letter-spacing: -0.02em; }
.pot-big .unit { font: 500 18px var(--font-mono); color: var(--ink-2); letter-spacing: 0; }
.served { font-size: 18px; }
.pot-bar { height: 6px; }
.crew-table { display: grid; }
.crew-tr { display: grid; grid-template-columns: minmax(0, 1.8fr) 0.6fr 0.7fr 0.7fr; gap: 10px; align-items: center; padding: 10px 0; border-bottom: var(--border); font-size: 14px; }
.crew-tr > span:not(:first-child) { text-align: right; }
.crew-th { padding-top: 0; }
.crew-tr.you { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent); }
.crew-who { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.crew-who a { font-size: 12.5px; }
.crew-who a:hover { color: var(--ink); }
.crew-card .fine { margin-top: 12px; }
.coin-stats { margin-top: 18px; }
.coin-stats .stat-value { font-size: 20px; }
.serve-list { display: grid; gap: 6px; }
.serve-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; font-size: 14px; }

/* ---------- my slices ---------- */
.lookup-card { display: grid; gap: 14px; max-width: 620px; }
.lookup { display: flex; gap: 8px; }
.lookup .input { flex: 1; font-size: 14px; }
.whose { margin-top: 4px; }
.slice-totals { margin-bottom: 18px; }
.slice-totals .stat { padding: 14px 18px; border-radius: var(--r); border: var(--border); background: var(--surface); min-width: 170px; }
.slices { display: grid; gap: 10px; }
.slice-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 90px 130px 130px; gap: 16px; align-items: center; padding: 12px 18px 12px 12px; border-radius: var(--r-lg); border: var(--border); background: var(--surface); transition: border-color var(--t) var(--ease), transform var(--t) var(--ease); }
.slice-row:hover { border-color: var(--line-3); transform: translateY(-2px); }
.slice-pot { width: 76px; }
.slice-id { display: grid; gap: 4px; min-width: 0; }
.slice-num { display: grid; gap: 2px; text-align: right; }
.addr-title { font-size: clamp(28px, 4vw, 44px); }

/* ---------- biggest pots ---------- */
.board { display: grid; }
.board-tr { display: grid; grid-template-columns: 34px minmax(0, 2.6fr) 0.5fr 1fr 1fr 1fr 0.9fr; gap: 14px; align-items: center; padding: 10px 14px; border-bottom: var(--border); font-size: 14.5px; }
.board-tr > :nth-child(n+3) { text-align: right; }
a.board-tr:hover { background: var(--surface); }
.board-th { border-bottom: 1px solid var(--line-2); }
.board-rank { color: var(--muted); }
a.board-tr:nth-child(2) .board-rank, a.board-tr:nth-child(3) .board-rank, a.board-tr:nth-child(4) .board-rank { color: var(--accent); }
.board-pot { display: flex; align-items: center; gap: 12px; min-width: 0; }
.board-art { width: 54px; flex: none; }
.board-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- docs ---------- */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.doc-toc { position: sticky; top: calc(var(--top-h) + 24px); display: grid; gap: 4px; }
.doc-toc .label { margin-bottom: 6px; }
.doc-toc a { color: var(--ink-2); font-size: 14.5px; padding: 4px 0; }
.doc-toc a:hover { color: var(--ink); }
.doc-body { max-width: 720px; display: grid; gap: 44px; }
.doc-sec { display: grid; gap: 14px; scroll-margin-top: calc(var(--top-h) + 24px); }
.doc-sec h2 { font-size: clamp(26px, 3vw, 34px); }
.doc-sec p { color: var(--ink-2); }
.doc-list { display: grid; gap: 10px; color: var(--ink-2); padding-left: 18px; list-style: disc; }
.doc-list b { color: var(--ink); }
.doc-figure { width: min(100%, 420px); margin: 6px auto 0; }
.doc-figure svg { width: 100%; height: auto; display: block; overflow: visible; }
.doc-body .faq { margin-top: 0; }

/* ---------- footer ---------- */
.foot-brand svg { height: 30px; width: auto; display: block; }
.foot-brand p { max-width: 34em; }

/* ---------- phones ---------- */
@media (max-width: 1100px) {
  .top-actions .ca { display: none; }
}
@media (max-width: 980px) {
  .hero, .pot-grid { grid-template-columns: 1fr; }
  .stage { max-width: 520px; width: 100%; margin-inline: auto; }
  .steps { grid-template-columns: 1fr; }
  .docs { grid-template-columns: 1fr; }
  .doc-toc { position: static; display: flex; flex-wrap: wrap; gap: 6px 14px; }
  .doc-toc .label { flex-basis: 100%; margin: 0; }
  .launch-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .board-th { display: none; }
  .board-tr { grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: "rank pot earned"; padding: 12px 6px; }
  .board-rank { grid-area: rank; }
  .board-pot { grid-area: pot; }
  .board-earned { grid-area: earned; }
  .board-tr > span[data-l]:not(.board-earned) { display: none; }
  .slice-row { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .slice-pot { width: 64px; }
  .slice-row .slice-num:nth-of-type(3), .slice-row .slice-num:nth-last-child(1) { display: none; }
  .tabbar a { padding: 8px 10px; }
  main { padding-bottom: 140px; }
}
@media (max-width: 560px) {
  .grid-pots { grid-template-columns: 1fr; }
  .pot-card { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 14px 14px 14px 10px; }
  .pot-card-art { width: 84px; }
  .crew-head { display: none; }
  .crew-row { grid-template-columns: 22px minmax(0, 1fr) 92px 32px; grid-template-areas: "n name share x" "n wallet wallet wallet" ". p p p"; row-gap: 6px; padding-bottom: 10px; border-bottom: var(--border); }
  .crew-n { grid-area: n; align-self: start; padding-top: 12px; }
  .crew-name { grid-area: name; }
  .crew-wallet { grid-area: wallet; }
  .crew-share-box { grid-area: share; }
  .crew-x { grid-area: x; }
  .crew-problem { grid-area: p; }
  .serve-top { grid-template-columns: 1fr; }
  .serve-top > div:last-child { text-align: left; justify-items: start; }
  .lookup { flex-direction: column; }
  .hero-stats { gap: 10px 22px; }
  .note-card { padding: 16px; }
  .coin-actions .btn { width: 100%; }
}
