/* Hyena Recon: a scouting sheet. Tracker's family (IBM Plex, light paper, hairline rules, mono figures, the same
   sign-in) with its own face: a graphite bar, one amber accent for what is switched on, a reticle for a mark.
   The work happens in the bar: filters are switches there, and the list under it is only what passes them. */

@font-face { font-family: 'Plex Sans'; src: url('/fonts/plex-sans.woff2') format('woff2'); font-weight: 100 700; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('/fonts/plex-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('/fonts/plex-mono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #fbfaf6;
  --paper-2: #f3f1ea;
  --rule: #e4e0d5;
  --rule-strong: #cbc5b6;
  --ink: #1d1c19;
  --ink-2: #5c5950;
  --ink-3: #9a968a;
  --bar: #24221e;
  --bar-2: #34312b;
  --amber: #e7a33a;
  --amber-ink: #8a5a10;
  --pen: #2348c8;
  --up: #1c9a55;
  --down: #c4462f;
  --sans: 'Plex Sans', system-ui, sans-serif;
  --mono: 'Plex Mono', ui-monospace, monospace;
  --cols: 74px minmax(210px, 1.25fr) minmax(220px, 2fr) minmax(140px, 0.85fr) minmax(170px, 1fr) 104px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--paper); color: var(--ink); font: 14px/1.35 var(--sans); -webkit-font-smoothing: antialiased; }
#app { height: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; }

/* ---- wordmark: a reticle */
.wordmark { display: flex; align-items: center; gap: 12px; margin: 0; font-weight: 600; font-size: 42px; line-height: 1; letter-spacing: -0.025em; color: var(--ink); white-space: nowrap; }
.reticle { position: relative; flex: none; width: 0.66em; height: 0.66em; border: 0.075em solid currentColor; border-radius: 50%; }
.reticle::before { content: ''; position: absolute; inset: 50% auto auto 50%; width: 0.2em; height: 0.2em; margin: -0.1em 0 0 -0.1em; border-radius: 50%; background: var(--amber); }
.reticle::after { content: ''; position: absolute; inset: -0.2em; background:
  linear-gradient(currentColor, currentColor) top center / 0.075em 0.18em no-repeat,
  linear-gradient(currentColor, currentColor) bottom center / 0.075em 0.18em no-repeat,
  linear-gradient(currentColor, currentColor) left center / 0.18em 0.075em no-repeat,
  linear-gradient(currentColor, currentColor) right center / 0.18em 0.075em no-repeat; }
.wordmark-small { font-size: 16px; gap: 9px; letter-spacing: -0.01em; color: #fff; }

/* ---- sign-in */
.gate { min-height: 100dvh; display: grid; place-content: center; padding: 24px; background: var(--paper); }
.gate-form { width: min(360px, calc(100vw - 48px)); display: grid; gap: 12px; }
.gate-lede { margin: 6px 0 20px; font-size: 16px; line-height: 1.45; color: var(--ink-2); }
.gate-btn { height: 48px; border: 0; border-radius: 4px; background: var(--bar); color: #fff; font-weight: 600; font-size: 15px; transition: background 0.15s; }
.gate-btn:hover { background: #000; }
.gate-btn:disabled { opacity: 0.6; cursor: progress; }
.gate-msg { min-height: 40px; margin: 4px 0 0; color: var(--down); }
.gate-msg a { color: var(--pen); }

/* ---- frame */
.app { display: grid; grid-template-rows: auto auto minmax(0, 1fr); height: 100dvh; }

.topbar { display: flex; align-items: center; gap: 18px; min-height: 56px; padding: 0 16px; background: var(--bar); color: #fff; }
.tb-brand { flex: none; }
.filters { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters-label { flex: none; margin-right: 4px; font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: rgb(255 255 255 / 0.45); }
.flt { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 9px; border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 6px; background: transparent; color: rgb(255 255 255 / 0.82); font-weight: 500; font-size: 13px; white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, color 0.12s; }
.flt:hover { border-color: rgb(255 255 255 / 0.4); color: #fff; }
.flt-box { width: 14px; height: 14px; border: 1.5px solid rgb(255 255 255 / 0.45); border-radius: 3px; display: grid; place-items: center; }
.flt[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: #1d1405; }
.flt[aria-pressed="true"] .flt-box { border-color: #1d1405; background: #1d1405; }
.flt[aria-pressed="true"] .flt-box::after { content: ''; width: 7px; height: 4px; margin-top: -2px; border: solid var(--amber); border-width: 0 0 1.6px 1.6px; transform: rotate(-45deg); }
.flt:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.tb-right { display: flex; align-items: center; gap: 10px; flex: none; }
.feedstate { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 10px; border-radius: 6px; background: var(--bar-2);
  font: 12px var(--mono); color: rgb(255 255 255 / 0.75); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #56d98c; box-shadow: 0 0 0 3px rgb(86 217 140 / 0.2); }
.feedstate.is-down { color: #ffc2b3; }
.feedstate.is-down .dot { background: #ff8a6f; box-shadow: 0 0 0 3px rgb(255 138 111 / 0.2); }
.signout { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent;
  color: rgb(255 255 255 / 0.7); font: 500 12.5px var(--sans); }
.signout:hover { background: var(--bar-2); color: #fff; }
.ico { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* results line: how much passes, and whether anything is waiting */
.results { display: flex; align-items: center; gap: 12px; min-height: 38px; padding: 0 16px; border-bottom: 1px solid var(--rule); background: var(--paper-2);
  font-size: 13px; color: var(--ink-2); }
.results-n { font: 500 13px var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.results-what { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.results-err { color: var(--down); }
.results-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: none; font: 12px var(--mono); color: var(--ink-3); }
.newbtn { height: 26px; padding: 0 10px; border: 0; border-radius: 4px; background: var(--pen); color: #fff; font: 600 12px var(--sans); font-variant-numeric: tabular-nums; }
.newbtn:hover { background: #1a379c; }

/* ---- the list */
.list { overflow: auto; min-height: 0; overscroll-behavior: contain; }
.row { display: grid; grid-template-columns: var(--cols); align-items: center; min-height: 58px; border-bottom: 1px solid var(--rule); }
.row > * { min-width: 0; padding: 8px 12px; }
.rows .row:hover { background: #fff; }
.head { position: sticky; top: 0; z-index: 2; min-height: 32px; background: var(--paper); border-bottom: 1px solid var(--rule-strong); }
.head > * { padding-block: 0; font: 500 11px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.head .c-mc { text-align: right; }

.c-age { font: 12.5px var(--mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }

.c-coin { display: flex; align-items: center; gap: 11px; }
.thumb { position: relative; flex: none; display: block; width: 40px; height: 40px; border-radius: 6px; overflow: hidden; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--rule); }
.thumb::before { content: attr(data-initials); position: absolute; inset: 0; display: grid; place-items: center; font: 500 12px/1 var(--mono); color: var(--ink-3); }
.thumb img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; }
.coin-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.c-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; color: var(--ink); text-decoration: none; }
.c-name:hover { color: var(--pen); }
.c-ticker { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 12px var(--mono); color: var(--amber-ink); }

.desc { margin: 0; font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.desc.is-empty { color: var(--ink-3); font-style: italic; }

.lnk { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; color: var(--ink); font: 12.5px var(--mono); text-decoration: none; }
.lnk:hover .lnk-text { color: var(--pen); text-decoration: underline; }
.lnk-text { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.none { color: var(--ink-3); font: 12px var(--mono); }
.lamp { flex: none; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--ink-3); }
.lamp.is-ok { border-color: var(--up); background: var(--up); }
.lamp.is-dead { border-color: var(--down); }
.lamp.is-wait { border-style: dashed; }
.site-note { display: block; margin-top: 2px; font: 11px var(--mono); color: var(--ink-3); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.c-mc { text-align: right; font: 500 13px var(--mono); font-variant-numeric: tabular-nums; }
.mc-grad { font: 500 11px var(--mono); color: var(--up); text-transform: uppercase; letter-spacing: 0.04em; }
.mc-high { color: var(--ink-3); }

@media (prefers-reduced-motion: no-preference) {
  .row.is-new { animation: fresh 2.2s ease-out; }
}
@keyframes fresh { from { background: color-mix(in srgb, var(--amber) 22%, var(--paper)); } }

.empty { margin: 40px 16px; color: var(--ink-3); font: 13px var(--mono); }
.more { display: block; margin: 16px auto 28px; height: 34px; padding: 0 16px; border: 1px solid var(--rule-strong); border-radius: 4px; background: var(--paper); color: var(--ink); font-weight: 500; }
.more:hover:not(:disabled) { background: #fff; }

/* narrower windows: description goes, the rest keeps its room */
@media (max-width: 1080px) {
  :root { --cols: 64px minmax(190px, 1.3fr) minmax(130px, 0.8fr) minmax(150px, 1fr) 96px; }
  .c-desc { display: none; }
}
/* phones: the filters take their own row; each launch is a small block */
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px; }
  .tb-brand { order: 1; }
  .tb-right { order: 2; margin-left: auto; }
  .filters { order: 3; flex-basis: 100%; }
  .filters-label, .signout-text { display: none; }
  .results { padding: 0 12px; }
  .head { display: none; }
  .row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "coin mc" "desc desc" "x site" "age age"; gap: 0 12px; padding: 10px 12px; }
  .row > * { padding: 2px 0; }
  .c-coin { grid-area: coin; } .c-mc { grid-area: mc; } .c-desc { grid-area: desc; display: block; } .c-x { grid-area: x; } .c-site { grid-area: site; }
  .c-age { grid-area: age; font-size: 11px; color: var(--ink-3); }
}
