/* Data panels on the case board (src/panels/*.ts, shared pieces in src/panels/util.ts).
   Each panel's root is the board's .pnl-body with .pn added: a bar (tabs/actions), a scrolling body
   and a source footer ("DexScreener · 2 min ago"). */

.pn.pn {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 13px;
}
.pn-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 36px;
  padding: 0 var(--sp-3) var(--sp-1h) var(--pad-panel);
  overflow-x: auto;
  scrollbar-width: none;
}
.pn-bar:empty,
.pn-bar:not(:has(> :not(.pn-grow, .win-spacer, [hidden]))) {
  display: none;
}
.pn-bar-title {
  color: var(--ink-2);
  font-size: var(--fs-meta);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pn-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: var(--sp-1) var(--pad-panel) var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.pn-body:has(> .pn-embed:only-child),
.pn-body:has(> .cu-frame:only-child),
.pn-body:has(> .pn-embed-wait:only-child) {
  padding: 0;
}
.pn-foot-wrap:empty {
  display: none;
}
.pn-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px var(--sp-3);
  padding: var(--sp-2) var(--pad-panel) 10px;
  color: var(--ink-4);
  font-size: var(--fs-micro);
  line-height: 1.4;
}
.pn-src {
  white-space: nowrap;
}
.pn-src b {
  margin-right: 2px;
  color: var(--ink-3);
  font-weight: var(--fw-medium);
}
.pn-src.is-err b {
  color: var(--caution);
}
.pn-srctag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--ink-4);
  font-size: var(--fs-micro);
  white-space: nowrap;
}
.pn-srctag.is-err {
  color: var(--amber);
}
.pn-grow {
  flex: 1 1 auto;
}
.pn-note {
  margin: 0;
  color: var(--ink-3);
  font-size: var(--fs-meta);
  line-height: 1.5;
}
.pn-note code {
  font-size: var(--fs-micro);
  color: var(--ink-2);
}
.pn-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* tones */
.t-good {
  color: var(--fine);
}
.t-bad {
  color: var(--danger-ink);
}
.t-warn {
  color: var(--caution);
}
.t-info {
  color: var(--info);
}
.t-dim {
  color: var(--ink-3);
}

/* skeletons, empty, error */
.pn-skel {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 4px 0;
}
.pn-skel-line,
.pn-skel-inline,
.pn-embed-wait {
  height: 11px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 40%, var(--surface-2) 80%);
  background-size: 300% 100%;
  animation: pn-shimmer 1.6s linear infinite;
}
.pn-skel-inline {
  display: inline-block;
  width: 110px;
  height: 20px;
  vertical-align: middle;
}
.pn-embed-wait {
  flex: 1;
  height: auto;
  min-height: 120px;
  border-radius: 0;
}
@keyframes pn-shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -200% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pn-skel-line,
  .pn-skel-inline,
  .pn-embed-wait {
    animation: none;
  }
}
.pn-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  flex: 1;
  min-height: 90px;
  padding: var(--sp-3);
  color: var(--ink-2);
  text-align: center;
}
.pn-empty p {
  margin: 0;
  max-width: 46ch;
  line-height: 1.5;
}
.pn-empty .pn-actions {
  justify-content: center;
}
.pn-empty.is-err p {
  color: var(--caution);
}

/* links, buttons */
.pn-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}
.pn-link .ico {
  opacity: 0.6;
}
.pn-linkbtn.pn-linkbtn {
  color: var(--ink-2);
  text-decoration: none;
  gap: 5px;
}
.pn-linkbtn:hover {
  color: var(--ink-1);
}
.pn-mini-link {
  border: 0;
  background: none;
  padding: 2px 4px;
  color: var(--ink-3);
  font-size: var(--fs-meta);
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.pn-mini-link:hover {
  color: var(--text);
}

/* chips, stats, meters */
.pn-chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 var(--sp-2);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  line-height: 1;
  white-space: nowrap;
}
.pn-chip.t-good {
  color: var(--fine);
  background: var(--fine-wash);
}
.pn-chip.t-bad {
  color: var(--danger-ink);
  background: var(--danger-wash);
}
.pn-chip.t-warn {
  color: var(--caution);
  background: var(--caution-wash);
}
.pn-chip.t-info {
  color: var(--info);
  background: rgba(143, 181, 226, 0.12);
}
.pn-chip.t-dim {
  color: var(--ink-3);
  background: none;
  box-shadow: inset 0 0 0 1px var(--rule-2);
}
.pn-stat {
  min-width: 0;
}
.pn-stat-l {
  color: var(--ink-3);
  font-size: var(--fs-micro);
  white-space: nowrap;
}
.pn-stat-v {
  font: var(--fw-strong) 15px/1.3 var(--sans);
  font-variant-numeric: tabular-nums;
  color: var(--ink-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pn-stat-s {
  color: var(--ink-3);
  font-size: var(--fs-micro);
}
.pn-meter {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-3);
  overflow: hidden;
}
.pn-meter-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--ink-2);
}
.pn-meter-fill.t-good {
  background: var(--fine);
}
.pn-meter-fill.t-warn {
  background: var(--caution);
}
.pn-meter-fill.t-bad {
  background: var(--danger);
}
.pn-meter-fill.t-info {
  background: var(--info);
}
.pn-meter-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--bg);
}

/* tabs */
.pn-tabs {
  display: inline-flex;
  flex: none;
  padding: 2px;
  gap: 2px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--surface-sunk);
}
.pn-tab {
  height: 24px;
  padding: 0 var(--sp-3);
  border: 0;
  border-radius: var(--radius-inner);
  background: none;
  color: var(--ink-3);
  font-size: var(--fs-meta);
  font-weight: var(--fw-medium);
  cursor: pointer;
  white-space: nowrap;
}
.pn-tab:hover:not(:disabled) {
  color: var(--ink-1);
}
.pn-tab.is-on {
  background: var(--surface-3);
  color: var(--ink-1);
}
.pn-tab:disabled {
  opacity: 0.4;
  cursor: default;
}
.pn-tab:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* sparkline */
.pn-spark {
  display: block;
  width: 100%;
  height: 34px;
}
.pn-spark-line {
  fill: none;
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.pn-spark.t-good .pn-spark-line {
  stroke: var(--up);
}
.pn-spark.t-bad .pn-spark-line {
  stroke: var(--down);
}
.pn-spark-area {
  stroke: none;
  opacity: 0.12;
}
.pn-spark.t-good .pn-spark-area {
  fill: var(--up);
}
.pn-spark.t-bad .pn-spark-area {
  fill: var(--down);
}

/* key-value, sections, tables */
.pn-kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-1h) var(--sp-4);
  margin: 0;
}
.pn-kv dt {
  color: var(--ink-3);
}
.pn-kv dd {
  margin: 0;
  min-width: 0;
}
.pn-sec {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-1);
  color: var(--ink-2);
  font-size: var(--fs-meta);
  font-weight: var(--fw-strong);
}
.pn-sec-r {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.pn-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}
.pn-table th {
  height: 26px;
  padding: 0 var(--sp-2);
  border-bottom: 1px solid var(--rule-2);
  color: var(--ink-3);
  font: var(--fw-medium) var(--fs-micro) var(--sans);
  text-align: left;
}
.pn-table td {
  height: var(--row-h);
  padding: var(--sp-1) var(--sp-2);
  border-bottom: 1px solid var(--rule-1);
  vertical-align: middle;
}

/* addresses */
.pn-addrwrap {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.pn-addr {
  font-size: var(--fs-meta);
  color: var(--ink-2);
}
a.pn-addr:hover {
  color: var(--ink-1);
}
.pn-copy {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
}
.pn-copy:hover {
  color: var(--ink-1);
  background: var(--surface-3);
}
.pn-copy.is-done {
  color: var(--fine);
}

/* third-party embeds */
.pn-embed {
  display: block;
  flex: 1;
  width: 100%;
  min-height: 160px;
  border: 0;
  background: var(--bg-2);
}

/* ---------------------------------------------------------------- overview */
.ov-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ov-logo {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-3);
  flex: none;
}
.ov-name {
  font: 600 15px var(--sans);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.ov-sym {
  color: var(--dim);
  font-size: 13px;
}
.ov-price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.ov-price-v {
  font: 650 22px/1.1 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.ov-changes {
  display: inline-flex;
  gap: 10px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.ov-ch i {
  font-style: normal;
  color: var(--faint);
  margin-right: 4px;
}
.ov-price .pn-srctag {
  margin-left: auto;
}
.ov-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 8px 14px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
}
.ov-txns {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.ov-ratio {
  display: inline-block;
  width: 34px;
  height: 4px;
  margin-left: 6px;
  border-radius: 2px;
  background: var(--bad, var(--red));
  overflow: hidden;
  vertical-align: middle;
}
.ov-ratio span {
  display: block;
  height: 100%;
  background: var(--good, var(--acc));
}
.ov-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---------------------------------------------------------------- embed panel */
.em-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
}
.em-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.em-card:hover {
  border-color: var(--line-3);
  background: var(--panel-3);
}
.em-card.is-on {
  border-color: var(--acc-dim);
}
.em-card b {
  font-weight: 600;
  font-size: 12.5px;
}
.em-card span {
  color: var(--dim);
  font-size: 11px;
}
.em-card i {
  position: absolute;
  top: 6px;
  right: 8px;
  color: var(--acc);
  font-style: normal;
  font-size: 10px;
}
.em-form,
.lc-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 560px;
}
.lc-form p {
  margin: 0;
  color: var(--text-2);
  line-height: 1.5;
}

/* ---------------------------------------------------------------- safety */
.sf-verdict {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 11px;
  border: 1px solid var(--line-2);
  border-left-width: 3px;
  border-radius: 6px;
  background: var(--bg-2);
}
.sf-verdict b {
  font-size: 14px;
  font-weight: 600;
}
.sf-verdict span {
  color: var(--dim);
  font-size: 11.5px;
}
.sf-verdict.t-good {
  border-left-color: var(--good, var(--acc));
}
.sf-verdict.t-warn {
  border-left-color: var(--warn, var(--amber));
}
.sf-verdict.t-bad {
  border-left-color: var(--bad, var(--red));
}
.sf-verdict.is-wait {
  border-left-color: var(--line-3);
  color: var(--text-2);
}
.sf-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sf-group-h {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
  color: var(--dim);
  font-size: 10.5px;
  font-weight: 600;
}
.sf-group-h span {
  color: var(--faint);
}
.sf-flag {
  display: grid;
  grid-template-columns: 8px 1fr;
  align-items: start;
  gap: 2px 8px;
  padding: 4px 0;
  line-height: 1.4;
}
.sf-dot {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--dim);
}
.sf-flag.l-danger .sf-dot {
  background: var(--bad, var(--red));
  box-shadow: 0 0 0 3px rgba(255, 91, 87, 0.15);
}
.sf-flag.l-warn .sf-dot {
  background: var(--warn, var(--amber));
}
.sf-flag.l-good .sf-dot {
  background: var(--good, var(--acc));
}
.sf-flag.l-info .sf-dot {
  background: var(--blue);
}
.sf-flag.l-good .sf-text {
  color: var(--text-2);
}
.sf-srcs {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.sf-srcs .pn-chip {
  height: 16px;
  font-size: 10px;
}
.sf-links {
  padding-top: 2px;
}

/* ---------------------------------------------------------------- holders */
.ho-conc {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ho-conc-h {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text-2);
}
.ho-conc-h b {
  font-size: 16px;
}
.ho-conc-h .pn-srctag {
  margin-left: auto;
}
.ho-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 8px;
}
.ho-stats:empty {
  display: none;
}
.ho-table .c-n {
  width: 26px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.ho-table .c-p {
  position: relative;
  width: 72px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ho-table th.c-p {
  text-align: right;
}
.ho-table tr.is-pool td {
  color: var(--dim);
}
.ho-who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 5px;
  min-width: 0;
}
.ho-who .pn-chip {
  height: 16px;
  font-size: 10px;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ho-bar {
  position: absolute;
  right: 6px;
  bottom: 3px;
  height: 2px;
  max-width: 60px;
  border-radius: 1px;
  background: var(--line-3);
}
.ho-pct {
  position: relative;
}
.ho-from {
  color: var(--faint);
  font-size: 11px;
}

/* ---------------------------------------------------------------- socials */
.so-account {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.so-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--panel-3);
}
.so-avatar.sm {
  width: 24px;
  height: 24px;
}
.so-acc-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.so-acc-name {
  display: flex;
  align-items: center;
  gap: 6px;
}
.so-acc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  color: var(--dim);
  font-size: 11.5px;
}
.so-bio {
  margin: 0;
  color: var(--text-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.so-tweet,
.so-tg-post {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
}
.so-tweet.is-err p {
  margin: 0;
  color: var(--text-2);
}
.so-tg-post p {
  margin: 0;
  color: var(--text-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.so-tw-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.so-tw-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.so-media {
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr 1fr;
}
.so-media.n1 {
  grid-template-columns: 1fr;
}
.so-media-a {
  position: relative;
  display: block;
  border-radius: 6px;
  overflow: hidden;
  background: var(--panel-3);
}
.so-media-img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}
.so-media-a.is-video::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 22px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}
.so-quote,
.so-note {
  padding: 6px 8px;
  border-left: 2px solid var(--line-3);
  color: var(--text-2);
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.so-note {
  border-left-color: var(--amber);
}
.so-tw-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: var(--dim);
  font-size: 11.5px;
}
.so-embed {
  display: flex;
  min-height: 320px;
  border-radius: 8px;
  overflow: hidden;
}
.so-tg {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.so-tg-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.so-site {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text-2);
}
.so-site .pn-link {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- larpcheck */
.lc-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.lc-verdict {
  font: 700 18px/1.1 var(--sans);
  letter-spacing: 0.02em;
}
.lc-score {
  color: var(--dim);
  font-size: 12px;
}
.lc-score b {
  color: var(--text);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.lc-title {
  font-weight: 600;
}
.lc-headline {
  margin: 0;
  line-height: 1.5;
}
.lc-call {
  margin: 0;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--text-2);
}
.lc-stamps {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lc-stamp {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.lc-stamp-id {
  width: 42px;
  color: var(--dim);
  font-size: 11px;
}
.lc-stamp-score {
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}
.lc-stamp-line {
  color: var(--dim);
  font-size: 11.5px;
}
.lc-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--dim);
  font-size: 11.5px;
}
.lc-none {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lc-none p {
  margin: 0;
  color: var(--text-2);
  line-height: 1.5;
}

/* ---------------------------------------------------------------- pump.fun */
.pf-curve {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pf-curve-h {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pf-logo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-3);
}
.pf-curve .pn-meter {
  height: 8px;
}
.pf-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: end;
  gap: 14px;
}
.pf-spark {
  min-width: 80px;
}
.pf-hs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.pf-creator {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pf-cr-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.pf-others {
  display: flex;
  flex-direction: column;
}
.pf-other {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 4px;
  border-radius: 4px;
  color: var(--text-2);
  text-decoration: none;
}
.pf-other:hover {
  background: var(--panel-2);
  text-decoration: none;
}
.pf-other span:not(.pn-note):not(.pn-chip) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.pf-tape {
  display: flex;
  flex-direction: column;
  font: 11.5px var(--sans);
  font-variant-numeric: tabular-nums;
}
.pf-trade {
  display: grid;
  grid-template-columns: 34px 1fr auto 72px 34px;
  gap: 8px;
  padding: 2px 4px;
  border-radius: 3px;
}
.pf-trade.is-buy .pf-side {
  color: var(--good, var(--acc));
}
.pf-trade.is-sell .pf-side {
  color: var(--bad, var(--red));
}
.pf-trade.is-dev {
  background: rgba(230, 187, 69, 0.08);
}
.pf-trade.is-dev .pf-who {
  color: var(--warn, var(--amber));
}
.pf-sol,
.pf-who,
.pf-at {
  color: var(--dim);
  text-align: right;
}
.pf-usd {
  text-align: right;
}

/* ---------------------------------------------------------------- custom */
.cu-frame {
  flex: 1;
  display: flex;
  min-height: 0;
}
.cu-frame iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--bg-2);
}
.cu-pick {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ================================================================ v3 narrative panels
   story (st-), x (xp-), media (mx-), stats (sx-), website (ws-), source badges (pn-si).
   Calm: big readable type, few borders, generous spacing. Each panel is a size container so it
   lays out by its own width (narrow column or full board). */

.pn-story,
.pn-x,
.pn-media,
.pn-stats,
.pn-site {
  container-type: inline-size;
}

/* source badge: a small round glyph; the name is shown as text next to it where it matters */
.pn-si {
  --si: 16px;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--si);
  height: var(--si);
  border-radius: 50%;
  background: var(--panel-3);
  color: var(--text-2);
  font: 700 calc(var(--si) * 0.56) / 1 var(--sans);
  vertical-align: middle;
}
.pn-si svg {
  width: 62%;
  height: 62%;
  fill: currentColor;
}
.pn-si .ico {
  width: 70%;
  height: 70%;
}
.pn-si.si-x {
  background: #e7e9ea;
  color: #000;
}
.pn-si.si-telegram {
  background: #2aabee;
  color: #fff;
}
.pn-si.si-dexscreener {
  background: #1c1c1f;
  color: #e9e9ea;
  box-shadow: inset 0 0 0 1px var(--line-3);
}
.pn-si.si-pumpfun {
  background: #12352a;
  color: #86efac;
}
.pn-si.si-geckoterminal {
  background: #243b1f;
  color: #9be15d;
}
.pn-si.si-jupiter {
  background: #2a3417;
  color: #c7f284;
}
.pn-si.si-discord {
  background: #5865f2;
  color: #fff;
}
.pn-si.si-user {
  background: var(--acc-dim);
  color: var(--acc);
}
.pn-si.si-site,
.pn-si.si-browser {
  background: #17283a;
  color: var(--blue);
}

/* buttons with a leading icon */
.pn-ibtn.pn-ibtn {
  gap: 6px;
  text-decoration: none;
  color: var(--text-2);
}
.pn-ibtn:hover {
  color: var(--text);
}
.pn-ibtn.btn-primary {
  color: var(--ink-on-accent);
}
.pn-ibtn .pn-si {
  --si: 14px;
}

/* images fetched as bytes show a quiet placeholder until the blob arrives */
img.is-fetching,
video.is-fetching {
  background: linear-gradient(90deg, var(--panel-2) 0%, var(--panel-3) 40%, var(--panel-2) 80%);
  background-size: 300% 100%;
  animation: pn-shimmer 1.4s linear infinite;
}

/* ---------------------------------------------------------------- story
   Tight: the header above already names the coin, so the head is one small line; sources sit
   inline after each description; exact times are on hover. */
.pn-story .pn-body {
  gap: 10px;
  padding: 4px var(--pad-panel) 12px;
}
.st-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.st-logo {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  object-fit: cover;
  flex: none;
  background: var(--panel-3);
}
.st-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 10px;
  min-width: 0;
}
.st-name {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.st-name b {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--text);
}
.st-sym {
  color: var(--acc);
  font: 600 13px var(--sans);
}
.st-id {
  color: var(--text-2);
  font-size: 12.5px;
}
.st-moving {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--panel-2);
  border-left: 3px solid var(--line-3);
}
.st-moving.is-up {
  border-left-color: var(--good);
  background: rgba(217, 191, 134, 0.05);
}
.st-moving.is-down {
  border-left-color: var(--bad);
  background: rgba(255, 91, 87, 0.05);
}
.st-mv-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 8px;
}
.st-mv-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
}
.st-mv-line {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.st-moving.is-up .st-mv-line {
  color: var(--good);
}
.st-moving.is-down .st-mv-line {
  color: var(--bad);
}
.st-mv-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.st-fact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: 10px;
  background: var(--panel-3);
  color: var(--text-2);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.st-fact.is-up {
  color: var(--good);
}
.st-fact.is-down {
  color: var(--bad);
}
.st-fact.is-paid {
  color: var(--amber);
  background: rgba(230, 187, 69, 0.08);
}
.st-descs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.st-desc {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.st-desc-src {
  display: flex;
  gap: 2px;
  padding-top: 2px;
  flex: none;
}
.st-desc-main {
  min-width: 0;
}
.st-desc-main p {
  display: inline;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.st-desc-from {
  margin-left: 6px;
  color: var(--dim);
  font-size: 11px;
  white-space: nowrap;
}
.st-none {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
}
.st-launch {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: 0;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.45;
}
.st-launch .ico {
  margin-top: 2px;
  color: var(--dim);
}
.st-when {
  display: none;
}

/* ---------------------------------------------------------------- x
   Dense: the linked post first (one meta line, full text, media), the account on one line, then the
   latest posts as a horizontal strip of mini cards. */
.pn-x .pn-body {
  gap: 10px;
  padding: 2px var(--pad-panel) 12px;
}
.pn-x .pn-bar {
  min-height: 30px;
}
.xp-accs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.xp-acc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px 0 4px;
  border: 1px solid var(--rule-2);
  border-radius: 12px;
  background: none;
  color: var(--ink-2);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.xp-acc:not(:has(img)) {
  padding-left: 9px;
}
.xp-acc.is-on {
  border-color: var(--accent-line);
  background: var(--accent-wash);
  color: var(--ink-1);
}
.xp-acc-av {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
}
.xp-av {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-3);
}
.xp-n {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--ink-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.xp-n .ico {
  color: var(--ink-4);
}
.xp-open {
  flex: none;
  width: 24px;
  height: 24px;
  color: var(--ink-3);
}
.xp-time {
  color: var(--ink-3);
  font-size: 12px;
  white-space: nowrap;
}
/* the linked post */
.xp-post {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.xp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 7px;
  min-width: 0;
  font-size: 13px;
}
.xp-who {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-1);
}
.xp-handle {
  white-space: nowrap;
}
.xp-counts {
  display: inline-flex;
  gap: 10px;
}
.xp-text {
  margin: 0;
  color: var(--ink-1);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.xp-text.is-long:not(.is-open) {
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.xp-showall {
  align-self: flex-start;
  font-size: 12.5px;
}
.xp-post-body,
.xp-post-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
@container (min-width: 520px) {
  .xp-post-body {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
  }
  .xp-post-col {
    flex: 1;
  }
  .xp-post-body > .xp-media {
    flex: 0 0 38%;
  }
  .xp-post-body > .xp-media.n1 {
    justify-items: end;
  }
}
.xp-media {
  display: grid;
  gap: 3px;
  grid-template-columns: 1fr 1fr;
  border-radius: 8px;
  overflow: hidden;
}
.xp-media.n1 {
  grid-template-columns: 1fr;
  justify-items: start;
}
.xp-media-a {
  position: relative;
  display: block;
  max-width: 100%;
  background: var(--panel-3);
}
.xp-media.n1 .xp-media-a {
  border-radius: 8px;
  overflow: hidden;
}
.xp-media-img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 200px;
  min-height: 64px;
  object-fit: cover;
}
.xp-media.n1 .xp-media-img {
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.xp-play,
.mx-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}
.xp-play .ico,
.mx-play .ico {
  fill: currentColor;
}
.xp-quote,
.xp-cnote {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  font-size: 13px;
}
.xp-quote p,
.xp-cnote p {
  margin: 0;
  color: var(--text-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.xp-cnote {
  border-color: var(--amber-dim);
}
.xp-cnote b {
  color: var(--amber);
}
/* one-line rows: the account, notes */
.xp-acct,
.xp-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 8px;
  min-width: 0;
  padding: 6px 0 0;
  border-top: 1px solid var(--rule-1, var(--line));
  font-size: 13px;
}
.xp-post + .xp-acct {
  margin-top: 2px;
}
.xp-acct:first-child,
.xp-line:first-child {
  border-top: 0;
  padding-top: 0;
}
.xp-acct-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-1);
}
.xp-verified {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--info);
  color: var(--ink-on-accent, #fff);
}
.xp-n.is-young {
  color: var(--caution);
}
.xp-n.is-young .ico {
  color: var(--caution);
}
.xp-line.is-err > span:first-child {
  color: var(--text-2);
}
/* latest posts: a strip of mini cards */
.xp-latest {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.xp-sec {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 600;
}
.xp-sec .pn-link {
  font-weight: 400;
}
.xp-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.xp-mini {
  position: relative;
  flex: none;
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--panel-2);
  color: inherit;
  text-decoration: none;
  scroll-snap-align: start;
}
.xp-mini:hover {
  background: var(--panel-3);
}
.xp-mini:has(.xp-mini-thumb) .xp-mini-text {
  padding-right: 34px;
}
.xp-mini-text {
  margin: 0;
  color: var(--ink-1);
  font-size: 12.5px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.xp-mini-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: var(--ink-3);
  font-size: 11.5px;
}
.xp-mini-foot .xp-n {
  font-size: 11.5px;
}
.xp-mini-thumb {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 30px;
  height: 30px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--panel-3);
}
.xp-mini-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@container (max-width: 460px) {
  .xp-counts {
    gap: 7px;
  }
}

/* ---------------------------------------------------------------- media */
.pn-media {
  outline: none;
  position: relative;
}
.pn-media.is-drop::after {
  content: "Drop to save into this case";
  position: absolute;
  inset: 6px;
  display: grid;
  place-items: center;
  border: 2px dashed var(--acc);
  border-radius: 12px;
  background: rgba(7, 9, 10, 0.8);
  color: var(--acc);
  font-size: 15px;
  font-weight: 600;
  pointer-events: none;
  z-index: 2;
}
.pn-media .pn-body {
  padding: 4px var(--pad-panel) 12px;
}
/* Dense tiles: the source is a tiny badge; label, age and caption show on hover or focus. */
.mx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 6px;
}
.mx-tile {
  position: relative;
  margin: 0;
  min-width: 0;
  border-radius: 7px;
  overflow: hidden;
}
.mx-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 7px;
  overflow: hidden;
  background: var(--panel-2);
  cursor: zoom-in;
}
.mx-thumb:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: -2px;
}
.mx-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mx-tile.is-logo .mx-img {
  object-fit: contain;
  padding: 14%;
}
.mx-img.is-missing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--faint);
  font-size: 11px;
}
.mx-tile.is-user .mx-thumb {
  box-shadow: inset 0 0 0 2px var(--acc-dim);
}
.mx-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  display: grid;
  place-items: center;
  padding: 2px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.mx-tile figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 16px 6px 5px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8) 45%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
}
.mx-tile:hover figcaption,
.mx-tile:focus-within figcaption,
.mx-tile.has-cap figcaption {
  opacity: 1;
  pointer-events: auto;
}
.mx-tile.has-cap:not(:hover, :focus-within) .mx-src {
  display: none;
}
.mx-src {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #e8e4d6;
  font-size: 11px;
}
.mx-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.mx-at {
  margin-left: auto;
  color: #b9b5a6;
  white-space: nowrap;
  flex: none;
}
.mx-cap {
  margin: 0;
  color: #f2eee0;
  font-size: 11.5px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mx-cap-in {
  width: 100%;
  height: 22px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.35);
  color: #f2eee0;
  font: 11.5px var(--sans);
}
.mx-cap-in:hover {
  border-color: var(--line-2);
}
.mx-cap-in:focus {
  outline: none;
  border-color: var(--acc-dim);
}
.mx-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  aspect-ratio: 1;
  border: 1.5px dashed var(--line-3);
  border-radius: 7px;
  background: none;
  color: var(--text-2);
  cursor: pointer;
  font-size: 11.5px;
}
.mx-add span {
  color: var(--dim);
  font-size: 10.5px;
  text-align: center;
}
.mx-add:hover {
  border-color: var(--acc);
  color: var(--text);
}
.mx-drop {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 160px;
  padding: 20px;
  border: 1.5px dashed var(--line-3);
  border-radius: 12px;
  color: var(--text-2);
  text-align: center;
}
.mx-drop b {
  font-size: 15px;
  color: var(--text);
}
.mx-drop .ico {
  color: var(--dim);
}
@container (max-width: 420px) {
  .mx-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* lightbox (appended to document.body) */
.mx-lb {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 48px 16px 16px;
  background: rgba(4, 6, 7, 0.97);
  backdrop-filter: blur(6px);
  outline: none;
}
.mx-lb-close {
  position: absolute;
  top: 10px;
  right: 12px;
  gap: 6px;
}
.mx-lb-stage {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  place-items: center;
  min-height: 0;
}
.mx-lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
}
.mx-lb-nav {
  grid-row: 1;
  align-self: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--panel-3);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.mx-lb-nav.is-prev {
  grid-column: 1;
}
.mx-lb-nav.is-next {
  grid-column: 3;
}
.mx-lb-nav:disabled {
  opacity: 0.3;
  cursor: default;
}
.mx-lb-meta {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  color: var(--text-2);
}
.mx-lb-src {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.mx-lb-src b {
  color: var(--text);
}
.mx-lb-cap {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}
.mx-lb-count {
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- stats */
.pn-stats .pn-body {
  justify-content: center;
  padding: 8px 16px;
}
.sx-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px 18px;
  align-items: start;
}
.sx-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sx-l {
  color: var(--dim);
  font-size: 11px;
  white-space: nowrap;
}
.sx-v {
  color: var(--text);
  font: 600 16px/1.25 var(--sans);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sx-s {
  color: var(--dim);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sx-ch {
  display: inline-flex;
  gap: 8px;
}
.sx-bar {
  display: block;
  height: 4px;
  margin-top: 4px;
  border-radius: 2px;
  background: var(--bad);
  overflow: hidden;
}
.sx-bar > span {
  display: block;
  height: 100%;
  background: var(--good);
}
.sx-skel {
  width: 70px;
  height: 16px;
}
@container (max-width: 520px) {
  .sx-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------------------------------------------------------------- website */
.pn-site .pn-body {
  gap: 12px;
  padding: 14px 16px;
}
.ws-domain {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: var(--text-2);
}
.ws-domain b {
  color: var(--text);
  font-size: 14px;
}
.ws-ext {
  opacity: 0.7;
}
.ws-head {
  --ws-accent: var(--line-3);
  display: flex;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel-2);
  border-left: 3px solid var(--ws-accent);
}
.ws-og-wrap {
  flex: none;
  width: 42%;
  max-width: 260px;
  aspect-ratio: 1.91 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-3);
  order: 2;
}
.ws-og {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ws-head-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.ws-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ws-title b {
  font-size: 15px;
  line-height: 1.3;
}
.ws-fav {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex: none;
}
.ws-desc {
  margin: 0;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.5;
}
.ws-sec {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
}
.ws-cas {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ws-ca {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.ws-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ws-excerpt {
  margin: 0;
  padding: 2px 0 2px 12px;
  border-left: 2px solid var(--line-3);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@container (max-width: 480px) {
  .ws-head {
    flex-direction: column;
  }
  .ws-og-wrap {
    width: 100%;
    max-width: none;
    order: 0;
  }
}

/* ================================================================ sketch (sk-) */
/* ---------------------------------------------------------------- sketch */
.sk-bar {
  flex-wrap: wrap;
  gap: 6px 10px;
  overflow: visible;
}
.sk-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.sk-tool.is-on {
  background: var(--panel-3);
  color: var(--acc);
  border-color: var(--line-2);
}
.sk-swatch {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--sk-c);
  background-clip: content-box;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.sk-swatch.is-on {
  border-color: var(--text-2);
}
.sk-width {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: none;
  cursor: pointer;
}
.sk-width span {
  display: block;
  border-radius: 50%;
  background: var(--text-2);
}
.sk-width.is-on {
  border-color: var(--line-2);
  background: var(--panel-3);
}
.sk-body.sk-body {
  padding: 0;
}
.sk-stage {
  position: relative;
  flex: 1;
  min-height: 160px;
  overflow: hidden;
  background: var(--panel);
  outline: none;
  touch-action: none;
}
.sk-stage.is-drop {
  box-shadow: inset 0 0 0 2px var(--acc);
}
.sk-bg,
.sk-ink {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.sk-ink {
  cursor: crosshair;
}
.sk-stage[data-tool="note"] .sk-ink {
  cursor: copy;
}
.sk-stage[data-tool="eraser"] .sk-ink {
  cursor: cell;
}
.sk-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: var(--dim);
  text-align: center;
}
.sk-hint p {
  margin: 0;
  max-width: 34ch;
  line-height: 1.5;
}
.sk-notes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.sk-note {
  position: absolute;
  width: 170px;
  max-width: 60%;
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  background: rgba(230, 187, 69, 0.92);
  color: var(--ink-on-accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
}
.sk-note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 16px;
  padding: 0 2px 0 4px;
}
.sk-note-grip {
  flex: 1;
  height: 100%;
  cursor: grab;
  color: rgba(26, 20, 5, 0.5);
  display: flex;
  align-items: center;
  touch-action: none;
}
.sk-note-del {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: none;
  color: rgba(26, 20, 5, 0.65);
  cursor: pointer;
}
.sk-note-del:hover {
  background: rgba(0, 0, 0, 0.12);
  color: var(--ink-on-accent);
}
.sk-note-text {
  resize: none;
  border: 0;
  padding: 0 8px 7px;
  background: none;
  color: inherit;
  font: 12px/1.35 var(--sans);
  outline: none;
  overflow: hidden;
}
.sk-note-text::placeholder {
  color: rgba(26, 20, 5, 0.5);
}
.sk-status.t-warn {
  color: var(--amber);
}

/* ================================================================ research steps (rs-), thesis (th-) */
/* ---------------------------------------------------------------- research steps (src/panels/steps.ts) */
.pn-steps {
  container-type: inline-size;
}
.rs-bar {
  justify-content: flex-end;
}
.rs-progress {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--ink-3);
  font-size: var(--fs-meta);
  white-space: nowrap;
}
.rs-progress-track {
  width: 96px;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-3);
  overflow: hidden;
}
.rs-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width var(--dur-3) var(--ease-out);
}
.rs-body.rs-body {
  gap: 0;
  padding: 0 var(--pad-panel) var(--sp-2);
}
/* Narrow (default): one column. Head, then links, then the note. */
.rs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "main" "side" "embed";
  gap: var(--sp-2);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--rule-1);
}
.rs-row:last-child {
  border-bottom: 0;
}
.rs-head {
  grid-area: head;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  min-width: 0;
}
.rs-tick {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.rs-label {
  display: flex;
  gap: var(--sp-2);
  min-width: 0;
  cursor: pointer;
}
.rs-ic {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-inner);
  background: var(--surface-3);
  color: var(--ink-2);
}
.rs-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rs-title {
  color: var(--ink-1);
  font-size: 14px;
  font-weight: var(--fw-strong);
  line-height: 22px;
}
.rs-hint {
  color: var(--ink-3);
  font-size: var(--fs-meta);
  line-height: 1.45;
  max-width: 56ch;
}
.rs-row.is-done .rs-title {
  color: var(--ink-2);
}
.rs-row.is-done .rs-ic {
  background: var(--accent-wash);
  color: var(--accent);
}
.rs-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-width: 0;
}
.rs-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px var(--sp-1);
}
.rs-links .pn-ibtn {
  gap: var(--sp-1h);
  max-width: 100%;
  height: 28px;
  padding: 0 var(--sp-2) 0 var(--sp-1h);
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--ink-2);
  font-size: 13px;
}
.rs-links .pn-ibtn:hover {
  background: var(--surface-3);
  color: var(--ink-1);
}
.rs-links .pn-ibtn > .ico {
  color: var(--ink-3);
}
.rs-links .pn-ibtn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rs-pair {
  display: inline-flex;
  align-items: center;
  gap: 0;
}
.rs-embed-btn {
  gap: var(--sp-1);
  color: var(--ink-3);
  font-size: var(--fs-meta);
}
.rs-embed-btn.is-on {
  color: var(--accent);
}
.rs-none,
.rs-sim-none {
  margin: 0;
  color: var(--ink-3);
  font-size: var(--fs-meta);
}
.rs-side {
  grid-area: side;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
/* The one-line note is the user's words: serif, an underline field rather than a box. */
.rs-note.input {
  width: 100%;
  height: 30px;
  padding: 0 var(--sp-1);
  border: 0;
  border-bottom: 1px dashed var(--rule-2);
  border-radius: 0;
  background: none;
  color: var(--ink-1);
  font: 420 15px var(--font-voice);
}
.rs-note.input:hover {
  border-bottom-color: var(--rule-3);
}
.rs-note.input:focus {
  border-bottom: 1px solid var(--accent);
  box-shadow: none;
}
.rs-note.input::placeholder {
  color: var(--ink-4);
  font-style: italic;
}
.rs-status {
  min-height: 14px;
  color: var(--ink-4);
  font-size: var(--fs-micro);
}
.rs-status.is-ok {
  color: var(--ink-3);
}
.rs-status.is-err {
  color: var(--caution);
}
.rs-embed {
  grid-area: embed;
  display: flex;
  flex-direction: column;
  height: 420px;
  border-radius: var(--radius-media);
  background: var(--surface-sunk);
  overflow: hidden;
}
.rs-embed[hidden] {
  display: none;
}
.rs-embed-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-2);
  border-bottom: 1px solid var(--rule-1);
  color: var(--ink-2);
  font-size: var(--fs-meta);
}
.rs-embed .pn-embed {
  flex: 1;
  width: 100%;
  border: 0;
}
.rs-sim-h {
  color: var(--ink-3);
  font-size: var(--fs-meta);
}
.rs-sim {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rs-sim li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px var(--sp-3);
  padding: 3px 0;
  font-size: 13px;
}
.rs-sim-sym {
  color: var(--ink-1);
}
.rs-sim-name {
  color: var(--ink-2);
}
.rs-sim-meta {
  color: var(--ink-3);
  font-size: var(--fs-meta);
}
/* Medium: the step on the left, its links and note stacked on the right. */
@container (min-width: 560px) {
  .rs-row {
    grid-template-columns: minmax(170px, 230px) minmax(0, 1fr);
    grid-template-areas: "head main" "head side" "embed embed";
    column-gap: var(--sp-5);
    row-gap: var(--sp-1);
    align-items: start;
  }
  .rs-row:not(:has(.rs-embed:not([hidden]))) {
    grid-template-areas: "head main" "head side";
  }
}
/* Wide: three columns, the note gets its own. */
@container (min-width: 1040px) {
  .rs-row {
    grid-template-columns: minmax(200px, 260px) minmax(0, 1fr) minmax(200px, 280px);
    grid-template-areas: "head main side" "embed embed embed";
  }
  .rs-row:not(:has(.rs-embed:not([hidden]))) {
    grid-template-areas: "head main side";
  }
}

/* ---------------------------------------------------------------- thesis (src/panels/thesis.ts) */
.th-body.th-body {
  gap: 4px;
  padding: 12px 16px 8px;
}
.th-text {
  width: 100%;
  min-height: 52px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px dashed transparent;
  background: transparent;
  color: var(--text);
  font: 500 18px/1.45 var(--sans);
  resize: none;
  overflow: hidden;
  outline: none;
}
.th-text::placeholder {
  color: var(--faint);
  font-weight: 400;
}
.th-text:hover,
.th-text:focus {
  border-bottom-color: var(--line-3);
}
.th-status {
  min-height: 14px;
  color: var(--faint);
  font-size: 11px;
}
.th-status.is-err {
  color: var(--amber);
}

/* ---- notes editor (nt-) ---- */
/* ---------------------------------------------------------------- notes editor (src/notes/editor.ts)
   The user's words: reading serif, big and plain. Used by the notes panel, the dock and the pop-out. */
.pn-notes.pn-notes {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.nt {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
  container-type: inline-size;
}
/* A notepad: plain text, a reading serif, a comfortable measure. The faint rules sit on the baseline
   grid and scroll with the text; they fade out where the text column ends. */
.nt-ta {
  --nt-lh: 26px;
  --nt-pad: var(--sp-5);
  flex: 1;
  min-height: 120px;
  width: 100%;
  max-width: calc(66ch + 2 * var(--nt-pad));
  box-sizing: border-box;
  margin: 0;
  padding: var(--sp-4) var(--nt-pad) var(--sp-10);
  border: 0;
  outline: none;
  resize: none;
  background: repeating-linear-gradient(to bottom, transparent 0 calc(var(--nt-lh) - 1px), rgba(255, 248, 225, 0.035) calc(var(--nt-lh) - 1px) var(--nt-lh)) 0 calc(var(--sp-4) - 3px) / 100% 100% local;
  color: var(--ink-1);
  font-family: var(--font-voice);
  font-size: 17px;
  font-weight: 400;
  font-optical-sizing: auto;
  line-height: var(--nt-lh);
  letter-spacing: 0.003em;
  font-variant-numeric: lining-nums tabular-nums;
  tab-size: 3;
  caret-color: var(--accent);
  scrollbar-gutter: stable;
}
@container (min-width: 640px) {
  .nt-ta {
    --nt-pad: var(--sp-10);
    padding-top: var(--sp-8);
    align-self: center;
    background-position-y: calc(var(--sp-8) - 3px);
  }
}
.nt-ta::placeholder {
  color: var(--ink-4);
  font-style: italic;
}
.nt-ta:disabled {
  opacity: 0.6;
}
.nt-ta::selection {
  background: rgba(217, 191, 134, 0.3);
}
.nt-foot {
  flex: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-1h) var(--sp-3);
  min-height: 40px;
  padding: var(--sp-1h) var(--sp-5);
  box-shadow: inset 0 1px 0 var(--rule-1);
  font-family: var(--font-ui);
}
.nt-grow {
  flex: 1 1 auto;
}
.nt-status {
  color: var(--ink-3, var(--dim, #8d8b7d));
  font-size: var(--fs-micro, 11px);
  white-space: nowrap;
}
.nt-status.is-err {
  color: var(--caution, var(--amber, #e6bb45));
}
.nt-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  min-width: 0;
}
.nt-chips[hidden] {
  display: none;
}
.nt-chips-l {
  color: var(--ink-3, var(--dim, #8d8b7d));
  font-size: var(--fs-micro, 11px);
  margin-right: 2px;
}
.nt-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 var(--sp-2);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  color: var(--ink-2, var(--text-2, #bdb9a9));
  font: var(--fs-meta, 12px) var(--font-ui, system-ui, sans-serif);
  cursor: pointer;
}
.nt-chip:hover:not(:disabled) {
  background: var(--rule-3);
  color: var(--ink-1, var(--text, #ece7d8));
}
.nt-chip:disabled {
  cursor: default;
}
.nt-chip .ico {
  opacity: 0.7;
}
.nt-conflict {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 8px var(--sp-4, 16px);
  background: var(--caution-wash, rgba(230, 187, 69, 0.12));
  color: var(--caution-ink, var(--amber, #f3dc9c));
  font: var(--fs-meta, 12px) var(--font-ui, system-ui, sans-serif);
}
.nt-conflict[hidden] {
  display: none;
}

/* ---- posts (po-) + wallet (wa-) ---- */
/* ---------------------------------------------------------------- posts (po-) */
.pn-posts {
  container-type: inline-size;
}
.pn-posts .pn-body {
  gap: 12px;
  padding: 12px 14px;
}
.po-accts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0;
}
.pn-posts .pn-bar {
  overflow: visible;
  flex-wrap: wrap;
  height: auto;
}
.po-acct {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--rule-2, var(--line-2));
  border-radius: 12px;
  background: transparent;
  color: var(--ink-2, var(--text-2));
  font-size: var(--fs-meta, 12px);
  cursor: pointer;
  white-space: nowrap;
}
.po-acct:hover {
  border-color: var(--rule-3, var(--line-3));
  color: var(--ink-1, var(--text));
}
.po-acct.is-on {
  border-color: var(--accent-line, var(--acc-dim));
  background: var(--accent-wash, rgba(217, 191, 134, 0.13));
  color: var(--ink-1, var(--text));
}
.po-acct .pn-si {
  --si: 12px;
}
.po-n {
  color: var(--ink-3, var(--dim));
  font-variant-numeric: tabular-nums;
}
.po-post {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--surface-2, var(--panel-2));
}
.po-head {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.po-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.po-who {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
  min-width: 0;
}
.po-time {
  color: var(--ink-3, var(--dim));
  font-size: var(--fs-meta, 12px);
  white-space: nowrap;
}
.po-repost {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.po-text {
  margin: 0;
  color: var(--ink-1, var(--text));
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.po-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border-radius: 8px;
  overflow: hidden;
}
.po-media.n1 {
  grid-template-columns: 1fr;
}
.po-media-a {
  position: relative;
  display: block;
  background: var(--surface-sunk, var(--panel-3));
}
.po-media-img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 180px;
  min-height: 70px;
  object-fit: cover;
}
.po-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}
.po-play .ico {
  fill: currentColor;
}
.po-quote {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--rule-2, var(--line-2));
}
.po-quote p {
  margin: 0;
  color: var(--ink-2, var(--text-2));
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.po-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  color: var(--ink-3, var(--dim));
  font-size: var(--fs-meta, 12px);
}
.po-foot b {
  color: var(--ink-2, var(--text-2));
  font-variant-numeric: tabular-nums;
}
.po-empty {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.po-more {
  align-self: center;
}

/* ---------------------------------------------------------------- wallet (wa-) */
.pn-wallet {
  container-type: inline-size;
}
.pn-wallet .pn-body {
  gap: 12px;
  padding: 12px 14px;
}
.wa-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wa-id {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--ink-2, var(--text-2));
}
.wa-id b {
  color: var(--ink-1, var(--text));
  font-size: 14px;
}
.wa-list {
  display: flex;
  flex-direction: column;
}
.wa-row {
  display: grid;
  grid-template-columns: 64px minmax(90px, 1fr) minmax(140px, 1.4fr) 82px auto;
  align-items: center;
  gap: 6px 12px;
  padding: 8px 2px;
  border-top: 1px solid var(--rule-1, var(--line));
  font-size: 12.5px;
}
.wa-row:first-child {
  border-top: 0;
}
.wa-dir {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-2, var(--text-2));
  font-weight: 520;
}
.wa-row.is-in .wa-dir {
  color: var(--info, var(--blue));
}
.wa-amt {
  color: var(--ink-1, var(--text));
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-cp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.wa-time {
  color: var(--ink-3, var(--dim));
  white-space: nowrap;
}
.wa-time-full {
  display: none;
}
.wa-acts {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}
.wa-done {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  color: var(--accent, var(--acc));
  font-size: var(--fs-meta, 12px);
}
.wa-evm {
  padding: 4px 0;
}
@container (max-width: 620px) {
  .wa-row {
    grid-template-columns: 56px 1fr auto;
    grid-template-areas: "dir amt time" "cp cp cp" "acts acts acts";
  }
  .wa-dir {
    grid-area: dir;
  }
  .wa-amt {
    grid-area: amt;
  }
  .wa-time {
    grid-area: time;
  }
  .wa-cp {
    grid-area: cp;
  }
  .wa-acts {
    grid-area: acts;
    justify-content: flex-start;
  }
}

/* ---- media: subject filter (mx-filter) ---- */
.mx-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.mx-chip { font: inherit; font-size: var(--fs-meta, 12px); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--rule-2, #3a3f34); background: var(--surface-2, #262920); color: var(--ink-2, #bdb9a9); cursor: pointer; }
.mx-chip:hover { border-color: var(--rule-3, #4d5345); color: var(--ink-1, #ece7d8); }
.mx-chip.is-on { background: var(--accent-wash, rgba(217,191,134,.13)); border-color: var(--accent-line, rgba(217,191,134,.45)); color: var(--ink-1, #ece7d8); }
.mx-sub { display: inline-block; font-size: var(--fs-micro, 11px); color: var(--ink-2, #bdb9a9); background: var(--surface-3, #30342a); border-radius: 4px; padding: 0 6px; margin-bottom: 3px; }

/* ---- compare (cm-) ----
   One scroller (the panel body) so the coin header and the label column both stay put. Rows snap,
   and a soft shade at the bottom edge says there's more below. */
.pn-compare .pn-body {
  overflow: auto;
  padding-top: 0;
  scroll-snap-type: y proximity;
  scroll-padding-top: 58px;
  background:
    linear-gradient(transparent, var(--surface-panel) 70%) 0 100% / 100% 36px no-repeat local,
    radial-gradient(farthest-side at 50% 100%, rgba(6, 7, 3, 0.55), transparent) 0 100% / 100% 16px no-repeat scroll;
}
.cm-scroll { overflow: visible; }
.cm-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.cm-table th, .cm-table td { height: 32px; padding: 0 var(--sp-3); border-bottom: 1px solid var(--rule-1); text-align: left; vertical-align: middle; white-space: nowrap; }
.cm-table tbody tr { scroll-snap-align: start; }
.cm-table thead th { position: sticky; top: 0; z-index: 2; height: 58px; background: var(--surface-panel); border-bottom: 1px solid var(--rule-2); }
.cm-table th.cm-l, .cm-one .cm-l { position: sticky; left: 0; z-index: 1; background: var(--surface-panel); color: var(--ink-3); font-size: var(--fs-meta); font-weight: var(--fw-regular); }
.cm-table thead th.cm-corner { left: 0; z-index: 3; min-width: 104px; }
.cm-table tr.cm-grp th { height: 30px; padding-top: var(--sp-2); border-bottom: 0; vertical-align: bottom; background: none; }
.cm-grp-l span { position: sticky; left: var(--sp-3); color: var(--ink-2); font: var(--fw-strong) var(--fs-micro) var(--sans); }
.cm-table tbody tr:not(.cm-grp):hover td, .cm-table tbody tr:not(.cm-grp):hover th.cm-l { background-color: rgba(255, 248, 225, 0.025); }
.cm-head { min-width: 150px; }
.cm-open { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-1) var(--sp-1h); margin-left: calc(-1 * var(--sp-1h)); border: 0; border-radius: var(--radius-control); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
button.cm-open:hover { background: var(--surface-2); }
div.cm-open { cursor: default; }
.cm-logo { flex: none; width: 28px; height: 28px; border-radius: 9px; object-fit: cover; background: var(--surface-sunk); }
.cm-head-t { display: flex; flex-direction: column; gap: 1px; line-height: 1.2; }
.cm-sym { display: inline-flex; align-items: center; gap: var(--sp-1h); color: var(--ink-1); font-weight: var(--fw-strong); }
.cm-head[style*="--ang"] .cm-sym::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ang); }
.cm-sub { max-width: 160px; overflow: hidden; text-overflow: ellipsis; color: var(--ink-3); font-size: var(--fs-micro); font-weight: var(--fw-regular); }
.cm-skel { display: inline-block; width: 48px; height: 10px; }
.cm-flags { display: inline-flex; flex-wrap: wrap; gap: var(--sp-1); }
.cm-flag { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 var(--sp-2) 0 var(--sp-1h); border-radius: var(--radius-pill); background: var(--danger-wash); color: var(--danger-ink); font-size: var(--fs-meta); }
.cm-noflag { color: var(--ink-3); font-size: var(--fs-meta); }
.cm-angle { display: inline-flex; align-items: center; gap: var(--sp-1h); }
.cm-angle::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ang); }
tr.is-yours th.cm-l, .cm-one-cell.is-yours .cm-l { color: var(--accent); }
.cm-vibe { display: inline-flex; gap: 1px; padding: 2px; border-radius: var(--radius-control); background: var(--surface-sunk); }
.cm-vibe-b { display: inline-flex; align-items: center; gap: var(--sp-1); height: 24px; padding: 0 var(--sp-1h); border: 0; border-radius: var(--radius-inner); background: none; color: var(--ink-2); font: 13px var(--sans); cursor: pointer; filter: grayscale(1) opacity(0.55); }
.cm-vibe-b:hover { filter: none; background: var(--surface-3); }
.cm-vibe-b.is-on { filter: none; background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--accent-line); color: var(--ink-1); }
.cm-vibe-b.v1.is-on .cm-vibe-l { color: var(--vibe-1); } .cm-vibe-b.v2.is-on .cm-vibe-l { color: var(--vibe-2); } .cm-vibe-b.v3.is-on .cm-vibe-l { color: var(--vibe-3); } .cm-vibe-b.v4.is-on .cm-vibe-l { color: var(--vibe-4); } .cm-vibe-b.v5.is-on .cm-vibe-l { color: var(--vibe-5); }
.cm-vibe-l { font-size: var(--fs-meta); }
.pn-compare .t-good { color: var(--up); }
.pn-compare .t-bad { color: var(--down); }
.cm-note { width: 100%; min-width: 150px; height: 28px; padding: 0 var(--sp-1); border: 0; border-bottom: 1px dashed var(--rule-2); border-radius: 0; background: transparent; color: var(--ink-1); font: 420 15px var(--font-voice); }
.cm-note::placeholder { color: var(--ink-4); font-style: italic; }
.cm-note:focus { outline: none; border-bottom: 1px solid var(--accent); }
.cm-one { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--sp-3) var(--sp-4); align-items: start; padding-top: var(--sp-1); }
.cm-one-head { grid-column: 1 / -1; }
.cm-one-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cm-one-cell .cm-l { position: static; background: none; }
.cm-one-cell.is-yours { grid-column: span 2; }

/* ---- angles (an-) ---- */
.an-body { display: flex; flex-direction: column; gap: var(--sp-3); }
.an-intro { margin: 0; }
.an-card { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-4); border-radius: var(--radius-media); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--ang); }
.an-head { display: flex; align-items: center; gap: var(--sp-2); }
.an-colors { position: relative; flex: none; display: inline-flex; }
.an-swatch { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 var(--sp-1h) 0 var(--sp-2); border: 0; border-radius: var(--radius-control); background: var(--surface-3); cursor: pointer; }
.an-swatch::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.an-swatch::after { content: ""; width: 0; height: 0; margin-top: 3px; border: 3.5px solid transparent; border-top-color: var(--ink-2); }
.an-swatch:hover, .an-swatch[aria-expanded="true"] { background: var(--rule-3); }
.an-swatch:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.an-palette { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; display: grid; grid-template-columns: repeat(4, 22px); gap: var(--sp-1h); padding: var(--sp-2); border-radius: var(--radius-control); background: var(--surface-3); box-shadow: var(--elev-2); }
.an-palette[hidden] { display: none; }
.an-color { width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0; background: var(--c); cursor: pointer; }
.an-color.is-on { box-shadow: 0 0 0 2px var(--surface-3), 0 0 0 4px var(--ink-1); }
.an-color:hover { transform: scale(1.08); }
.an-color:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--surface-3), 0 0 0 4px var(--accent); }
.an-title { flex: 1; min-width: 0; height: 30px; padding: 0 var(--sp-1h); border: 0; border-radius: var(--radius-inner); background: transparent; color: var(--ink-1); font: 450 var(--fs-lead) var(--font-voice); }
.an-title:hover, .an-note:hover { background: rgba(255, 248, 225, 0.03); }
.an-title:focus, .an-note:focus { outline: none; background: var(--surface-sunk); box-shadow: inset 0 0 0 1px var(--accent-line); }
.an-note { height: 30px; padding: 0 var(--sp-1h); border: 0; border-radius: var(--radius-inner); background: transparent; color: var(--ink-1); font: 420 15px var(--font-voice); }
.an-note::placeholder { color: var(--ink-4); font-style: italic; }
.an-l { margin-right: var(--sp-1); color: var(--ink-3); font-size: var(--fs-meta); }
.an-stance { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.an-st { height: 26px; padding: 0 var(--sp-3); border: 0; border-radius: var(--radius-pill); background: none; color: var(--ink-3); font: var(--fw-medium) var(--fs-meta) var(--sans); cursor: pointer; }
.an-st:hover { background: var(--surface-3); color: var(--ink-1); }
.an-st.is-on { background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--accent-line); color: var(--ink-1); }
.an-st.st-checks-out.is-on { background: var(--fine-wash); box-shadow: inset 0 0 0 1px rgba(147, 191, 141, 0.4); color: var(--fine); }
.an-st.st-doesnt.is-on { background: var(--danger-wash); box-shadow: inset 0 0 0 1px var(--danger-line); color: var(--danger-ink); }
.an-st.st-mixed.is-on { background: var(--caution-wash); box-shadow: inset 0 0 0 1px rgba(230, 187, 69, 0.4); color: var(--caution); }
.an-members { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1h); }
.an-member { display: inline-flex; align-items: center; gap: 2px; height: 26px; padding: 0 2px 0 var(--sp-2); border-radius: var(--radius-inner); background: var(--surface-3); }
.an-member-name { display: inline-flex; align-items: baseline; gap: var(--sp-1h); padding: 0; border: 0; background: none; color: var(--ink-1); font: var(--fw-medium) 13px var(--sans); cursor: pointer; }
.an-member-name:disabled { cursor: default; }
.an-kind { color: var(--ink-3); font-size: var(--fs-micro); }
.an-x { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: var(--radius-inner); background: none; color: var(--ink-3); cursor: pointer; }
.an-x:hover { background: var(--surface-2); color: var(--ink-1); }
.an-add-sel { max-width: 200px; height: 26px; padding: 0 var(--sp-2); border: 1px dashed var(--rule-2); border-radius: var(--radius-inner); background: transparent; color: var(--ink-3); font: var(--fs-meta) var(--sans); }
.an-remove { margin-left: auto; color: var(--ink-3); }
.an-add { align-self: flex-start; display: inline-flex; align-items: center; gap: var(--sp-1h); }
.an-new { display: flex; gap: var(--sp-1h); }
.an-new-in { flex: 1; min-width: 0; height: 30px; padding: 0 var(--sp-2); border: 0; border-radius: var(--radius-control); background: var(--surface-sunk); color: var(--ink-1); font: 420 15px var(--font-voice); box-shadow: inset 0 0 0 1px var(--rule-2); }
.an-new-in:focus { outline: none; box-shadow: var(--focus-ring); }
.an-empty { padding: var(--sp-1h) 2px; }
.an-loose { display: flex; flex-direction: column; gap: var(--sp-1h); padding-top: var(--sp-3); border-top: 1px solid var(--rule-1); }
