/*
 * Attention Labs.
 *
 * Dark, monospaced and loud on purpose. The engine's whole argument is that
 * every number here came off a contract rather than out of a marketing
 * department, so the page is built to look like an instrument panel: data in
 * mono, headings in something heavy enough to shout, and no illustration
 * standing in for a figure.
 *
 * No webfonts. This page is often opened from a phone on a bad connection the
 * moment somebody posts the ticker, and a flash of invisible text on the one
 * number people came to read is not worth a nicer typeface.
 */

:root {
  --bg: #06070a;
  --panel: #0b0e14;
  --panel-2: #0f131b;
  --line: #1b212d;
  --line-hot: #2a3342;

  --text: #e9ece4;
  --dim: #78839a;
  --dimmer: #4d5668;

  /*
   * Sampled out of the logo rather than picked, so the mark never sits on the
   * page looking like a slightly different green from everything around it.
   * tools/lab-logo.py carries the same value for the share card.
   */
  --acid: #6df644;
  --acid-dim: #47b82c;
  --hot: #ff4d5e;
  --cyan: #38e8ff;

  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --display: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;

  --r: 4px;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/*
 * A faint scanline wash over everything.
 *
 * Fixed and pointer-events-none so it never intercepts a tap on the buy
 * button. Kept subtle enough to read through: the point is texture, and a
 * CRT effect strong enough to notice makes the figures harder to read, which
 * defeats the page.
 */
.grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.014) 0 1px,
      transparent 1px 3px
    ),
    radial-gradient(ellipse at 50% 0%, rgba(109, 246, 68, 0.05), transparent 60%);
}

a { color: inherit; }
code { font-family: var(--mono); }

::selection { background: var(--acid); color: #05060a; }

/* ============================================================== bar ===== */

.bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 7, 10, 0.82);
  backdrop-filter: blur(12px);
}

.mark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--acid);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
}

.mark span { color: var(--text); }
.mark i { color: var(--acid); font-style: normal; }
.mark img { display: block; }

.bar nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bar nav a {
  padding: 7px 11px;
  color: var(--dim);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.14em;
  transition: color 0.15s;
}

.bar nav a:hover { color: var(--text); }

/* ============================================================== tape ==== */

/*
 * The ticker strip.
 *
 * Duplicated content inside the runner, and the animation translates by half
 * its width, which is what makes the loop seamless without measuring anything
 * in script. `aria-hidden` on the wrapper because it is the strip above
 * repeated, and a screen reader should not read the totals twice.
 */
.tape {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  padding: 8px 0;
  white-space: nowrap;
}

.tape-run {
  display: inline-block;
  animation: tape 42s linear infinite;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

.tape-run span { padding: 0 20px; }
.tape-run b { color: var(--acid); font-weight: 600; }
.tape-run em { color: var(--dimmer); font-style: normal; padding: 0 2px; }

@keyframes tape {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .tape-run { animation: none; }
}

/* ============================================================== layout == */

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 22px;
}

.band {
  padding: 74px 0;
  border-top: 1px solid var(--line);
}

.band h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.band h2 i {
  font-style: normal;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--acid);
}

.band-lede {
  max-width: 62ch;
  margin: 0 0 34px;
  color: var(--dim);
}

/* ============================================================== hero ==== */

/*
 * The banner, full width and faded into the page underneath it.
 *
 * Cropped rather than letterboxed as the window narrows: the art is 3:1 with
 * the flask dead centre, so `cover` keeps the subject and loses the slime at
 * the edges, which is the right thing to lose. The mask means there is no
 * seam between the artwork and the headline below it.
 */
.hero-banner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 22px;
}

/*
 * Shown whole rather than cropped to a fixed height.
 *
 * The obvious build is a full-bleed strip with `object-fit: cover`, and it is
 * wrong: the art is 3:1, so on a 1920px window covering a 320px strip throws
 * away half the image, and the half it throws away has the flask in it.
 * Letting the height follow the width keeps the whole composition at every
 * size, which is what the art was drawn for.
 *
 * The edges are then dissolved on three sides instead of being cut. The
 * artwork's own background is black and the page is all but black, so what
 * would otherwise show is the point where the slime stops - a visible seam on
 * a plain rectangle. Fading it out means the art ends in the page rather than
 * against it, and the banner reads as part of the page rather than a picture
 * pasted at the top of it.
 */
.hero-banner img {
  width: 100%;
  height: auto;
  display: block;

  -webkit-mask-image:
    linear-gradient(to bottom, #000 74%, transparent 100%),
    linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, #000 74%, transparent 100%),
    linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%);
  mask-composite: intersect;
}

.hero { padding: 26px 0 64px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 26px;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--dim);
}

.eyebrow .sep { color: var(--dimmer); }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dimmer);
  flex: none;
}

.dot.on {
  background: var(--acid);
  box-shadow: 0 0 0 0 rgba(109, 246, 68, 0.5);
  animation: pulse 2.4s ease-out infinite;
}

.dot.off { background: var(--hot); }

@keyframes pulse {
  to { box-shadow: 0 0 0 9px rgba(109, 246, 68, 0); }
}

/*
 * The line breaks in the markup are deliberate, so the size has to be one that
 * lets each of those lines fit. Where it does not, the forced break and the
 * natural wrap both happen and the headline arrives as five ragged lines
 * instead of three - which is why the floor here is well below what a headline
 * this prominent would otherwise take.
 */
.hero h1 {
  margin: 0 0 28px;
  font-family: var(--display);
  font-size: clamp(29px, 8.4vw, 86px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.hero h1 em {
  font-style: normal;
  color: var(--acid);
}

.lede {
  max-width: 60ch;
  margin: 0 0 40px;
  font-size: 15px;
  color: var(--dim);
}

.lede .tag {
  color: var(--acid);
  font-weight: 600;
}

/*
 * The one number the page exists to show.
 *
 * Tabular figures so it does not jiggle every few seconds as digits change
 * width, which on a number this size is impossible to ignore.
 */
.hero-num {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 22px 0 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 34px;
}

.hero-num b {
  font-family: var(--display);
  font-size: clamp(42px, 9vw, 78px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--acid);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 44px rgba(109, 246, 68, 0.28);
}

.hero-num span {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--dim);
}

.fine {
  max-width: 58ch;
  margin: 30px 0 0;
  font-size: 12px;
  color: var(--dimmer);
}

/* ============================================================== buttons = */

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  border: 1px solid var(--acid);
  border-radius: var(--r);
  background: var(--acid);
  color: #05060a;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 26px rgba(109, 246, 68, 0.3);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-hot);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--acid);
  box-shadow: none;
}

.btn-sm { padding: 8px 16px; font-size: 11px; }

.btn[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}

/* ============================================================== strip === */

.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 30px;
}

.strip > div {
  background: var(--panel);
  padding: 18px 16px;
}

.strip b {
  display: block;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.strip span {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

/* ============================================================== gauge === */

.gauge {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  padding: 20px;
  margin-bottom: 18px;
}

.gauge-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--dim);
}

.gauge-head b {
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.track {
  position: relative;
  height: 26px;
  border-radius: 2px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  overflow: hidden;
}

.track .fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, rgba(109, 246, 68, 0.25), var(--acid));
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.track .mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line-hot);
}

.track .mark.cap { background: var(--hot); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 12px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--dim);
}

.legend span { display: flex; align-items: center; gap: 7px; }
.legend i { width: 9px; height: 9px; border-radius: 2px; flex: none; }

/* ============================================================== next ==== */

.next {
  border: 1px solid var(--line-hot);
  border-radius: var(--r);
  background: var(--panel);
  padding: 20px;
}

.next-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.next-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--dim);
}

.next-amount {
  font-family: var(--display);
  font-size: clamp(24px, 4.4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--acid);
  font-variant-numeric: tabular-nums;
}

/* ============================================================== zones === */

.zone {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 2px;
  border: 1px solid currentColor;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.zone.surge { color: var(--hot); }
.zone.take { color: var(--acid); }
.zone.survive { color: var(--cyan); }
.zone.idle { color: var(--dimmer); }

/* Square swatches, for the legend above the log. */
.log-legend .zone {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: currentColor;
  vertical-align: -1px;
  margin: 0 5px 0 12px;
}

/* ============================================================== math ==== */

details.math {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

details.math > summary {
  cursor: pointer;
  list-style: none;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--dim);
  transition: color 0.15s;
}

details.math > summary::-webkit-details-marker { display: none; }
details.math > summary::before { content: "[+] "; color: var(--acid); }
details.math[open] > summary::before { content: "[-] "; }
details.math > summary:hover { color: var(--text); }

.math-body { padding-top: 14px; }

.math-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.math-body td { padding: 4px 0; vertical-align: top; }
.math-body td:first-child { color: var(--dim); padding-right: 18px; }
.math-body td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.math-body .rule {
  height: 1px;
  background: var(--line);
  margin: 9px 0;
}

.math-body tr.total td { color: var(--text); font-weight: 700; }
.math-body tr.total td:first-child { letter-spacing: 0.14em; font-size: 10px; }

.math-body .why {
  margin-top: 14px;
  font-size: 12px;
  color: var(--dim);
  max-width: 68ch;
}

.warn {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--hot);
  border-radius: var(--r);
  font-size: 11px;
  color: var(--hot);
}

/* ============================================================== feed ==== */

.log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

.feed-wrap { position: relative; }

/* A fade that means "more below", removed once there is not. */
.feed-wrap::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 1px;
  height: 64px;
  border-radius: 0 0 var(--r) var(--r);
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.2s;
}

.feed-wrap.at-end::after { opacity: 0; }

.feed {
  max-height: 620px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  scrollbar-width: thin;
  scrollbar-color: var(--line-hot) transparent;
}

.feed::-webkit-scrollbar { width: 8px; }
.feed::-webkit-scrollbar-thumb { background: var(--line-hot); border-radius: 4px; }

.empty {
  margin: 0;
  padding: 44px 20px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--dimmer);
}

.fire {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.fire:last-child { border-bottom: 0; }

.fire.is-new { animation: land 0.5s ease-out; }

@keyframes land {
  from { background: rgba(109, 246, 68, 0.07); }
  to { background: transparent; }
}

.fire-av { flex: none; text-decoration: none; }

.fire-av img,
.fire-initial {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--dim);
  font-weight: 700;
}

.fire-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 12px;
  margin-bottom: 6px;
}

.fire-name { font-weight: 700; }
.fire-handle, .fire-followers, .fire-when { color: var(--dimmer); font-size: 11px; }
.fire-when { margin-left: auto; text-decoration: none; }
.fire-when:hover { color: var(--text); }
.fire-followers::before { content: "· "; }
.check { color: var(--cyan); flex: none; }

.fire-post {
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
}

.fire-post mark {
  background: rgba(109, 246, 68, 0.16);
  color: var(--acid);
  padding: 0 2px;
  border-radius: 2px;
}

.fire-post mark.ca { font-size: 11px; }
.fire-post .link { color: var(--dimmer); }

.fire-media {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.fire-media img {
  max-height: 150px;
  max-width: 48%;
  border-radius: var(--r);
  border: 1px solid var(--line);
  object-fit: cover;
}

.fire-out {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  font-size: 12px;
}

.fire-eth {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--acid);
  font-variant-numeric: tabular-nums;
}

.fire-burn { color: var(--hot); font-size: 11px; }
.fire-miss { color: var(--dimmer); font-size: 11px; }

.fire-tx {
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-decoration: none;
  border-bottom: 1px solid var(--line-hot);
}

.fire-tx:hover { color: var(--acid); border-color: var(--acid); }

.feed-more {
  margin: 12px 0 0;
  font-size: 11px;
  color: var(--dimmer);
}

/* ============================================================== cards === */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.cards article {
  background: var(--panel);
  padding: 24px 20px 26px;
}

.cards .step {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--acid);
}

.cards h3 {
  margin: 12px 0 10px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.cards p { margin: 0; font-size: 12.5px; color: var(--dim); }

.cards code {
  color: var(--acid);
  background: rgba(109, 246, 68, 0.08);
  padding: 1px 5px;
  border-radius: 2px;
}

/* ============================================================== cant ==== */

.cant {
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  padding: 24px 22px;
}

.cant h3 {
  margin: 0 0 16px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--hot);
}

.cant ul { margin: 0; padding: 0; list-style: none; }

.cant li {
  padding: 11px 0 11px 26px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--dim);
  position: relative;
}

.cant li:first-child { border-top: 0; }

.cant li::before {
  content: "\00d7";
  position: absolute;
  left: 4px;
  top: 10px;
  color: var(--hot);
  font-size: 15px;
}

.cant b { color: var(--text); font-weight: 700; }

/* ============================================================== split == */

.split {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  overflow: hidden;
}

.split-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  padding: 20px;
  border-top: 1px solid var(--line);
}

.split-row:first-child { border-top: 0; }

.split-pct {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--acid);
  line-height: 1;
}

.split-row b { display: block; margin-bottom: 5px; font-size: 13px; }
.split-row p { margin: 0; font-size: 12.5px; color: var(--dim); }
.split-row code { color: var(--text); }

.split-note {
  margin: 14px 0 0;
  font-size: 11.5px;
  color: var(--dimmer);
  max-width: 68ch;
}

.split-note code { color: var(--dim); }

/* ============================================================== buy ===== */

.addr { margin-bottom: 26px; }

.addr label {
  display: block;
  margin-bottom: 9px;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--dim);
}

.addr-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}

.addr-row code {
  flex: 1 1 320px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  color: var(--dimmer);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.addr-row code.set { color: var(--text); }

#copy {
  padding: 0 20px;
  border: 1px solid var(--line-hot);
  border-radius: var(--r);
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

#copy:hover:not(:disabled) { border-color: var(--acid); color: var(--acid); }
#copy:disabled { opacity: 0.35; cursor: default; }

/* ============================================================== footer == */

footer {
  border-top: 1px solid var(--line);
  padding: 44px 22px 60px;
  max-width: 1080px;
  margin: 0 auto;
}

footer p { margin: 0 0 12px; font-size: 11.5px; color: var(--dimmer); max-width: 66ch; }

.foot-mark {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text);
}

.foot-mark i { color: var(--acid); font-style: normal; }

.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }

.foot-links a {
  color: var(--dim);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.14em;
  border-bottom: 1px solid var(--line-hot);
}

.foot-links a:hover { color: var(--acid); border-color: var(--acid); }

/* ============================================================== small === */

@media (max-width: 720px) {
  .bar { padding: 11px 16px; }
  .bar nav a:not(.btn) { display: none; }
  main { padding: 0 16px; }
  /* Edge to edge, because at this width the art is small enough already. */
  .hero-banner { padding: 0; }
  .band { padding: 54px 0; }
  .hero { padding: 48px 0; }
  .fire { grid-template-columns: 36px 1fr; gap: 11px; padding: 16px 14px; }
  .fire-av img, .fire-initial { width: 36px; height: 36px; }
  .split-row { grid-template-columns: 1fr; gap: 8px; }
  footer { padding: 34px 16px 50px; }
}
