:root {
  --bg: #06070b;
  --bg-2: #0d0e12;
  --row-hover: #101114;
  --line: #1a1b22;
  --line-2: #22242d;
  --text: #fcfcfc;
  --text-2: #777a8c;
  --text-3: #4b4e5c;
  --accent: #f2a142;
  --accent-hi: #fdbf6a;
  --accent-line: #6b4a22;
  --accent-dim: rgba(242, 161, 66, .12);
  --on-accent: #1a1206;
  --green: #2fe3ac;
  --red: #ec397a;
  --amber: #f5b14c;
  --sans: 'Source Sans 3', system-ui, sans-serif;
  --mono: 'Source Code Pro', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.4 var(--sans); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.muted { color: var(--text-2); }
.mono { font-family: var(--mono); }
.up { color: var(--green); }
.down { color: var(--red); }

/* header */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 24px; height: 64px; padding: 0 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.brand img, .brand svg { height: 30px; width: auto; display: block; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 8px; font-size: 16px; font-weight: 600; }
.nav a:hover { background: var(--row-hover); }
.nav a.on { color: var(--accent); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: 0 1 auto; min-width: 0; }
.search { cursor: pointer; flex: 0 1 400px; width: 400px; min-width: 140px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: inherit; outline: none; }
.search:focus { border-color: var(--accent-line); }
.pill { white-space: nowrap; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; color: var(--text-2); }
.pill:is(a) { text-decoration: none; }
.pill:is(a):hover { border-color: var(--text-2); }
.pill .live { color: var(--green); }
.dcard-h .muted:has(.budget-set) { flex: 1; display: flex; align-items: baseline; gap: 6px; }
.budget-set { margin-left: auto; white-space: nowrap; }
.budget-in { width: 64px; padding: 1px 4px; background: transparent; color: var(--text); border: 1px solid var(--line-2); border-radius: 4px; font: inherit; font-family: 'Source Code Pro', monospace; }
.budget-in:focus { outline: none; border-color: var(--accent); }
.refresh { display: inline-flex; align-items: center; gap: 6px; }
.refresh:hover { border-color: var(--text-2); color: var(--text); }
.refresh .ic { display: inline-block; font-size: 14px; line-height: 1; }
.refresh.busy { color: var(--accent); cursor: default; }
.refresh.busy .ic { animation: spin .9s linear infinite; }
.pill .live::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; vertical-align: 2px; border-radius: 50%; background: var(--green); animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { opacity: .4; box-shadow: 0 0 0 0 rgba(47, 227, 172, .6); } 50% { opacity: 1; box-shadow: 0 0 0 4px rgba(47, 227, 172, 0); } }

/* views */
.discover-head { position: sticky; top: 64px; z-index: 4; background: var(--bg); }
.view { display: none; }
.view.on { display: block; }
.bar { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 12px; }
.tabs { display: flex; gap: 4px; }
.tabs button { padding: 5px 12px; border-radius: 6px; font-size: 17px; font-weight: 600; color: var(--text-2); }
.tabs button.on { color: var(--accent); background: var(--accent-dim); }

/* discover table */
.table-wrap { overflow-x: auto; margin: 0 16px 16px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 4px 4px; }
/* Column headers stay under the page header and the tabs/filters bar (--list-top, measured in app.js) while the page
   scrolls. Needs a wrapper that clips rather than scrolls; narrow screens keep sideways scrolling instead. */
@media (min-width: 1100px) { .table-wrap { overflow-x: clip; } }
/* Flush under the bar, with the table's top line as the header's own border (the wrapper has none on top), so stuck looks
   the same as unstuck. Needs separate borders: collapsed ones belong to the table and don't stick with the cell. */
.grid thead th { top: var(--list-top, 0px); z-index: 3; border-top: 1px solid var(--line); }
.grid { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 960px; }
.grid th { white-space: nowrap; position: sticky; top: 0; padding: 10px 14px; text-align: left; font-size: 13px; font-weight: 400; color: var(--text-2); background: var(--bg-2); border-bottom: 1px solid var(--line); }
.grid td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid tr:hover td { background: var(--row-hover); }
.r, .grid th.r { text-align: right; }
.pair { display: flex; gap: 12px; align-items: center; min-width: 260px; }
.av { flex: none; width: 68px; height: 68px; border-radius: 4px; display: grid; place-items: center; font-size: 24px; font-weight: 500; border: 1px solid var(--line-2); }
.av.sm { width: 76px; height: 76px; }
.av { position: relative; overflow: hidden; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sym { font-size: 16px; font-weight: 600; }
.nm { color: var(--text-2); margin-left: 5px; font-size: 15px; }
.star { padding: 0 5px 0 0; font-size: 15px; line-height: 1; color: var(--text-3); vertical-align: 1px; }
.star:hover { color: var(--text-2); }
.star.on { color: var(--amber); }
.nm[data-copy] { cursor: copy; }
.nm[data-copy]:hover { color: var(--text); text-decoration: underline dotted; }
.nm.done { color: var(--green); text-decoration: none; }
.nm.fail, .ca.fail { color: var(--red); text-decoration: none; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 7px; color: var(--text-2); font-size: 13px; }
.age { color: var(--green); }
.links { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.lk { padding: 3px 12px; border-radius: 999px; background: var(--line-2); color: var(--text-2); font-size: 13px; line-height: 18px; transition: background .12s, color .12s; }
.lk:hover { background: #2f3240; color: var(--text); }
.ca { padding: 2px 11px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text-2); font: 13px/18px var(--mono); word-break: break-all; text-align: left; transition: border-color .12s, color .12s; }
.ca:hover { border-color: var(--text-3); color: var(--text); }
.ca.done { border-color: var(--green); color: var(--green); }
.num { font-family: var(--mono); font-size: 15px; }
.num.b { font-weight: 600; }
.sub { font-family: var(--mono); font-size: 12px; font-weight: 400; white-space: nowrap; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 13px; border: 1px solid var(--line-2); color: var(--text-2); }
.chip.T2 { color: #f0d468; border-color: #4f4518; }
.chip.T1 { color: #c3c7d4; border-color: #3a3d48; }
.chip.T0 { color: #b9805f; border-color: #42291b; }
.chip.flag { color: var(--text); }
.chip.rug { color: var(--red); border-color: #4d1d30; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 6px 16px; border: 1px solid transparent; border-radius: 999px; line-height: 1.2; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 13px; }
.btn:hover { background: var(--accent-hi); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.card-foot { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; align-items: center; }

/* token page */
.tk { max-width: 1200px; margin: 0 auto; padding: 16px; }
.tk-head { display: flex; gap: 14px; align-items: flex-start; }
.tk-head .av { width: 84px; height: 84px; font-size: 30px; }
.tk-head .sym { font-size: 22px; }
.tk-head .nm { font-size: 18px; }
.tk-head > div { min-width: 0; }
.tk-head .meta { flex-wrap: wrap; }
.tk-head .mono { word-break: break-all; }
.tk-desc { margin: 12px 0 0; color: var(--text-2); font-size: 15px; line-height: 1.5; white-space: pre-wrap; max-width: 760px; }
.tk-sec { margin-top: 24px; }
.tk-sec h3 { margin: 0 0 10px; font-size: 17px; font-weight: 600; }
.chart { width: 100%; height: 220px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-2); }
.chart path { fill: none; stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.chart line { stroke: var(--line-2); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.shots { display: flex; gap: 10px; flex-wrap: wrap; }
.shots a { display: block; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; background: var(--bg-2); }
.shots img { display: block; height: 160px; width: auto; max-width: 320px; object-fit: cover; object-position: top; }
.post { border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; font-size: 15px; line-height: 1.5; max-width: 560px; white-space: pre-wrap; }
.files { font-family: var(--mono); font-size: 13px; }
.files td { padding: 4px 14px 4px 0; color: var(--text-2); }
.back { display: inline-block; margin-bottom: 12px; color: var(--text-2); }
.back:hover { color: var(--text); }

/* website preview + live check */
.site { min-width: 196px; }
.pv { display: block; width: 184px; height: 104px; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; background: var(--bg-2); margin-bottom: 6px; }
.pv img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.pv.big { width: min(640px, 100%); height: auto; aspect-ratio: 16 / 9; }
.site-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.dom { color: var(--accent); }
.dom:hover { text-decoration: underline; }
.chk { padding: 3px 11px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text-2); font-size: 13px; }
.chk:hover { color: var(--text); border-color: var(--text-3); }
.chk.online { color: var(--green); border-color: #1d4b3d; }
.chk.offline { color: var(--red); border-color: #4d1d30; }
#rows tr { cursor: pointer; }
.fullpage { max-height: 640px; overflow-y: auto; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-2); }
.fullpage img { display: block; width: 100%; height: auto; }

#paused { position: fixed; z-index: 15; top: 76px; left: 50%; transform: translateX(-50%); padding: 5px 14px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 600; box-shadow: 0 4px 16px rgba(0, 0, 0, .4); }

.bar-right { display: flex; align-items: center; gap: 10px; }
.chk.on { color: var(--accent); border-color: var(--accent-line); background: var(--accent-dim); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 16px 12px; }
.filters select { height: 28px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg-2); color: var(--text-2); font: 13px var(--sans); outline: none; }
.filters select:focus { border-color: var(--accent-line); }
.chk:disabled { opacity: .35; cursor: default; }

.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; white-space: normal; }
.tag { padding: 1px 7px; border-radius: 4px; background: var(--row-hover); color: var(--text-2); font-size: 12px; line-height: 17px; }
.tag:hover { color: var(--accent); }
.tag-input { width: 200px; height: 28px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg-2); color: var(--text); font: 13px var(--sans); outline: none; }
.tag-input:focus { border-color: var(--accent-line); }

.facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.fact { padding: 3px 9px; border-radius: 4px; border: 1px solid var(--line-2); font: 13px var(--mono); color: var(--text-2); }
.fact.good { color: var(--green); border-color: #1d4b3d; }
.fact.bad { color: var(--red); border-color: #4d1d30; }
.fact.warn { color: var(--amber); border-color: #4d3a1c; }
.bul { margin: 4px 0 10px; padding-left: 18px; white-space: normal; font-size: 15px; line-height: 1.5; }
.bul li { margin: 2px 0; }

#sitepop { position: fixed; z-index: 20; overflow-y: auto; overscroll-behavior: contain; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
#sitepop img { display: block; width: 100%; height: auto; }
#sitepop img[hidden] { display: none; }
.sp-load { display: flex; align-items: center; justify-content: center; gap: 10px; height: 100%; color: var(--text-2); font-size: 13px; }
.spin { width: 18px; height: 18px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Rebuild running in Claude: pulsing amber dot and a light sweep across the button */
.btn.building { position: relative; overflow: hidden; gap: 8px; color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.btn.building::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: build-pulse 1.4s ease-in-out infinite; }
.btn.building::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--accent) 22%, transparent) 50%, transparent 70%); background-size: 250% 100%; animation: build-sweep 2.2s linear infinite; pointer-events: none; }
@keyframes build-pulse { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); box-shadow: 0 0 8px var(--accent); } }
@keyframes build-sweep { from { background-position: 125% 0; } to { background-position: -125% 0; } }
@media (prefers-reduced-motion: reduce) { .btn.building::before, .btn.building::after { animation: none; } .btn.building::before { opacity: 1; } }

/* search modal */
#search { position: fixed; inset: 0; z-index: 30; display: flex; justify-content: center; align-items: center; padding: 16px; background: rgba(0, 0, 0, .55); }
#search[hidden] { display: none; }
.search-box { width: min(820px, 100%); height: min(720px, calc(100vh - 32px)); display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 16px 48px rgba(0, 0, 0, .6); overflow: hidden; }
.search-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 0; }
.search-input { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.search-input input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: 400 20px var(--sans); }
.kbd { padding: 1px 7px; border: 1px solid var(--line-2); border-radius: 4px; font-size: 12px; color: var(--text-2); }
.search-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 16px; font-size: 13px; }
.search-sort { display: flex; align-items: center; gap: 6px; }
.search-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 8px; }
.sr { display: grid; grid-template-columns: auto 1fr 130px 104px; gap: 14px; align-items: center; padding: 10px 8px; border-radius: 6px; }
.sr { cursor: pointer; }
.sr:hover { background: var(--row-hover); }
.sr .av { width: 52px; height: 52px; font-size: 19px; }
.sr-main { min-width: 0; }
.sr-main > div:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-num { font: 15px var(--mono); text-align: right; }
.sr-empty { padding: 16px 6px; }
@media (max-width: 760px) { .sr { grid-template-columns: auto 1fr 90px; } .sr-num:last-child { display: none; } }

.dexchart { display: block; width: 100%; height: max(640px, calc(100vh - 280px)); border: 1px solid var(--line); border-radius: 4px; background: var(--bg-2); }
.dexhead { display: block; width: min(900px, 100%); aspect-ratio: 3 / 1; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; }

.tk-top { position: sticky; top: 64px; z-index: 4; margin: -16px -16px 0; padding: 14px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.tk-top .back { margin-bottom: 8px; }
.tk-top .facts { margin-top: 8px; }
.tk-id { flex: 1; min-width: 0; }
.tk-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex: none; }
.btn-lg { padding: 9px 20px; font-size: 14px; }
.tk-btns { display: flex; gap: 8px; }
.btn-grey { background: var(--line); color: var(--text-2); border: 1px solid var(--line-2); }
.btn-grey:hover { background: var(--line-2); color: var(--text); }
.btn-grey:disabled { opacity: .6; cursor: default; }
@media (max-width: 760px) { .tk-head { flex-wrap: wrap; } .tk-right { align-items: flex-start; flex: 1 1 100%; min-width: 0; } .tk-btns { flex-wrap: wrap; } }
.dexmark { height: 18px; width: auto; vertical-align: middle; margin: 0 6px 0 4px; }

.tk-tabs { align-items: center; margin-bottom: 10px; }
.tk-tab-links { margin-left: auto; display: flex; gap: 16px; font-size: 14px; }

.tk-desc[data-copy] { cursor: copy; }
.tk-desc[data-copy]:hover { color: var(--text); }
.copied { margin-left: 6px; font-size: 13px; }

.xshot { display: block; width: min(460px, 100%); height: auto; border-radius: 12px; }

/* Screenshot left, copyable transcript right; stacked when there's no room */
.xpair { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.xpair > a { flex: 0 1 460px; min-width: 0; }
.xblocks { display: grid; gap: 8px; flex: 1 1 360px; max-width: 640px; align-content: start; }
.xblock { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
.xblock-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 13px; }
.xblock-text { white-space: pre-wrap; font-size: 15px; line-height: 1.5; }
.xblock-label { margin: 10px 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.copy-ico { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 4px; color: var(--text-2); }
.copy-ico:hover { color: var(--text); background: var(--row-hover); }


.grid th.sortable { cursor: pointer; user-select: none; }
.grid th.sortable:hover { color: var(--text); }
.grid th.sortable::before { content: attr(data-arrow); margin-right: 4px; font-size: 10px; color: var(--accent); }

/* lightbox */
#lightbox { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .85); }
#lightbox[hidden] { display: none; }
.lb-bar { position: absolute; top: 0; left: 0; right: 0; height: 44px; display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 0 16px; z-index: 2; }
.lb-bar > span { margin-right: auto; font-size: 14px; }
.lb-x { font-size: 26px; line-height: 1; color: var(--text-2); }
.lb-x:hover { color: var(--text); }
.lb-body { position: absolute; inset: 44px 56px 16px; overflow: auto; overscroll-behavior: contain; display: flex; justify-content: center; align-items: flex-start; }
.lb-body img { max-width: 100%; height: auto; display: block; margin: auto; border-radius: 4px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 64px; font-size: 36px; color: var(--text-2); }
.lb-nav:hover { color: var(--text); }
.lb-nav.prev { left: 8px; }
.lb-nav.next { right: 8px; }

/* Duplicate site: where it was captured */
.site-owner { margin-top: 10px; }
.so-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.so-tok { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 15px; }
.so-tok:hover { background: var(--row-hover); }
.so-tok .av { width: 22px; height: 22px; font-size: 11px; }
.site-owner .fullpage { display: block; }

/* Rebuilds running in Claude: header indicator and the list under it */
.builds { margin-left: auto; margin-right: -14px; flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--accent-line); color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap; }
.builds:hover, .builds[aria-expanded="true"] { background: var(--row-hover); }
.builds::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: build-pulse 1.4s ease-in-out infinite; }
.builds b { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 600 12px/1.4 'Source Code Pro', monospace; text-align: center; }
.builds-pop { position: fixed; top: 64px; left: 16px; z-index: 6; width: 340px; max-width: calc(100vw - 32px); max-height: calc(100vh - 88px); overflow-y: auto; margin-top: 6px; padding: 6px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.builds-pop h4 { margin: 4px 8px 6px; font-size: 13px; font-weight: 400; color: var(--text-2); }
.build-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 6px; }
.build-row:hover { background: var(--row-hover); }
.build-row .av { width: 32px; height: 32px; flex: none; }
.build-row .bt { min-width: 0; flex: 1; }
.build-row .bt > div:first-child { display: flex; gap: 6px; align-items: baseline; }
.build-row .sym { font-size: 15px; font-weight: 600; }
.build-row .nm, .build-row .bn { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.build-row .bn { display: block; }
.build-row::after { content: ''; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--accent); animation: build-pulse 1.4s ease-in-out infinite; }
.builds[hidden], .builds-pop[hidden] { display: none; }
.builds:not([hidden]) + .top-right { margin-left: 0; }
@media (prefers-reduced-motion: reduce) { .builds::before, .build-row::after { animation: none; } }
@media (max-width: 760px) { .builds { margin-right: 0; padding: 0 10px; } .builds span { display: none; } .builds-pop { max-width: calc(100vw - 16px); } }

/* image popover */
#pop { position: fixed; z-index: 20; width: 280px; padding: 8px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
#pop > img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.pop-reuse { margin-top: 8px; font-size: 13px; display: grid; gap: 4px; }
.pop-tok { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; }
.pop-tok:hover { background: var(--row-hover); }
.pop-tok .mono { margin-left: auto; color: var(--accent); }

@media (max-width: 760px) {
  .top { gap: 12px; }
  .brand img, .brand svg { height: 24px; }
  .nav { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .nav a { padding: 8px; white-space: nowrap; }
  /* search collapses to an icon button */
  .top-right { position: relative; margin-left: 0; flex: none; }
  .top-right::before { content: ''; position: absolute; left: 10px; top: 50%; width: 16px; height: 16px; margin-top: -8px; background: var(--text-2); pointer-events: none;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") center / contain no-repeat; }
  .search { flex: none; width: 36px; min-width: 0; padding: 0; }
  .search::placeholder { color: transparent; }
}
@media (max-width: 960px) { .pill { display: none; } }

/* dashboard (infrastructure) */
.dash { max-width: 1400px; margin: 0 auto; padding: 16px; }
.dash-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.dash-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.dash-head .chk { margin-left: auto; }
.alerts { display: grid; gap: 6px; margin-bottom: 16px; }
.alert { display: flex; gap: 10px; align-items: baseline; padding: 9px 12px; border: 1px solid var(--line-2); border-left-width: 3px; border-radius: 4px; background: var(--bg-2); font-size: 15px; }
.alert.warn { border-left-color: var(--amber); }
.alert.crit { border-left-color: var(--red); }
.alert.ok { border-left-color: var(--green); color: var(--text-2); }
.alert-area { flex: none; min-width: 76px; font-size: 13px; font-weight: 600; }
.alert.warn .alert-area { color: var(--amber); }
.alert.crit .alert-area { color: var(--red); }
.dgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 12px; }
.dcard { border: 1px solid var(--line); border-radius: 4px; background: var(--bg-2); padding: 14px 16px 8px; }
.dcard-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.dcard-h h3 { margin: 0; font-size: 17px; font-weight: 600; }
.dcard-h .muted { font-size: 13px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.kv:first-of-type { border-top: 0; }
.kv > .muted { font-size: 13px; padding-top: 2px; }
.kv .v { min-width: 0; font: 15px var(--mono); }
.dcard.words .v, .kv .txt { font-family: var(--sans); }
.kv .s { margin-top: 3px; font: 13px var(--sans); color: var(--text-2); }
.meter { display: block; height: 4px; margin-top: 6px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--text-2); }
.meter.warn i { background: var(--amber); }
.meter.crit i { background: var(--red); }
.t-warn { color: var(--amber); }
.t-crit { color: var(--red); }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--text-3); vertical-align: 1px; }
.dot.up { background: var(--green); }
.dot.down { background: var(--red); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 36px; margin-top: 6px; }
.bars i { flex: 1; max-width: 28px; min-height: 1px; background: var(--text-3); border-radius: 1px 1px 0 0; }
.bars i:hover { background: var(--accent); }
.dnotes { margin: 12px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
@media (max-width: 760px) { .kv { grid-template-columns: 1fr; gap: 2px; } }

/* sentiment */
.ngrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; margin-bottom: 16px; }
.ncard { display: block; text-align: left; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-2); padding: 12px 14px; }
.ncard:hover { border-color: var(--line-2); }
.ncard.on { border-color: var(--accent-line); background: var(--accent-dim); }
.ncard-h { display: flex; align-items: baseline; gap: 8px; font-size: 17px; }
.ncard-h .muted { margin-left: auto; font-size: 13px; white-space: nowrap; }
.nrank { color: var(--accent); font: 600 15px var(--mono); }
.nthesis { margin-top: 4px; font-size: 13px; color: var(--text-2); }
.nspark { display: block; width: 100%; height: 30px; margin-top: 8px; }
.nspark path { fill: none; stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.nmembers { display: flex; gap: 4px; margin-top: 8px; }
.av.xs { width: 30px; height: 30px; font-size: 13px; }
.sent-head { position: static; }
.sent-head .bar { padding-left: 0; padding-right: 0; }
.sent-head + .table-wrap { margin: 0; }
.sent-head + .table-wrap thead th { position: static; }
.note { color: var(--accent); white-space: normal; }
.narr-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.narr-chip { padding: 3px 10px; border: 1px solid var(--accent-line); border-radius: 999px; font-size: 13px; }
.rel .sr { padding-left: 0; }

/* settings */
.settings-card { max-width: 640px; }
.wallets { width: 100%; margin-top: 10px; padding: 10px 12px; background: var(--bg); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; font: 13px/1.6 var(--mono); resize: vertical; }
.wallets:focus { outline: none; border-color: var(--accent-line); }
.settings-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 10px; }

/* uncleramsey.fun: sign-in screen and header */
.gate { display: none; }
body.locked > :not(.gate) { display: none !important; }
body.locked .gate { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px; min-height: 100vh; padding: 16px; }
.gate .logo-slot { width: min(420px, 100%); }
.gate .logo-slot svg { width: 100%; height: auto; display: block; }
.gate .btn { padding: 12px 32px; font-size: 17px; }
.gate .btn:disabled { opacity: .6; cursor: default; }
.gate #login-msg { min-height: 20px; font-size: 15px; color: var(--text-2); text-align: center; }
.gate #login-msg a { color: var(--accent); }
.top .logo-slot svg { height: 30px; width: auto; display: block; }
.top .search { cursor: text; }
.wallet { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); }
.wallet button { color: var(--text-2); font-family: var(--sans); }
.wallet button:hover { color: var(--text); }
.shots .shot { border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; background: var(--bg-2); }
.picked { margin-top: 8px; font-size: 13px; color: var(--amber); }
/* instant tooltips (capture time on market cap, peak and volume) */
[data-tip]:not([data-tip=""]) { position: relative; }
[data-tip]:not([data-tip=""]):hover::after { content: attr(data-tip); position: absolute; z-index: 20; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); padding: 4px 8px; white-space: nowrap; border: 1px solid var(--line-2); border-radius: 4px; background: var(--bg-2); color: var(--text); font: 400 12px/1.3 var(--sans); box-shadow: 0 4px 14px rgba(0, 0, 0, .5); pointer-events: none; }
td[data-tip]:not([data-tip=""]):hover::after { top: calc(100% - 8px); }
/* capture images drawn on canvas (see paint() in app.js) */
canvas.sec { display: block; -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
img { -webkit-user-drag: none; -webkit-touch-callout: none; }
.pv canvas.sec { width: 100%; height: 100%; }
.av canvas.sec { position: absolute; inset: 0; width: 100%; height: 100%; }
.fullpage canvas.sec, #sitepop canvas.sec { width: 100%; height: auto; }
.shots canvas.sec { height: 160px; width: 120px; max-width: 320px; }
canvas.sec.xshot { width: min(460px, 100%); height: auto; }
.capnote { max-width: 760px; margin: 16px 0 0; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--bg-2); color: var(--text-2); font-size: 13px; line-height: 1.5; }
.capnote b { display: block; margin-bottom: 2px; color: var(--text); font-weight: 600; }
#wallet { display: inline-flex; align-items: center; gap: 6px; }
#wallet b { color: var(--text); font-weight: 700; font-family: var(--sans); }
.uemoji { font-size: 16px; line-height: 1; }
.age-col { white-space: nowrap; }
.age-col .age { font-size: 15px; }
.capnote-av { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: center 30%;
  border: 2px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-dim), 0 4px 12px rgba(0, 0, 0, .45); background: var(--bg); }
/* screenshot callout: pinned to the bottom of the window on token pages, a little wider than the content column;
   the page pads its end by the callout's height (--capnote-h, measured in app.js) so the last content clears it */
#tk { padding-bottom: calc(var(--capnote-h, 96px) + 32px); }
.capnote { position: fixed; z-index: 6; bottom: 0; left: 50%; transform: translateX(-50%); width: min(1232px, 100%); max-width: none; margin: 0;
  display: flex; gap: 14px; align-items: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border: 1px solid var(--line-2); border-bottom: 0; border-radius: 0; box-shadow: 0 -8px 24px rgba(0, 0, 0, .45); }
.capnote-p { display: block; margin-top: 4px; }
.list-q { align-self: center; width: 230px; height: 30px; margin-left: 14px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg-2); color: var(--text); font: 13px var(--sans); outline: none; }
.list-q:focus { border-color: var(--accent-line); }
.list-q::placeholder { color: var(--text-3); }
@media (max-width: 760px) { .tabs:has(.list-q) { flex-wrap: wrap; } .list-q { margin-left: 0; width: 100%; } }
.capnote { align-items: flex-start; }
/* the filter box's clear button, in the accent colour instead of the browser's blue */
.list-q::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; width: 12px; height: 12px; margin-left: 6px; cursor: pointer; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 2l8 8M10 2l-8 8' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 2l8 8M10 2l-8 8' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.list-q::-webkit-search-cancel-button:hover { background: var(--accent-hi); }
/* dropdowns: our own chevron, 12px in from the right edge, instead of the browser's arrow on the border */
.filters select, .star-by { -webkit-appearance: none; appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23777a8c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 10px 6px; }
.filters select:hover, .star-by:hover { border-color: var(--text-3); }
/* header user pill: larger name; emoji and name centred on one line (emoji glyphs sit high in their line box) */
.wallet { height: 34px; padding: 0 14px 0 8px; gap: 12px; }
#wallet { gap: 7px; line-height: 1; }
#wallet b { font-size: 15px; line-height: 1; }
.uemoji { display: block; font-size: 18px; line-height: 1; transform: translateY(1px); }
.wallet button { font-size: 13px; line-height: 1; }
/* "Loading more tokens…" while the list fetches its next page */
.toast { position: fixed; z-index: 30; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid var(--accent-line); border-radius: 8px;
  background: var(--bg-2); color: var(--text); font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); animation: toast-in .15s ease-out; }
.toast[hidden] { display: none; }
.toast .spin { width: 14px; height: 14px; border-color: var(--accent-line); border-top-color: var(--accent); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
/* loading shimmer: the space a screenshot or token image will fill, until it has loaded */
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
canvas.sec[data-state="queued"], canvas.sec[data-state="loading"], canvas.sec:not([data-state]), .av:has(img:not(.ok)) { background: linear-gradient(100deg, var(--bg-2) 30%, #1b1d26 50%, var(--bg-2) 70%) var(--bg-2); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@media (prefers-reduced-motion: reduce) { canvas.sec[data-state="queued"], canvas.sec[data-state="loading"], canvas.sec:not([data-state]), .av:has(img:not(.ok)) { animation: none; } }
.av:has(canvas.sec:not([data-state="done"]):not([data-state="error"])), .av:has(img:not(.ok)) { color: transparent !important; }
.offline { display: inline-flex; align-items: center; color: var(--red); cursor: help; }
.offline svg { display: block; }
