/* Dashboard page: only what the design system does not define. */

/* Header: stays in view while the page scrolls, with the wallet button on the right of the nav row. */
.site-header { position: sticky; top: 0; background-color: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .nav { height: 64px; }
.site-header .hero__ca { padding-bottom: var(--s-3); }
.site-header .ca-slot { box-shadow: 0 2px 0 var(--navy); padding-top: 5px; padding-bottom: 5px; }

.wallet { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); min-height: 32px; }
.wallet__addr { font-size: 13px; color: var(--ink); padding: 0 10px; line-height: 30px; border-radius: 6px; background: var(--paper-2); }
.wallet[data-state='disconnected'] .wallet__addr,
.wallet[data-state='connecting'] .wallet__addr,
.wallet[data-state='missing'] .wallet__addr,
.wallet[data-state='disconnected'] [data-wallet-disconnect],
.wallet[data-state='connecting'] [data-wallet-disconnect],
.wallet[data-state='missing'] [data-wallet-disconnect] { display: none; }
.wallet[data-state='connected'] [data-wallet-connect] { display: none; }
.wallet[data-state='connecting'] [data-wallet-connect] { opacity: 0.6; pointer-events: none; }

/* Page frame */
.app-main { padding-top: 0; padding-bottom: var(--s-8); align-items: stretch; }
.app-main > section { min-width: 0; }
.app-fill { height: 100%; }
.app-col { display: flex; flex-direction: column; }
.app-grow { flex: 1; min-height: 0; }
.app-col > .panel__foot { margin-top: auto; }

/* Vault card */
.vault-card { display: flex; flex-direction: column; gap: var(--s-5); flex: 1; }
.panel--stage.app-fill { display: flex; flex-direction: column; }
.vault-card__balance { margin-top: var(--s-2); font-size: 46px; color: var(--on-navy); }
.vault-card__clock { display: flex; align-items: center; gap: var(--s-4); padding: 14px 0; border-top: 1px dashed var(--navy-line); border-bottom: 1px dashed var(--navy-line); }
.vault-card__clock .figure { color: var(--on-navy); }
.vault-card__clock .small { margin-top: 4px; }
.vault-card__run { margin-top: auto; width: 100%; justify-content: center; }
.vault-card .list__row dd { display: inline-flex; align-items: center; }
.vault-card [hidden], .app-main [hidden] { display: none !important; }

/* Submit box */
.submit-recent { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line); }
#submit-form .preview { margin-top: calc(var(--s-1) * -1); }
.preview__text { overflow-wrap: anywhere; }
.preview__meta b { color: var(--ink); font-weight: 600; margin-left: 4px; }
.suggestion:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.suggestion .type-chip { min-width: 84px; }

/* Posts */
.posts-filter { padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--paper); }
#posts-table .post-cell { max-width: 250px; }
#posts-table th, #posts-table td { white-space: nowrap; }
.tab:focus-visible, .sort:focus-visible, .pager__btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Leaderboard */
.lb-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lb-person__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#board-table th:first-child, #board-table td:first-child { padding-left: 16px; padding-right: 4px; width: 28px; }
#board-table th:last-child, #board-table td:last-child { padding-right: 16px; }
.share { display: grid; gap: 5px; justify-items: end; min-width: 64px; }
.share .meter { width: 100%; }
#board-table tr.is-me .meter { background: #fff; }
#board-table tr.is-me .meter__fill { background: var(--navy); }

/* History */
.history-chart { padding: var(--s-5) 20px var(--s-3); border-bottom: 1px solid var(--line); }
.history-scroll { max-height: 520px; overflow-y: auto; }
.history-scroll .table tfoot td { position: sticky; bottom: 0; }

@media (max-width: 1180px) {
  #posts-table .post-cell { max-width: 190px; }
}

/* Muted text on the gold "my row" highlight needs the darker ink */
.table tr.is-me .muted, .table tr.is-me .small { color: var(--ink-2); }
