/* Note Systems: community page */

.cm .site-header { position: sticky; top: 0; }
.cm .dim { color: var(--text-2); }
.cm .brass { color: var(--brass); }
.cm .num { text-align: right; }

/* Hero */
.cm-hero {
  position: relative;
  padding: clamp(72px, 10vw, 128px) 0 clamp(40px, 5vw, 64px);
  overflow: hidden;
}
.cm-hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 70%;
  background: radial-gradient(60% 60% at 70% 30%, rgba(201, 169, 110, 0.10), transparent 70%);
  pointer-events: none;
}
.cm-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.cm-eyebrow { color: var(--brass); margin-bottom: 14px; }
.cm-title { font-size: clamp(34px, 4vw, 56px); text-wrap: balance; }
.cm-sub { margin-top: 22px; max-width: 34em; }
.cm-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.cm-msg { min-height: 1.5em; margin-top: 14px; }
.cm-msg.is-error { color: var(--down); }
.cm-msg.is-ok { color: var(--up); }

/* Streak ladder */
.cm-ribbon { padding: 24px; }
.cm-ribbon__head { display: flex; justify-content: space-between; align-items: baseline; }
.cm-ribbon__live { color: var(--brass); font-variant-numeric: tabular-nums; }
.cm-ribbon__track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
  margin: 46px 0 14px;
  padding-top: 8px;
}
.cm-ribbon__track::before {
  content: "";
  position: absolute;
  left: 4%; right: 4%; top: 15px;
  height: 1px;
  background: var(--line-strong);
}
.cm-node { position: relative; display: grid; justify-items: center; }
.cm-node__dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--surface-2);
  display: grid; place-items: center;
  color: var(--text-3);
  transition: background-color 400ms var(--ease), border-color 400ms var(--ease), box-shadow 400ms var(--ease), color 400ms var(--ease);
}
.cm-node--tier .cm-node__dot { width: 18px; height: 18px; margin-top: -2px; }
.cm-node--diamond .cm-node__dot { width: 24px; height: 24px; margin-top: -5px; border-radius: 6px; }
.cm-node__tag {
  position: absolute;
  top: -34px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--text-2);
  white-space: nowrap;
}
.cm-node--diamond .cm-node__tag { right: 0; color: var(--brass); }
.cm-node[data-n="1"] .cm-node__tag { left: 0; }
.cm-node.is-lit .cm-node__dot {
  background: var(--brass);
  border-color: var(--brass);
  color: #0A0B0D;
  box-shadow: 0 0 0 4px var(--brass-dim);
}
.cm-node.is-lit.cm-node--diamond .cm-node__dot { box-shadow: 0 0 0 5px var(--brass-dim), 0 0 24px rgba(201, 169, 110, 0.45); }
.cm-ribbon__foot { margin-top: 18px; }

/* Stats strip */
.cm-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin: clamp(40px, 5vw, 64px) 0 0;
}
.cm-stat { background: var(--surface-1); padding: 18px 20px; min-width: 0; }
.cm-stat dt { overflow-wrap: anywhere; }
.cm-stat dd { margin: 8px 0 0; font-size: 26px; line-height: 1.1; }

/* Sections */
.cm-section { padding: clamp(56px, 7vw, 104px) 0; border-top: 1px solid var(--line); }
.cm-section__head { max-width: 46em; margin-bottom: clamp(28px, 4vw, 48px); }
.cm-section__head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; max-width: none; }
.cm-section__head .t-h2 { margin-top: 0; }

/* Sign-in card */
.cm-signin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 28px;
}
.cm-signin .t-body { margin-top: 8px; max-width: 48em; }

/* Profile */
.cm-profile {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.cm-id { padding: 24px; display: grid; gap: 8px; align-content: start; }
.cm-id .t-label { margin-top: 12px; }
.cm-pfp-wrap { display: grid; justify-items: center; gap: 10px; margin-bottom: 8px; }
.cm-pfp {
  width: 128px; height: 128px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: radial-gradient(circle at 30% 30%, var(--surface-3), var(--surface-1));
  display: grid; place-items: center;
  overflow: hidden;
}
.cm-pfp img { width: 100%; height: 100%; object-fit: cover; }
.cm-pfp__initials { font-family: var(--font-mono); font-size: 22px; color: var(--text-2); }
.cm-pfp__remove { color: var(--text-3); }
.cm-pfp__remove:hover { color: var(--text-1); }
.cm-name__row { display: flex; gap: 8px; margin-top: 6px; }
.cm-input {
  flex: 1; min-width: 0;
  height: 36px;
  padding: 0 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--text-1);
  font: inherit;
  font-size: 14px;
}
.cm-input:focus { outline: none; border-color: var(--brass); }
.cm-addr { font-size: 13px; word-break: break-all; color: var(--text-1); }
.cm-socials li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cm-socials li:last-child { border-bottom: 0; }
.cm-social__name { font-weight: 500; }
.cm-pill {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.02em;
  border: 1px solid var(--line-strong);
  color: var(--text-2);
  white-space: nowrap;
}
.cm-pill--soon { color: var(--text-2); }
.cm-pill--locked { color: var(--warn); border-color: rgba(224, 169, 74, 0.4); }
.cm-pill--on { color: var(--up); border-color: rgba(61, 214, 140, 0.4); }
.cm-pill--track { color: var(--info); border-color: rgba(122, 162, 247, 0.4); }
.cm-pill--off { color: var(--text-3); }
.cm-id__foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.cm-id__foot .btn { width: 100%; justify-content: center; white-space: nowrap; padding-left: 8px; padding-right: 8px; }
.cm-id__signout { grid-column: 1 / -1; }
.cm-linkbtn { color: var(--text-2); }
.cm-linkbtn:hover { color: var(--text-1); }

.cm-metrics { display: grid; gap: 24px; min-width: 0; }
.cm-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cm-kpi { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; min-width: 0; }
.cm-kpi--main { background: var(--surface-3); border-color: var(--line-strong); }
.cm-kpi__val { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.1; margin-top: 8px; font-weight: 500; overflow-wrap: anywhere; }
.cm-kpi .t-small { margin-top: 8px; }
.cm-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.cm-block { padding: 22px 24px; min-width: 0; }
.cm-block__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.cm-bonuses { margin-top: 12px; display: grid; gap: 10px; }
.cm-bonuses li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: start; padding: 4px 0; }
.cm-bonuses li > .mono { padding-top: 2px; }
.cm-bonus__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cm-bonuses .t-small { display: block; margin-top: 2px; }
.cm-shield { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; margin: 12px 0 16px; color: var(--brass); }
.cm-shield .t-body { color: var(--text-1); }
.cm-shield .t-small { margin-top: 6px; }
.cm-diamonds-label { margin-top: 20px; }
#diamonds { margin-top: 6px; }
.cm-diamond-row { display: flex; gap: 8px; margin-top: 8px; color: var(--brass); }

/* Tables */
.cm-table-wrap { overflow-x: auto; margin-top: 12px; -webkit-overflow-scrolling: touch; }
.cm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cm-table--pos { font-size: 13px; }
.cm-table--pos td { padding: 10px 8px; }
.cm-table--pos th { padding: 8px; }
.cm-table th { text-align: left; font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); padding: 10px 12px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.cm-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.cm-table tbody tr:last-child td { border-bottom: 0; }
.cm-table .num { text-align: right; }
.cm-table--compact { margin-top: 16px; }
.cm-table--compact td:last-child { white-space: normal; }
.cm-table--lb td { padding: 14px 12px; }
.cm-table--lb tr.is-me td { background: var(--brass-dim); }
.cm-lb { padding: 8px 16px 16px; }
.cm-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cm-who__pfp { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface-3); display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; color: var(--text-2); overflow: hidden; flex: none; }
.cm-who__pfp img { width: 100%; height: 100%; object-fit: cover; }
.cm-who__name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; max-width: 18em; }
.cm-who__addr { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.cm-empty { margin-top: 14px; }
.cm-empty[hidden] { display: none; }

/* Activity */
.cm-activity { margin-top: 12px; display: grid; }
.cm-activity li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cm-activity li:last-child { border-bottom: 0; }
.cm-activity i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); transform: translateY(-1px); }
.cm-activity .is-hold i { background: var(--up); }
.cm-activity .is-breach i { background: var(--down); }
.cm-activity .is-deposit i { background: var(--brass); }
.cm-activity time { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }

/* How it works */
.cm-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cm-step { padding: 26px; display: grid; gap: 10px; align-content: start; }
.cm-step__n { color: var(--brass); font-size: 13px; }
.cm-step .t-body { margin-top: 2px; }
.cm-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.cm-rule { padding: 26px; min-width: 0; }
.cm-rule .t-h3 { margin-bottom: 10px; }
.cm-rule .cm-eyebrow { margin-bottom: 10px; }
.cm-tiers { margin-top: 16px; display: grid; gap: 8px; }
.cm-tier { display: grid; grid-template-columns: 110px 60px 60px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; background: var(--surface-2); border-radius: var(--r-sm); }
.cm-tier__name { font-weight: 500; }
.cm-tier__lvl { color: var(--text-2); }
.cm-salvage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.cm-salvage div { background: var(--surface-2); border-radius: var(--r-sm); padding: 14px; display: grid; gap: 4px; }
.cm-big { font-size: 28px; line-height: 1; font-weight: 500; }
.cm-bonus-list { display: grid; gap: 10px; margin-top: 6px; }
.cm-bonus-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.cm-formula { margin-top: 24px; font-family: var(--font-mono); font-size: 13px; }

/* Claim */
.cm-claim { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; align-items: center; padding: 32px; }
.cm-claim .t-h2 { margin: 6px 0 12px; }
.cm-claim__panel { display: grid; gap: 12px; justify-items: start; padding: 22px; background: var(--surface-2); border-radius: var(--r-md); }
.cm-claim__panel .btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

[hidden] { display: none !important; }
.show-m { display: none; }

/* Responsive */
@media (max-width: 1024px) {
  .cm-hero__inner { grid-template-columns: 1fr; }
  .cm-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cm-profile { grid-template-columns: 1fr; }
  .cm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cm-steps { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .cm-title { font-size: clamp(34px, 9.5vw, 44px); }
  .cm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cm-stat dd { font-size: 22px; }
  .cm-signin { grid-template-columns: 1fr; }
  .cm-grid2 { grid-template-columns: 1fr; }
  .cm-rules { grid-template-columns: 1fr; }
  .cm-claim { grid-template-columns: 1fr; padding: 24px; }
  .cm-claim__panel { justify-items: stretch; }
  .cm-section__head--row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .cm-tier { grid-template-columns: 1fr 60px 60px; }
  .cm-tier .t-small { grid-column: 1 / -1; }
  .cm-node__tag { font-size: 10px; }
  .cm-salvage { grid-template-columns: 1fr; }
  .cm-bonus__row { flex-wrap: wrap; }
  .cm-who__name { max-width: 9em; }
  .hide-m { display: none; }
  .show-m { display: block; }
  .cm-table--pos td:first-child { white-space: normal; min-width: 128px; }
  .cm-table--pos { font-size: 12px; }
  .cm-table--pos .cm-pill { font-size: 10px; padding: 3px 7px; }
  .cm-table--pos .cm-pill { white-space: nowrap; }
  .cm-table--pos td, .cm-table--pos th { padding-left: 5px; padding-right: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .cm-node__dot { transition: none; }
}

.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; }

/* Header account chip */
.cm-hdr-account { display: flex; align-items: center; gap: 8px; flex: none; }
.cm-hdr-account[hidden] { display: none !important; }
.cm-hdr-addr {
  font-size: 12px; letter-spacing: 0.02em; color: var(--text-2);
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-1);
  transition: border-color 300ms var(--ease), color 300ms var(--ease);
}
.cm-hdr-addr:hover { color: var(--text-1); border-color: var(--line-strong); }
@media (max-width: 720px) {
  .cm-hdr-account { margin-left: auto; }
  .cm-hdr-addr { display: none; }
}

/* Wallet chooser */
.cm-sheet-root { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cm-sheet__scrim { position: absolute; inset: 0; background: rgba(4, 5, 6, 0.7); animation: cm-fade 220ms var(--ease) both; }
.cm-sheet {
  position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto;
  background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: var(--r-md);
  padding: 18px 20px 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: cm-rise 320ms var(--ease) both;
}
.cm-sheet__grab { display: none; width: 36px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 0 auto 12px; }
.cm-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cm-sheet__title { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; margin: 0; }
.cm-sheet__x { width: 32px; height: 32px; border-radius: var(--r-sm); color: var(--text-2); font-size: 22px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; }
.cm-sheet__x:hover { color: var(--text-1); background: var(--surface-2); }
.cm-wc__lead { font-size: 13px; line-height: 1.55; color: var(--text-2); margin: 0 0 14px; }
.cm-wc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cm-wc__item {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg);
  color: var(--text-1); cursor: pointer; font: inherit; text-decoration: none;
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease);
}
.cm-wc__item:hover:not(:disabled) { background: var(--surface-2); border-color: var(--line-strong); }
.cm-wc__item:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.cm-wc__item:disabled, .cm-wc__item.is-off { cursor: not-allowed; }
.cm-wc__item.is-off .cm-wc__ic, .cm-wc__item.is-off .cm-wc__name { opacity: 0.45; }
.cm-wc__item.is-off .cm-wc__ic img { filter: grayscale(1); }
.cm-wc__ic { flex: 0 0 auto; width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.cm-wc__ic img { width: 28px; height: 28px; object-fit: contain; display: block; }
.cm-wc__ic-fallback { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--text-3); }
.cm-wc__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.cm-wc__name { font-size: 14px; font-weight: 500; letter-spacing: -0.005em; }
.cm-wc__hint { font-size: 12px; color: var(--text-3); line-height: 1.4; }
.cm-wc__tag { flex: 0 0 auto; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.cm-wc__deep { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.cm-wc__deep-title { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin: 0 0 4px; }
.cm-wc__deep-sub { font-size: 12px; color: var(--text-3); line-height: 1.5; margin: 0 0 10px; }
.cm-wc--links .cm-wc__tag { color: var(--brass); border-color: rgba(201, 169, 110, 0.35); }
.cm-sheet__foot { margin: 12px 0 0; font-size: 12px; color: var(--text-3); line-height: 1.5; min-height: 1.2em; }
.cm-sheet__foot.is-error { color: var(--down); }
.cm-sheet__foot.is-ok { color: var(--up); }
body.cm-modal-open { overflow: hidden; }
@keyframes cm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cm-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 720px) {
  .cm-sheet-root { align-items: flex-end; padding: 0; }
  .cm-sheet { max-width: none; border-radius: var(--r-md) var(--r-md) 0 0; border-bottom: 0; max-height: 88vh; padding-bottom: calc(20px + env(safe-area-inset-bottom)); animation-name: cm-slide; }
  .cm-sheet__grab { display: block; }
}
@keyframes cm-slide { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .cm-sheet, .cm-sheet__scrim { animation: none; }
}
