/* Shard V2. A dark room, a few coloured lights, and panes of cut glass in front of them.
   Every surface is one of those panes: it blurs what is behind it, catches light on its
   top edge, and a pool's pane takes the colour of that pool's stone. */

@font-face {
  font-family: 'Kaisei Tokumin';
  font-weight: 700;
  font-display: swap;
  src: url('./fonts/kaisei-tokumin-latin-700-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Kaisei Tokumin';
  font-weight: 800;
  font-display: swap;
  src: url('./fonts/kaisei-tokumin-latin-800-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Hanken Grotesk';
  font-weight: 100 900;
  font-display: swap;
  src: url('./fonts/hanken-grotesk-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Hanken Grotesk';
  font-weight: 100 900;
  font-display: swap;
  src: url('./fonts/hanken-grotesk-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;

  /* The room. */
  --velvet: #070916;
  --velvet-2: #10142b;
  --velvet-3: #232845;

  /* Text. */
  --pearl: #f5f6ff;
  --pearl-2: #cbd0e8;
  --pearl-3: #9da7c7;

  /* Signals. Amethyst is the brand; the rest each mean one thing. */
  --amethyst: #bcacff;
  --live: #ff86a5;
  --ready: #f3c96b;
  --good: #7fe3cd;
  --bad: #ff9dab;

  --seam: rgb(214 222 255 / 0.12);
  --seam-strong: rgb(214 222 255 / 0.24);

  /* Glass. A pane is a faint diagonal sheen over a dark tint, frosted, with a lit top edge. */
  --pane: linear-gradient(145deg, rgb(255 255 255 / 0.12), rgb(255 255 255 / 0.03) 40%, rgb(255 255 255 / 0.065));
  --pane-tint: rgb(11 14 34 / 0.46);
  --frost: blur(26px) saturate(175%);
  --bevel: inset 0 1px 0 rgb(255 255 255 / 0.2), inset 0 -1px 0 rgb(0 0 0 / 0.22);
  --drop: 0 1.5rem 3.5rem rgb(2 3 12 / 0.38);
  --edge: linear-gradient(140deg, rgb(255 255 255 / 0.55), rgb(255 255 255 / 0.1) 26%, rgb(255 255 255 / 0.05) 62%, rgb(255 255 255 / 0.26));
  /* A hollow cut into a pane, for anything you type into. */
  --well: rgb(3 5 16 / 0.5);
  /* A pane raised a little: hover and selected. */
  --lift: rgb(255 255 255 / 0.1);

  --display: 'Kaisei Tokumin', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --text: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;

  --page: 82rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --tray: 1.75rem;
  --control: 0.9rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
  -webkit-text-size-adjust: 100%;
  background: var(--well);
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  color: var(--pearl);
  font: 400 1rem/1.5 var(--text);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The lights. They stay put while the page scrolls, so every pane passes in front of them. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(58rem 40rem at 84% -4%, rgb(126 92 255 / 0.6), transparent 64%),
    radial-gradient(44rem 34rem at 2% 10%, rgb(24 172 180 / 0.36), transparent 64%),
    radial-gradient(38rem 28rem at 56% 52%, rgb(255 84 150 / 0.17), transparent 66%),
    radial-gradient(52rem 38rem at 8% 100%, rgb(78 98 255 / 0.34), transparent 64%),
    radial-gradient(40rem 30rem at 100% 92%, rgb(255 170 92 / 0.13), transparent 66%),
    var(--velvet);
  pointer-events: none;
}

/* Light falling through a cut stone: a few hard-edged beams fanning out from the top corner. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: conic-gradient(
    from 192deg at 88% -10%,
    rgb(206 190 255 / 0.17) 0deg,
    transparent 13deg,
    transparent 22deg,
    rgb(120 232 222 / 0.1) 22deg,
    transparent 33deg,
    transparent 47deg,
    rgb(255 160 200 / 0.09) 47deg,
    transparent 57deg,
    transparent 66deg,
    rgb(180 190 255 / 0.07) 66deg,
    transparent 72deg,
    transparent 360deg
  );
  -webkit-mask-image: linear-gradient(#000 30%, transparent 92%);
  mask-image: linear-gradient(#000 30%, transparent 92%);
  pointer-events: none;
}

body:has(dialog[open]) {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: wait;
  opacity: 0.5;
}

svg {
  display: block;
}

code,
.mono {
  font-family: var(--mono);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

:focus-visible {
  outline: 2px solid var(--amethyst);
  outline-offset: 3px;
}

::selection {
  background: var(--amethyst);
  color: var(--velvet);
}

[hidden] {
  display: none !important;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 30;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--pearl);
  color: var(--velvet);
  font-weight: 600;
}

.skip:focus {
  top: 1rem;
}

/* The bright rim of a pane. Drawn as a ring so the light can run diagonally around it. */
.top::after,
.feature::before,
.pool::before,
.market-controls::before,
.hero-principles::before,
.empty::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  pointer-events: none;
}

/* ------------------------------------------------------------ controls */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.7rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.25s, transform 0.18s var(--ease);
}

.button:active:not(:disabled) {
  transform: scale(0.97);
}

/* The one lit pane on any screen: the thing to do next. */
.button.primary {
  border-color: var(--seam-strong);
  background: rgb(255 255 255 / 0.06);
  box-shadow: var(--bevel);
}

.button.primary:hover:not(:disabled) {
  box-shadow: inset 0 1px 0 #fff, inset 0 -0.5rem 0.9rem -0.5rem rgb(104 74 220 / 0.35), 0 0.6rem 2.25rem rgb(150 122 255 / 0.6);
}

.button.quiet {
  border-color: var(--seam-strong);
  background: rgb(255 255 255 / 0.06);
  box-shadow: var(--bevel);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
}

.button.quiet:hover:not(:disabled) {
  background: var(--lift);
  border-color: rgb(255 255 255 / 0.4);
}

.button.danger {
  color: var(--bad);
  border-color: color-mix(in oklab, var(--bad) 45%, transparent);
}

.button.danger:hover:not(:disabled) {
  background: color-mix(in oklab, var(--bad) 14%, transparent);
  border-color: var(--bad);
}

.button.small {
  min-height: 2.5rem;
  padding: 0.45rem 1.05rem;
  font-size: 0.9375rem;
}

.button.wide {
  width: 100%;
}

.link {
  color: var(--pearl-2);
  text-decoration: underline;
  text-decoration-color: var(--seam-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: color 0.18s, text-decoration-color 0.18s;
}

.link:hover {
  color: var(--pearl);
  text-decoration-color: var(--amethyst);
}

.icon-button {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--seam-strong);
  border-radius: 50%;
  background: rgb(255 255 255 / 0.05);
  box-shadow: var(--bevel);
  color: var(--pearl-2);
  transition: background-color 0.18s, color 0.18s, border-color 0.18s;
}

.icon-button:hover:not(:disabled) {
  background: var(--lift);
  border-color: rgb(255 255 255 / 0.4);
  color: var(--pearl);
}

.icon {
  width: 1.125rem;
  height: 1.125rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dot {
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--amethyst);
  box-shadow: 0 0 0.6rem color-mix(in oklab, var(--amethyst) 70%, transparent);
}

.dot.good {
  background: var(--good);
  box-shadow: 0 0 0.6rem color-mix(in oklab, var(--good) 70%, transparent);
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border: 1px solid color-mix(in oklab, var(--amethyst) 40%, transparent);
  border-radius: 999px;
  background: color-mix(in oklab, var(--amethyst) 12%, transparent);
  color: var(--amethyst);
  font: 600 0.75rem/1.3 var(--text);
  vertical-align: middle;
}

.tag.good {
  color: var(--good);
  border-color: color-mix(in oklab, var(--good) 40%, transparent);
  background: color-mix(in oklab, var(--good) 10%, transparent);
}

/* A small label that says what a thing is. Sentence case, like everything else. */
.eyebrow {
  color: var(--pearl-2);
  font: 500 0.875rem/1.4 var(--text);
}

/* -------------------------------------------------------------- header */

/* The header's glass is drawn behind it rather than on it, so the navigation inside
   can leave and dock at the bottom of a phone's screen. */
.top {
  position: sticky;
  top: 0.75rem;
  z-index: 20;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: calc(100% - 2 * var(--gutter));
  max-width: calc(var(--page) - 2 * var(--gutter));
  margin: 0.75rem auto 0;
  padding: 0.5rem 0.5rem 0.5rem 1.2rem;
  border-radius: 999px;
}

.top::before,
.top-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--pane), rgb(9 11 28 / 0.55);
  box-shadow: var(--bevel), var(--drop);
  -webkit-backdrop-filter: var(--frost);
  backdrop-filter: var(--frost);
}

.top-nav::before {
  display: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font: 800 1.5rem/1 var(--display);
  letter-spacing: -0.035em;
}

.brand svg {
  width: 1.75rem;
  height: 1.75rem;
  filter: drop-shadow(0 0 0.6rem rgb(154 114 239 / 0.6));
}

.brand-version {
  margin-left: 0.1rem;
  padding: 0.22rem 0.45rem;
  border: 1px solid var(--seam-strong);
  border-radius: 999px;
  color: var(--amethyst);
  font: 700 0.6875rem/1 var(--text);
  letter-spacing: 0.04em;
}

.top-nav {
  display: flex;
  gap: 0.15rem;
  margin-left: 0.5rem;
}

.nav-link {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  color: var(--pearl-2);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.18s, color 0.18s;
}

.nav-link:hover {
  color: var(--pearl);
  background: rgb(255 255 255 / 0.05);
}

.nav-link.active {
  background: var(--lift);
  box-shadow: var(--bevel);
  color: var(--pearl);
}

/* Icons belong to the phone dock; a wide header has room for the words alone. */
.nav-link .icon {
  display: none;
}

.nav-link.nav-create .icon {
  display: block;
  width: 1rem;
  height: 1rem;
  color: var(--amethyst);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.network {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--pearl-2);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background-color 0.18s, color 0.18s;
}

.network:hover {
  background: rgb(255 255 255 / 0.06);
  color: var(--pearl);
}

.network .icon {
  width: 0.9rem;
  height: 0.9rem;
}

.top-actions .button {
  min-height: 2.75rem;
  white-space: nowrap;
}

.wallet {
  font-family: var(--mono);
  font-size: 0.8125rem;
}

/* ---------------------------------------------------------------- hero */

main {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
  gap: 2.5rem clamp(2rem, 5vw, 5rem);
  padding-block: clamp(2.25rem, 5vw, 4.5rem) 1rem;
}

.hero-copy {
  display: grid;
  justify-items: center;
  max-width: 42rem;
}

/* Sized from its own column, so "Move the whole." always sits on one line. The whole
   headline is cut from one piece of glass: bright where the light lands, violet below. */
.hero h1 {
  padding-bottom: 0.08em;
  font-size: clamp(2.4rem, 11.6cqi, 5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-wrap: nowrap;
  color: #fff;
}

.hero-lede {
  max-width: 31rem;
  margin-top: 1.4rem;
  color: var(--pearl-2);
  font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.25rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
}

.hero-actions .button {
  min-height: 3.25rem;
  padding-inline: 1.75rem;
}

.hero-demo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.25rem;
  color: var(--pearl-3);
  font-size: 0.875rem;
}

.hero-demo .dot {
  width: 0.4rem;
  height: 0.4rem;
}

/* The three things worth knowing before you put money in, on one long pane. */
.hero-principles {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0.5rem;
  border-radius: 1.6rem;
  background: var(--pane), var(--pane-tint);
  box-shadow: var(--bevel), var(--drop);
  -webkit-backdrop-filter: var(--frost);
  backdrop-filter: var(--frost);
}

.hero-principles > * {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: 1.15rem;
  text-align: left;
  transition: background-color 0.18s;
}

.hero-principles > *:hover {
  background: rgb(255 255 255 / 0.06);
}

.hero-principles strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
}

.hero-principles small {
  display: block;
  margin-top: 0.15rem;
  color: var(--pearl-3);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.principle-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.95rem;
  background: color-mix(in oklab, var(--tone, var(--amethyst)) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--tone, var(--amethyst)) 34%, transparent), inset 0 1px 0 rgb(255 255 255 / 0.18);
  color: var(--tone, var(--amethyst));
}

.hero-principles > :nth-child(1) {
  --tone: var(--good);
}

.hero-principles > :nth-child(2) {
  --tone: var(--live);
}

/* The featured basket, behind its own pane: the first pieces fanned out, the funding
   stone pinned to them, and a smaller pane across the bottom that the art shows through. */
#hero-feature {
  width: 100%;
  max-width: 34rem;
  min-width: 0;
  justify-self: center;
}

.feature {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  text-align: left;
  padding: 0.75rem;
  border-radius: 2rem;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

@media (hover: hover) {
}

.feature-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.35rem 0.45rem 0 0.55rem;
}

.feature-stone {
  display: block;
  width: min(100% - 2rem, 23rem);
  margin-top: 0.5rem;
  border-radius: 50%;
}

.feature-art {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100% - 7rem, 20rem);
  aspect-ratio: 1;
  margin-top: 1.6rem;
  border-radius: 1.5rem;
}

.fan-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 1.5rem;
  box-shadow: 0 1.75rem 3.5rem rgb(2 3 12 / 0.6);
  transition: transform 0.6s var(--ease);
}

.fan-card::after,
.pool-tray::after,
.gallery-main::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14), inset 0 1px 0 rgb(255 255 255 / 0.3);
  pointer-events: none;
  transition: box-shadow 0.3s;
}

.fan-card:nth-last-child(2) {
  transform: translate(12%, -2%) rotate(8deg) scale(0.92);
}

.fan-card:nth-last-child(3) {
  transform: translate(-12%, -1%) rotate(-9deg) scale(0.89);
}

.feature-art:hover .fan-card:nth-last-child(2) {
  transform: translate(16%, -3%) rotate(11deg) scale(0.92);
}

.feature-art:hover .fan-card:nth-last-child(3) {
  transform: translate(-16%, -2%) rotate(-12deg) scale(0.89);
}

.feature-art .seal {
  left: -2.25rem;
  bottom: 3.25rem;
  width: 5.75rem;
  height: 5.75rem;
}

.feature-art-label {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 999px;
  background: rgb(8 10 24 / 0.5);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  backdrop-filter: blur(14px) saturate(170%);
  color: var(--pearl);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.feature-caption {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem 1.25rem;
  width: 100%;
  margin-top: -2.5rem;
  padding: 1.1rem 1.15rem 1.15rem 1.25rem;
  border: 1px solid rgb(255 255 255 / 0.13);
  border-radius: 1.6rem;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.12), rgb(255 255 255 / 0.04)), rgb(9 11 28 / 0.5);
  box-shadow: var(--bevel), 0 1rem 2.5rem rgb(2 3 12 / 0.35);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
}

.feature-caption .legend,
.feature-caption .funding-track {
  grid-column: 1 / -1;
}

.feature-caption .funding-track {
  margin-top: 0;
}

.feature-name {
  font: 700 1.5rem/1.2 var(--display);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.feature-figure {
  margin-top: 0.2rem;
  color: var(--pearl-2);
  font-variant-numeric: tabular-nums;
}

.feature-figure strong {
  color: var(--pearl);
  font-weight: 600;
}

/* Light that follows the pointer across a pane, the way it slides over real glass. */
.feature::after,
.pool::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background: radial-gradient(22rem circle at var(--glare-x, 50%) var(--glare-y, 0%), rgb(255 255 255 / 0.16), transparent 62%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}

@media (hover: hover) {
  .feature:hover::after,
  .pool:hover::after {
    opacity: 1;
  }
}

/* What the facets mean. The swatch colours come from the stone itself. */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  color: var(--pearl-2);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.legend b {
  color: var(--pearl);
  font-weight: 600;
}

.key {
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 0.2rem;
  background: var(--stone-lit, var(--amethyst));
}

.key.yours {
  background: var(--stone-own, var(--pearl));
}

.key.open {
  background: transparent;
  border: 1px solid var(--stone-ghost, var(--pearl-3));
}

/* ----------------------------------------------------------------- art */

.nft-visual {
  display: block;
  width: 100%;
  height: 100%;
}

/* One picture of an NFT. It fills whatever box it is put in. */
.art {
  container-type: inline-size;
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--velvet-3);
}

.art-stone {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 40%, #27203f, #101326 75%);
}

.art-stone .stone {
  width: min(100%, 22rem);
  max-height: 100%;
}

.art img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}

/* Until a picture arrives it stays out of the way of the token's number beneath it. */
.art:not([data-here]) img {
  opacity: 0;
}

/* No picture yet, or none at all: the token's number on a blank facet. */
.art-blank {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.15em;
  width: 100%;
  height: 100%;
  padding: 6cqi;
  background: linear-gradient(118deg, var(--velvet-3) 0 46%, color-mix(in oklab, var(--velvet-3) 80%, var(--seam-strong)) 46% 100%);
  color: var(--pearl-2);
  font-size: clamp(0.625rem, 11cqi, 2rem);
  line-height: 1.1;
  text-align: center;
}

.art-blank b {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.art-blank small {
  color: var(--pearl-3);
  font-size: max(0.6875rem, 0.42em);
}

/* A thumbnail has room for the number and nothing else. */
@container (max-width: 5rem) {
  .art-blank small {
    display: none;
  }
}

.art[data-state='loading'] .art-blank,
.art[data-state='ready'] .art-blank {
  animation: wait 1.6s ease-in-out infinite;
}

@keyframes wait {
  50% {
    opacity: 0.55;
  }
}

/* The funding stone, pinned to the artwork it belongs to. */
.seal {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  display: grid;
  place-items: center;
  width: 4.25rem;
  height: 4.25rem;
  overflow: hidden;
  border-radius: 50%;
  background: rgb(8 10 24 / 0.55);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.2), inset 0 1px 0 rgb(255 255 255 / 0.22), 0 0.6rem 1.5rem rgb(2 3 12 / 0.5);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  backdrop-filter: blur(14px) saturate(170%);
}

/* -------------------------------------------------------------- stones */

.stone {
  width: 100%;
  height: auto;
  overflow: visible;
}

.stone-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 2.6s ease-out infinite;
}

.stone-sweep .stone-lit path.fresh {
  animation: facet 0.5s both;
  animation-delay: calc(var(--i) * 15ms + 0.3s);
}

/* In the dialog the new facets follow straight on from the click that funded them. */
dialog .stone-sweep .stone-lit path.fresh {
  animation-delay: calc(var(--i) * 28ms + 0.05s);
}

dialog .stone-sweep .stone-reached {
  animation: none;
}

.stone-sweep .stone-reached {
  animation: reach 1.3s 0.3s both;
}

@keyframes facet {
  from {
    opacity: 0;
    filter: brightness(1.9);
  }
}

@keyframes reach {
  from {
    opacity: 0;
  }
}

@keyframes pulse {
  0% {
    transform: scale(0.94);
    opacity: 0.9;
  }
  70%,
  100% {
    transform: scale(1.08);
    opacity: 0;
  }
}

/* -------------------------------------------------------------- market */

.market {
  padding-block: clamp(2.5rem, 5vw, 4rem) clamp(3rem, 7vw, 5.5rem);
}

.market-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

.market-head h2,
.how h1 {
  font-size: clamp(2rem, 1.35rem + 1.5vw, 2.75rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.mode {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  padding: 0.45rem 0.9rem 0.45rem 0.5rem;
  border: 1px solid var(--seam);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.04);
  color: var(--pearl-2);
  font-size: 0.875rem;
}

.mode .link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.25rem;
  color: var(--amethyst);
  font-weight: 600;
  text-decoration: none;
}

.mode .link:hover {
  color: var(--pearl);
}

.mode .icon {
  width: 0.9rem;
  height: 0.9rem;
}

/* The filters ride along under the header while you scroll the pools. */
.market-controls {
  position: sticky;
  top: 5rem;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin-top: 1.5rem;
  padding: 0.45rem;
  border-radius: 1.6rem;
  background: var(--pane), rgb(9 11 28 / 0.55);
  box-shadow: var(--bevel), var(--drop);
  -webkit-backdrop-filter: var(--frost);
  backdrop-filter: var(--frost);
}

.tabs {
  display: flex;
  gap: 0.15rem;
}

.tabs button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  min-height: 2.75rem;
  border-radius: 999px;
  color: var(--pearl-2);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.18s, color 0.18s;
}

.tabs button:hover {
  color: var(--pearl);
  background: rgb(255 255 255 / 0.05);
}

.tabs button.active {
  background: var(--lift);
  box-shadow: var(--bevel);
  color: var(--pearl);
}

.tabs button span {
  min-width: 1.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.08);
  color: var(--pearl-3);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.tabs button.active span {
  background: var(--amethyst);
  color: var(--velvet);
}

.search-tools {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 20rem;
  min-width: 0;
  min-height: 2.75rem;
  padding-inline: 1rem;
  border: 1px solid var(--seam);
  border-radius: 999px;
  background: var(--well);
  box-shadow: inset 0 2px 6px rgb(0 0 0 / 0.35);
  color: var(--pearl-3);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.search:focus-within {
  border-color: var(--amethyst);
  box-shadow: inset 0 2px 6px rgb(0 0 0 / 0.35), 0 0 0 4px color-mix(in oklab, var(--amethyst) 20%, transparent);
}

.search input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0;
  border: 0;
  background: none;
  color: var(--pearl);
  outline: none;
}

.search input::placeholder {
  color: var(--pearl-3);
}

.search input::-webkit-search-cancel-button {
  display: none;
}

/* The key that jumps to the search box, shown until you start typing. */
.search kbd {
  flex: none;
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--seam-strong);
  border-radius: 0.4rem;
  color: var(--pearl-3);
  font: 500 0.75rem/1.4 var(--text);
}

.search:focus-within kbd,
.search:has(.search-clear:not([hidden])) kbd {
  display: none;
}

.search-clear {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  margin-right: -0.4rem;
  border-radius: 50%;
  color: var(--pearl-3);
  transition: background-color 0.18s, color 0.18s;
}

.search-clear:hover {
  background: var(--lift);
  color: var(--pearl);
}

.search-clear .icon {
  width: 0.9rem;
  height: 0.9rem;
}

.market-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0.25rem;
  color: var(--pearl-3);
  font-size: 0.875rem;
}

#market-results {
  overflow-wrap: anywhere;
}

.sort {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: none;
}

.sort select {
  min-height: 2.75rem;
  max-width: 11rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--pearl);
  font-weight: 500;
  cursor: pointer;
}

.sort select:hover {
  border-color: var(--seam-strong);
  background: rgb(255 255 255 / 0.05);
}

.sort option {
  background: var(--velvet-2);
}

.pool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

/* One pool: a pane holding its art, lit from below in the colour of its stone. */
.pool {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0.55rem;
  border-radius: var(--tray);
  background:
    radial-gradient(120% 62% at 50% 108%, color-mix(in oklab, var(--stone-lit, var(--amethyst)) 24%, transparent), transparent 72%),
    var(--pane),
    var(--pane-tint);
  box-shadow: var(--bevel), 0 1rem 2.5rem rgb(2 3 12 / 0.3);
  -webkit-backdrop-filter: var(--frost);
  backdrop-filter: var(--frost);
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

@media (hover: hover) {
  .pool:hover {
    transform: translateY(-4px);
    box-shadow: var(--bevel), 0 1.75rem 3.5rem rgb(2 3 12 / 0.45), 0 0 4rem -1.25rem var(--stone-lit, var(--amethyst));
  }
}

.pool:focus-visible {
  outline-offset: 4px;
}

.pool-tray {
  position: relative;
  aspect-ratio: 1.18;
  overflow: hidden;
  border-radius: 1.25rem;
  background: var(--well);
}

.pool-badges {
  position: absolute;
  inset: 0.7rem 0.7rem auto;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.5rem;
}

.pool-badges .chip,
.piece-badge {
  border: 1px solid rgb(255 255 255 / 0.2);
  background: rgb(8 10 24 / 0.5);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), 0 2px 8px rgb(0 0 0 / 0.2);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  backdrop-filter: blur(14px) saturate(170%);
}

.piece-badge {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  color: var(--pearl);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Up to four pieces from the basket share the tray. */
.collage {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 2px;
}

.collage[data-pieces='2'] {
  grid-template-columns: 1fr 1fr;
}

.collage[data-pieces='3'] {
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.collage[data-pieces='3'] .collage-cell:first-child {
  grid-row: span 2;
}

.collage[data-pieces='4'] {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.collage-cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.collage-cell .art img,
.collage-cell .art-stone .stone {
  transition: transform 0.6s var(--ease);
}

.collage-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(8 10 24 / 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font: 700 1.75rem/1 var(--display);
  font-variant-numeric: lining-nums;
}

.pool:hover .collage-cell .art img,
.pool:hover .collage-cell .art-stone .stone {
  transform: scale(1.04);
}

/* A cancelled basket is no longer on offer, so its pictures step back. */
.pool-tray[data-state='cancelled'] .collage {
  filter: grayscale(0.85);
  opacity: 0.55;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.7rem 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.08);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
}

.chip::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--chip, var(--amethyst));
  box-shadow: 0 0 0.5rem var(--chip, var(--amethyst));
}

.chip.ready {
  --chip: var(--ready);
}

.chip.auction {
  --chip: var(--live);
}

.chip.auction::before {
  animation: blink 1.6s ease-in-out infinite;
}

.chip.sold {
  --chip: var(--pearl-3);
}

.chip.sold::before {
  box-shadow: none;
}

.chip.draft::before,
.chip.cancelled::before {
  background: none;
  border: 1.5px solid var(--pearl-3);
  box-shadow: none;
}

.chip.plain {
  padding: 0;
  background: none;
  font-size: 0.875rem;
}

@keyframes blink {
  50% {
    opacity: 0.35;
  }
}

.pool-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1rem 0.7rem 0.45rem;
}

.pool-collection {
  color: var(--pearl-3);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.pool-name {
  margin-top: 0.2rem;
  font-size: 1.4375rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.pool-figures {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.pool-figures > div:last-child {
  text-align: right;
}

.pool-figures dt {
  color: var(--pearl-3);
  font-size: 0.8125rem;
}

.pool-figures dd {
  margin-top: 0.1rem;
  font-size: 1.0625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pool-figures dd span {
  color: var(--pearl-2);
  font-weight: 400;
}

/* How far along the funding is: a groove in the pane, filled with the stone's light. */
.funding-track {
  height: 0.4rem;
  margin-top: 0.8rem;
  border-radius: 999px;
  background: var(--well);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.5), 0 1px 0 rgb(255 255 255 / 0.07);
}

.funding-track > span {
  display: block;
  min-width: 0.4rem;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--stone-lit, var(--amethyst)), var(--stone-own, var(--pearl)));
  box-shadow: 0 0 0.9rem color-mix(in oklab, var(--stone-lit, var(--amethyst)) 80%, transparent);
}

.pool-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 1rem;
}

.pool-hint,
.pool-yours {
  min-width: 0;
  color: var(--pearl-3);
  font-size: 0.8125rem;
}

.pool-yours {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--pearl);
  font-weight: 500;
}

.pool-yours .dot {
  background: var(--stone-own, var(--amethyst));
  box-shadow: 0 0 0.6rem var(--stone-own, var(--amethyst));
}

/* What opening the pool lets you do. It lights up with the card. */
.pool-open {
  flex: none;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--seam-strong);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.06);
  box-shadow: var(--bevel);
  color: var(--pearl);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.pool:hover .pool-open,
.pool:focus-visible .pool-open {
  border-color: rgb(255 255 255 / 0.7);
  background: linear-gradient(180deg, #fff, #ded7ff 52%, #bdb0ff);
  box-shadow: inset 0 1px 0 #fff, 0 0.4rem 1.25rem rgb(138 108 255 / 0.4);
  color: var(--velvet);
}

.empty {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  padding: clamp(2rem, 6vw, 4rem) 1.5rem;
  border-radius: var(--tray);
  background: var(--pane), var(--pane-tint);
  box-shadow: var(--bevel);
  -webkit-backdrop-filter: var(--frost);
  backdrop-filter: var(--frost);
  text-align: center;
}

.empty .stone {
  width: 6.5rem;
}

.empty h3 {
  font-size: 1.5rem;
}

.empty p {
  max-width: 30rem;
  color: var(--pearl-2);
}

.empty .button {
  margin-top: 0.75rem;
}

.market-message {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--pearl-3);
  font-size: 0.875rem;
}

.market-message:empty {
  display: none;
}

.more {
  display: flex;
  margin: 1.5rem auto 0;
}

/* -------------------------------------------------------- how it works */

.how {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.how-back {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--pearl-2);
}

.how-back:hover {
  color: var(--pearl);
}

.how-intro {
  max-width: 38rem;
  margin-top: 1rem;
  color: var(--pearl-2);
  font-size: 1.125rem;
}

.how-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.steps {
  --gap: clamp(1.25rem, 2.4vw, 2rem);
  --branch: color-mix(in oklab, var(--good) 62%, transparent);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--gap);
  margin-top: clamp(1.5rem, 4vw, 2.75rem);
  counter-reset: step;
}

.steps > li {
  counter-increment: step;
}

.step {
  position: relative;
}

.step-stone {
  display: block;
  width: 7rem;
  height: 7rem;
  margin: -0.5rem 0 0 -0.5rem;
}

.step h3 {
  margin-top: 1rem;
  font-size: 1.25rem;
  line-height: 1.2;
}

.step h3::before {
  content: counter(step) '. ';
  color: var(--pearl-3);
}

.step p {
  margin-top: 0.5rem;
  color: var(--pearl-2);
  font-size: 0.9375rem;
}

/* -------------------------------------------------------- safety hatch */

/* The hatch is not a section of its own. It is the way back out of step 2, so it
   lives inside that step and is drawn as a branch leaving the line of stones. */
.hatch {
  position: relative;
  border-left: 1px dashed var(--branch);
  scroll-margin-top: 6rem;
}

/* Where the branch leaves step 2. */
.hatch::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
}

.hatch h4 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.5rem;
  line-height: 1.15;
}

.hatch h4 .icon {
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
  color: var(--good);
}

.hatch-claim {
  max-width: 39rem;
  margin-top: 0.7rem;
  color: var(--pearl);
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);
  line-height: 1.5;
}

.hatch-limit {
  max-width: 44rem;
  margin-top: 0.7rem;
  color: var(--pearl-2);
  font-size: 0.9375rem;
}

.hatch-terms {
  display: grid;
  margin-top: 1.6rem;
}

.hatch-terms > div {
  padding-top: 0.9rem;
  border-top: 1px solid color-mix(in oklab, var(--good) 22%, var(--seam-strong));
}

.hatch-terms dt {
  font: 700 1.125rem/1.2 var(--display);
  letter-spacing: -0.025em;
}

.hatch-terms dd {
  margin-top: 0.45rem;
  color: var(--pearl-2);
  font-size: 0.9375rem;
}

/* Wide: the four steps run left to right along one seam. Step 2 also owns the row
   beneath itself and beneath steps 3 and 4, which is where its hatch branches off to. */
@media (width > 68rem) {
  .steps > li {
    grid-row: 1;
  }

  .steps > li:nth-child(3) {
    grid-column: 3;
  }

  .steps > li:nth-child(4) {
    grid-column: 4;
  }

  .steps > .step-with-hatch {
    display: grid;
    grid-area: 1 / 2 / span 2 / -1;
    grid-template-columns: subgrid;
    grid-template-rows: subgrid;
    /* Its box lies over steps 3 and 4; only its own contents should take the pointer. */
    pointer-events: none;
  }

  .step-with-hatch > * {
    pointer-events: auto;
  }

  .step-with-hatch > .step {
    grid-area: 1 / 1;
  }

  .steps > li:not(:last-child) .step::after {
    content: '';
    position: absolute;
    top: 3rem;
    left: 7rem;
    right: calc(0.75rem - var(--gap));
    border-top: 1px dashed var(--seam-strong);
  }

  /* The hatch keeps the steps' columns, so its three terms sit under steps 2, 3 and 4. */
  .hatch {
    display: grid;
    grid-area: 2 / 1 / auto / -1;
    grid-template-columns: subgrid;
    margin-top: 0.9rem;
    padding: 1.9rem 0 0.2rem 1.5rem;
  }

  .hatch > * {
    grid-column: 1 / -1;
  }

  .hatch-terms {
    grid-template-columns: subgrid;
  }
}

.hatch-line {
  display: flex;
  gap: 0.5rem;
  color: var(--pearl-2);
  font-size: 0.875rem;
}

.hatch-line .icon {
  margin-top: 0.15rem;
  color: var(--good);
}

.hatch-line b {
  color: var(--pearl);
  font-weight: 600;
}

/* The hatch as it appears beside a contributor's own position. */
.hatch-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--good);
  font-size: 0.875rem;
  font-weight: 600;
}

.hatch-panel {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid color-mix(in oklab, var(--good) 32%, transparent);
  border-radius: var(--control);
  background: color-mix(in oklab, var(--good) 6%, transparent);
}

.hatch-panel > p:not(.hatch-label, .fine) {
  color: var(--pearl-2);
  font-size: 0.9375rem;
}

.hatch-panel details.more-options {
  margin-top: 0.25rem;
  padding-top: 0.9rem;
  border-top-color: color-mix(in oklab, var(--good) 22%, transparent);
  font-size: 0.9375rem;
}

.calls {
  display: grid;
  gap: 0.6rem;
  counter-reset: call;
}

.calls li {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: 0.1rem 0.5rem;
  align-items: baseline;
  counter-increment: call;
}

.calls li::before {
  content: counter(call) '.';
  color: var(--pearl-3);
}

.calls li > :not(:first-child) {
  grid-column: 2;
}

.calls span {
  color: var(--pearl-2);
  font-size: 0.875rem;
}

.calls li > code:first-of-type {
  color: var(--pearl);
}

.hatch-address {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.9rem;
}

.hatch-address > span {
  color: var(--pearl-3);
}

/* -------------------------------------------------------------- footer */

.foot {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  max-width: var(--page);
  margin-inline: auto;
  padding: 1.75rem var(--gutter) 2.5rem;
  color: var(--pearl-3);
  font-size: 0.875rem;
}

.foot::before {
  content: '';
  position: absolute;
  inset: 0 var(--gutter) auto;
  border-top: 1px solid var(--seam);
}

.foot .brand {
  color: var(--pearl);
  font-size: 1.25rem;
}

.foot .brand svg {
  width: 1.35rem;
  height: 1.35rem;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-left: auto;
}

/* -------------------------------------------------------------- dialog */

/* The thickest pane. The page stays visible behind it, out of focus. */
dialog {
  width: min(60rem, calc(100vw - 2rem));
  max-height: min(92dvh, 58rem);
  padding: 0;
  overflow: auto;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 2rem;
  background: var(--pane), rgb(11 14 34 / 0.74);
  -webkit-backdrop-filter: blur(44px) saturate(175%);
  backdrop-filter: blur(44px) saturate(175%);
  color: var(--pearl);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.24), 0 3rem 7rem rgb(2 3 12 / 0.65);
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--seam-strong) transparent;
}

dialog.narrow {
  width: min(40rem, calc(100vw - 2rem));
}

dialog::backdrop {
  background: rgb(4 6 18 / 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

dialog[open] {
  animation: rise 0.26s var(--ease);
}

dialog[open]::backdrop {
  animation: dim 0.26s ease-out;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1rem) scale(0.98);
  }
}

@keyframes dim {
  from {
    opacity: 0;
  }
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1.25rem, 3vw, 2rem) 1.1rem;
  border-bottom: 1px solid var(--seam);
  /* Nearly solid: what scrolls underneath must never compete with the title. */
  background: linear-gradient(180deg, rgb(255 255 255 / 0.05), transparent), rgb(14 17 40 / 0.93);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
}

.modal-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  min-height: 1.5rem;
  color: var(--pearl-2);
  font-size: 0.875rem;
  font-weight: 500;
}

.modal-head h2 {
  margin-top: 0.35rem;
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.modal-close {
  margin: -0.25rem -0.35rem 0 0;
}

.modal-body {
  padding: clamp(1.25rem, 3vw, 2rem);
}

/* Errors and wallet prompts stay in view while the dialog scrolls. */
.modal-feedback {
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding: 0 clamp(1.25rem, 3vw, 2rem);
}

.modal-feedback > :last-child:not(:empty):not([hidden]),
.modal-feedback > .error-note:not([hidden]) {
  margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
}

.error-note {
  padding: 0.8rem 1rem;
  border: 1px solid color-mix(in oklab, var(--bad) 50%, transparent);
  border-radius: var(--control);
  background: rgb(58 18 36 / 0.82);
  box-shadow: var(--bevel), 0 1rem 2rem rgb(2 3 12 / 0.4);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  color: #ffd9df;
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

.modal-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--seam-strong);
  border-radius: var(--control);
  background: rgb(30 34 68 / 0.82);
  box-shadow: var(--bevel), 0 1rem 2rem rgb(2 3 12 / 0.4);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  color: var(--pearl);
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

.modal-status::before {
  content: '';
  flex: none;
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid var(--seam-strong);
  border-top-color: var(--pearl);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.modal-status:empty {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------------------------------------- forms */

.field {
  display: block;
  margin-top: 1.1rem;
}

.field > span {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--pearl-2);
  font-size: 0.875rem;
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--seam-strong);
  border-radius: var(--control);
  background-color: var(--well);
  box-shadow: inset 0 2px 6px rgb(0 0 0 / 0.35);
  font-variant-numeric: tabular-nums;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.field input:hover,
.field select:hover {
  border-color: var(--pearl-3);
}

.field input:focus-visible,
.field select:focus-visible {
  outline: none;
  border-color: var(--amethyst);
  box-shadow: inset 0 2px 6px rgb(0 0 0 / 0.35), 0 0 0 4px color-mix(in oklab, var(--amethyst) 22%, transparent);
}

.field select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cdc3de' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 1.1rem;
}

.field input::placeholder {
  color: var(--pearl-3);
}

.field input[readonly] {
  border-style: dashed;
  color: var(--pearl-2);
}

.field small {
  display: block;
  margin-top: 0.4rem;
  color: var(--pearl-3);
  font-size: 0.8125rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.25rem;
}

.note {
  padding: 0.8rem 1rem;
  border-radius: var(--control);
  background: var(--lift);
  color: var(--pearl-2);
  font-size: 0.9375rem;
}

.note.good {
  background: color-mix(in oklab, var(--good) 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--good) 26%, transparent);
  color: #cdf3e6;
}

.fine {
  color: var(--pearl-3);
  font-size: 0.8125rem;
}

.section-title {
  margin-top: 1.75rem;
  font: 600 1rem/1.3 var(--text);
  letter-spacing: 0;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--seam);
}

.form-foot p {
  flex: 1 1 16rem;
  max-width: 24rem;
  color: var(--pearl-3);
  font-size: 0.875rem;
}

.nft-row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) 7.5rem 2.75rem;
  align-items: end;
  gap: 0 0.6rem;
}

.nft-row .field {
  margin-top: 0.9rem;
}

.nft-row .icon-button {
  margin-bottom: 0.125rem;
}

/* The NFT a row points at, shown as soon as it can be found. */
.nft-thumb {
  width: 3rem;
  height: 3rem;
  overflow: hidden;
  border: 1px dashed var(--seam-strong);
  border-radius: var(--control);
}

.nft-thumb:has(.art) {
  border: 0;
}

.nft-found {
  grid-column: 2 / -1;
  min-height: 1.2rem;
  margin-top: 0.35rem;
  color: var(--pearl-3);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.nft-found.warn {
  color: var(--ready);
}

.add-asset {
  margin-top: 0.9rem;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: var(--well);
  box-shadow: inset 0 2px 6px rgb(0 0 0 / 0.35), 0 1px 0 rgb(255 255 255 / 0.07);
}

.segmented button {
  min-height: 2.5rem;
  border-radius: 999px;
  color: var(--pearl-2);
  font-weight: 600;
  transition: background-color 0.18s, color 0.18s;
}

.segmented button:hover {
  color: var(--pearl);
}

.segmented button.active {
  background: var(--lift);
  color: var(--pearl);
  box-shadow: var(--bevel), inset 0 0 0 1px var(--seam);
}

#settings-form {
  margin-top: 1.25rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

details.more-options {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--seam);
}

details.more-options summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  border-radius: 0.4rem;
}

details.more-options summary::-webkit-details-marker {
  display: none;
}

details.more-options summary::after {
  content: '';
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.3rem;
  border: solid var(--pearl-3);
  border-width: 0 1.75px 1.75px 0;
  transform: translateY(-0.15rem) rotate(45deg);
  transition: transform 0.2s var(--ease), border-color 0.18s;
}

details.more-options summary:hover::after {
  border-color: var(--pearl);
}

details.more-options[open] summary::after {
  transform: translateY(0.1rem) rotate(225deg);
}

details.more-options > :not(summary) {
  margin-top: 0.9rem;
}

details.more-options p {
  color: var(--pearl-2);
  font-size: 0.9375rem;
}

details.more-options form .button {
  margin-top: 1.1rem;
}

details.more-options .fine {
  color: var(--pearl-3);
  font-size: 0.8125rem;
}

/* --------------------------------------------------------- pool dialog */

.pool-jump {
  display: none;
}

.pool-jump .icon {
  transform: rotate(90deg);
}

#pool-action {
  scroll-margin-top: 10rem;
}

.stages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  margin: 1rem clamp(1.25rem, 3vw, 2rem) 0;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--seam);
  color: var(--pearl-3);
  font-size: 0.875rem;
}

.stages li {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.stages li + li::before {
  content: '';
  width: 1.25rem;
  border-top: 1px solid var(--seam-strong);
}

.stages li.done {
  color: var(--pearl-2);
}

.stages li[aria-current] {
  color: var(--pearl);
  font-weight: 600;
}

.stages li[aria-current]::after {
  content: '';
  order: -1;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: -0.15rem;
  border-radius: 50%;
  background: var(--amethyst);
  box-shadow: 0 0 0.6rem var(--amethyst);
}

.stages li + li[aria-current]::before {
  order: -2;
}

.detail {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    'gallery main'
    'facts main';
  gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.detail-main {
  grid-area: main;
}

.gallery {
  grid-area: gallery;
  min-width: 0;
}

.gallery-main {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 1.25rem;
  background: var(--well);
  cursor: zoom-in;
}

.gallery-main .art,
.viewer-figure .art {
  background: var(--well);
}

.gallery-main .art img,
.viewer-figure .art img {
  object-fit: contain;
}

.gallery-zoom {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: color-mix(in oklab, var(--velvet) 80%, transparent);
  color: var(--pearl);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.18s;
}

.gallery-main:hover .gallery-zoom,
.gallery-main:focus-visible .gallery-zoom {
  opacity: 1;
}

@media (hover: none) {
  .gallery-zoom {
    opacity: 1;
  }
}

.gallery-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3.5rem, 1fr));
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.gallery-strip button {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 0.6rem;
  opacity: 0.6;
  transition: opacity 0.18s, box-shadow 0.18s;
}

.gallery-token {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  background: rgb(7 9 22 / 0.85);
  color: var(--pearl);
  font-size: 0.625rem;
  line-height: 1.4;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-strip button:hover {
  opacity: 1;
}

.gallery-strip button[aria-current] {
  opacity: 1;
  outline: 2px solid var(--pearl);
  outline-offset: 2px;
}

.piece {
  margin-top: 1.1rem;
}

.piece-count,
.viewer-count {
  color: var(--pearl-3);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.piece-name {
  font-size: 1.375rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.piece-from {
  margin-top: 0.15rem;
  color: var(--pearl-2);
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

.piece .fine {
  margin-top: 0.5rem;
}

.piece-about {
  display: -webkit-box;
  max-width: 34rem;
  margin-top: 0.6rem;
  overflow: hidden;
  color: var(--pearl-2);
  font-size: 0.9375rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow-wrap: anywhere;
}

.traits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.traits li {
  display: inline-flex;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--seam-strong);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.traits span {
  color: var(--pearl-3);
  font-weight: 400;
}

.piece-contract {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin-top: 0.9rem;
  color: var(--pearl-3);
  font-size: 0.875rem;
}

.piece-contract code {
  color: var(--pearl-2);
}

/* How full the pool is: its stone, and what the facets mean. */
.gauge {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.gauge .seal {
  position: static;
  flex: none;
  width: 5.5rem;
  height: 5.5rem;
  background: var(--well);
  box-shadow: 0 0 0 1px var(--seam-strong), inset 0 2px 6px rgb(0 0 0 / 0.4), 0 0 2.5rem -0.75rem var(--stone-lit, var(--amethyst));
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.gauge .legend {
  flex-direction: column;
  gap: 0.2rem;
}

.figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.5rem;
}

.figures dt {
  color: var(--pearl-3);
  font-size: 0.875rem;
}

.figures dd {
  margin-top: 0.1rem;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.action {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1.1rem;
  border: 1px solid var(--seam);
  border-radius: 1.4rem;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.08), rgb(255 255 255 / 0.03));
  box-shadow: var(--bevel), 0 1rem 2.5rem rgb(2 3 12 / 0.25);
}

.action:focus {
  outline: none;
}

.action > .note:not(.warn, .good) {
  padding: 0;
  background: none;
}

.action .field {
  margin-top: 0;
}

.action form {
  display: grid;
  gap: 0.9rem;
}

.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: -0.3rem;
}

.quick button {
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--seam-strong);
  background: rgb(255 255 255 / 0.05);
  border-radius: 999px;
  color: var(--pearl-2);
  font-size: 0.8125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s;
}

.quick button:hover:not(:disabled) {
  background: var(--lift);
  border-color: var(--stone-lit, var(--pearl-3));
  color: var(--pearl);
}

.preview {
  min-height: 1.25rem;
  color: var(--pearl-3);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.preview:empty {
  display: none;
}

.preview b {
  color: var(--pearl);
  font-weight: 600;
}

.preview .warn {
  color: var(--bad);
}

.demo-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px dashed var(--seam-strong);
  border-radius: var(--control);
  font-size: 0.875rem;
}

.position {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--seam);
}

.position h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font: 600 1rem/1.3 var(--text);
  letter-spacing: 0;
}

.rows {
  margin-top: 0.6rem;
}

.rows > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.3rem;
  font-size: 0.9375rem;
}

.rows dt {
  color: var(--pearl-2);
}

.rows dd {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.position .button-row {
  margin-top: 0.9rem;
}

.position .field {
  margin-top: 0.9rem;
}

.position .field + .button {
  margin-top: 0.75rem;
}

.detail-facts {
  grid-area: facts;
  display: grid;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--seam);
}

.detail-facts h3 {
  font: 600 1rem/1.3 var(--text);
  letter-spacing: 0;
}

.facts code {
  color: var(--pearl-2);
}

.facts > div + div {
  margin-top: 0.9rem;
}

.facts dt {
  color: var(--pearl-3);
  font-size: 0.875rem;
}

.facts dd {
  margin-top: 0.1rem;
}

/* -------------------------------------------------------------- wallet */

.wallet-lede {
  color: var(--pearl-2);
}

.wallet-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.wallet-option {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 0.75rem;
  border: 1px solid var(--seam-strong);
  border-radius: 1rem;
  background: var(--well);
  text-align: left;
  transition: background-color 0.18s, border-color 0.18s, transform 0.18s var(--ease);
}

.wallet-option:hover:not(:disabled) {
  background: var(--lift);
  border-color: var(--amethyst);
}

.wallet-option:active:not(:disabled) {
  transform: scale(0.99);
}

.wallet-option .icon:last-child {
  color: var(--pearl-3);
  transition: transform 0.18s var(--ease), color 0.18s;
}

.wallet-option:hover:not(:disabled) .icon:last-child {
  color: var(--pearl);
  transform: translateX(0.2rem);
}

.wallet-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  overflow: hidden;
  border-radius: 0.7rem;
  background: var(--lift);
  color: var(--amethyst);
}

.wallet-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wallet-mark .icon {
  width: 1.3rem;
  height: 1.3rem;
}

.wallet-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.wallet-hint {
  color: var(--good);
  font-size: 0.8125rem;
  font-weight: 500;
}

.wallet-none {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0 1.5rem;
  text-align: center;
}

.wallet-none .stone {
  width: 6rem;
}

.wallet-none h3 {
  font-size: 1.375rem;
  line-height: 1.2;
}

.wallet-none p {
  max-width: 30rem;
  color: var(--pearl-2);
}

.wallet-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem;
  border: 1px solid var(--seam-strong);
  border-radius: 1rem;
  background: var(--well);
}

.wallet-card > div {
  flex: 1;
  min-width: 0;
}

.wallet-card code {
  color: var(--pearl-2);
  user-select: all;
}

.wallet-rows {
  margin-block: 1rem;
}

.wallet-rows .fine {
  margin-left: 0.3rem;
}

.note.warn {
  background: color-mix(in oklab, var(--ready) 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ready) 28%, transparent);
  color: #f6e2b3;
}

/* ---------------------------------------------------------------- guide */

/* The long version of "How a pool works", on the same page. A contents rail on the left.
   On the right, one tall pane follows the stone down through its four stages, the hatch
   gets a pane lit in its own colour, and the two closing topics sit bare on the room. */
.guide {
  margin-top: clamp(4.5rem, 9vw, 8rem);
}

.guide-head h2 {
  font-size: clamp(2.5rem, 1.4rem + 4vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-align: center;
}

.guide-head p {
  margin-top: 1rem;
  color: var(--pearl-2);
  font-size: 1.1875rem;
  text-align: center;
}

.guide-layout {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 4vw, 4rem);
  margin-top: clamp(2rem, 4vw, 3.25rem);
}

.guide-rail {
  position: sticky;
  top: 7rem;
  font-size: 0.9375rem;
}

.guide-rail p {
  color: var(--pearl-3);
  font-size: 0.8125rem;
  font-weight: 600;
}

.guide-rail ul + p,
.guide-rail ol + p {
  margin-top: 1.6rem;
}

.guide-rail ol,
.guide-rail ul {
  margin-top: 0.6rem;
  border-left: 1px solid var(--seam);
  counter-reset: rail;
}

.guide-rail a {
  display: block;
  margin-left: -1px;
  padding: 0.4rem 0 0.4rem 1rem;
  border-left: 1px solid transparent;
  color: var(--pearl-2);
  line-height: 1.3;
  transition: color 0.18s, border-color 0.18s;
}

.guide-rail ol a::before {
  counter-increment: rail;
  content: counter(rail) '. ';
  color: var(--pearl-3);
}

.guide-rail a:hover {
  color: var(--pearl);
}

.guide-rail a[aria-current] {
  border-left-color: var(--amethyst);
  color: var(--pearl);
}

.guide-pane {
  position: relative;
  padding: clamp(1.25rem, 3vw, 2.5rem);
}

/* The bright rim of the pane. */
.guide-pane::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  pointer-events: none;
}

.guide h3 {
  font-size: clamp(1.5rem, 1.25rem + 0.8vw, 1.875rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.guide-lede {
  max-width: 38rem;
  margin-top: 0.6rem;
  color: var(--pearl);
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);
  line-height: 1.5;
}

/* The rules of a stage, side by side: a short name in the display face, then the rule itself. */
.guide-rules {
  --rule: var(--seam-strong);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem clamp(1.25rem, 2.4vw, 2rem);
  margin-top: 1.6rem;
}

.guide-rules.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.guide-rules > div {
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
}

.guide-rules dt {
  font: 700 1.125rem/1.2 var(--display);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.guide-rules dd {
  margin-top: 0.45rem;
  color: var(--pearl-2);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* ------------------------------------------------------ guide: stages */

.guide-stages {
  counter-reset: stage;
}

.guide-stage {
  position: relative;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  column-gap: clamp(1rem, 2.5vw, 2rem);
  counter-increment: stage;
}

.guide-stage:not(:last-child) {
  padding-bottom: clamp(2.5rem, 5vw, 3.75rem);
}

/* The seam the stone travels down, from one stage to the next. */
.guide-stage:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 5.25rem;
  bottom: 0.5rem;
  left: 2.25rem;
  border-left: 1px dashed var(--seam-strong);
}

.guide-stone {
  display: block;
  width: 5.5rem;
  height: 5.5rem;
  margin: -0.75rem 0 0 -0.5rem;
}

.guide-stage h3::before {
  content: counter(stage) '. ';
  color: var(--pearl-3);
}

/* ---------------------------------------------------- guide: bid tool */

/* A hollow in the pane with one thing to move: how much of the pool you already hold. */
.bid-tool {
  margin-top: 1.75rem;
  padding: clamp(1.1rem, 2.5vw, 1.75rem);
  border-radius: 1.25rem;
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--seam), inset 0 0.75rem 1.5rem -0.75rem rgb(0 0 0 / 0.5);
}

.bid-tool h4 {
  font-size: 1.25rem;
  line-height: 1.2;
}

.bid-tool-setup {
  max-width: 36rem;
  margin-top: 0.35rem;
  color: var(--pearl-2);
  font-size: 0.9375rem;
}

.bid-tool-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 4.25rem;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  font-weight: 600;
}

.bid-tool-control output {
  font: 700 1.5rem/1 var(--display);
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -0.03em;
  text-align: right;
}

.bid-tool input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2.75rem;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.bid-tool input[type='range']::-webkit-slider-runnable-track {
  height: 0.375rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amethyst) var(--share), rgb(255 255 255 / 0.16) var(--share));
}

.bid-tool input[type='range']::-moz-range-track {
  height: 0.375rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amethyst) var(--share), rgb(255 255 255 / 0.16) var(--share));
}

.bid-tool input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: -0.5625rem;
  border: 0;
  border-radius: 50%;
  background: var(--pearl);
  box-shadow: 0 0 0 0.3rem rgb(188 172 255 / 0.28), 0 0.3rem 0.8rem rgb(0 0 0 / 0.5);
}

.bid-tool input[type='range']::-moz-range-thumb {
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  border-radius: 50%;
  background: var(--pearl);
  box-shadow: 0 0 0 0.3rem rgb(188 172 255 / 0.28), 0 0.3rem 0.8rem rgb(0 0 0 / 0.5);
}

.bid-tool input[type='range']:focus-visible {
  outline-offset: 0;
  border-radius: 999px;
}

/* The whole valuation as one bar: the cut-stone part is what your shares cover, the clear part is cash. */
.bid-bar {
  display: grid;
  grid-template-columns: var(--share) minmax(0, 1fr);
  gap: 3px;
  height: 3.5rem;
  margin-top: 0.75rem;
  overflow: hidden;
  border-radius: 0.9rem;
}

.bid-bar span:first-child {
  background:
    linear-gradient(118deg, rgb(255 255 255 / 0.34) 0 1.1rem, transparent 1.1rem),
    linear-gradient(118deg, #d6c2ff, #9a72ef 55%, #6a41c6);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.55);
}

.bid-bar span:last-child {
  background: linear-gradient(145deg, rgb(255 255 255 / 0.2), rgb(255 255 255 / 0.07) 45%, rgb(255 255 255 / 0.12));
  box-shadow: var(--bevel);
}

.bid-figures {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 0.9rem;
}

.bid-figures p {
  color: var(--pearl-2);
  font-size: 0.875rem;
}

.bid-figures b {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--pearl);
  font: 700 clamp(1.75rem, 1.3rem + 1.6vw, 2.625rem) / 1.05 var(--display);
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.bid-figure-shares b {
  color: var(--amethyst);
}

.bid-figure-cash {
  text-align: right;
}

.bid-tool-result {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--seam);
  color: var(--pearl-2);
  font-size: 0.9375rem;
}

/* ------------------------------------------------------- guide: hatch */

.guide-hatch {
  margin-top: 1.5rem;
}

.guide-hatch h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.guide-hatch h3 .icon {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--good);
}

.guide-note {
  max-width: 42rem;
  margin-top: 0.7rem;
  color: var(--pearl-2);
}

/* The way out is two calls, in this order. */
.guide-calls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
  counter-reset: call;
}

.guide-calls li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  gap: 0.3rem 0.9rem;
  padding: 1rem 1.15rem;
  border-radius: 1.1rem;
  background: var(--well);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--good) 24%, transparent);
  counter-increment: call;
}

.guide-calls li::before {
  content: counter(call);
  display: grid;
  place-items: center;
  grid-row: span 2;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: color-mix(in oklab, var(--good) 16%, transparent);
  color: var(--good);
  font-size: 0.875rem;
  font-weight: 700;
}

.guide-calls code {
  align-self: center;
  color: var(--good);
  font-size: 1rem;
}

.guide-calls span {
  grid-column: 2;
  color: var(--pearl-2);
  font-size: 0.9375rem;
}

.guide-hatch .guide-rules {
  --rule: color-mix(in oklab, var(--good) 24%, var(--seam-strong));
}

/* ---------------------------------------------- guide: rights and risks */

.guide-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem clamp(2rem, 4vw, 3.5rem);
  margin-top: clamp(2.75rem, 5vw, 4rem);
  padding-inline: clamp(1.25rem, 3vw, 2.5rem);
}

/* Here each rule is a row: its name on the left, the rule on the right. */
.guide-rules.one {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin-top: 1.4rem;
}

.guide-rules.one > div {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.25rem 1.25rem;
  padding-block: 0.85rem;
}

.guide-rules.one dd {
  margin-top: 0;
}

.guide-risks ul {
  margin-top: 1.4rem;
}

.guide-risks li {
  position: relative;
  padding: 0.85rem 0 0.85rem 1.6rem;
  border-top: 1px solid color-mix(in oklab, var(--ready) 26%, var(--seam-strong));
  color: var(--pearl-2);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* A small cut stone in the warning colour marks each thing to check. */
.guide-risks li::before {
  content: '';
  position: absolute;
  top: 1.35rem;
  left: 0.15rem;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--ready);
  transform: rotate(45deg);
}

.guide-risks li:first-child {
  color: var(--pearl);
  font-weight: 600;
}

.guide-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.75rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: 1.5rem clamp(1.25rem, 3vw, 2.5rem) 0;
  border-top: 1px solid var(--seam);
  font-size: 0.9375rem;
}

.guide-links .icon {
  width: 1.1rem;
  height: 1.1rem;
}

/* The rail goes once there is no room beside the guide; it is short enough to read straight down. */
@media (max-width: 68rem) {
  .guide-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-rail {
    display: none;
  }

  .guide-rules.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 48rem) {
  .guide-stage {
    grid-template-columns: 3rem minmax(0, 1fr);
    column-gap: 0.9rem;
  }

  .guide-stage:not(:last-child)::after {
    top: 3.9rem;
    left: 1.5rem;
  }

  .guide-stone {
    width: 4rem;
    height: 4rem;
    margin: -0.6rem 0 0 -0.5rem;
  }

  .guide-rules,
  .guide-rules.four,
  .guide-calls,
  .guide-pair {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-rules {
    gap: 1rem;
    margin-top: 1.25rem;
  }

  .guide-pair {
    padding-inline: 0;
  }

  .guide-links {
    padding-inline: 0;
  }
}

@media (max-width: 30rem) {
  /* The bid tool needs the full width of the pane, so it steps out from under the stone. */
  .bid-tool {
    position: relative;
    z-index: 1;
    margin-left: -3.9rem;
    background: rgb(8 10 26 / 0.94);
  }

  .bid-tool-control {
    grid-template-columns: auto minmax(0, 1fr) 3.5rem;
    gap: 0.6rem;
  }

  .guide-rules.one > div {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------- viewer */

#viewer {
  width: fit-content;
  max-width: none;
  max-height: none;
  padding: 0.75rem;
  overflow: visible;
  border-radius: 1.75rem;
  background: var(--pane), rgb(8 10 24 / 0.7);
}

#viewer::backdrop {
  background: rgb(4 5 14 / 0.82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

#viewer-content {
  position: relative;
}

.viewer-figure .art {
  /* As large as fits, leaving room for the caption and the dialog's own edge. */
  width: min(100vw - 3rem, 100dvh - 9rem, 56rem);
  height: auto;
  aspect-ratio: 1;
  border-radius: 1rem;
}

.viewer-figure figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  max-width: min(100vw - 3rem, 100dvh - 9rem, 56rem);
  padding: 0.85rem 0.5rem 0.35rem;
}

.viewer-figure figcaption > div {
  flex: 1 1 12rem;
  min-width: 0;
}

.viewer-name {
  font: 700 1.25rem/1.2 var(--display);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.viewer-from {
  color: var(--pearl-2);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.viewer-figure .link {
  font-size: 0.875rem;
}

.viewer-step,
.viewer-close {
  position: absolute;
  border-color: transparent;
  background: color-mix(in oklab, var(--velvet) 78%, transparent);
  color: var(--pearl);
  backdrop-filter: blur(10px);
}

.viewer-close {
  top: 0.6rem;
  right: 0.6rem;
}

.viewer-step {
  /* Halfway down the picture, which is as tall as the dialog is wide. */
  top: calc((100% - 4.5rem) / 2);
}

.viewer-step.back {
  left: 0.6rem;
}

.viewer-step.forward {
  right: 0.6rem;
}

/* ---------------------------------------------------------------- toast */

.toast {
  position: fixed;
  inset: auto auto 1.5rem 50%;
  z-index: 40;
  margin: 0;
  overflow: visible;
  width: max-content;
  max-width: calc(100vw - 2rem);
  padding: 0.8rem 1.25rem;
  transform: translateX(-50%);
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 999px;
  background: var(--pane), rgb(14 17 40 / 0.78);
  box-shadow: var(--bevel), 0 1rem 3rem rgb(2 3 12 / 0.55);
  -webkit-backdrop-filter: var(--frost);
  backdrop-filter: var(--frost);
  color: var(--pearl);
  font-size: 0.9375rem;
  font-weight: 500;
  animation: rise-toast 0.25s var(--ease);
}

.toast.error {
  border-color: color-mix(in oklab, var(--bad) 50%, transparent);
  border-radius: 1.25rem;
  background: rgb(58 18 36 / 0.85);
  color: #ffd9df;
}

@keyframes rise-toast {
  from {
    opacity: 0;
    transform: translate(-50%, 0.5rem);
  }
}

/* ----------------------------------------------------------- narrower */

@media (max-width: 68rem) {
  .pool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search {
    width: 15rem;
  }

  /* The steps turn to run down the page: stones on the left joined by the seam,
     the hatch tucked under step 2 as a branch to the right of it. */
  .steps {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.75rem;
    max-width: 46rem;
  }

  .steps > li {
    position: relative;
  }

  .steps > li:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 4.1rem;
    bottom: -1.4rem;
    left: 1.75rem;
    border-left: 1px dashed var(--seam-strong);
  }

  .step {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    column-gap: 1rem;
  }

  .step-stone {
    grid-row: span 2;
    width: 4rem;
    height: 4rem;
    margin: -0.25rem;
  }

  .step h3 {
    margin-top: 0.1rem;
  }

  .hatch {
    margin: 1.1rem 0 0.25rem 4.5rem;
    padding: 0.9rem 0 0.1rem 1.1rem;
  }

  .hatch-terms {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem clamp(1.25rem, 2.4vw, 2rem);
  }
}

@media (max-width: 48rem) {
  .hatch-terms {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 56rem) {
  /* The navigation leaves the header and docks under the thumb. */
  .top-nav {
    position: fixed;
    left: 50%;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    z-index: 25;
    isolation: isolate;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.15rem;
    width: min(100vw - 1.5rem, 27rem);
    margin: 0;
    padding: 0.35rem;
    border-radius: 1.6rem;
    transform: translateX(-50%);
  }

  .top-nav::before {
    display: block;
    background: var(--pane), rgb(9 11 28 / 0.66);
  }

  .top-nav::after {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: var(--edge);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    pointer-events: none;
  }

  .nav-link {
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    min-height: 3.4rem;
    padding: 0.4rem 0.2rem;
    border-radius: 1.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
  }

  .nav-link .icon,
  .nav-link.nav-create .icon {
    display: block;
    width: 1.3rem;
    height: 1.3rem;
    color: inherit;
  }

  .nav-link.active .icon {
    color: var(--amethyst);
  }

  /* Room at the end of the page for the dock to rest on. */
  .foot {
    padding-bottom: 7rem;
  }

  .toast {
    bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero h1 {
    font-size: clamp(2rem, 11.5cqi, 4.5rem);
  }

  .hero-copy {
    max-width: 36rem;
  }

  #hero-feature {
    width: 100%;
    max-width: 34rem;
    justify-self: center;
  }

  .hero-principles {
    grid-template-columns: 1fr;
  }

  .market-controls {
    position: relative;
    top: auto;
  }

  .search-tools {
    flex: 1 1 100%;
  }

  .search {
    flex: 1;
    width: auto;
  }

  .search kbd {
    display: none;
  }

  .detail {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas:
      'gallery'
      'main'
      'facts';
  }

  .gallery-main {
    max-width: 26rem;
    margin-inline: auto;
  }

  .pool-jump {
    display: block;
    padding: 1rem 1.25rem 0;
  }
}

@media (max-width: 40rem) {
  html {
    scroll-padding-top: 5.5rem;
  }

  .top {
    top: 0.5rem;
    width: calc(100% - 1.25rem);
    margin-top: 0.5rem;
    padding: 0.4rem 0.4rem 0.4rem 0.9rem;
    gap: 0.5rem;
  }

  .brand {
    font-size: 1.3125rem;
  }

  .brand svg {
    width: 1.5rem;
    height: 1.5rem;
  }

  .brand-version {
    padding: 0.2rem 0.35rem;
    font-size: 0.625rem;
  }

  .top-actions {
    gap: 0.15rem;
  }

  .top-actions .button {
    min-height: 2.5rem;
    padding-inline: 0.85rem;
    font-size: 0.8125rem;
  }

  .network {
    min-height: 2.5rem;
    padding-inline: 0.6rem;
  }

  /* On a phone the header keeps only the network dot; the mode line above the pools says the rest. */
  .network #network-label {
    display: none;
  }

  .hero {
    gap: 1.75rem;
    padding-top: 2rem;
  }

  .hero-lede {
    margin-top: 1.1rem;
  }

  .hero-actions {
    gap: 0.5rem;
    flex-wrap: nowrap;
    margin-top: 1.4rem;
  }

  .hero-actions .button {
    flex: 1;
    padding-inline: 0.7rem;
    font-size: 0.9375rem;
  }

  .feature {
    padding: 0.55rem;
    border-radius: 1.9rem;
  }

  .feature-art {
    width: min(100% - 6rem, 17rem);
  }

  .feature-art .seal {
    left: -2rem;
    bottom: 3.25rem;
    width: 4.75rem;
    height: 4.75rem;
  }

  /* The name gets the full width; the button moves to the bottom, under the thumb. */
  .feature-caption {
    grid-template-columns: minmax(0, 1fr);
    padding: 0.95rem 1rem 1rem;
    border-radius: 1.4rem;
  }

  .feature-caption .button {
    order: 1;
    width: 100%;
    min-height: 2.75rem;
  }

  .feature-name {
    font-size: 1.3125rem;
  }

  .feature-figure {
    font-size: 0.9375rem;
  }

  .feature-caption .legend {
    font-size: 0.8125rem;
    gap: 0.35rem 0.8rem;
  }

  .mode {
    border-radius: 1.1rem;
  }

  .market-controls {
    gap: 0.4rem;
    padding: 0.4rem;
    border-radius: 1.4rem;
  }

  .tabs {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tabs button {
    flex: 1 0 auto;
    justify-content: center;
    padding-inline: 0.7rem;
    font-size: 0.875rem;
    gap: 0.35rem;
  }

  .search-tools {
    min-width: 0;
  }

  .sort select {
    max-width: 9.5rem;
  }

  /* Keep two columns on small tablets; phones get full, readable cards below. */
  .pool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.875rem;
  }

  .pool {
    padding: 0.45rem;
    border-radius: 1.5rem;
  }

  .pool-tray {
    border-radius: 1.1rem;
  }

  .pool-tray .seal {
    left: 0.4rem;
    bottom: 0.4rem;
    width: 2.75rem;
    height: 2.75rem;
  }

  .pool-body {
    padding: 0.8rem 0.5rem 0.35rem;
  }

  .pool-name {
    font-size: 1.125rem;
  }

  .pool-figures {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.7rem;
  }

  .pool-figures > div:last-child {
    text-align: left;
  }

  .pool-figures dd {
    font-size: 1rem;
  }

  .hatch h4 {
    font-size: 1.3125rem;
  }

  /* Too narrow for a heading over each term, so each runs on from its name. */
  .hatch-terms {
    gap: 0.8rem;
    margin-top: 1.1rem;
  }

  .hatch-terms > div {
    padding-top: 0.8rem;
  }

  .hatch-terms dt,
  .hatch-terms dd {
    display: inline;
    font-size: 0.9375rem;
  }

  .hatch-terms dt {
    font-family: var(--text);
    font-weight: 650;
    letter-spacing: 0;
  }

  .hatch-terms dt::after {
    content: '. ';
  }

  .foot-links {
    margin-left: 0;
  }

  /* A dialog on a phone is a sheet that comes up from the bottom edge. */
  dialog:not(#viewer),
  dialog.narrow:not(#viewer) {
    width: 100vw;
    max-width: none;
    max-height: 94dvh;
    margin: auto 0 0;
    border-width: 1px 0 0;
    border-radius: 1.75rem 1.75rem 0 0;
  }

  dialog[open]:not(#viewer) {
    animation-name: sheet;
  }

  .gallery-strip {
    grid-template-columns: repeat(auto-fill, minmax(2.75rem, 1fr));
  }

  .gallery-main {
    max-width: 16rem;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .nft-row {
    grid-template-columns: 2.75rem minmax(0, 1fr) 4.75rem 2.75rem;
    gap: 0 0.4rem;
  }

  .nft-thumb {
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 0.125rem;
  }

  .form-foot .button {
    width: 100%;
  }

  .figures dd {
    font-size: 1.25rem;
  }

  .toast {
    border-radius: 1.25rem;
    text-align: center;
  }
}

@keyframes sheet {
  from {
    transform: translateY(2.5rem);
    opacity: 0;
  }
}

@media (max-width: 32rem) {
  /* All four filters fit on one line once only the chosen one shows its count. */
  .tabs button {
    padding-inline: 0.5rem;
  }

  .tabs button:not(.active) span {
    display: none;
  }

  .pool-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.1rem;
  }

  .pool {
    padding: 0.55rem;
    border-radius: var(--tray);
  }

  .pool-tray {
    aspect-ratio: 1.35;
    border-radius: 1.25rem;
  }

  .pool-tray .seal {
    left: 0.7rem;
    bottom: 0.7rem;
    width: 3.5rem;
    height: 3.5rem;
  }

  .pool-body {
    padding: 1rem 0.7rem 0.45rem;
  }

  .pool-name {
    font-size: 1.375rem;
  }

  .pool-figures {
    flex-direction: row;
    gap: 0.75rem;
  }

  .pool-figures > div:last-child {
    text-align: right;
  }
}

/* The narrowest phones: nothing in the header or the hero breaks onto a second line. */
@media (max-width: 22.5rem) {
  .brand-version {
    display: none;
  }

  .hero-actions {
    flex-wrap: wrap;
  }
}

/* For anyone who has asked for less transparency, the panes become solid. */
@media (prefers-reduced-transparency: reduce) {
  .top::before,
  .top-nav::before,
  .feature,
  .feature-caption,
  .pool,
  .market-controls,
  .hero-principles,
  .empty,
  .modal-head,
  .toast,
  dialog {
    background: var(--velvet-2);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .stone-pulse {
    opacity: 0.5;
  }
}
