/* The atoms every page uses: the reset, type, focus, the one filled pill
   and its ghost kin, chips, tier chips, deltas, logos and citations. */

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--canvas); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; border-spacing: 0; }
th { font-weight: inherit; text-align: left; }
img, svg { display: block; }
svg.ico { display: inline-block; flex: none; vertical-align: middle; }

body {
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-feature-settings: "cv01", "ss03";
  font-variant-numeric: tabular-nums;
  font-weight: var(--w-body);
  font-size: 15px;
  line-height: 22.5px;
  letter-spacing: -0.165px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3 { font-weight: var(--w-heading); }
::selection { background: rgba(84, 104, 255, 0.4); }

a { color: inherit; text-decoration: none; }
p a, dd a, .rows a, .more-link {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.24);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--quick) var(--ease);
}
p a:hover, dd a:hover, .rows a:hover { text-decoration-color: currentColor; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--chart-line); outline-offset: 2px; }
code, kbd, .addr, .sid { font-family: var(--font-mono); font-size: 14px; letter-spacing: 0; }

.vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }
.offscreen { position: fixed; top: 0; left: -9999px; opacity: 0; }
.skip {
  position: absolute; left: 12px; top: -48px; z-index: 50; padding: 8px 14px;
  border-radius: var(--r-input); background: var(--pill-fill); color: var(--pill-ink);
}
.skip:focus { top: 12px; }

.muted { color: var(--ink-muted); }
.up { color: var(--up); }
.down { color: var(--down); }
.num { text-align: right; }
.eyebrow { font-size: 12px; line-height: 16px; letter-spacing: 0.4px; text-transform: uppercase; color: var(--ink-muted); font-weight: var(--w-heading); }

/* The one filled control, and the ghost and hairline controls */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 16px; border-radius: var(--r-pill);
  background: var(--pill-fill); color: var(--pill-ink);
  font-size: 15px; font-weight: var(--w-heading); white-space: nowrap;
  transition: background-color var(--quick) var(--ease);
}
.pill:hover { background: #ffffff; }
.pill.is-ghost { background: var(--ghost-fill); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hairline-soft); }
.pill.is-ghost:hover { background: #ffffff17; }
.ghost, .copy {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: var(--r-input);
  background: var(--ghost-fill); color: var(--ink-2);
  font-size: 14px; font-weight: var(--w-heading); white-space: nowrap; text-decoration: none;
  transition: background-color var(--quick) var(--ease), color var(--quick) var(--ease);
}
.ghost:hover, .copy:hover { background: #ffffff17; color: var(--ink); }
button:disabled { opacity: 0.6; cursor: progress; }

/* Chips */
.chip, .chain-chip, .label, .chip-boost {
  display: inline-flex; align-items: center; height: 22px; padding: 0 7px;
  border-radius: var(--r-chip); background: var(--ghost-fill); color: var(--ink-muted);
  font-size: 12px; line-height: 16px; font-weight: var(--w-heading); letter-spacing: 0.1px;
  white-space: nowrap; vertical-align: middle;
}
.chip { height: 24px; font-size: 14px; color: var(--ink-2); }
.label.is-unavailable { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.chip-boost { color: var(--tier-medium); background: color-mix(in srgb, var(--tier-medium) 12%, transparent); }

/* Tier chips: tier colour on the same colour at 12%, ringed at 20% */
.tier-low { --t: var(--tier-low); }
.tier-medium { --t: var(--tier-medium); }
.tier-high { --t: var(--tier-high); }
.tier-critical { --t: var(--tier-critical); }
.tier-none { --t: var(--tier-none); }
.score-chip {
  --t: var(--tier-none);
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px;
  border-radius: var(--r-chip); color: var(--t);
  background: color-mix(in srgb, var(--t) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 20%, transparent);
  font-size: 14px; line-height: 20px; font-weight: var(--w-heading); white-space: nowrap;
}
.score-chip.tier-low { --t: var(--tier-low); }
.score-chip.tier-medium { --t: var(--tier-medium); }
.score-chip.tier-high { --t: var(--tier-high); }
.score-chip.tier-critical { --t: var(--tier-critical); }
.score-n { font-weight: var(--w-title); }
/* Beside a feed score: "180d+" when the first pair is past the launch window */
.age-tag {
  display: inline-flex; align-items: center; height: 18px; padding: 0 5px;
  border-radius: var(--r-chip); box-shadow: var(--ring-card); color: var(--ink-muted);
  font-size: 12px; line-height: 16px; font-weight: var(--w-heading); white-space: nowrap; vertical-align: middle;
}

/* Moves */
.delta { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta.flat, .nil { color: var(--ink-muted); }

/* Logos: the monogram always, the icon over it when it loads */
.logo {
  position: relative; display: inline-flex; flex: none; width: 32px; height: 32px;
  border-radius: var(--r-logo); overflow: hidden; background: var(--mono-fill); box-shadow: var(--ring-logo);
}
.logo-24 { width: 24px; height: 24px; border-radius: 6px; }
.logo-48 { width: 48px; height: 48px; border-radius: 12px; }
.mono {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 12px; font-weight: var(--w-title); letter-spacing: 0; color: var(--ink-2);
}
.logo-24 .mono { font-size: 10px; }
.logo-48 .mono { font-size: 16px; }
.logo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.brand-mark { border-radius: 0; }

/* Citations: the numbers become small ringed chips that link to sources */
.cites { font-size: 0; margin-left: 6px; white-space: nowrap; }
.cites a {
  position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
  padding: 0 4px; margin-right: 6px; border-radius: 5px; vertical-align: 1px;
  font-size: 12px; line-height: 1; font-weight: var(--w-heading); letter-spacing: 0;
  color: var(--ink-muted); background: var(--ghost-fill); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  text-decoration: none; transition: color var(--quick) var(--ease);
}
.cites a:hover { color: var(--ink); }
.cites a:last-child { margin-right: 3px; }
.cites a::after { content: ""; position: absolute; inset: -3px; }

/* Cards */
.card { background: var(--card); border-radius: var(--r-card); box-shadow: var(--ring-card); padding: 20px; }
.card > h2, .card-title { font-size: 17px; line-height: 22px; font-weight: var(--w-title); letter-spacing: -0.25px; }
.empty { padding: 32px 16px; text-align: center; color: var(--ink-muted); }
.notice { margin-top: 14px; color: var(--tier-medium); font-size: 14px; }
