/* Launchpad layer on top of styles.css: board, create form, token page layout. No external resources. */

/* ---- view switching for the two new views --------------------------------- */
body:not([data-view="launches"]) .col-board,
body:not([data-view="create"]) .col-create {
  display: none !important;
}

body[data-view="launches"] main > .col:not(.col-board),
body[data-view="create"] main > .col:not(.col-create) {
  display: none !important;
}

body[data-view="launches"] main {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1180px;
}

body[data-view="create"] main {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1040px;
}

/* "Markets" is highlighted by the old layout on wide screens whatever the view; only on its own views now. */
@media (min-width: 760px) {
  body[data-view="launches"] .nav button[data-view="pairs"],
  body[data-view="create"] .nav button[data-view="pairs"],
  body[data-view="launch"] .nav button[data-view="pairs"] {
    background: transparent;
    color: var(--text-muted);
  }
}

.col-board {
  display: grid;
  gap: 16px;
  align-content: start;
}

.col-create {
  display: grid;
  gap: 16px;
  align-content: start;
}

@media (min-width: 900px) {
  body[data-view="create"] .col-create {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: start;
  }
}

.create-side {
  display: grid;
  gap: 16px;
  align-content: start;
}

/* ---- token page: the pool view without its list column ---------------------- */
body[data-view="pools"] .pools-list-card {
  display: none;
}

@media (min-width: 760px) {
  body[data-view="pools"] .col-pools {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 1180px) {
  body[data-view="pools"] .col-pools {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}

.back-row {
  margin: 0 0 4px;
}

/* ---- hero ----------------------------------------------------------------- */
.hero {
  padding: 28px 4px 8px;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
  font-weight: 650;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4.6vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-actions .primary,
.hero-actions .ghost {
  width: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* "redaction bars": three ink bars like struck-out ledger lines */
.redact {
  display: grid;
  gap: 6px;
  margin: 22px 0 0;
  max-width: 320px;
}

.redact i {
  display: block;
  height: 8px;
  border-radius: 2px;
  background: var(--text);
  opacity: 0.85;
}

.redact i:nth-child(1) {
  width: 92%;
}

.redact i:nth-child(2) {
  width: 64%;
  background: var(--accent);
  opacity: 1;
}

.redact i:nth-child(3) {
  width: 78%;
}

/* ---- board ---------------------------------------------------------------- */
.board-tools {
  display: grid;
  gap: 10px;
  margin: 10px 0 14px;
}

@media (min-width: 760px) {
  .board-tools {
    grid-template-columns: minmax(200px, 1fr) auto auto;
    align-items: end;
  }
}

.board-tools .field {
  margin: 0;
}

.board-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.board-grid:empty {
  display: none;
}

.board-state {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 18px 2px;
}

.board-state p {
  margin: 0;
}

.board-state:empty {
  display: none;
}

.launch-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  position: relative;
  min-width: 0;
}

.launch-card:hover,
.launch-card:focus-within {
  border-color: var(--accent-text);
}

.lc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.card-link {
  display: grid;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

/* the whole card is the link target */
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.lc-ticker {
  font-family: var(--mono);
  font-weight: 750;
  font-size: 18px;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.lc-name {
  color: var(--text-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.lc-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 2px 0 0;
}

.lc-stats > div {
  min-width: 0;
}

.lc-stats dt {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lc-stats dd {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.lc-id {
  margin: 0;
  font-family: var(--mono);
  overflow-wrap: anywhere;
}

/* ---- create form ---------------------------------------------------------- */
.curve-set {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px 4px;
  margin: 10px 0;
}

.curve-set legend {
  padding: 0 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.notice {
  border: 1px solid var(--warn-border);
  background: var(--warn-bg);
  color: var(--warn-text);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 10px 0;
  line-height: 1.5;
}

.notice.small {
  font-size: 12.5px;
}

#createGo {
  width: 100%;
}

#createStatus h2 {
  margin: 0;
}

/* ---- 404 page ---------------------------------------------------------------- */
.nf {
  max-width: 520px;
  margin: 12vh auto;
  padding: 0 16px;
  display: block;
}

.nf h1 {
  font-size: 30px;
  margin: 12px 0;
}

.nf-mark {
  margin: 0 0 18px;
}

.nf-link {
  display: inline-block;
  text-decoration: none;
}

/* ---- narrow screens --------------------------------------------------------- */
@media (max-width: 759px) {
  .hero {
    padding-top: 14px;
  }

  .hero-actions .primary,
  .hero-actions .ghost {
    flex: 1 1 100%;
  }

  .brand-tag {
    display: none;
  }

  .lc-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Token images (verified before display; placeholder otherwise) and descriptions */
.tok-img {
  --tok-hue: 200;
  display: inline-grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  border-radius: 10px;
  background: hsl(var(--tok-hue) 35% 32%);
  color: #fff;
  font-family: var(--mono);
  font-weight: 750;
}
.tok-img-sm { width: 40px; height: 40px; font-size: 18px; }
.tok-img-lg { width: 96px; height: 96px; font-size: 40px; border-radius: 14px; }
.tok-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lc-top { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.lc-top .lc-head { flex: 1; min-width: 0; }
.lc-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.pool-title-row { display: flex; gap: 14px; align-items: flex-start; }
.pool-desc { margin: 10px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 70ch; }
.create-card textarea { width: 100%; font: inherit; }
.image-preview { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.image-preview img { max-width: 96px; max-height: 96px; border-radius: 10px; border: 1px solid var(--border); }
