/* On the left a person writes, on the right the crowd reacts. The look of a social network at
   night, with one thing of its own: everybody here is a dot. */

:root {
  --ink: #090b10;
  --panel: #10141b;
  --raised: #181d27;
  --line: #1d2430;
  --line-strong: #2c3546;
  --text: #eef1f5;
  --dim: #8d97a8;
  --faint: #717c91; /* 4.6:1 on the ink: the smallest text is still text */
  --accent: #ed6ca2; /* Jevtown's reaction pink: the brand and actions, distinct from the map's reaction colors. */
  --accent-bright: #f58abb;
  --accent-ink: #3a0a25;
  --focus: #f58abb;
  --blue: #6ea8fe;
  --green: #3ddc84;
  --yellow: #ffd84d;
  --red: #ff5c5c;
  --violet: #c4a5ff;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --display: ui-rounded, 'SF Pro Rounded', 'Arial Rounded MT Bold', var(--sans);
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --bar: 64px; /* the bar on top; whatever sticks, sticks under it */
  font-family: var(--sans);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* A faint lattice of dots behind everything: the crowd is always there. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 0) 0 0 / 20px 20px,
    radial-gradient(ellipse 70% 60% at 85% 0%, rgba(237, 108, 162, 0.08), transparent 70%),
    radial-gradient(ellipse 50% 40% at 100% 60%, rgba(61, 220, 132, 0.05), transparent 70%);
  -webkit-mask-image: linear-gradient(200deg, #000 10%, transparent 75%);
  mask-image: linear-gradient(200deg, #000 10%, transparent 75%);
}

[hidden] {
  display: none !important;
}

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

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

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

q {
  quotes: '«' '»';
}

:root:lang(en) q {
  quotes: '“' '”';
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

button:disabled {
  cursor: default;
}

.dim {
  color: var(--dim);
}

.small {
  font-size: 12.5px;
}

.hint {
  color: var(--faint);
  font-size: 13px;
}

.problem {
  color: var(--red);
  font-size: 14px;
}

.grow {
  flex: 1;
}

.icon {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dot {
  display: inline-block;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
}

.dot.hollow {
  background: none;
  box-shadow: inset 0 0 0 2px var(--c);
}

.live {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2.2s infinite;
}

/* -- the shell: a bar on top, the page under it */

.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: 28px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--bar);
  margin-inline: -28px; /* the bar runs under the whole width of the shell, its content keeps the shell's gutter */
  padding-inline: 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 11, 16, 0.85);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: auto;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.logo {
  display: block;
  width: 145px;
  height: 38px;
}

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

.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--dim);
  font-size: 14.5px;
  transition: background 0.15s, color 0.15s;
}

.nav-link .icon {
  width: 18px;
  height: 18px;
}

.nav-link:hover {
  background: var(--raised);
  text-decoration: none;
}

.nav-link:hover,
.nav-link.on {
  color: var(--text);
}

.nav-link.on {
  background: var(--raised);
  font-weight: 650;
}

.nav-link.on .icon {
  stroke-width: 2.6;
}

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 999px;
  transition: transform 0.12s, background 0.15s;
}

.primary:hover {
  background: var(--accent-bright);
}

.primary:active {
  transform: scale(0.97);
}

.primary.busy {
  background: linear-gradient(100deg, var(--accent) 30%, #ffc4e6 50%, var(--accent) 70%) 0 0 / 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

/* "Write" is a way to the composer, not the deed itself: the filled button is the one that shows a text to the crowd. */
.write {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 8px 0 6px;
  padding: 8px 15px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  transition: box-shadow 0.15s, color 0.15s;
}

.write:hover {
  box-shadow: inset 0 0 0 1px var(--accent);
  color: var(--accent-bright);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  margin-top: 40px;
  padding: 22px 0 40px;
  border-top: 1px solid var(--line);
}

.about {
  color: var(--faint);
  font-size: 12.5px;
  line-height: 1.45;
}

.about a {
  color: var(--dim);
}

.lang,
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  justify-self: start;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}

.lang button,
.seg button {
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--dim);
  font-size: 13px;
  font-weight: 650;
  transition: background 0.15s, color 0.15s;
}

.lang button {
  font: 600 12px var(--mono);
}

.lang {
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.lang .on,
.seg .on {
  background: var(--raised);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* -- pages: a column for words, a rail for the crowd */

.page {
  display: grid;
  align-items: start;
  gap: 0 36px;
}

.page.home,
.page.profile {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
}

.page.post,
.page.crowdpage {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 500px);
  grid-template-rows: auto 1fr; /* the map is taller than the post: what is left over goes under the post, not into it */
}

.post-top {
  grid-area: 1 / 1;
}

.post-rest {
  grid-area: 2 / 1;
}

.page.post .map-col {
  grid-area: 1 / 2 / 3 / 3;
}

.page.single {
  padding: 40px 20px;
}

.column,
.post-top,
.post-rest {
  border-inline: 1px solid var(--line);
  background: var(--ink);
}

.column {
  min-height: 60vh;
  padding-bottom: 96px;
}

.home .column {
  border-top: 1px solid var(--line); /* under the first screen the timeline starts as a panel of its own */
  border-radius: 20px 20px 0 0;
  padding-top: 16px;
}

.welcome {
  padding: 30px 22px 22px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 12px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

.eyebrow::before {
  content: '';
  flex: none;
  width: 22px;
  height: 1px;
  background: var(--accent);
}

.welcome h1 {
  margin: 12px 0 12px;
  font: 800 38px / 1.08 var(--display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lead {
  color: var(--dim);
  font-size: 15.5px;
  max-width: 56ch;
}

/* -- the first screen: a headline beside an example that already works */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  align-items: center;
  gap: 44px;
  padding: 34px 0 30px;
}

.hero-copy h1 {
  margin: 18px 0 16px;
  font: 800 clamp(40px, 4.4vw, 58px) / 1.04 var(--display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero-copy h1 span {
  display: block;
  color: var(--accent);
}

.hero-copy .lead {
  max-width: 44ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin-top: 24px;
}

.hero-actions .primary {
  padding: 13px 22px;
  font-size: 15.5px;
}

.hero-demo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: var(--dim);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.15s;
}

.hero-demo:hover {
  color: var(--text);
}

/* One listing written two ways. Nothing here is coloured except what the crowd did. */
.showcase,
.composer {
  scroll-margin-top: calc(var(--bar) + 14px);
}

.showcase {
  padding: 18px 20px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 30px 80px -50px rgba(237, 108, 162, 0.35);
}

.showcase-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--dim);
  font: 11.5px var(--mono);
}

.showcase-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.showcase-index {
  flex: none;
  color: var(--faint);
  white-space: nowrap;
}

.showcase h2 {
  margin: 10px 0 12px;
  font: 750 19px var(--display);
  letter-spacing: -0.01em;
}

.showcase-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.showcase-tabs button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 8px;
  border-radius: 9px;
  color: var(--dim);
  font-size: 13px;
  font-weight: 650;
  transition: background 0.15s, color 0.15s;
}

.showcase-tabs button:hover:not(:disabled) {
  color: var(--text);
}

.showcase-tabs .on {
  background: var(--raised);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.showcase-number {
  color: var(--faint);
  font: 11px var(--mono);
}

.showcase-body {
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  align-items: center;
  gap: 16px 20px;
  margin-top: 14px;
}

.showcase-map .grid {
  padding: 6px;
  border-radius: 14px;
  box-shadow: none;
}

.showcase-map .grid-glow {
  inset: 6px;
  width: calc(100% - 12px) !important;
  height: calc(100% - 12px) !important;
  filter: blur(5px) saturate(1.6);
}

.showcase-side {
  display: grid;
  gap: 12px;
}

.showcase-excerpt {
  min-height: 4.65em; /* three lines, so the card does not jump when the shorter listing comes */
  color: var(--dim);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.showcase-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-block: 12px;
  border-block: 1px solid var(--line);
}

.showcase-stat {
  display: grid;
  gap: 2px;
}

.showcase-stat b {
  font: 800 24px / 1.1 var(--display);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.showcase-stat span {
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.3;
}

.showcase-finding {
  min-height: 62px;
  font-size: 13px;
  line-height: 1.5;
}

.showcase-finding strong {
  font-weight: 700;
}

.showcase-finding p {
  margin-top: 3px;
  color: var(--dim);
}

.showcase-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 14px;
  margin-top: 12px;
}

.showcase-foot .legend {
  font-size: 11.5px;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 20px 22px 10px;
  font: 750 17px var(--display);
}

/* -- faces */

.face {
  flex: none;
  display: block;
}

.face.author {
  border-radius: 28%;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.face.persona {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: var(--size, 40px);
  height: var(--size, 40px);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, hsl(var(--h) 72% 70%), hsl(var(--h) 56% 42%));
  color: #0b0e13;
  font-weight: 750;
  font-size: calc(var(--size, 40px) * 0.42);
  line-height: 1;
}

.face.persona .dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 38%;
  height: 38%;
  min-width: 10px;
  min-height: 10px;
  border: 2px solid var(--ink);
  box-sizing: content-box;
}

.face.persona .dot.hollow {
  background: var(--ink);
}

/* -- the composer: a post in the making, a card lifted above the timeline */

.kind-post {
  --kc: var(--blue);
}

.kind-listing {
  --kc: var(--yellow);
}

.kind-product {
  --kc: var(--green);
}

.kind-headline {
  --kc: var(--violet);
}

.composer {
  position: relative;
  margin: 0 16px 26px;
  padding: 16px 18px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--kc) 9%, transparent), transparent 120px),
    var(--panel);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px -22px rgba(0, 0, 0, 0.9);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.4s;
}

.composer:focus-within {
  border-color: color-mix(in srgb, var(--kc) 55%, var(--line-strong));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 0 0 4px color-mix(in srgb, var(--kc) 12%, transparent),
    0 22px 50px -24px color-mix(in srgb, var(--kc) 45%, #000);
}

.composer.editing {
  margin: 4px 0 18px;
}

.draft-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.composer-face {
  flex: none;
  height: 40px;
}

.draft-by {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.nickname {
  flex: 1;
  min-width: 0;
  max-width: 260px;
  padding: 3px 0;
  border: 0;
  border-bottom: 1px dashed var(--line-strong); /* always there: the name is a field, not a caption */
  outline: 0;
  background: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.nickname::placeholder {
  color: var(--dim);
  font-weight: 600;
}

.nickname:hover {
  border-bottom-color: var(--faint);
}

.nickname:focus {
  border-bottom-color: var(--kc);
}

/* Who sees the post: a checkbox that reads as the audience line of a social network. */
.visibility {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  background: var(--raised);
  color: var(--dim);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s, background 0.15s;
}

.visibility:hover {
  color: var(--text);
}

.visibility input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.visibility:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.visibility span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.visibility input:checked ~ .when-off,
.visibility input:not(:checked) ~ .when-on {
  display: none;
}

.visibility input:checked ~ .when-on .icon {
  color: var(--green);
}

.draft-body {
  padding: 8px 0 0 52px;
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 84px;
  max-height: 46vh;
  padding: 4px 0;
  border: 0;
  outline: 0;
  resize: none;
  overflow: hidden;
  background: none;
  color: var(--text);
  font: 400 19px / 1.45 var(--sans);
}

.composer textarea::placeholder {
  color: var(--faint);
}

/* The prices of a product open inside the draft, the way a poll does. */
.ladder {
  min-width: 0;
  margin: 12px 0 4px;
  padding: 12px 14px 12px;
  border: 1px solid color-mix(in srgb, var(--green) 28%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--green) 5%, transparent);
  animation: rise 0.3s ease both;
}

.ladder legend {
  /* a sentence with a currency picker inside it: it flows and wraps like text */
  padding: 0 6px;
  line-height: 28px;
  margin-left: -6px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.ladder legend .icon {
  margin-right: 7px;
  vertical-align: -3px;
}

.ladder-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 10px;
}

/* Steps of the ladder are joined by a thin line: they are one scale, from cheap to dear. */
.price {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--ink);
  font: 600 15px var(--mono);
  cursor: text;
  transition: border-color 0.15s;
}

.price:focus-within {
  border-color: var(--green);
}

.price.bad {
  border-color: var(--red);
  background: color-mix(in srgb, var(--red) 8%, var(--ink));
}

.price.bad .sign {
  color: var(--red);
}

.price .sign {
  color: var(--green);
}

.price input {
  min-width: 2ch;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font: inherit;
}

.price-remove {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 0 -5px 0 4px;
  border-radius: 50%;
  color: var(--faint);
}

/* Removing a price is rare: the cross shows when the chip is pointed at or holds the cursor. Touch screens always show it. */
@media (hover: hover) {
  .price-remove {
    opacity: 0;
    transition: opacity 0.12s;
  }

  .price:hover .price-remove,
  .price:focus-within .price-remove,
  .price-remove:focus-visible {
    opacity: 1;
  }
}

.price-remove:hover {
  color: var(--text);
  background: var(--raised);
}

.price-add {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 13px 0 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--dim);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.15s, border-color 0.15s;
}

.price-add:hover {
  color: var(--green);
  border-color: var(--green);
}

.currency {
  flex: none;
  height: 26px;
  margin: 0 6px;
  padding: 0 22px 0 9px;
  border: 1px solid color-mix(in srgb, var(--green) 40%, var(--line-strong));
  border-radius: 9px;
  outline: 0;
  -webkit-appearance: none;
  appearance: none;
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%238d97a8' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 8px center;
  color: var(--text);
  font: 600 14px var(--mono);
  cursor: pointer;
}

.currency:focus-visible {
  border-color: var(--green);
}

.ladder-note {
  color: var(--dim);
  font-size: 13px;
  line-height: 1.45;
  max-width: 62ch;
}

.composer .problem {
  margin-top: 10px;
}

.composer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.composer-bar .primary {
  margin-left: auto; /* stays on the right when the bar wraps */
}

/* What is being written: tools of the bar. The chosen one opens up to show its name. */
.modes {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.mode {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--dim);
  font-size: 13px;
  font-weight: 700;
  transition: color 0.2s, background 0.25s;
}

.mode span {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width 0.32s cubic-bezier(0.3, 0.9, 0.3, 1), opacity 0.2s, margin 0.32s;
}

.mode:hover:not(:disabled) {
  color: var(--kc);
}

.mode.on {
  color: var(--kc);
  background: color-mix(in srgb, var(--kc) 16%, transparent);
}

.mode.on span {
  max-width: 130px;
  margin-left: 7px;
  opacity: 1;
}

.mode:disabled {
  cursor: default;
}

/* What a tool that is not chosen is for shows above it. */
.mode:not(.on)::after {
  content: attr(data-tip);
  position: absolute;
  left: 0; /* the tools sit at the left edge of the draft, so the words grow to the right */
  bottom: calc(100% + 9px);
  transform: translateY(4px);
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--raised);
  box-shadow: 0 0 0 1px var(--line-strong), 0 8px 20px rgba(0, 0, 0, 0.5);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}

.mode:not(.on):hover::after,
.mode:not(.on):focus-visible::after {
  opacity: 1;
  transform: none;
}

.left {
  font: 12px var(--mono);
  color: var(--faint);
}

.readers-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--dim);
}

.readers-line .sep {
  color: var(--faint);
}

.readers,
.promise {
  display: inline-block;
}

.promise {
  color: var(--text); /* not the kind's colour: on a post that is the blue of a link */
}

.readers-line .live {
  background: var(--kc);
}

.readers.flip,
.promise.flip {
  animation: flip 0.35s ease;
}

/* -- the feed */

.feed-head {
  position: sticky;
  top: var(--bar);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 22px 0 8px;
  border-block: 1px solid var(--line);
  background: rgba(9, 11, 16, 0.8);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.feed-tabs {
  display: flex;
}

.feed-tab {
  position: relative;
  white-space: nowrap;
  padding: 16px 14px;
  color: var(--dim);
  font-weight: 650;
}

.feed-tab:hover {
  color: var(--text);
}

.feed-tab.on {
  color: var(--text);
}

.feed-tab.on::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 3px;
  border-radius: 3px;
  background: var(--blue);
}

.totals {
  font: 11.5px var(--mono);
  text-align: right;
}

.empty {
  padding: 56px 22px;
  text-align: center;
  color: var(--dim);
}

.card {
  position: relative;
  padding: 16px 22px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.18s;
  animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--i) * 45ms);
}

.card:hover,
.card.focused,
.card:has(.card-text:focus-visible) {
  background: rgba(255, 255, 255, 0.024);
}

.card::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--blue);
  transform: scaleY(0);
  transition: transform 0.25s;
}

.card.focused::before {
  transform: scaleY(1);
}

.post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.post-by {
  min-width: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  flex: none;
  padding: 2px 9px;
  border: 1px solid color-mix(in srgb, var(--kc) 45%, transparent);
  border-radius: 999px;
  color: var(--kc);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-body,
.card > .stats,
.card-voices {
  margin-left: 50px;
}

.card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 16px;
  margin-top: 4px;
}

.card-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
  overflow: hidden;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.card-text:hover {
  text-decoration: none;
}

.card-note {
  margin-top: 6px;
  font: 11.5px var(--mono);
  color: var(--faint);
}

.card-map {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0c0f15;
  opacity: 0;
  transition: opacity 0.5s, transform 0.25s, border-color 0.25s;
}

.card-map.ready {
  opacity: 1;
}

.card:hover .card-map,
.card.focused .card-map {
  border-color: var(--line-strong);
  transform: scale(1.03);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-top: 12px;
  color: var(--dim);
  font-size: 13px;
}

.stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}

.stat b {
  color: var(--text);
  font-weight: 650;
}

.stat-label {
  display: none;
}

.stat.reach .stat-label {
  display: inline;
}

.stat.stopped .icon {
  color: var(--blue);
}

.stat.glad .icon {
  color: var(--green);
}

.stat.spreads .icon {
  color: var(--yellow);
}

.stat.sorry .icon {
  color: var(--red);
}

.card-voices {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  margin-top: 10px;
}

/* -- a voice: one persona and what it did */

.voice-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  margin-inline: -8px;
  border-radius: 12px;
  color: inherit;
  transition: background 0.15s;
}

.voice-link:hover {
  background: var(--raised);
  text-decoration: none;
}

.voice-body {
  display: grid;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
}

.voice-who,
.voice-did {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-did em {
  font-style: normal;
  font-weight: 650;
  color: var(--c);
}

.voice-said {
  color: var(--dim);
}

.voice-said q {
  color: var(--text);
}

.card-voices .face {
  --size: 26px;
}

.card-voices .voice-body {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-voices .voice-who::after {
  content: ' — ';
  color: var(--faint);
}

.voice-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  margin-top: 8px;
}

.voice-list .voice-link {
  padding: 9px 8px;
  gap: 12px;
}

.voice-list .voice-body {
  font-size: 14px;
}

.voice-list .voice-did {
  white-space: normal;
}

/* A number the feed does not know yet: a quiet dash of the right width, not a stray dot. */
.stat b.pending {
  display: inline-block;
  width: 18px;
  height: 7px;
  border-radius: 4px;
  background: var(--line-strong);
  animation: pulse-dim 1.4s ease-in-out infinite;
}

@keyframes pulse-dim {
  50% {
    opacity: 0.45;
  }
}

/* -- the rail: the crowd */

.rail,
.map-col {
  align-self: stretch; /* as tall as the column, so what is inside can stay on the screen */
}

.rail-in {
  position: sticky;
  top: var(--bar);
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100vh - var(--bar));
  padding-top: 22px;
  overflow: hidden;
}

/* Head, caption, legend and four voices take about 480px: the map gets what is left of the window, so the voices stay in sight. */
.rail-in > .grid {
  width: min(100%, max(260px, calc(100vh - var(--bar) - 480px)));
  align-self: center;
}

.rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.rail-head h2 {
  font: 800 19px var(--display);
}

.rail-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 12px var(--mono);
  color: var(--dim);
}

.rail-sub {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font: 750 15px var(--display);
}

.grid {
  position: relative;
  flex: none; /* in a short window the column gives way elsewhere; a squeezed map would turn its dots into ovals */
  width: 100%;
  padding: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #0b0e14;
  box-shadow: 0 30px 80px -40px rgba(110, 168, 254, 0.35);
}

.grid canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.grid-glow {
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px) !important;
  height: calc(100% - 20px) !important;
  filter: blur(7px) saturate(1.6);
  opacity: 0.75;
  pointer-events: none;
}

/* The town is 100 people wide. It starts as a square of 10,000; every hundred residents visitors move in add a row. */
.grid .grid-dots {
  position: relative;
  height: auto;
  aspect-ratio: 100 / var(--rows, 100);
}

.grid-wrap {
  position: relative;
}

.grid-labels {
  position: absolute;
  inset: 10px;
  bottom: auto;
  height: calc((100% - 20px) * 100 / var(--rows, 100)); /* the square of the 10,000, not the rows under it */
  pointer-events: none;
}

.grid-labels span {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(9, 11, 16, 0.86);
  box-shadow: 0 0 0 1px var(--line-strong);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  animation: appear 0.5s both; /* not `rise`: a label is put in its place with a transform */
}

.grid-labels .to-left {
  transform: translate(calc(-100% + 10px), -50%);
}

.grid-labels .to-right {
  transform: translate(-10px, -50%);
}

.grid-labels.atlas span {
  font-size: 9.5px;
  font-weight: 650;
  background: rgba(9, 11, 16, 0.5);
}

.rail-caption {
  min-height: 92px;
}

.caption-post {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  margin-inline: -12px;
  border-radius: 14px;
  color: inherit;
  animation: appear 0.3s both;
}

.caption-post:hover {
  background: var(--panel);
  text-decoration: none;
}

.caption-post .face.author {
  width: 28px;
  height: 28px;
}

.caption-text {
  color: var(--dim);
  font-size: 13.5px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.caption-wait {
  display: grid;
  gap: 4px;
  padding-top: 8px;
  font-size: 13.5px;
  animation: appear 0.3s both;
}

.caption-wait b {
  font: 750 15px var(--display);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--dim);
  font-size: 12px;
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ticker {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}

.ticker .face {
  --size: 32px;
}

.ticker .voice {
  animation: drop 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.ticker .voice:nth-child(n + 4) {
  opacity: 0.45;
  transition: opacity 0.4s;
}

.tip {
  position: fixed;
  z-index: 50;
  display: grid;
  gap: 1px;
  max-width: 280px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #1a202b;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  font-size: 12.5px;
  pointer-events: none;
}

.tip span {
  color: var(--dim);
}

.tip span:nth-child(3) {
  color: var(--text);
}

/* -- the post page */

.post-top {
  padding: 12px 24px 0;
}

.post-rest {
  min-height: 50vh;
  padding: 0 24px 96px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 18px;
  color: var(--text);
  font: 750 18px var(--display);
}

.back:hover {
  text-decoration: none;
  color: var(--blue);
}

.post-full .face.author {
  width: 46px;
  height: 46px;
}

.post-full .post-by b {
  font-size: 16px;
}

.post-text {
  margin: 14px 0 12px;
  font-size: 21px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.versions {
  display: flex;
  gap: 6px;
  margin-top: 14px;
}

.version,
.chip,
.value {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--dim);
  font-size: 13px;
  transition: all 0.15s;
}

.version {
  font: 12px var(--mono);
}

.version:hover,
.chip:hover,
.value:hover {
  color: var(--text);
  border-color: var(--faint);
}

.version.on,
.chip.on,
.value.on {
  color: var(--text);
  border-color: var(--blue);
  background: rgba(110, 168, 254, 0.12);
}

.chip.on {
  border-color: var(--c, var(--blue));
  background: color-mix(in srgb, var(--c, var(--blue)) 14%, transparent);
}

.chip b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.delta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 10px 0;
  color: var(--faint);
  font-size: 12.5px;
}

.delta span {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.delta .up {
  color: var(--green);
  background: rgba(61, 220, 132, 0.1);
}

.delta .down {
  color: var(--red);
  background: rgba(255, 92, 92, 0.1);
}

.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--dim);
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.15s;
}

.quiet:hover {
  color: var(--text);
  border-color: var(--faint);
}

.quiet.wide {
  width: 100%;
  margin-top: 10px;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--blue);
  font: inherit;
}

.link:hover {
  text-decoration: underline;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.block {
  padding: 18px 0 20px;
  border-top: 1px solid var(--line);
  animation: rise 0.45s both;
}

.block h3 {
  font: 750 17px var(--display);
}

.block .hint {
  margin: 8px 0 6px;
}

.bars {
  display: grid;
  gap: 1px;
  margin-top: 6px;
}

.bars li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  padding: 7px 10px;
  margin-inline: -10px;
  border-radius: 10px;
  font-size: 14px;
  transition: background 0.15s;
}

.bars li:hover {
  background: rgba(255, 255, 255, 0.04);
}

.bar-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bar {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--raised);
}

.bar i {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: 3px;
  transform-origin: left;
  animation: grow 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--i) * 45ms);
}

.bar-note {
  grid-column: 1 / -1;
  color: var(--faint);
  font-size: 12px;
}

.flagged .bar-label,
.flagged .bar-note {
  color: var(--green);
}

/* -- the map column: how far the text went, the crowd, the counters */

.map-col {
  padding-top: 22px;
}

.map-in {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stepper {
  display: flex;
  margin-bottom: 2px;
}

.step {
  position: relative;
  flex: 1;
  display: grid;
  gap: 1px;
  padding: 20px 6px 0 0;
  color: var(--faint);
  font-size: 11.5px;
  cursor: default;
}

.step::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line-strong);
}

.step:last-child::before {
  right: 60%;
}

.step-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--line-strong);
  box-shadow: 0 0 0 3px var(--ink);
}

.step b {
  color: var(--dim);
  font: 750 13.5px var(--display);
  font-variant-numeric: tabular-nums;
}

.step-note {
  min-height: 16px;
  font-family: var(--mono);
  font-size: 10.5px;
}

.step.passed::before,
.step.passed .step-dot {
  background: var(--green);
}

.step.passed b,
.step.running b,
.step.stopped b {
  color: var(--text);
}

.step.stopped .step-dot {
  background: var(--red);
}

.step.running .step-dot {
  background: var(--blue);
  animation: pulse-blue 1.2s infinite;
}

.step.never {
  opacity: 0.4;
}

.status {
  min-height: 19px;
  font: 12px var(--mono);
  color: var(--dim);
}

.stats.big {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)); /* three and two: a Ukrainian word fits whole, and no tile is left alone in a row */
  gap: 8px;
  margin-top: 0;
}

.stats.big .stat {
  grid-column: span 2;
}

.stats.big .stat:nth-child(n + 4),
.stats.big .stat:first-child:nth-last-child(4),
.stats.big .stat:first-child:nth-last-child(4) ~ .stat {
  grid-column: span 3; /* a headline has four numbers: two and two */
}

.stats.big .stat {
  display: grid;
  justify-items: start;
  gap: 3px;
  padding: 11px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.stats.big b {
  font: 800 23px / 1.1 var(--display);
  letter-spacing: -0.01em;
}

.stats.big .stat-label {
  display: block;
  max-width: 100%;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.25;
}

.stats.big .reach .icon {
  color: var(--dim);
}

/* What the check showed, in words. The colour is the wave's: green when the text went all the way, red where it was stopped. */
.verdict {
  --c: var(--green);
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--c) 8%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 28%, transparent);
  font-size: 14px;
  line-height: 1.5;
}

.verdict.stopped {
  --c: var(--red);
}

.verdict .eyebrow::before {
  background: var(--c);
}

.verdict h2 {
  font: 750 19px / 1.25 var(--display);
}

.compare {
  margin-top: 14px;
}

.compare summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  list-style: none;
  color: var(--dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

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

.compare summary::before {
  content: '';
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg);
  transition: transform 0.15s;
}

.compare[open] summary::before {
  transform: rotate(45deg);
}

.compare summary:hover {
  color: var(--text);
}

.compare-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.compare-columns article {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.compare-columns b {
  display: block;
  margin-bottom: 6px;
  color: var(--faint);
  font: 11.5px var(--mono);
}

.compare-columns p {
  color: var(--dim);
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.asked-prices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
}

.price-tag {
  padding: 3px 10px;
  border: 1px solid color-mix(in srgb, var(--green) 30%, var(--line-strong));
  border-radius: 9px;
  font: 600 13.5px var(--mono);
}

.price-tag i {
  margin-right: 2px;
  color: var(--green);
  font-style: normal;
}

.best-price {
  margin: 2px 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--green) 10%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 30%, transparent);
  font-weight: 650;
}

.block h3 .count {
  margin-left: 10px;
  color: var(--faint);
  font: 400 12px var(--mono);
}

/* -- a persona's page */

.profile .back,
.crowdpage .back {
  padding: 14px 22px;
}

.profile-head {
  padding: 0 22px 20px;
  border-bottom: 1px solid var(--line);
}

.profile-cover {
  height: 124px;
  margin-inline: -22px;
  background:
    radial-gradient(circle at 2px 2px, hsl(var(--h) 70% 66% / 0.5) 1.6px, transparent 0) 0 0 / 14px 14px,
    linear-gradient(120deg, hsl(var(--h) 55% 24%), #10141b 80%);
}

.profile-face {
  margin-top: -50px;
}

.profile-face .face {
  --size: 100px;
  box-shadow: 0 0 0 5px var(--ink);
}

.profile-head h1 {
  margin-top: 12px;
  font: 800 28px var(--display);
}

.bio {
  margin-top: 10px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag {
  padding: 4px 12px;
  border-radius: 999px;
  background: hsl(var(--h) 60% 60% / 0.14);
  color: hsl(var(--h) 75% 74%);
  font-size: 13px;
  font-weight: 600;
}

.tag.plain {
  background: var(--panel);
  color: var(--dim);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.activity li {
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  animation: rise 0.4s both;
  animation-delay: calc(var(--i) * 40ms);
}

.activity-did {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.activity-did > span {
  margin-left: -4px;
}

.quoted {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: inherit;
  font-size: 14px;
  transition: border-color 0.15s, background 0.15s;
}

.quoted:hover {
  border-color: var(--line-strong);
  background: var(--panel);
  text-decoration: none;
}

.quoted .face.author {
  width: 26px;
  height: 26px;
}

.people {
  display: grid;
  gap: 2px;
}

.people.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-inline: 12px;
}

.person {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  color: inherit;
  transition: background 0.15s;
}

.person:hover {
  background: var(--raised);
  text-decoration: none;
}

.person-body {
  display: grid;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.35;
}

.person-body > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* -- the whole crowd */

.crowd-tools {
  padding: 0 22px 18px;
  border-bottom: 1px solid var(--line);
}

.values {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.value {
  padding: 4px 11px;
  font-size: 12.5px;
}

.crowd-count {
  font: 12px var(--mono);
  color: var(--dim);
}

/* -- the resident a visitor moves in */

.me-form {
  display: grid;
  gap: 18px;
  padding: 4px 22px 0;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.field-name {
  font-size: 13px;
  font-weight: 650;
}

.field-name small {
  color: var(--faint);
  font-weight: 400;
}

.me-form input,
.me-form textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  resize: vertical;
}

.me-form input::placeholder,
.me-form textarea::placeholder {
  color: var(--faint);
}

.me-form .values {
  margin-top: 0;
}

.value small {
  color: var(--accent);
  font: 600 11px var(--mono);
}

/* What is picked, in the order of picking: forty chips do not show that at a glance. */
.chosen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  font-size: 13px;
}

.chosen-one {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 11px;
  border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--text);
  font-size: 13px;
}

.chosen-one small {
  color: var(--accent);
  font-size: 11px;
}

.chosen-one .icon {
  color: var(--dim);
}

.chosen-one:hover .icon {
  color: var(--text);
}

.map-slot:empty {
  display: none;
}

.map-slot .me-map {
  display: grid;
  gap: 8px;
  max-width: 300px;
  margin: 6px auto 0;
}

.column.me > .map-slot {
  padding: 14px 22px 6px;
  border-bottom: 1px solid var(--line);
}

.me-map {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.me-hello {
  display: grid;
  gap: 6px;
  margin: 16px 22px 4px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.me-hello h2 {
  font: 800 19px / 1.25 var(--display);
}

.me-step.done {
  gap: 6px;
  padding-block: 14px;
}

.me-step.done .me-actions {
  margin-top: 0;
  font-size: 14px;
}

.me-step.done .icon {
  color: var(--green, #3ddc84);
  vertical-align: -2px;
}

.me-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 36px;
}

.me-scores p {
  display: grid;
  gap: 2px;
  font-size: 13px;
}

.me-scores .score {
  font: 800 30px / 1.1 var(--display);
}

/* -- the card of a post */

.card-dialog {
  width: min(92vw, 460px);
  max-height: 94vh;
  margin: auto;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--panel);
  color: var(--text);
}

.card-dialog::backdrop {
  background: rgba(5, 7, 10, 0.78);
}

.card-dialog img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(94vh - 110px);
  object-fit: contain;
  border-radius: 12px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.me-known {
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.me-known summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  list-style: none;
  font: 750 16px var(--display);
  cursor: pointer;
}

.me-known summary::-webkit-details-marker {
  display: none;
}

.me-known summary::before {
  content: '';
  width: 7px;
  height: 7px;
  border: solid var(--dim);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg);
  transition: transform 0.15s;
}

.me-known[open] summary::before {
  transform: rotate(45deg);
}

.value:disabled {
  opacity: 0.4;
}

.me-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.profile-head .me-actions {
  margin-top: 12px;
}

.me-actions.end {
  margin-top: 28px;
  padding: 0 22px;
}

.primary.off {
  background: var(--raised);
  color: var(--faint);
}

.me-step,
.me-result {
  display: grid;
  gap: 8px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.me-step h2,
.me-result h2 {
  font: 800 21px / 1.2 var(--display);
}

.me-step .me-actions {
  margin-top: 6px;
}

.me-step.off h2 {
  color: var(--dim);
}

.me-kicker {
  font: 12px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.me-result .score {
  font-size: 30px;
}

.me-note {
  padding: 0 22px 10px;
}

.guesses {
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.guesses.all {
  margin-top: 0;
}

.guess {
  display: grid;
  gap: 5px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.guesses.all .guess {
  padding-inline: 22px;
}

.guess-text {
  color: var(--dim);
  font-size: 14px;
}

.guess-said {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  font-size: 14px;
}

.guess-said > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.guess-verdict.hit {
  color: var(--green);
}

.guess-verdict.miss {
  color: var(--dim);
}

.tries {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.tries li {
  display: grid;
  gap: 1px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  font-size: 13px;
}

.tries b {
  font: 800 17px var(--display);
}

/* A round of posts: one post at a time, the way it would pass in a feed. */
.quiz {
  display: grid;
  gap: 16px;
  padding: 0 22px;
}

.quiz-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.quiz-count {
  font: 12px var(--mono);
  color: var(--dim);
  white-space: nowrap;
}

.quiz-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--raised);
  overflow: hidden;
}

.quiz-bar i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

.quiz-card {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--panel);
  animation: rise 0.3s both;
}

.quiz-text {
  font-size: 17px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.quiz-ask {
  font-weight: 650;
}

.quiz-do {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.do {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.do:hover {
  border-color: var(--faint);
  background: var(--raised);
}

.do:active {
  transform: scale(0.98);
}

.do kbd {
  margin-left: auto;
  color: var(--faint);
  font: 11px var(--mono);
}

@media (hover: none) {
  .do kbd {
    display: none;
  }
}

/* Under a finger: what is tapped is about 44px high, or stands that far from its neighbours. */
@media (hover: none) and (pointer: coarse) {
  .value,
  .chosen-one {
    min-height: 40px;
    padding-inline: 14px;
    font-size: 14px;
  }

  .values {
    gap: 8px;
  }

  .quiet,
  .seg button {
    min-height: 44px;
  }

  .lang button {
    min-height: 40px;
  }
}

.quiz-busy {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 40px 0;
  color: var(--dim);
}

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* -- movement */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

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

@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
}

@keyframes grow {
  from {
    transform: scaleX(0);
  }
}

@keyframes flip {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55);
  }
  70%,
  100% {
    box-shadow: 0 0 0 7px rgba(61, 220, 132, 0);
  }
}

@keyframes pulse-blue {
  0% {
    box-shadow: 0 0 0 3px var(--ink), 0 0 0 3px rgba(110, 168, 254, 0.7);
  }
  100% {
    box-shadow: 0 0 0 3px var(--ink), 0 0 0 11px rgba(110, 168, 254, 0);
  }
}

@keyframes blink {
  0%,
  88%,
  100% {
    transform: scale(1);
  }
  94% {
    transform: scale(1.35);
  }
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.18s;
}

@media (min-width: 901px) and (min-height: 780px) {
  .map-in {
    position: sticky;
    top: calc(var(--bar) + 22px);
  }
}

/* -- a narrower desk */

@media (max-width: 1180px) {
  .page {
    gap: 0 24px;
  }

  .hero {
    gap: 28px;
  }
}

/* -- a phone: icons in the bar, the crowd comes into the flow */

@media (max-width: 900px) {
  :root {
    --bar: 58px;
  }

  .shell {
    padding-inline: 0;
  }

  .nav {
    gap: 2px;
    margin-inline: 0;
    padding-inline: 14px 10px;
  }

  .logo {
    width: 130px;
    height: auto;
  }

  .nav-link span,
  .write span {
    display: none;
  }

  .nav-link,
  .write {
    padding: 10px;
  }

  .nav-link .icon {
    width: 21px;
    height: 21px;
  }

  .write {
    margin: 0 6px 0 2px;
  }

  .foot {
    padding-inline: 18px;
  }

  .page.home,
  .page.profile,
  .page.post,
  .page.crowdpage {
    display: block;
  }

  .column,
  .post-top,
  .post-rest {
    border-inline: 0;
  }

  .column {
    min-height: 0;
  }

  .rail,
  .map-col {
    padding: 8px 18px 20px;
  }

  .rail-in {
    position: static;
    max-height: none;
  }

  /* On a phone the composer comes right after the headline; the example with its map follows, then the feed. */
  .front {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .hero,
  .page.home,
  .home .column {
    display: contents;
  }

  .front > *,
  .hero > *,
  .home .column > * {
    min-width: 0; /* a row of buttons inside must wrap or shrink, never widen the page */
  }

  .hero-copy {
    order: 1;
    padding: 26px 18px 20px;
  }

  .hero-copy h1 {
    font-size: clamp(34px, 10vw, 46px);
  }

  .hero-actions .primary {
    display: none; /* the composer is the next thing on the screen */
  }

  .home .composer {
    order: 2;
  }

  .showcase {
    order: 3;
    margin: 4px 12px 22px;
  }

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

  .showcase-map {
    width: min(100%, 330px);
    margin-inline: auto;
  }

  .home .feed-head {
    order: 4;
  }

  .home .timeline {
    order: 5;
  }

  .home .rail {
    display: none;
  }

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

  .totals {
    display: none;
  }

  .stats {
    gap: 6px 16px;
  }

  .welcome {
    padding: 22px 18px 18px;
  }

  .welcome h1 {
    font-size: 30px;
  }

  .composer {
    margin-inline: 12px;
    padding-inline: 14px;
  }

  .draft-body {
    padding-left: 0;
  }

  .composer textarea {
    font-size: 17px;
  }

  /* No hover on a phone, so nothing to explain an icon: all four kinds carry their names, and a finger gets room. */
  .composer-bar {
    gap: 12px;
  }

  .modes {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .mode {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
    height: 40px;
    padding: 0 6px;
    font-size: 12.5px;
  }

  .mode span,
  .mode.on span {
    max-width: none;
    margin-left: 0;
    opacity: 1;
  }

  /* Four names and four icons do not fit 390 px: the name says more, the chosen kind keeps its icon. */
  .mode:not(.on) .icon {
    display: none;
  }

  .mode.on span {
    margin-left: 5px;
  }

  .mode::after {
    display: none;
  }

  .composer-bar .primary {
    flex: 1;
    min-height: 44px;
  }

  .visibility {
    min-height: 32px;
    padding-inline: 10px 12px;
  }

  .price-remove {
    min-width: 32px;
    min-height: 32px;
  }

  .card {
    padding-inline: 18px;
  }

  .card-body,
  .card > .stats,
  .card-voices {
    margin-left: 0;
  }

  .card-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-top: 10px;
  }

  .card-map {
    max-width: 440px;
    border-radius: 16px;
  }

  .card:hover .card-map {
    transform: none;
  }

  .post-top,
  .post-rest {
    padding-inline: 18px;
  }

  .post-text {
    font-size: 19px;
  }

  .stats.big {
    gap: 6px;
  }

  .stats.big .stat {
    padding: 9px 8px 8px;
    border-radius: 13px;
  }

  .stats.big b {
    font-size: 18px;
  }

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

  /* Twenty names do not fit on a map this small: only the district that is picked keeps its name. */
  .grid-labels.atlas:not(.picked) {
    display: none;
  }

  /* The map of the crowd is what the page is about: on a phone it comes right after the title. */
  .page.crowdpage {
    display: flex;
    flex-direction: column;
  }

  .crowdpage .column {
    display: contents;
  }

  .crowdpage .map-col {
    order: 1;
    padding-top: 0;
  }

  .crowdpage .crowd-tools {
    order: 2;
  }

  .crowdpage .section-title {
    order: 3;
  }

  .crowdpage .people {
    order: 4;
    padding-bottom: 72px;
  }
}

@media (max-width: 400px) {
  .logo {
    width: 112px;
  }

  .nav-links {
    gap: 0;
  }

  .write {
    margin-inline: 0;
  }

  .lang button {
    padding-inline: 7px;
  }
}

@media (max-width: 340px) {
  .logo {
    width: 34px;
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}
