/* singles.bid - pay-to-rank board for single people */

:root {
  --bg:        #FFFDFA;
  --fg:        #282624;
  --muted:     #67625D;
  --card:      #FFFDFA;
  --soft:      #F6F3EF;
  --line:      #E6E0DA;
  --primary:   #E45893;
  --on-primary:#FFFFFF;
  --live:      #009F31;
  --shadow:    0 1px 2px rgba(40,38,36,.04);

  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 896px;
}

:root[data-theme="dark"] {
  --bg:     #1A1512;
  --fg:     #F7F5F1;
  --muted:  #ABA39B;
  --card:   #231E1B;
  --soft:   #2D2824;
  --line:   rgba(255,255,255,.10);
  --live:   #50C05F;
  --shadow: 0 1px 2px rgba(0,0,0,.4);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ol, ul { list-style: none; margin: 0; padding: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

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

.site { padding: 16px 16px 0; }
.site-in {
  max-width: var(--wrap); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-left { display: flex; align-items: center; gap: 12px; min-width: 0; }

.logo { display: flex; align-items: center; gap: 7px; }
.logo-mark { width: 21px; height: 21px; fill: var(--primary); stroke: none; flex: none; }
.logo-word { font-size: 19px; font-weight: 700; letter-spacing: -.03em; }
.logo-tld { color: var(--primary); }

.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav > a { padding: 6px 10px; font-size: 14px; font-weight: 500; color: var(--fg); border-radius: 999px; }
.site-nav > a:hover { background: var(--soft); }
.icon-btn {
  background: none; border: 0; cursor: pointer; color: var(--fg);
  width: 32px; height: 32px; border-radius: 999px;
  display: grid; place-items: center;
}
.icon-btn .i { width: 17px; height: 17px; }
.icon-btn:hover { background: var(--soft); }

/* Header stays on a single line: the logo holds its size, the nav tightens. */
.site-nav > a { white-space: nowrap; }
@media (max-width: 560px) {
  .site { padding: 14px 12px 0; }
  .site-in { flex-wrap: nowrap; gap: 8px; }
  .site-left { flex: none; }
  .logo { gap: 6px; }
  .logo-mark { width: 18px; height: 18px; }
  .logo-word { font-size: 17px; }
  .site-nav { gap: 0; flex: none; }
  .site-nav > a { font-size: 13px; padding: 6px 7px; }
  .icon-btn { width: 30px; height: 30px; }
}
@media (max-width: 380px) {
  .logo-word { font-size: 15.5px; }
  .site-nav > a { font-size: 12px; padding: 6px 5px; }
  .icon-btn { width: 26px; height: 26px; }
}

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

main { max-width: var(--wrap); margin-inline: auto; padding: 0 16px 64px; }

.statpill {
  margin: 32px auto 0; width: fit-content; max-width: 100%;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center;
  background: var(--soft); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; color: var(--muted);
}
.dot-live {
  width: 7px; height: 7px; border-radius: 999px; background: var(--live); flex: none;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0,159,49,.45); } 70%, 100% { box-shadow: 0 0 0 6px rgba(0,159,49,0); } }
@media (prefers-reduced-motion: reduce) { .dot-live { animation: none; } }
.statpill .online { color: var(--live); font-weight: 600; }
.statpill .sep { opacity: .5; }
.statpill .stats-link { color: var(--fg); font-weight: 500; }
.statpill .stats-link:hover { color: var(--primary); }

.claim {
  margin-top: 24px; text-align: center;
  font-size: clamp(20px, 6.4vw, 56px);
  font-weight: 700; letter-spacing: -.035em; line-height: 1.05;
  display: flex; align-items: center; justify-content: center; gap: .22em; flex-wrap: nowrap;
  white-space: nowrap;
}
/* The minus, the price and the plus travel as one unit, never split apart. */
.stepper { display: inline-flex; align-items: center; gap: .22em; flex: none; }
.price { color: var(--primary); font-variant-numeric: tabular-nums; padding: 0 2px; cursor: text; }
/* editing shows a caret; an outline round the number reads as a bug */
.price:focus, .price:focus-visible { outline: none; }
/* Sized in its own em, so the circle tracks the headline as it scales. */
.step {
  width: 1.62em; height: 1.62em; flex: none;
  border: 0; border-radius: 999px; cursor: pointer;
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  color: var(--primary);
  font-size: .38em; font-weight: 500; line-height: 1;
  display: grid; place-items: center;
}
.step:hover { background: color-mix(in srgb, var(--primary) 28%, transparent); }
.step:active { transform: translateY(1px); }

.sub {
  margin: 12px auto 0; max-width: 520px; text-align: center;
  font-size: 15px; color: var(--muted); line-height: 1.45;
}
.sub b { color: var(--primary); font-weight: 600; }

/* ---------- bid bar ---------- */

.bidbar {
  margin: 24px auto 0; max-width: 470px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
/* The handle pill and the Outbid button ride side by side at every width.
   The pill takes what is left; a long handle truncates rather than pushing. */
@media (max-width: 560px) {
  .bidbar { grid-template-columns: minmax(0, 1fr) auto; }
}

.bb-input {
  display: flex; align-items: center; gap: 9px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 0 16px; height: 44px;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.bb-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}
.bb-input > .i { width: 17px; height: 17px; color: var(--muted); }
.bb-input input { border: 0; background: none; outline: none; width: 100%; font-size: 15px; }
.bb-input input::placeholder { color: var(--muted); }

.bb-go {
  border: 0; border-radius: 999px; cursor: pointer; padding: 0 24px;
  background: var(--primary); color: var(--on-primary);
  font-size: 15px; font-weight: 600; height: 44px;
}
.bb-go:hover:not(:disabled) { filter: brightness(1.06); }
.bb-go:disabled { opacity: .45; cursor: not-allowed; }

.receiptline { margin-top: 10px; text-align: center; font-size: 13px; color: var(--muted); }
.receiptline a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.bidhint { margin-top: 10px; text-align: center; font-size: 13px; color: var(--muted); }
.bidhint.err { color: var(--primary); font-weight: 500; }

.connectbar {
  margin: 24px auto 0; max-width: 470px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center;
}
@media (max-width: 640px) {
  .connectbar { grid-template-columns: minmax(0, 1fr) auto; }
  .connect { padding: 0 14px; gap: 7px; }
}
@media (max-width: 380px) {
  .connect, .bb-go { font-size: 14px; }
  .connect { padding: 0 11px; }
}

.connect {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  height: 44px; width: 100%; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--fg);
  font-size: 15px; font-weight: 600;
}
.connect.x { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.connect:hover:not(:disabled) { filter: brightness(1.12); }
.connect:disabled { opacity: .45; cursor: not-allowed; }

.brand { width: 15px; height: 15px; fill: currentColor; stroke: none; }


.mepill {
  justify-self: stretch; min-width: 0;
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 6px 0 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
}
.mepill .brand { width: 14px; height: 14px; color: var(--fg); }
.me-face { width: 28px; height: 28px; border-radius: 999px; object-fit: cover; flex: none; background: var(--soft); }
.mepill.has-face { padding-left: 8px; }
.me-handle {
  font-size: 15px; font-weight: 600;
  min-width: 0; flex: 1 1 auto;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.me-out {
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center;
  background: var(--soft); border: 0; border-radius: 999px;
  font-size: 17px; line-height: 1; color: var(--muted); cursor: pointer;
}
.me-out:hover { background: var(--primary); color: var(--on-primary); }

/* ---------- board ---------- */

.board { margin-top: 28px; display: flex; flex-direction: column; gap: 8px; }

.row {
  position: relative;
  display: grid;
  grid-template-columns: 40px 52px minmax(0, 1fr) auto;
  align-items: center; gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--card);
  transition: border-color .14s ease;
}
.row:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.row:hover .title a { color: var(--primary); }

.rank {
  justify-self: start;
  background: var(--primary); color: var(--on-primary);
  border-radius: 999px; padding: 3px 9px;
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.row.plain .rank { background: var(--soft); color: var(--muted); }

.face {
  object-fit: cover;
  width: 52px; height: 52px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 700; color: #fff;
  text-transform: uppercase;
}

.body { min-width: 0; }
.title { font-size: 17px; font-weight: 700; letter-spacing: -.015em; line-height: 1.3; }
.title a:hover { color: var(--primary); }
.title .sep { color: var(--muted); font-weight: 500; }
.desc { margin-top: 2px; font-size: 14.5px; color: var(--muted); line-height: 1.4; }
.meta {
  margin-top: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted);
}
.meta .who { display: inline-flex; align-items: center; gap: 4px; }
.meta .clicks { display: inline-flex; align-items: center; gap: 5px; color: var(--fg); font-weight: 600; }
.meta .clicks::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--primary); }
.meta .details { background: none; border: 0; padding: 0; cursor: pointer; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.meta .details:hover { color: var(--fg); }

.amount {
  align-self: start;
  font-size: 17px; font-weight: 700; color: var(--primary);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

.extra {
  grid-column: 1 / -1;
  margin: 2px 0 0; padding-top: 12px;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.extra dt { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.extra dd { margin: 3px 0 0; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.extra .go { display: inline-flex; align-items: center; gap: 5px; color: var(--primary); font-weight: 600; }

@media (max-width: 700px) {
  .row { grid-template-columns: 40px minmax(0, 1fr); row-gap: 10px; }
  .face { grid-row: 2; width: 44px; height: 44px; font-size: 17px; }
  .body { grid-column: 2; }
  .amount { grid-row: 1; grid-column: 2; justify-self: end; }
  .extra { grid-template-columns: 1fr 1fr; }

  /* A touch screen has no hover, so the claim button sits in the row and stays
     tappable. On a pointer device it keeps floating over the top edge. */
  .claim-rank {
    position: static; transform: none;
    grid-row: 3; grid-column: 1 / -1;
    opacity: 1; pointer-events: auto;
    width: 100%; padding: 10px 14px; font-size: 14px;
  }
}

.board-empty { padding: 32px 0; text-align: center; color: var(--muted); }

.you {
  margin-left: 6px; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 45%, transparent);
  border-radius: 999px; padding: 1px 7px; vertical-align: 2px;
}

.claim-rank {
  position: absolute; top: 0; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--primary); color: var(--on-primary);
  border: 0; border-radius: 999px; padding: 5px 14px; cursor: pointer;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .12s ease;
}
.row:hover .claim-rank,
.claim-rank:focus-visible { opacity: 1; pointer-events: auto; }
.claim-rank:hover { filter: brightness(1.08); }

/* ---------- activity ---------- */

.activity { margin-top: 40px; }
.activity h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.activity ul { margin-top: 10px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.activity li {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 16px; font-size: 13.5px; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.activity li:last-child { border-bottom: 0; }
.activity li b { color: var(--fg); font-weight: 600; }
.activity li .amt { color: var(--primary); font-weight: 700; font-variant-numeric: tabular-nums; }
.activity li .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity li .at { margin-left: auto; white-space: nowrap; }
.activity li .when { font-family: var(--mono); font-size: 12px; white-space: nowrap; min-width: 92px; text-align: right; }

.showmore {
  margin-top: 10px; width: 100%; height: 38px; cursor: pointer;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13.5px; font-weight: 600; color: var(--muted);
}
.showmore:hover { color: var(--fg); border-color: var(--line-2, var(--muted)); }

/* ---------- about ---------- */

.about { margin-top: 44px; }
.about h2 { font-size: 17px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 12px; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.about-grid > div { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: var(--card); }
.about-grid h3 { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; }
.about-grid p { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .about-grid { grid-template-columns: 1fr; } }

.foot { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

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

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 70;
  background: var(--fg); color: var(--bg);
  padding: 11px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 14px 34px -16px rgba(0,0,0,.6);
  max-width: calc(100vw - 32px);
}

/* ---------- prose pages ---------- */

.prose { max-width: 640px; margin-inline: auto; padding: 44px 24px 64px; }
.prose h1 { font-size: 34px; font-weight: 700; letter-spacing: -.03em; }
.prose .stamp { margin-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.prose .lead { margin-top: 22px; font-size: 17px; color: var(--fg); }
.prose h2 { margin-top: 38px; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.prose h3 { margin-top: 22px; font-size: 15.5px; font-weight: 700; color: var(--fg); }
.prose p { margin-top: 11px; font-size: 15px; color: var(--muted); line-height: 1.6; }
.prose ul { margin-top: 11px; padding-left: 0; display: flex; flex-direction: column; gap: 8px; }
.prose li {
  font-size: 15px; color: var(--muted); line-height: 1.55;
  padding-left: 16px; position: relative;
}
.prose li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border-radius: 999px; background: var(--primary);
}
.prose b { color: var(--fg); font-weight: 600; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { filter: brightness(1.1); }

.prose-foot { max-width: 640px; margin-inline: auto; padding: 20px 24px 40px; }
.prose-foot a { color: var(--primary); }

/* ---------- stats ---------- */

.stats { max-width: 940px; margin-inline: auto; padding: 40px 24px 64px; }
.stats h1 { font-size: 34px; font-weight: 700; letter-spacing: -.03em; }
.stats-sub { margin-top: 8px; font-size: 15px; color: var(--muted); }
.stats-note { margin-top: 32px; font-size: 13px; color: var(--muted); line-height: 1.6; max-width: 62ch; }
.stats-note a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 26px 0 0; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tiles > div { border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; background: var(--card); min-width: 0; }
.tiles dt { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.tiles dd { margin: 5px 0 0; font-size: 27px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tiles p { margin-top: 2px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
@media (max-width: 760px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  /* an odd tile left alone on the last row fills the width instead of half of it */
  .tiles > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .tiles > div { padding: 14px; }
  /* seven-figure counts have to fit a half-width tile */
  .tiles dd { font-size: clamp(19px, 5.6vw, 27px); }
}

.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
@media (max-width: 760px) { .charts { grid-template-columns: 1fr; } }

.chart { margin: 0; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px 10px; background: var(--card); }
.chart figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.chart h2 { font-size: 15px; font-weight: 700; letter-spacing: -.015em; }
.chart .cap { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.plot { width: 100%; }
.plot svg { display: block; width: 100%; height: auto; overflow: visible; }

/* recessive frame, prominent data */
.plot .grid { stroke: var(--line); stroke-width: 1; }
.plot .ytick, .plot .xtick { fill: var(--muted); font-family: var(--mono); font-size: 10px; }
.plot .ytick { text-anchor: end; }
.plot .line { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.plot .end { fill: var(--primary); stroke: var(--card); stroke-width: 2; }
.plot .cross { stroke: var(--primary); stroke-width: 1; stroke-dasharray: 3 3; opacity: .5; }
.plot .dot { fill: var(--primary); stroke: var(--card); stroke-width: 2; }
.plot .catch { cursor: crosshair; }

.bars { display: flex; flex-direction: column; gap: 2px; padding-bottom: 6px; }
.bar {
  display: grid; grid-template-columns: 178px minmax(0, 1fr) auto;
  align-items: center; gap: 12px; padding: 5px 0; border-radius: 6px;
}
.bar:hover, .bar:focus-visible { background: var(--soft); outline: none; }
.bar-label {
  font-size: 13px; color: var(--fg); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bar-track { height: 14px; }
.bar-fill { display: block; height: 100%; background: var(--primary); border-radius: 0 4px 4px 0; }
.bar-value { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-value i { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 6px; }
@media (max-width: 560px) { .bar { grid-template-columns: 108px minmax(0, 1fr) auto; } }

.nodata { font-size: 13.5px; color: var(--muted); padding: 14px 0; }

.tableview { margin-top: 22px; }
.tableview summary { cursor: pointer; font-size: 13.5px; color: var(--muted); }
.tableview summary:hover { color: var(--fg); }
.tablewrap { margin-top: 12px; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.tableview table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.tableview th, .tableview td { text-align: left; padding: 9px 16px; border-bottom: 1px solid var(--line); }
.tableview th { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tableview td { font-variant-numeric: tabular-nums; }
.tableview tr:last-child td { border-bottom: 0; }

.tip {
  position: fixed; z-index: 90; pointer-events: none;
  background: var(--fg); color: var(--bg);
  padding: 7px 11px; border-radius: 8px;
  font-size: 12.5px; line-height: 1.35;
  box-shadow: 0 10px 24px -12px rgba(0,0,0,.6);
}
.tip b { font-weight: 700; }
.tip span { display: block; opacity: .7; font-family: var(--mono); font-size: 10.5px; }

.stats-foot { max-width: 940px; }
