/* Strikepad app theme.
   Tokens lifted from the site's own stylesheet rather than approximated, and the
   same locally hosted faces the rest of the site uses. */

@font-face {
  font-family: HaasUnicaSH-Regular;
  font-display: swap;
  font-style: normal;
  src: url(/fonts/HaasUnicaSH-Regular.woff2) format("woff2"),
       url(/fonts/HaasUnicaSH-Regular.woff) format("woff");
}
@font-face {
  font-family: HaasUnicaSH-Medium;
  font-display: swap;
  font-style: normal;
  src: url(/fonts/HaasUnicaSH-Medium.woff2) format("woff2"),
       url(/fonts/HaasUnicaSH-Medium.woff) format("woff");
}
@font-face {
  font-family: ductile;
  font-display: swap;
  font-style: normal;
  src: url(/fonts/ductile.woff2) format("woff2"),
       url(/fonts/ductile.woff) format("woff");
  unicode-range: u+0000-002a, u+002c-003f, u+0041-ffff;
}

:root {
  --c-accent: #beff8b;
  --c-bg: #ede8e8;
  --c-bg-brand: #9dbbc5;
  --c-secondary: #d5bafb;
  --c-placeholder: #c0dfe9;
  --c-dark: #000;
  --c-light: #fff;
  --c-up: #1f8f3a;
  --c-down: #b3261e;
  --gutter: 1rem;
  --columns: 6;
  --pad: 1rem;
  --radius: 1.25rem;
}
@media screen and (min-width: 1024px) {
  :root { --columns: 12; --pad: 2.5rem; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  background: var(--c-bg);
  color: var(--c-dark);
  font-family: HaasUnicaSH-Regular, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.35;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }

.wrap { padding: 0 var(--pad); }
.rule { height: 1px; background: rgba(0, 0, 0, .18); width: 100%; }
.muted { opacity: .45; }
.pos { color: var(--c-up); }
.neg { color: var(--c-down); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.med { font-family: HaasUnicaSH-Medium, Helvetica, sans-serif; font-weight: 400; }

/* ---------- pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: HaasUnicaSH-Medium, Helvetica, sans-serif; font-size: .8rem;
  padding: .7rem 1.35rem; border-radius: 999px; border: 1px solid var(--c-dark);
  background: transparent; white-space: nowrap; cursor: pointer;
  transition: background .35s ease, color .35s ease, transform .35s ease, opacity .2s ease;
}
.pill:hover { background: var(--c-dark); color: var(--c-accent); transform: translateY(-2px); }
.pill--solid { background: var(--c-accent); border-color: var(--c-dark); }
.pill--solid:hover { background: var(--c-dark); color: var(--c-accent); }
.pill--dark { background: var(--c-dark); color: var(--c-accent); border-color: var(--c-dark); }
.pill--dark:hover { background: var(--c-accent); color: var(--c-dark); }
.pill--sm { padding: .45rem .9rem; font-size: .7rem; }
/* The mark carries it, so the pill is square rather than a word's width. */
.pill--x { padding: .7rem .85rem; display: inline-flex; align-items: center; }
.pill--x svg { width: .85rem; height: .85rem; fill: currentColor; display: block; }
.pill[disabled], .pill[aria-disabled="true"] {
  opacity: .35; cursor: not-allowed; pointer-events: none;
}

/* ---------- header ---------- */
header.bar {
  position: fixed; top: 0; left: 0; width: 100vw; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1.25rem var(--pad);
  transition: background .4s ease, box-shadow .4s ease, padding .4s ease;
}
header.bar.is-scrolled {
  padding: .85rem var(--pad);
  background: rgba(237, 232, 232, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .12);
}
header.bar.is-scrolled .pill { background: var(--c-light); }
header.bar.is-scrolled .pill--dark { background: var(--c-dark); }
header.bar.is-scrolled .pill:hover { background: var(--c-dark); }
header.bar.is-scrolled .pill--dark:hover { background: var(--c-accent); }
.lockup {
  font-family: ductile, Helvetica, sans-serif; font-size: 1.4rem;
  letter-spacing: .06em; line-height: 1;
}
.lockup small {
  font-family: HaasUnicaSH-Medium, Helvetica, sans-serif; font-size: .62rem;
  letter-spacing: .18em; text-transform: uppercase;
  display: block; margin-top: .35rem; opacity: .6;
}
.nav { display: flex; gap: .5rem; align-items: center; }

/* Below the desktop breakpoint the pills will not fit beside the lockup, so
   they drop to a line of their own and scroll sideways. Hiding them instead
   takes Connect wallet and Launch a market off the phone entirely, which is
   most of the app and most of the traffic. */
@media screen and (max-width: 899px) {
  header.bar { flex-wrap: wrap; gap: .8rem 1rem; padding: 1rem var(--pad) .9rem; }
  header.bar.is-scrolled { padding: .75rem var(--pad) .7rem; }
  .lockup { font-size: 1.15rem; }
  .lockup small { margin-top: .25rem; }
  .nav {
    width: 100%;
    overflow-x: auto; overscroll-behavior-x: contain;
    scrollbar-width: none; -ms-overflow-style: none;
    /* Bleed to both edges so a pill can sit half off-screen and read as more. */
    margin-inline: calc(var(--pad) * -1);
    padding: .2rem var(--pad) .25rem;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav .pill { flex: 0 0 auto; padding: .5rem 1rem; font-size: .72rem; }
  .nav .pill--x { padding: .5rem .72rem; }
  /* The strip starts scrolled to the left, so the two pills that actually do
     something lead it. The markup keeps its own order for everything else. */
  .nav .pill--dark { order: -2; }
  .nav #connect { order: -1; }
  main { padding-top: 8.5rem; }
}

/* ---------- sections ---------- */
main { padding-top: 6.5rem; }
section { padding: 4rem 0; }
.label {
  font-family: HaasUnicaSH-Medium, Helvetica, sans-serif; font-size: .66rem;
  letter-spacing: .18em; text-transform: uppercase; opacity: .55;
  margin-bottom: 1.5rem; display: block;
}
h1 {
  font-family: HaasUnicaSH-Regular, Helvetica, sans-serif; font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 5.4rem); line-height: .96;
  letter-spacing: -.035em; max-width: 16ch;
}
h2 {
  font-family: HaasUnicaSH-Regular, Helvetica, sans-serif; font-weight: 400;
  font-size: clamp(1.8rem, 4.4vw, 3.6rem); line-height: 1.02;
  letter-spacing: -.03em; max-width: 20ch;
}
h3 {
  font-family: HaasUnicaSH-Medium, Helvetica, sans-serif; font-weight: 400;
  font-size: 1.1rem; letter-spacing: -.01em;
}
.lede { margin-top: 1.25rem; max-width: 54ch; font-size: 1.02rem; line-height: 1.5; opacity: .8; }

/* ---------- cards ---------- */
.card {
  background: var(--c-light); border-radius: var(--radius); padding: 1.75rem;
  display: flex; flex-direction: column;
}
.card__n {
  font-family: ductile, Helvetica, sans-serif; font-size: 1.5rem;
  margin-bottom: auto; opacity: .35;
}
.grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 2.5rem; }
@media screen and (min-width: 800px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media screen and (min-width: 800px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- data rows ---------- */
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: .7rem 0; border-bottom: 1px solid rgba(0, 0, 0, .08); font-size: .88rem;
}
.row:last-child { border-bottom: 0; }
.row span:first-child { opacity: .55; }
.row span:last-child { font-family: HaasUnicaSH-Medium, Helvetica, sans-serif; text-align: right; }

/* ---------- status ---------- */
.status {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: HaasUnicaSH-Medium, Helvetica, sans-serif;
  font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
  background: var(--c-light); padding: .45rem .85rem; border-radius: 999px;
}
.dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--c-dark); opacity: .3; }
.dot--live { background: var(--c-up); opacity: 1; }
.dot--warn { background: #d08700; opacity: 1; }

/* ---------- forms ---------- */
.field { margin-bottom: 1.5rem; }
.field > label {
  font-family: HaasUnicaSH-Medium, Helvetica, sans-serif; font-size: .66rem;
  letter-spacing: .18em; text-transform: uppercase; opacity: .55;
  display: block; margin-bottom: .6rem;
}
.input {
  width: 100%; padding: .95rem 1.1rem; border-radius: .9rem;
  border: 1px solid rgba(0, 0, 0, .18); background: var(--c-light);
  font-size: 1rem; outline: none;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.input:focus { border-color: var(--c-dark); box-shadow: 0 0 0 3px rgba(0, 0, 0, .06); }
.hint { font-size: .75rem; opacity: .5; margin-top: .5rem; line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.chip {
  border: 1px solid rgba(0, 0, 0, .2); background: transparent; border-radius: 999px;
  padding: .35rem .8rem; font-size: .72rem; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.chip:hover { border-color: var(--c-dark); }
.chip[aria-pressed="true"] { background: var(--c-dark); color: var(--c-accent); border-color: var(--c-dark); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; border-radius: var(--radius); background: var(--c-light); }
table { width: 100%; border-collapse: collapse; font-size: .85rem; min-width: 40rem; }
th, td { padding: .85rem 1rem; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th {
  font-family: HaasUnicaSH-Medium, Helvetica, sans-serif; font-weight: 400;
  font-size: .62rem; letter-spacing: .13em; text-transform: uppercase;
  opacity: .55; border-bottom: 1px solid rgba(0, 0, 0, .12);
}
tbody tr { border-bottom: 1px solid rgba(0, 0, 0, .07); }
tbody tr:last-child { border-bottom: 0; }

/* ---------- notices ---------- */
.notice {
  border-radius: var(--radius); padding: 1.5rem 1.75rem; background: var(--c-bg-brand);
  font-size: .9rem; line-height: 1.55;
}
.notice--warn { background: var(--c-secondary); }
.notice strong {
  font-family: HaasUnicaSH-Medium, Helvetica, sans-serif; font-weight: 400;
  display: block; margin-bottom: .4rem;
}
.notice code {
  font-family: ui-monospace, monospace; font-size: .8rem;
  background: rgba(0, 0, 0, .08); padding: .1rem .35rem; border-radius: .25rem;
}

/* ---------- footer ---------- */
footer { padding: 3rem 0 2.5rem; font-size: .72rem; opacity: .6; line-height: 1.6; }
.footer__row {
  display: flex; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin-top: 1.25rem;
}

/* ---------- misc ---------- */
.bar-meter {
  display: inline-block; vertical-align: middle; height: .45rem; border-radius: 999px;
  background: var(--c-accent); margin-right: .55rem; min-width: 2px;
}
.spread {
  display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 1.25rem 0;
}
.side {
  border-radius: 1rem; padding: 1rem 1.15rem; border: 1px solid transparent;
  cursor: pointer; text-align: left; background: var(--c-light);
  transition: border-color .2s ease, transform .2s ease;
}
.side:hover { transform: translateY(-2px); }
.side[aria-pressed="true"] { border-color: var(--c-dark); }
.side b {
  display: block; font-family: HaasUnicaSH-Medium, Helvetica, sans-serif;
  font-weight: 400; font-size: .66rem; letter-spacing: .13em;
  text-transform: uppercase; opacity: .55; margin-bottom: .35rem;
}
.side em { font-style: normal; font-size: 1.6rem; letter-spacing: -.02em; }
.side--up em { color: #1d4ed8; }
.side--down em { color: var(--c-down); }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
  background: var(--c-dark); color: var(--c-accent); padding: .9rem 1.4rem;
  border-radius: 999px; font-size: .82rem; z-index: 60; max-width: 90vw;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.toast a { text-decoration: underline; }
.toast--err { background: var(--c-down); color: #fff; }
