/* ============================================================
   THE LIST — every truth, ranked by what is behind it
   ============================================================
   Same vocabulary as the deck's left index: monospace labels,
   a dot per row, money on the right. Every colour comes from
   theme.css, so this page wears whatever palette is set.
   ============================================================ */

:root {
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Roboto Mono", monospace;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 ui-sans-serif, -apple-system, "Segoe UI", Inter, Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  transition: background 700ms var(--ease);
}

/* the same lit backdrop the deck has, so the two pages feel like one site */
.aura {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(90vw 90vh at 50% 0%, var(--bg-lift), var(--bg) 70%);
}

/* ---------- top bar ---------- */

.top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 26px clamp(18px, 5vw, 54px) 0;
}

.top__name {
  display: block;
  font: 700 15px/1 var(--mono);
  letter-spacing: .3em;
  color: var(--accent);
}
.top__tag {
  display: block;
  margin-top: 7px;
  font: 500 10.5px/1.5 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.top__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sorts {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
}
.sort {
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 7px 11px;
  cursor: pointer;
  font: 600 9.5px/1 var(--mono);
  letter-spacing: .14em;
  color: var(--ink-faint);
  transition: color 200ms var(--ease), background 200ms var(--ease);
}
.sort:hover { color: var(--ink-dim); }
.sort.is-on {
  background: var(--hover-2);
  color: var(--accent);
}
.sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.make {
  border: 1px solid var(--accent-deep);
  border-radius: 9px;
  background: var(--accent);
  color: var(--on-accent);
  padding: 9px 15px;
  cursor: pointer;
  font: 700 9.5px/1 var(--mono);
  letter-spacing: .14em;
  box-shadow: 0 0 24px -6px var(--glow);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.make:hover { transform: translateY(-1px); box-shadow: 0 0 30px -4px var(--glow); }
.make:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- the list ---------- */

.wrap {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px clamp(18px, 5vw, 54px) 60px;
}

.count, .empty, .offline {
  font: 500 10px/1.6 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 14px;
}
.empty, .offline {
  text-transform: none;
  letter-spacing: .04em;
  font-size: 12.5px;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--well);
}
.offline code {
  color: var(--accent-ink);
  font-family: var(--mono);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row {
  position: relative;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  transition: border-color 240ms var(--ease), transform 240ms var(--ease),
              box-shadow 240ms var(--ease), background 240ms var(--ease);
}
.row:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 18px 40px -26px var(--shadow), 0 0 34px -22px var(--glow);
}
.row:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* the leader carries the accent, the way the top label does on a card */
.row.is-top { border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); }
.row.is-top .rank { color: var(--accent); }

.rank {
  min-width: 26px;
  font: 700 12px/1 var(--mono);
  letter-spacing: .06em;
  color: var(--ink-faint);
  text-align: center;
}

.mid { min-width: 0; }

.title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 620;
  letter-spacing: -.01em;
  color: var(--ink);
}

.blurb {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta {
  margin: 9px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font: 500 9.5px/1.5 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.meta b {
  font-weight: 700;
  color: var(--ink-dim);
}

/* a swatch of the palette that thread wears, so the list shows its own range */
.swatch {
  display: inline-flex;
  gap: 3px;
  vertical-align: -1px;
  margin-right: 2px;
}
.swatch i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.money {
  text-align: right;
  white-space: nowrap;
}
.money__n {
  display: block;
  font: 700 17px/1 var(--mono);
  letter-spacing: -.01em;
  color: var(--accent);
}
.money__l {
  display: block;
  margin-top: 5px;
  font: 500 9px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.money.is-nil .money__n { color: var(--ink-faint); }

/* ---------- foot ---------- */

.foot {
  position: relative;
  z-index: 2;
  padding: 0 clamp(18px, 5vw, 54px) 26px;
  font: 500 10px/1.6 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

@media (max-width: 620px) {
  .row {
    grid-template-columns: auto auto 1fr;
    row-gap: 12px;
  }
  .money {
    grid-column: 3;
    text-align: left;
  }
  .cover { width: 58px; height: 46px; }
  .find__in { width: 100%; }
  .find { flex: 1 1 200px; }
  .top { padding-top: 18px; }
}

/* ---------- search ---------- */

.find {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.find:focus-within {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px var(--glow-soft);
}
.find__ico {
  font-size: 15px;
  line-height: 1;
  color: var(--ink-faint);
}
.find__in {
  width: min(280px, 46vw);
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 10px 0;
  font: 500 12px/1 inherit;
}
.find__in::placeholder { color: var(--ink-faint); }
.find__in:focus { outline: 0; }
.find__in::-webkit-search-cancel-button { filter: grayscale(1) opacity(.5); }

/* ---------- title image ---------- */

/* Every truth shows a face. The author can set one, otherwise it's the first
   post that has a still — so a truth is never a blank rectangle. */
.cover {
  flex: 0 0 auto;
  width: 84px;
  height: 62px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: var(--well);
  object-fit: cover;
  display: block;
}
.cover--none {
  display: grid;
  place-items: center;
  font: 700 15px/1 var(--mono);
  letter-spacing: .1em;
  color: var(--ink-faint);
}

/* ---------- who made it ---------- */

.by {
  color: var(--ink-dim);
  font-weight: 700;
}
.by__addr {
  color: var(--ink-faint);
  font-weight: 500;
}
