/* The shared look of the collector, the extension and the dashboard: Whatnot's
   yellow, near-black pill buttons, heavy headings, rounded panels.

   Light is the default and dark follows the computer's setting. A page may
   also choose for itself by putting data-theme="light" or "dark" on <html>
   (the dashboard's Settings does); that choice wins over the computer's. */
:root {
  color-scheme: light dark;
  --brand: #ffe000;
  --bg: #ffffff;
  --card: #f5f5f5;
  --text: #1c1c1c;
  --muted: #6e6e6e;
  --line: #e4e4e4;
  --accent: #1c1c1c;
  --on-accent: #ffffff;
  --good: #1a8a4a;
  --warn: #b26a00;
  --bad: #d92d20;
}
:root[data-theme="light"] {
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f0f;
    --card: #1c1c1c;
    --text: #ffffff;
    --muted: #a3a3a3;
    --line: #2e2e2e;
    --accent: #ffe000;
    --on-accent: #1c1c1c;
    --good: #4ade80;
    --warn: #ffb020;
    --bad: #ff6b60;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0f0f;
  --card: #1c1c1c;
  --text: #ffffff;
  --muted: #a3a3a3;
  --line: #2e2e2e;
  --accent: #ffe000;
  --on-accent: #1c1c1c;
  --good: #4ade80;
  --warn: #ffb020;
  --bad: #ff6b60;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    15px / 1.45 system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
a {
  color: inherit;
}
h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 8px 0 6px;
}
h2 {
  font-size: 17px;
  font-weight: 800;
  margin: 28px 0 8px;
}
p {
  margin: 0 0 12px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.strong {
  font-weight: 700;
}
.error {
  color: var(--bad);
}
.top {
  background: var(--brand);
  color: #1c1c1c;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 20px;
}
.brand {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.02em;
  text-decoration: none;
  margin-right: auto;
}
.top nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tab {
  text-decoration: none;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
}
.tab.on {
  background: #1c1c1c;
  color: #ffffff;
}
main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}
.narrow {
  max-width: 620px;
}
main.narrow {
  margin-top: 8vh;
}
.stack {
  display: grid;
  gap: 12px;
}
.field {
  display: grid;
  gap: 4px;
  font-weight: 600;
}
input,
select {
  font: inherit;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  min-width: 0;
}
button {
  font: inherit;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
button:hover:not(:disabled) {
  border-color: var(--text);
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  padding: 10px 20px;
}
button.small {
  padding: 3px 10px;
}
.notice {
  background: var(--card);
  border-left: 5px solid var(--warn);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  min-width: 0;
}
.card.link {
  text-decoration: none;
  border: 2px solid transparent;
}
.card.link:hover {
  border-color: var(--brand);
}
.card-title {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin: 10px 0;
}
.stat-value {
  font-weight: 800;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  color: var(--muted);
  font-size: 12px;
}
.coverage {
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 0;
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 12px;
}
.filters input {
  flex: 1 1 200px;
}
.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  background: var(--card);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 860px;
}
th,
td {
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
tfoot td {
  border-bottom: none;
  font-weight: 700;
}
th {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
button.sort {
  border: none;
  background: none;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  border-radius: 0;
}
.item {
  min-width: 240px;
}
.item-title {
  font-weight: 600;
}
.photo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}
.photo.placeholder {
  background: var(--line);
}
.row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.grow {
  flex: 1;
  min-width: 0;
}
.row-card {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--card);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 6px;
}
.row-card .strong {
  overflow: hidden;
  text-overflow: ellipsis;
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #1c1c1c;
}
@media (max-width: 520px) {
  h1 {
    font-size: 24px;
  }
  .row-card {
    flex-wrap: wrap;
  }
  .row-card > .grow {
    flex-basis: 100%;
  }
}

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 1px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.tag.good {
  color: var(--good);
  border-color: var(--good);
}
.tag.warn {
  color: var(--warn);
  border-color: var(--warn);
}
p.notice {
  display: block;
}
section > h2 {
  margin-top: 32px;
}

details.section {
  margin-top: 28px;
}
details.section > summary {
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 10px;
  list-style: none;
  padding: 6px 0;
}
details.section > summary::-webkit-details-marker {
  display: none;
}
details.section > summary::before {
  content: "▸";
  color: var(--muted);
  font-size: 18px;
  width: 16px;
}
details.section[open] > summary::before {
  content: "▾";
}
.section-title {
  font-size: 20px;
  font-weight: 800;
}
.section-actions {
  display: flex;
  justify-content: flex-end;
  margin: -34px 0 10px;
  pointer-events: none;
}
.section-actions > * {
  pointer-events: auto;
}
.pager {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
}
.page-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

/* Paged lists (spec 020) */
.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 24px;
  flex-wrap: wrap;
}
.table-wrap.loading {
  opacity: 0.55;
  transition: opacity 0.15s;
}
.picker {
  position: relative;
  display: inline-block;
}
.picker-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  width: 260px;
  padding: 8px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.15);
}
.picker-menu input {
  width: 100%;
  box-sizing: border-box;
}
.picker-list {
  max-height: 280px;
  overflow-y: auto;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
}
.picker-list button {
  text-align: left;
  border: 0;
  background: none;
  padding: 6px 8px;
  border-radius: 6px;
  font-weight: 400;
  color: var(--text);
  width: 100%;
}
.picker-list button:hover,
.picker-list button:focus-visible {
  background: var(--line);
}
.picker-note {
  padding: 6px 8px;
}

/* Spy (spec 029) */
.spy-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.subtabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.subtabs a {
  text-decoration: none;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.subtabs a.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #1c1c1c;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.tile {
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
}
.tile-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tile-value {
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.choice {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.choice button {
  border: 0;
  background: none;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 500;
}
.choice button.on {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}
.filters .grow {
  flex: 1;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.cards.loading {
  opacity: 0.55;
  transition: opacity 0.15s;
}
.cards .card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--card);
  border-radius: 14px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.card.stream:hover,
.seller-card:hover {
  outline: 2px solid var(--brand);
}
.stream-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.stream-top .tag {
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stream-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  font-size: 13px;
}
.stream-money {
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}
.seller-card {
  align-items: center;
  text-align: center;
}
.seller-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: inherit;
  width: 100%;
  min-width: 0;
}
.seller-link .strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--line);
  font-weight: 800;
  color: var(--muted);
}
.seller-card .save {
  margin-top: 8px;
  width: 100%;
}
.seller-card .save.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #1c1c1c;
}
.scope-note {
  margin-top: 4px;
}
.seller-name {
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.show-seller {
  margin: 0 0 2px;
  font-size: 18px;
  font-weight: 800;
}
.show-seller a {
  text-decoration: none;
}
.show-seller a:hover {
  text-decoration: underline;
}
.stats.wide {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.profile-link {
  text-decoration: none;
}
.profile-link:hover {
  text-decoration: underline;
}
.stream-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.seller-name a {
  text-decoration: none;
}
.seller-name a:hover,
.tile a:hover {
  text-decoration: underline;
}
.tiles.loading {
  opacity: 0.55;
  transition: opacity 0.15s;
}
.tile-value {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Revenue by day (spec 029, part C) */
.chart {
  margin: 8px 0 20px;
  padding: 16px 16px 8px 64px;
  background: var(--card);
  border-radius: 14px;
}
.chart-plot {
  position: relative;
  height: 180px;
}
.chart-grid,
.chart-bars {
  position: absolute;
  inset: 0;
}
.chart-gridline {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid var(--line);
}
.chart-gridline span {
  position: absolute;
  right: 100%;
  margin-right: 8px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.chart-bars {
  display: flex;
  align-items: stretch;
  gap: 2px;
}
.chart-slot {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  cursor: default;
}
.chart-slot.on {
  background: var(--line);
}
.chart-slot:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}
.chart-bar {
  width: 100%;
  max-width: 18px;
  background: var(--accent);
  border-radius: 4px 4px 0 0;
}
.chart-tip {
  position: absolute;
  bottom: 100%;
  transform: translateX(-50%);
  margin-bottom: 6px;
  padding: 6px 10px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.2);
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
  font-variant-numeric: tabular-nums;
}
.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.chart-axis {
  position: relative;
  height: 20px;
  margin-top: 4px;
}
.chart-axis span {
  position: absolute;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

/* One table everywhere (spec 029) */
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.table-toolbar input[type="search"] {
  min-width: 220px;
}
.table-toolbar .grow {
  flex: 1;
}
th .sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sort-mark {
  font-size: 11px;
  color: var(--muted);
  opacity: 0.6;
}
.sort.on .sort-mark {
  color: inherit;
  opacity: 1;
}

/* Pictures on the Spy cards (spec 029, part D) */
.stream-body .cover {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 6px;
  background: var(--line);
}
img.avatar {
  object-fit: cover;
}

/* Spy: its sections down the left (spec 029) */
.spy {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.side-nav {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 6px;
}
.side-nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
}
.side-nav a:hover {
  background: var(--card);
  color: var(--text);
}
.side-nav a.on {
  background: var(--card);
  color: var(--text);
  box-shadow: inset 3px 0 0 var(--brand);
}
.spy-main {
  min-width: 0;
}
.spy-main > h1 {
  margin-top: 0;
}
@media (max-width: 820px) {
  .spy {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .side-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* The light and dark switch in the top bar */
.theme-switch {
  border: 0;
  background: none;
  color: #1c1c1c;
  font-size: 16px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
}
.theme-switch:hover {
  background: rgb(0 0 0 / 0.12);
}

/* Getting in and the account page (spec 030, part B). */
.brand-link {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.entry-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.field .hint {
  font-weight: 400;
}
p.notice {
  display: block;
}
a.button {
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}
a.button:hover {
  border-color: var(--text);
}
button.danger {
  color: var(--bad);
  border-color: var(--bad);
}
.danger-box {
  border: 1px solid var(--bad);
  border-radius: 12px;
  padding: 14px;
}

/* Plans (spec 030, part C). */
.plan-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 16px 0;
  max-width: 760px;
}
.plan-card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.plan-card h2 {
  margin: 0;
}
.plan-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}
.plan-price {
  font-size: 32px;
  font-weight: 800;
  margin: 0;
}
.plan-price .was {
  color: var(--muted);
  font-size: 20px;
  font-weight: 600;
}
.saving {
  margin: 0;
  font-weight: 700;
  color: var(--good, var(--text));
}
