/* mikaelbuilds.com — wall pages (/, /wall, /me, /wall/rules).
   Page-level only. tokens.css and base.css are owned by the lead session.

   The idea the layout is built on: this site is a roll of numbers and names.
   A mono numeric gutter runs down the left edge of every list on every page,
   and the hero's number is drawn at the same rhythm as the board's. Nothing
   here is a card grid; the wall is a ledger, so it is ruled, not boxed.

   Gold appears in exactly three places: the Founding rail, the seat meter fill,
   and the seat numbers. Free actions never get gold. */

/* ----------------------------------------------------------- chrome: header */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg-0) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.site-head__inner {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-height: 56px;
}
.wordmark {
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--fg-0);
  text-decoration: none;
  font-size: var(--t-md);
}
.wordmark span { color: var(--fg-2); font-weight: 500; }
.site-nav { margin-left: auto; display: flex; gap: var(--s-4); align-items: center; }
.site-nav a {
  color: var(--fg-1);
  text-decoration: none;
  font-size: var(--t-sm);
  font-weight: 600;
}
.site-nav a:hover { color: var(--fg-0); }
.site-nav a[aria-current="page"] { color: var(--fg-0); }
.site-nav .btn { color: var(--btn-fg); }

@media (max-width: 30rem) {
  .site-nav { gap: var(--s-3); }
  .site-nav .nav-hide { display: none; }
}

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

.hero { padding-block: clamp(var(--s-6), 10vw, var(--s-9)) var(--s-7); }
.hero__grid { display: grid; gap: var(--s-6); }

.hero__title {
  font-size: var(--t-3xl);
  max-width: 14ch;
  text-wrap: balance;
}
.hero__title em {
  font-style: normal;
  color: var(--fg-2);
  display: block;
}
.hero__lede {
  font-size: var(--t-lg);
  color: var(--fg-1);
  line-height: var(--lh-snug);
  max-width: 34ch;
}
.hero__body { color: var(--fg-1); }
.hero__actions { margin-top: var(--s-5); display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.hero__fine { font-size: var(--t-sm); color: var(--fg-2); margin: var(--s-3) 0 0; }

@media (min-width: 60rem) {
  .hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr); gap: var(--s-8); align-items: start; }
}

/* ------------------------------------------------------- the seats counter */

.meter {
  border: 1px solid var(--gold-edge);
  border-radius: var(--r-3);
  background: linear-gradient(180deg, var(--gold-ghost), transparent 70%), var(--bg-1);
  padding: var(--s-5);
}
.meter__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.meter__label {
  font-size: var(--t-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}
.meter__count { font-family: var(--font-mono); font-size: var(--t-lg); color: var(--fg-0); }
.meter__track {
  margin-top: var(--s-3);
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--bg-3);
  overflow: hidden;
}
.meter__fill {
  --fill: 0%;
  display: block;
  height: 100%;
  width: var(--fill);
  min-width: 3px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  transition: width var(--dur-3) var(--ease);
}
.meter__note { margin: var(--s-3) 0 0; font-size: var(--t-sm); color: var(--fg-1); }
.meter__note b { color: var(--gold); font-weight: 700; }

/* ------------------------------------------------------- front page preview */

.preview { margin-top: var(--s-5); }
.preview__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3);
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--line);
}
.preview__title { font-size: var(--t-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); font-weight: 700; }
.preview__list { list-style: none; margin: 0; padding: 0; }
.preview__row {
  display: grid;
  grid-template-columns: 3.5ch 28px 1fr auto;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line);
  max-width: none;
}
.preview__rank { color: var(--fg-2); font-size: var(--t-sm); }
.preview__row .avatar { width: 28px; height: 28px; }
.preview__handle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview__score { color: var(--fg-1); }
.preview__more { margin: var(--s-4) 0 0; font-size: var(--t-sm); }

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

.zone { padding-block: var(--s-7); }
.zone__head { margin-bottom: var(--s-5); }
.zone__title { font-size: var(--t-xl); margin-bottom: var(--s-2); }
.zone__sub { color: var(--fg-1); margin: 0; }
.zone--gold .zone__title { color: var(--gold); }

.searchbar { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; margin-bottom: var(--s-4); }
.search {
  flex: 1 1 14rem;
  min-height: 44px;
  padding: var(--s-2) var(--s-4);
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  color: var(--fg-0);
  font: inherit;
  font-size: var(--t-sm);
}
.search::placeholder { color: var(--fg-2); }
.searchbar__count { font-size: var(--t-sm); color: var(--fg-2); font-variant-numeric: tabular-nums; }

.board { width: 100%; border-collapse: collapse; }
.board caption {
  caption-side: top;
  text-align: left;
  color: var(--fg-2);
  font-size: var(--t-sm);
  padding-bottom: var(--s-3);
}
.board th {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--fg-2);
  font-weight: 700;
  text-align: left;
  padding: 0 var(--s-2) var(--s-2);
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.board td {
  padding: var(--s-4) var(--s-2);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.board__row:hover td { background: var(--bg-1); }

.board__num { width: 5ch; }
.board__num .num { color: var(--fg-0); font-size: var(--t-sm); font-weight: 600; }
.board__rank, .board__score { text-align: right; width: 6ch; white-space: nowrap; }
.board__rank .num { color: var(--fg-1); font-size: var(--t-sm); }
.board__score .num { color: var(--fg-0); font-weight: 700; }
.board__report { display: block; margin-top: var(--s-2); font-size: var(--t-xs); }

.board__empty { padding: var(--s-6) 0; color: var(--fg-2); }

@media (min-width: 46rem) {
  .board__num { width: 8ch; }
  .board__rank, .board__score { width: 8ch; }
  .board td { padding: var(--s-4) var(--s-3); }
}

/* ------------------------------------------------------------- identity cell */

.who { display: flex; gap: var(--s-3); align-items: flex-start; min-width: 0; }
.who__body { min-width: 0; }
.avatar {
  width: 40px; height: 40px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--bg-3);
  border: 1px solid var(--line);
  object-fit: cover;
}
.avatar--empty {
  display: grid; place-items: center;
  font-family: var(--font-mono);
  color: var(--fg-2);
  font-size: var(--t-sm);
}
.who__handle { display: block; font-weight: 650; color: var(--fg-0); text-decoration: none; overflow-wrap: anywhere; }
.who__handle:hover { color: var(--accent-hot); }
.who__name { display: block; font-size: var(--t-sm); color: var(--fg-2); }
.who__line { margin: var(--s-2) 0 0; font-size: var(--t-sm); color: var(--fg-1); max-width: 52ch; }
.who__site {
  display: inline-block;
  margin-top: var(--s-2);
  font-size: var(--t-xs);
  font-family: var(--font-mono);
  color: var(--fg-2);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.who__site:hover { color: var(--accent-hot); }
.who__tags { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-3) 0 0; padding: 0; }
.who__tags li { max-width: none; }

/* ------------------------------------------------------- founding 100 roll */

.roll { list-style: none; margin: 0; padding: 0 0 0 var(--s-4); border-left: 1px solid var(--gold-edge); }
.seat {
  display: grid;
  grid-template-columns: 5.5ch 1fr;
  gap: var(--s-3);
  align-items: start;
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--line);
  max-width: none;
}
.seat:last-child { border-bottom: 0; }
.seat__num { font-size: var(--t-sm); font-weight: 700; padding-top: 2px; }
.seat .avatar { border-color: var(--gold-edge); }

.roll--empty { border-left-style: dashed; }
.founding__cta { margin-top: var(--s-5); }

/* ------------------------------------------------------------------ me page */

.me-head { display: grid; gap: var(--s-5); padding-block: var(--s-7) var(--s-6); }
.me-number { display: flex; align-items: baseline; gap: var(--s-4); flex-wrap: wrap; }
.me-number__value {
  font-family: var(--font-mono);
  font-size: var(--t-3xl);
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--fg-0);
}
.me-number__label { font-size: var(--t-sm); color: var(--fg-2); }
.me-stats { display: flex; gap: var(--s-6); flex-wrap: wrap; }
.me-stat__k { display: block; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--fg-2); }
.me-stat__v { font-family: var(--font-mono); font-size: var(--t-xl); color: var(--fg-0); }

.copyrow { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: stretch; }
.copyrow input {
  flex: 1 1 16rem;
  min-width: 0;
  min-height: 44px;
  padding: var(--s-2) var(--s-3);
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  color: var(--fg-0);
  font-family: var(--font-mono);
  font-size: var(--t-sm);
}

.field { display: grid; gap: var(--s-2); margin-bottom: var(--s-4); }
.field label { font-size: var(--t-sm); font-weight: 600; }
.field input {
  min-height: 44px;
  padding: var(--s-2) var(--s-3);
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  color: var(--fg-0);
  font: inherit;
  font-size: var(--t-sm);
}
.field .hint { font-size: var(--t-xs); color: var(--fg-2); }

.teardown { list-style: none; padding: 0; margin: 0; counter-reset: point; }
.teardown li {
  counter-increment: point;
  display: grid;
  grid-template-columns: 3ch 1fr;
  gap: var(--s-3);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--line);
  max-width: none;
}
.teardown li::before {
  content: counter(point, decimal-leading-zero);
  font-family: var(--font-mono);
  color: var(--fg-2);
}
.teardown h3 { font-size: var(--t-md); margin-bottom: var(--s-1); }
.teardown p { margin: 0; color: var(--fg-1); font-size: var(--t-sm); }

/* -------------------------------------------------------------- small parts */

.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--fg-2);
  font: inherit;
  font-size: var(--t-xs);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.linkish:hover { color: var(--fg-1); }
.linkish[disabled] { opacity: .5; cursor: default; }

.notice {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--bg-1);
  padding: var(--s-3) var(--s-4);
  font-size: var(--t-sm);
  color: var(--fg-1);
  margin-bottom: var(--s-4);
}
.notice--warn { border-color: rgba(224,163,60,.45); color: var(--warn); }

.status { font-size: var(--t-sm); color: var(--fg-1); min-height: 1.4em; margin: var(--s-2) 0 0; }

.rules { counter-reset: rule; }
.rules h2 { font-size: var(--t-lg); margin-top: var(--s-6); }
.rules ul { padding-left: var(--s-5); }
.rules li { margin-bottom: var(--s-2); }

.badge-live {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--fg-1);
}
.badge-live::before {
  content: ""; width: 7px; height: 7px; border-radius: var(--r-pill);
  background: var(--ok); box-shadow: 0 0 0 3px rgba(63,191,135,.18);
}
[data-frozen] .badge-live::before { background: var(--fg-2); box-shadow: none; }

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

.site-foot {
  border-top: 1px solid var(--line);
  padding-block: var(--s-6);
  color: var(--fg-2);
  font-size: var(--t-sm);
}
.site-foot nav { display: flex; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-3); }
.site-foot a { color: var(--fg-1); text-decoration: none; }
.site-foot a:hover { color: var(--fg-0); text-decoration: underline; }
.site-foot p { margin: 0; max-width: 60ch; }
