/* A token's sheet, lower half: what stands out, the section cards with
   label and value rows, the market pairs, the sources and the foot. */

.found, .src-box, .sheet-foot { background: var(--card); border-radius: var(--r-card); box-shadow: var(--ring-card); }
.found { padding: 18px 20px 10px; }
.found > h2 { font-size: 17px; line-height: 22px; font-weight: var(--w-title); letter-spacing: -0.25px; }
.found > h2, .cards .card > h2 { margin-bottom: 6px; }
.found-list li {
  position: relative; padding: 9px 0 9px 18px; border-top: 1px solid var(--divider);
  font-size: 15px; line-height: 22.5px;
}
.found-list li:first-child { border-top: 0; }
.found-list li::before {
  content: ""; position: absolute; left: 2px; top: 18px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--tier-medium);
}

/* Section cards: label at the left, value at the right, then the tags */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.cards .card.is-market, .cards .card.is-mentions { grid-column: 1 / -1; }
.rows li {
  display: flex; align-items: baseline; gap: 8px; padding: 10px 0;
  border-top: 1px solid var(--divider); font-size: 14px; line-height: 20px;
}
.rows li:first-child { border-top: 0; }
.row-t {
  flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(92px, 2fr) minmax(0, 3fr); gap: 12px;
  text-align: right; overflow-wrap: anywhere;
}
.row-k { text-align: left; font-weight: var(--w-body); color: var(--ink-muted); }
.row-t:not(:has(.row-k)) { display: block; text-align: left; }
.rows .label, .rows .cites { flex: none; }
/* The not scored tag on a fact line sits on a line of its own under the
   row (right, like the values; left under a stand-out line) and wraps on a
   phone. */
.rows li:has(.row-tag) { flex-wrap: wrap; row-gap: 6px; }
.rows .row-tag { flex: 1 0 100%; text-align: right; }
.found-list .row-tag { display: block; margin-top: 6px; }
.label.is-not-scored { height: auto; min-height: 22px; padding: 3px 7px; white-space: normal; text-align: left; }

/* Market pairs */
.pairs { width: 100%; margin-top: 8px; font-size: 14px; line-height: 20px; }
.pairs th, .pairs td { height: 44px; padding: 0 8px; text-align: right; white-space: nowrap; border-top: 1px solid var(--divider); }
.pairs th:first-child, .pairs td:first-child { padding-left: 0; text-align: left; }
.pairs th:last-child, .pairs td:last-child { padding-right: 0; }
.pairs thead th { height: 36px; border-top: 0; color: var(--ink-muted); font-weight: var(--w-body); }
.pairs thead th::first-letter { text-transform: uppercase; }
.pairs .p-pair, .pairs thead th:nth-child(2) { text-align: left; }
.pairs .p-pair { font-weight: var(--w-title); }
.pairs .p-dex { color: var(--ink-2); }
.pairs .k { display: none; }
.key-note { padding: 0 4px; font-size: 14px; line-height: 20px; color: var(--ink-muted); }

/* Sources */
.src-sum {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px;
  list-style: none; cursor: pointer; font-size: 15px; line-height: 22px; font-weight: var(--w-title);
}
.src-sum::-webkit-details-marker { display: none; }
.src-hint { color: var(--ink-muted); font-weight: var(--w-body); }
.src-box[open] .src-hint { display: none; }
.src-list { padding: 0 20px 12px; }
.src {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 2px 10px; align-items: baseline;
  padding: 10px 0; border-top: 1px solid var(--divider); font-size: 14px; line-height: 20px;
}
.src:target { background: var(--hover-fill); }
.src-n {
  grid-row: span 2; display: grid; place-items: center; width: 22px; height: 22px; border-radius: var(--r-chip);
  box-shadow: var(--ring-tile); color: var(--ink-muted); font-size: 12px;
}
.src-status { justify-self: end; color: var(--ink-muted); white-space: nowrap; }
.src-url { grid-column: 2 / -1; overflow-wrap: anywhere; color: var(--ink-muted); font-family: var(--font-mono); font-size: 14px; }
.src-url:hover { color: var(--ink-2); }
.src-box { container: sources / inline-size; }
@container sources (max-width: 760px) {
  .src { grid-template-columns: 26px minmax(0, 1fr); }
  .src-n { grid-row: span 3; }
  .src-status { justify-self: start; white-space: normal; }
}

/* Below 760px of card width the pairs stack: pair and DEX, then each
   figure under its own label */
.cards .card.is-market { container: market / inline-size; }
@container market (max-width: 760px) {
  .pairs thead { display: none; }
  .pairs, .pairs tbody { display: block; }
  .pairs tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px;
    padding: 12px 0; border-top: 1px solid var(--divider);
  }
  .pairs th, .pairs td { display: flex; flex-direction: column; height: auto; padding: 0; border: 0; text-align: left; white-space: normal; }
  .pairs th:first-child, .pairs td:first-child, .pairs th:last-child, .pairs td:last-child { padding: 0; }
  .pairs .p-pair { order: -1; display: block; }
  .pairs td.p-dex { text-align: right; }
  .pairs .k { display: block; color: var(--ink-muted); }
  .pairs td:last-child { grid-column: 1 / -1; }
}

/* The foot of the sheet */
.sheet-foot { display: flex; flex-direction: column; gap: 16px; padding: 16px 20px 20px; }
.foot-stamp {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 14px;
  background: var(--tile); border-radius: var(--r-tile); box-shadow: var(--ring-tile);
}
.stamp { min-width: 0; }
.stamp code { overflow-wrap: anywhere; color: var(--ink-2); }
.foot-end { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.foot-text { display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.foot-text .links { color: var(--ink-2); }
.barcode code {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: var(--r-chip);
  background: var(--ghost-fill); color: var(--ink-muted); letter-spacing: 1px;
}
