:root {
  --bg: #f7f4ee;
  --surface: #fffcf7;
  --raised: #ffffff;
  --border: #e4ded3;
  --text: #171717;
  --secondary: #5f5c56;
  --muted: #8a867e;
  --positive: #187a45;
  --negative: #c45c4a;
  --ink: #111111;
  --cream: #f4efe3;
  --header-h: 52px;
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --tile-mint: #9fe3be;
  --tile-ice: #a8d4f0;
  --tile-violet: #c9a8ee;
  --tile-chartreuse: #cde24a;
  --tile-rose: #e8b0c4;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); color: var(--text); }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; background: var(--raised); border: 1px solid var(--border); }
img { max-width: 100%; display: block; }

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 20;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.mark {
  width: 14px;
  height: 14px;
  background: var(--text);
  display: inline-block;
  flex: none;
}
.wordmark {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--secondary);
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  background: var(--raised);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.2;
}
.btn.primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.danger { color: var(--negative); border-color: var(--negative); background: transparent; }

.wrap {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
}
.page { padding: 28px 0 64px; }

.kicker-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0 0 10px;
}
h1 {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  line-height: 1.15;
}
.sub {
  color: var(--secondary);
  margin: 0 0 16px;
  max-width: 42em;
}
.lede { color: var(--secondary); margin: 0 0 16px; max-width: 46em; }
.muted { color: var(--muted); }
.intro {
  color: var(--secondary);
  font-size: 13px;
  margin: 0 0 20px;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 20px;
  align-items: start;
}
.home-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: start;
}
.home-center { min-width: 0; }
.sponsor-strip { display: none; }
@media (max-width: 960px) {
  .home-shell { grid-template-columns: 1fr; }
  .home-shell .sponsor-rail { display: none; }
  .sponsor-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    overflow: visible;
    padding: 0;
    margin: 0 0 16px;
  }
  .sponsor-strip .sponsor-tile,
  .sponsor-strip .slot-open {
    min-width: 0;
    width: 100%;
    min-height: 56px;
  }
  .sponsor-strip .slot-cta {
    grid-column: 1 / -1;
    min-height: 48px;
    letter-spacing: 0.06em;
  }
  .nav a:not(.btn) { display: none; }
}
@media (max-width: 840px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-grid .rail { display: none; }
}

.board {
  border: 1px solid var(--border);
  background: var(--raised);
  border-radius: 12px;
  overflow: hidden;
}
.board table {
  width: 100%;
  border-collapse: collapse;
}
.board th, .board td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.board th {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.board tr:last-child td { border-bottom: 0; }
.board tbody tr:hover { background: var(--raised); }
.num, .rank, .growth, .move {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.rank { color: var(--secondary); width: 48px; }
.growth { font-size: 13px; }
.growth.pos { color: var(--positive); }
.growth.neg { color: var(--negative); }
.brand-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.logo, .logo-lg {
  width: 28px;
  height: 28px;
  object-fit: cover;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 6px;
  flex: none;
}
.logo-lg { width: 56px; height: 56px; }
.logo.ph, .logo-lg.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  color: var(--secondary);
}
.cat { color: var(--secondary); font-size: 12px; }
.move { font-size: 11px; color: var(--muted); }
.move.up { color: var(--positive); }
.move.down { color: var(--negative); }

.empty {
  padding: 36px 16px;
  text-align: center;
  color: var(--secondary);
  border: 1px solid var(--border);
  background: var(--raised);
  border-radius: 12px;
}

.sponsor-mobile { display: none; }

.notice {
  border: 1px solid var(--border);
  background: var(--raised);
  padding: 10px 12px;
  margin: 0 0 16px;
  color: var(--secondary);
  border-radius: 10px;
}
.notice.error { border-color: var(--negative); color: var(--text); }

.form {
  display: grid;
  gap: 10px;
  max-width: 480px;
}
.form label {
  display: grid;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary);
}
.form input, .form select, .form textarea {
  padding: 8px 10px;
  background: var(--raised);
  color: var(--text);
  border: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}
.form textarea { min-height: 80px; resize: vertical; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.panel {
  border: 1px solid var(--border);
  background: var(--raised);
  padding: 16px;
  margin: 0 0 16px;
  border-radius: 12px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.stat {
  background: var(--raised);
  padding: 12px;
}
.stat .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat .v {
  font-family: var(--font-mono);
  font-size: 18px;
  margin-top: 4px;
}

.profile-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.meta-row { color: var(--secondary); margin: 0; }
.growth-hero { margin: 0 0 20px; }
.growth-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.growth-num {
  font-family: var(--font-mono);
  font-size: 56px;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 6px 0;
}
.growth-num.pos { color: var(--positive); }
.growth-num.neg { color: var(--negative); }
.growth-sub { color: var(--secondary); }
.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 3px 7px;
  color: var(--secondary);
}
.verify { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.share { display: flex; gap: 8px; margin-top: 20px; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}
.site-footer a:hover { color: var(--text); }

.preview-card {
  border: 1px solid var(--border);
  background: var(--raised);
  padding: 16px;
  margin-top: 16px;
}
.identity-card {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 14px;
  max-width: 480px;
}
.identity-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.identity-name {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
}
code { font-family: var(--font-mono); font-size: 12px; }

.cat-list { border: 1px solid var(--border); background: var(--raised); border-radius: 12px; overflow: hidden; }
.cat-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
}
.cat-row:last-child { border-bottom: 0; }
.cat-row:hover { background: var(--cream); }

.price {
  font-family: var(--font-mono);
  font-size: 32px;
  letter-spacing: -0.03em;
  margin: 8px 0;
}
.config-banner {
  margin: 12px auto 0;
  padding: 8px 12px;
  border: 1px dashed var(--border);
  background: var(--raised);
  color: var(--secondary);
  font-size: 12px;
  border-radius: 8px;
}
.config-banner strong { color: var(--text); font-weight: 500; }

fieldset.form {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
fieldset.form:disabled {
  opacity: 0.55;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-brand {
  text-align: center;
  margin: 4px 0 18px;
}
.home-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.lock-name {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.lock-rule {
  display: block;
  width: 56px;
  height: 1px;
  background: var(--border);
}
.lock-tag {
  margin: 4px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--secondary);
}
.home-center h1 {
  text-align: center;
  font-size: 32px;
  max-width: 18em;
  margin-left: auto;
  margin-right: auto;
}
.home-center .sub {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.board-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 0 0 18px;
}
.search-field { flex: 1; max-width: 420px; }
.search-field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
}
.connect-cta {
  padding: 10px 16px;
  border-radius: 8px;
}

.verified-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}
.verified-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  min-width: 0;
}
.verified-card .v-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.verified-card .growth {
  font-family: var(--font-mono);
  font-size: 22px;
  margin: 4px 0;
}
.verified-card .growth:not(.pos):not(.neg) {
  color: var(--muted);
  font-size: 16px;
}
.verified-card .v-name {
  font-size: 12px;
  color: var(--secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sponsor-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: calc(var(--header-h) + 12px);
}
.sponsor-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: var(--cream);
  color: var(--ink);
  border: 1px solid transparent;
  min-height: 64px;
  text-align: left;
  width: 100%;
  cursor: pointer;
}
.sponsor-tile:hover { color: var(--ink); filter: brightness(0.98); }
.sponsor-tile .fav {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
}
.sponsor-tile .copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.sponsor-tile strong {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
}
.sponsor-tile .copy span {
  font-size: 11px;
  color: var(--secondary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sponsor-tile.color-default { background: #ede4cf; }
.sponsor-tile.color-mint { background: var(--tile-mint); }
.sponsor-tile.color-ice { background: var(--tile-ice); }
.sponsor-tile.color-violet { background: var(--tile-violet); }
.sponsor-tile.color-chartreuse { background: var(--tile-chartreuse); }
.sponsor-tile.color-rose { background: var(--tile-rose); }
.sponsor-tile.preview { cursor: default; }
.sponsor-tile.slot-open {
  background: #fbf7ef;
  border: 1px dashed #cfc6b8;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  min-height: 64px;
}
.sponsor-tile.slot-open.slot-quiet {
  min-height: 64px;
}
.sponsor-tile.slot-open.slot-cta {
  min-height: 64px;
}
.sponsor-tile.slot-open .slot-mark {
  font-size: 18px;
  letter-spacing: 0;
  text-transform: none;
  color: #c4bdb2;
  line-height: 1;
}
.sponsor-tile.slot-open:hover { color: var(--text); border-color: var(--text); }
.sponsor-tile .tag-fallback {
  color: var(--muted);
  font-style: italic;
}

.ad-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  max-width: 720px;
  margin: 0 auto;
}
.ad-panel h1, .ad-panel h2 {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 500;
}
.ad-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 18px;
  letter-spacing: 0.02em;
}
.ad-form { display: grid; gap: 16px; }
.ad-field { display: grid; gap: 6px; }
.ad-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ad-form input {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
}
.ad-identity {
  display: grid;
  gap: 10px;
}
.duration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.duration-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.duration-card .d-label { font-size: 16px; font-weight: 500; }
.duration-card .d-price {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.duration-card.selected {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.duration-card.dashed { border-style: dashed; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.08);
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
}
.swatch.selected { box-shadow: inset 0 0 0 2px var(--ink); }
.swatch .check {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.preview-note {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  margin: 6px 0 0;
}
.book-cta {
  width: 100%;
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
}
.book-cta:hover { color: #fff; }
.ad-as, .ad-footnote { margin: 0; }
.field-error {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--negative);
}
.ad-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 23, 23, 0.28);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ad-modal {
  max-height: calc(100vh - 40px);
  overflow: auto;
  width: min(720px, 100%);
}
.ad-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.ad-modal-head h2 { margin: 0; }

@media (max-width: 860px) {
  .verified-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-grid, .duration-grid, .ad-identity { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  h1 { font-size: 22px; }
  .home-center h1 { font-size: 24px; }
  .growth-num { font-size: 40px; }
}
