/* ============================================================
   COMPONENTS — Messages, Cards, Badges, Chips, Pills,
                Framework Blocks, Contact Grid, Section Intro
   ============================================================ */

/* ── Message bubbles ── */
.msg {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  max-width: 820px;
}

.msg.visitor {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 500;
  flex-shrink: 0;
  margin-top: 2px;
}

.msg-avatar.nd {
  background: var(--bg4);
  border: 0.5px solid var(--border2);
  color: var(--accent);
}

.msg-avatar.vis {
  background: var(--bg3);
  border: 0.5px solid var(--border);
  color: var(--text2);
}

.msg-body {
  flex: 1;
  min-width: 0;
}

.msg-name {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text3);
  margin-bottom: 7px;
}

.msg-name.nd-name-tag {
  color: var(--accent2);
}

.msg-bubble {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: 4px 14px 14px 14px;
  padding: 16px 20px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
}

.msg.visitor .msg-bubble {
  background: var(--bg3);
  border-radius: 14px 4px 14px 14px;
  color: var(--text2);
  font-size: 16px;
}

/* ── Metric pills ── */
.metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.metric-pill {
  font-size: 13px;
  font-family: var(--font-mono);
  padding: 5px 13px;
  border-radius: 99px;
  border: 0.5px solid var(--border2);
  color: var(--text2);
  background: var(--bg3);
  letter-spacing: 0.02em;
}

/* ── Chips ── */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

.chip {
  font-size: 14px;
  padding: 9px 17px;
  border-radius: 99px;
  border: 0.5px solid var(--border2);
  color: var(--text2);
  background: var(--bg2);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  font-family: var(--font-sans);
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg3);
}

/* ── Cards ── */
.cards-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  transition: border-color 0.15s;
}

.card:hover {
  border-color: var(--border2);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.card-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}

.card-meta {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text3);
  margin-top: 3px;
}

.card-body {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.75;
}

.card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

/* ── Badges ── */
.badge {
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 4px 11px;
  border-radius: 99px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge-green { background: var(--green-t); color: #4a9960; border: 0.5px solid var(--green); }
.badge-red   { background: var(--red-t);   color: #c05050; border: 0.5px solid var(--red);   }
.badge-blue  { background: var(--blue-t);  color: #6a9aba; border: 0.5px solid var(--blue);  }
.badge-amber { background: var(--amber-t); color: #c9a030; border: 0.5px solid var(--amber); }
.badge-teal  { background: var(--teal-t);  color: #30a0a0; border: 0.5px solid var(--teal);  }

/* ── Divider ── */
.divider {
  height: 0.5px;
  background: var(--border);
  margin: 4px 0;
}

/* ── Section intro (serif italic quote) ── */
.section-intro {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--text2);
  line-height: 1.6;
  border-left: 2px solid var(--accent2);
  padding-left: 20px;
  padding-bottom: 4px;
}

/* ── Framework blocks ── */
.framework-block {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.framework-header {
  padding: 14px 20px;
  border-bottom: 0.5px solid var(--border);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.framework-body {
  padding: 18px 20px;
}

.principle {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--border);
  align-items: flex-start;
}

.principle:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.principle-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent2);
  padding-top: 2px;
  flex-shrink: 0;
  width: 24px;
}

.principle-text {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.7;
}

.principle-text strong {
  color: var(--text);
  font-weight: 500;
}

/* ── Contact grid ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s;
}

.contact-link:hover {
  border-color: var(--accent);
}

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  flex-shrink: 0;
  border: 0.5px solid var(--border2);
}

.contact-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.contact-sub {
  font-size: 13px;
  color: var(--text3);
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* ── Inline card lists (used in Building and Bets tabs) ── */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.card-list-item {
  display: flex;
  gap: 10px;
  font-size: 16px;
  color: var(--text2);
  align-items: flex-start;
}

.card-list-item .list-marker {
  color: var(--accent2);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.card-list-item .list-marker.teal {
  color: var(--teal);
}

/* ── Lesson / thesis label inside bet cards ── */
.card-lesson-label {
  margin-top: 12px;
  font-size: 13px;
  color: var(--accent);
  font-family: var(--font-mono);
}

.card-lesson-text {
  font-size: 16px;
  color: var(--text2);
  margin-top: 6px;
  line-height: 1.75;
}

/* ── Thesis items inside "The thesis is set" card ── */
.thesis-item {
  display: flex;
  flex-direction: column;
}

.thesis-label {
  font-size: 14px;
  color: var(--accent2);
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.thesis-desc {
  font-size: 16px;
  color: var(--text2);
}
