/* Reusable components. Class names are the contract with header.js/components.js. */

/* Header --------------------------------------------------------------- */
.site-header {
  background: rgba(8, 11, 18, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
  /* reserve the bar's height before JS injects it — no layout jump */
  min-height: calc(var(--header-h) + 1px);
}

/* Full-width single-row bar: brand + nav inline on the left, actions on the
   right (like major streaming/portal headers) */
.site-header .container {
  max-width: none;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
}

.brand .brand-mark {
  display: block;
  flex: none;
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(79, 140, 255, 0.7));
}
.brand .brand-mark svg {
  display: block;
  width: 22px;
  height: 22px;
}

.site-nav {
  display: flex;
  gap: var(--sp-5);
  flex-wrap: wrap;
  align-self: stretch;
  align-items: stretch;
}

.site-nav a {
  white-space: nowrap;
}

.site-nav a {
  color: var(--ink-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  /* Fill the full header height so the whole strip is clickable. */
  display: inline-flex;
  align-items: center;
  min-height: var(--header-h);
  padding: 0 var(--sp-1);
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--ink);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-1);
  color: var(--ink-muted);
}

.lang-toggle:hover {
  color: var(--ink);
  border-color: var(--ink-muted);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--text-sm);
}

.header-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, #4f8cff, #2f6fe0);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.header-avatar:hover {
  transform: scale(1.06);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.25);
}
.header-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-weight: 500;
  font-size: var(--text-sm);
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: var(--sp-2) var(--sp-4);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: var(--glow-blue-sm);
}

.btn-primary:hover {
  box-shadow: var(--glow-blue);
  filter: brightness(1.08);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}

.btn-copper {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: var(--glow-blue-sm);
}

.btn-copper:hover {
  filter: brightness(1.08);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--text-xs);
}

/* Cards ----------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--sp-5);
}

/* Legacy grid alias — kept in case any page still references it */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-4);
}

.metric-row {
  display: flex;
  gap: var(--sp-4);
  border-top: 1px dashed var(--line);
  padding-top: var(--sp-3);
}

.metric {
  flex: 1;
}

.metric .value {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-sm);
}

.metric .label {
  font-size: var(--text-xs);
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}

/* Vertical row list ------------------------------------------------------ */
/* Replaces the old card-grid everywhere a collection of items is listed:
   startups, news articles, membership plans. */
.list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.list-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-4);
  color: inherit;
  text-decoration: none;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.list-row:hover {
  background: var(--surface-2);
  border-color: rgba(79, 140, 255, 0.35);
  transform: translateY(-1px);
  box-shadow: var(--glow-blue-sm);
  text-decoration: none;
}

.list-row-rank {
  flex: none;
  width: 1.6em;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-faint);
}

.list-row-mark {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--text-sm);
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: var(--glow-blue-sm);
  overflow: hidden;
}

.list-row-mark.square {
  border-radius: var(--radius-sm);
}

.list-row-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.hero-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  margin-top: var(--sp-2);
}

.list-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.list-row-title {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-row-sub {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-row-tags {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-top: 2px;
}

.list-row-meta {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-faint);
  text-align: right;
  min-width: 92px;
}

.list-row-metric {
  flex: none;
  text-align: right;
  font-family: var(--font-mono);
  min-width: 92px;
}

.list-row-metric .value {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
}

.list-row-metric .delta {
  display: block;
  font-size: var(--text-xs);
  margin-top: 2px;
  font-weight: 500;
}

.list-row-metric .delta.up {
  color: var(--delta-up);
}

.list-row-metric .delta.down {
  color: var(--delta-down);
}

.list-row-action {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--ink-faint);
  background: transparent;
  border: 1px solid transparent;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.list-row-action:hover {
  color: var(--delta-up);
  background: rgba(255, 90, 95, 0.1);
}

.list-row-action[aria-pressed="true"] {
  color: var(--delta-up);
}

.list-row-cta {
  flex: none;
}

/* Badges & tags ---------------------------------------------------------- */
.badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 500;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px var(--sp-2);
  color: var(--ink-muted);
  background: var(--surface-2);
}

.badge-copper {
  border-color: rgba(79, 140, 255, 0.5);
  color: #cfe0ff;
  background: var(--accent-soft);
}

.tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: #9db8ff;
}

.tag::before {
  content: "#";
  opacity: 0.6;
}

/* Forms ------------------------------------------------------------------ */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.field > label {
  font-size: var(--text-sm);
  font-weight: 500;
}

.field .hint {
  font-size: var(--text-xs);
  color: var(--ink-faint);
}

.input,
.select,
.textarea {
  background: var(--surface-2);
  border: var(--border);
  border-radius: var(--radius);
  padding: var(--sp-2) var(--sp-3);
  width: 100%;
  color: var(--ink);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.form-error {
  color: var(--danger);
  font-size: var(--text-sm);
  min-height: 1.4em;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

fieldset.filter-group {
  border: 0;
  padding: 0;
  margin: 0 0 var(--sp-5);
}

.filter-group legend {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: var(--sp-2);
  padding: 0;
}

/* Dashboard filter strip */
.filter-panel {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-card);
}

.dashboard-filter-strip {
  max-height: none;
  overflow: visible;
}

.dashboard-filter-strip form {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: var(--sp-4) var(--sp-5);
  align-items: end;
}

.dashboard-filter-strip fieldset.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-width: 0;
  margin: 0;
}

.dashboard-filter-strip .filter-group legend {
  margin-bottom: 0;
}

.dashboard-filter-strip .input,
.dashboard-filter-strip .select {
  width: 100%;
}

.dashboard-filter-strip .filter-range {
  gap: var(--sp-2);
  align-items: center;
}

.dashboard-filter-strip .filter-range .input {
  flex: 1 1 0;
  min-width: 0;
}

.dashboard-filter-strip .filter-range span {
  flex: none;
  color: var(--ink-muted);
}

.dashboard-filter-strip #reset-filters {
  align-self: end;
  width: 100%;
  min-height: 44px;
}

/* Dashboard preview panel ------------------------------------------------ */
.startup-preview-panel {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-card);
  position: sticky;
  top: calc(var(--header-h) + var(--sp-4));
  min-width: 0;
}

.startup-preview-card {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-4);
  border-bottom: var(--border);
}

.startup-preview-card .namecard-embed {
  max-width: 100%;
}

.startup-preview-card .namecard-hint {
  margin-top: 0;
}

.startup-preview-details {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.startup-preview-head {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.startup-preview-head h2 {
  font-size: var(--text-xl);
}

.startup-preview-description {
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

.startup-preview-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-2);
}

.startup-preview-stat {
  min-width: 0;
  border: var(--border);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: var(--sp-2);
}

.startup-preview-stat span {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.startup-preview-stat strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.startup-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.startup-preview-fallback {
  width: 100%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  text-align: center;
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: var(--sp-5);
}

.startup-preview-fallback span {
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

/* Thread rows ------------------------------------------------------------ */
.thread-row {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  align-items: flex-start;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.thread-row:hover {
  border-color: rgba(79, 140, 255, 0.3);
}

.thread-row + .thread-row {
  margin-top: var(--sp-3);
}

.vote-box {
  font-family: var(--font-mono);
  text-align: center;
  min-width: 44px;
  flex: none;
}

.vote-btn {
  background: none;
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-1) var(--sp-2);
  color: var(--ink-muted);
  line-height: 1;
}

.vote-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.vote-count {
  font-weight: 500;
  display: block;
  margin-top: var(--sp-1);
}

.thread-row h3 a {
  color: var(--ink);
}

.thread-meta {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--ink-faint);
  font-family: var(--font-mono);
}

/* Replies */
.reply {
  padding: var(--sp-4);
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
}

.reply + .reply {
  margin-top: var(--sp-3);
}

.reply .children {
  margin-top: var(--sp-3);
  padding-left: var(--sp-5);
  border-left: 2px solid var(--accent-soft);
}

/* Category tabs ----------------------------------------------------------- */
.tabs {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}

.tab {
  border: var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: var(--sp-1) var(--sp-4);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.tab[aria-selected="true"] {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: transparent;
  color: #fff;
}

/* Mentoring pipeline -------------------------------------------------------- */
.pipeline {
  display: flex;
  align-items: center;
  gap: 0;
  margin-block: var(--sp-3);
}

.pipeline .step {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--ink-faint);
  white-space: nowrap;
}

.pipeline .step .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
  flex: none;
}

.pipeline .step.done .dot {
  background: var(--accent);
  border-color: var(--accent);
}

.pipeline .step.current .dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.pipeline .step.done,
.pipeline .step.current {
  color: var(--ink);
}

.pipeline .link {
  flex: 1;
  height: 2px;
  min-width: 16px;
  background: var(--line);
  margin-inline: var(--sp-2);
}

.pipeline .link.done {
  background: var(--accent);
}

.progress {
  height: 6px;
  border-radius: 999px;
  background: var(--grid);
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: inherit;
}

.kpi-chip {
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  border: var(--border);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: var(--sp-1) var(--sp-2);
}

.kpi-chip .delta-up {
  color: var(--delta-up);
}

.kpi-chip .delta-down {
  color: var(--delta-down);
}

/* Toast & dialog ------------------------------------------------------------ */
.toast-region {
  position: fixed;
  bottom: var(--sp-5);
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  align-items: center;
}

.toast {
  background: var(--surface-2);
  border: var(--border);
  color: var(--ink);
  border-radius: var(--radius);
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-pop);
  display: flex;
  gap: var(--sp-3);
  align-items: center;
}

.toast a {
  color: var(--accent);
  text-decoration: underline;
}

.toast.error {
  background: rgba(255, 90, 95, 0.15);
  border-color: rgba(255, 90, 95, 0.4);
}

dialog.modal {
  border: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  padding: var(--sp-6);
  width: min(560px, calc(100vw - 2 * var(--sp-5)));
  background: var(--surface);
  color: var(--ink);
  /* the global `* { margin: 0 }` reset kills the UA's centering — restore it */
  margin: auto;
  max-height: calc(100vh - var(--sp-6));
  overflow-y: auto;
}

dialog.modal.namecard-modal {
  width: min(680px, calc(100vw - 2 * var(--sp-5)));
}

.card-preview-row {
  display: flex;
  gap: var(--sp-3);
}

.card-preview-row canvas {
  flex: 1;
  min-width: 0;
  height: auto;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.swatch-row {
  display: flex;
  gap: var(--sp-2);
}

.swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
}

.swatch[aria-pressed="true"] {
  border-color: #fff;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

dialog.modal::backdrop {
  background: rgba(2, 4, 8, 0.72);
  backdrop-filter: blur(4px);
}

/* Misc ----------------------------------------------------------------------- */
.empty-state {
  text-align: center;
  color: var(--ink-muted);
  padding: var(--sp-8) var(--sp-5);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.pagination {
  display: flex;
  gap: var(--sp-2);
  justify-content: center;
  margin-top: var(--sp-6);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.pagination button {
  border: var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: var(--sp-1) var(--sp-3);
  color: var(--ink-muted);
}

.pagination button[aria-current="page"] {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  border-color: transparent;
}

.auth-card {
  max-width: 420px;
  margin: var(--sp-7) auto;
}

.price {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 500;
}

.price .period {
  font-size: var(--text-xs);
  color: var(--ink-faint);
}

.perks {
  list-style: none;
  padding: 0;
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.perks li {
  padding-left: var(--sp-4);
  position: relative;
}

.perks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.perks li + li {
  margin-top: var(--sp-1);
}

/* Landing page ---------------------------------------------------------- */
.landing-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-7);
  padding: var(--sp-7) var(--sp-4);
  text-align: center;
}

.landing-logo {
  position: fixed;
  top: var(--sp-5);
  left: var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
  color: var(--ink);
}

.landing-logo .node-dot {
  width: 10px;
  height: 10px;
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 12px rgba(79, 140, 255, 0.8);
}

.landing-heading {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  align-items: center;
}

.landing-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 20%, var(--accent) 140%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-tagline {
  color: var(--ink-muted);
  max-width: 46ch;
  font-size: var(--text-base);
}

.chat-panel {
  width: min(640px, 92vw);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: var(--sp-6);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    var(--surface);
  border: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop), var(--glow-blue);
  backdrop-filter: blur(20px);
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  text-align: left;
}

.chat-bubble {
  max-width: 82%;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.chat-bubble.assistant {
  align-self: flex-start;
  background: var(--surface-2);
  border: var(--border);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}

.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-input-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--surface-2);
  border: var(--border);
  border-radius: 999px;
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-5);
}

.chat-input-row input {
  flex: 1;
  background: none;
  border: 0;
  color: var(--ink);
  font-size: var(--text-sm);
  min-width: 0;
}

.chat-input-row input::placeholder {
  color: var(--ink-faint);
}

.chat-input-row input:disabled {
  cursor: not-allowed;
}

.chat-send-btn {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-hint {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
}

.landing-cta {
  margin-top: var(--sp-1);
}

.landing-map-body {
  overflow-x: hidden;
  background:
    radial-gradient(900px 520px at 64% 44%, rgba(158, 176, 198, 0.13), transparent 64%),
    radial-gradient(800px 480px at 26% 72%, rgba(255, 255, 255, 0.08), transparent 62%),
    linear-gradient(140deg, #020408 0%, #080d15 45%, #04060a 100%);
}

.landing-map-page {
  min-height: 100svh;
  display: block;
  padding: 0;
  text-align: left;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.landing-map-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: radial-gradient(circle at 60% 44%, black, transparent 70%);
}

.landing-map-page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(2, 4, 8, 0.94) 0%, rgba(2, 4, 8, 0.64) 36%, rgba(2, 4, 8, 0.08) 68%),
    radial-gradient(500px 240px at 16% 72%, rgba(255, 255, 255, 0.10), transparent 70%);
  pointer-events: none;
}

.landing-map-hero {
  min-height: 100svh;
  width: min(1480px, 100%);
  margin-inline: auto;
  padding: 104px clamp(24px, 5vw, 88px) 64px;
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(480px, 1.18fr);
  gap: clamp(28px, 5vw, 86px);
  align-items: center;
}

.landing-map-copy {
  grid-column: 1;
  grid-row: 1;
  max-width: 590px;
  color: #fff;
  text-shadow: 0 0 32px rgba(0, 0, 0, 0.55);
}

.landing-map-copy h1 {
  font-size: clamp(4.8rem, 13vw, 10rem);
  line-height: 0.82;
  letter-spacing: 0;
  color: #fff;
}

.landing-map-lede {
  margin-top: var(--sp-5);
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(1rem, 1.6vw, 1.28rem);
  max-width: 31ch;
  word-break: keep-all;
}

.landing-map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
  margin-top: var(--sp-6);
}

.landing-map-actions .btn {
  min-height: 44px;
}

.landing-map-actions button.btn {
  cursor: pointer;
}

.landing-map-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
}

.landing-map-actions .btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.09);
}

.landing-map-stats {
  margin-top: var(--sp-7);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-5);
  max-width: 460px;
}

.landing-map-stats div {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: var(--sp-3);
}

.landing-map-stats dt {
  font-family: var(--font-mono);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1;
  color: #fff;
}

.landing-map-stats dd {
  margin-top: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

.landing-map-scene {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  min-height: min(74vw, 720px);
  filter: drop-shadow(0 54px 70px rgba(0, 0, 0, 0.6));
}

.landing-map-scene::before {
  content: "";
  position: absolute;
  inset: 12% -4% 8% -6%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.14), transparent 64%);
  filter: blur(26px);
}

.network-map {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(800px, 70vw);
  max-width: none;
  transform: translate(-50%, -50%) perspective(1100px) rotateX(54deg) rotateZ(-5deg);
  transform-style: preserve-3d;
  overflow: visible;
}

.map-shadow {
  fill: rgba(0, 0, 0, 0.48);
  filter: blur(34px);
}

.map-extrude {
  fill: url("#map-side");
  opacity: 0.84;
}

.map-extrude-1 {
  transform: translate(0, 12px);
}

.map-extrude-2 {
  transform: translate(0, 24px);
}

.map-extrude-3 {
  transform: translate(0, 36px);
}

.map-extrude-4 {
  transform: translate(0, 48px);
  opacity: 0.62;
}

.map-extrude-5 {
  transform: translate(0, 60px);
  opacity: 0.42;
}

.map-face {
  fill: url("#map-face");
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1.4;
}

.map-border {
  fill: none;
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1.1;
  filter: url("#line-glow");
}

.map-region-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.13);
  stroke-width: 1;
}

.map-jeju {
  fill: url("#map-face");
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1.2;
}

.network-link {
  fill: none;
  stroke: rgba(255, 255, 255, 0.38);
  stroke-width: 1.2;
  filter: url("#line-glow");
  stroke-dasharray: 560;
  stroke-dashoffset: 560;
  animation: network-line-draw 1800ms var(--ease) forwards;
  animation-delay: var(--delay);
}

.network-link-major {
  stroke: rgba(255, 255, 255, 0.6);
  stroke-width: 1.5;
}

/* Opacity animates on the positioned group, the transform rise on the inner
   group — a transform animation here would override the translate() attribute
   and collapse every node onto the SVG origin. */
.network-node {
  filter: url("#white-node-glow");
  opacity: 0;
  animation: network-node-fade 900ms var(--ease) forwards;
  animation-delay: var(--delay);
}

.network-node-rise {
  animation: network-node-rise 900ms var(--ease) both;
  animation-delay: var(--delay);
}

.network-node-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.65);
  stroke-width: 1.3;
}

.network-node-core {
  fill: #fff;
}

.network-node-pulse {
  fill: none;
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 1.2;
  animation: network-node-pulse 2800ms ease-out infinite;
  animation-delay: var(--delay);
}

@keyframes network-node-pulse {
  0% {
    r: 5;
    opacity: 0.9;
  }

  70% {
    r: 17;
    opacity: 0;
  }

  100% {
    r: 17;
    opacity: 0;
  }
}

@keyframes network-line-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes network-node-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes network-node-rise {
  from {
    transform: translateY(12px) scale(0.82);
  }

  to {
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 980px) {
  .landing-map-hero {
    grid-template-columns: 1fr;
    align-items: start;
    padding-top: 92px;
  }

  .landing-map-scene {
    grid-column: 1;
    grid-row: 1;
    min-height: 430px;
    order: 1;
  }

  .landing-map-copy {
    grid-column: 1;
    grid-row: 2;
    order: 2;
    margin-top: -36px;
  }

  .network-map {
    width: min(760px, 104vw);
  }

  .landing-map-page::after {
    background:
      linear-gradient(180deg, rgba(2, 4, 8, 0.08) 0%, rgba(2, 4, 8, 0.72) 54%, rgba(2, 4, 8, 0.96) 100%),
      radial-gradient(520px 240px at 50% 24%, rgba(255, 255, 255, 0.11), transparent 70%);
  }
}

@media (max-width: 640px) {
  .landing-map-logo {
    top: var(--sp-4);
    left: var(--sp-4);
  }

  .landing-map-hero {
    padding: 82px var(--sp-4) var(--sp-5);
    gap: var(--sp-3);
  }

  .landing-map-scene {
    min-height: 360px;
  }

  .network-map {
    width: 122vw;
    transform: translate(-50%, -50%) perspective(900px) rotateX(56deg) rotateZ(-5deg);
  }

  .landing-map-copy h1 {
    font-size: clamp(4.2rem, 23vw, 6rem);
  }

  .landing-map-lede {
    max-width: 24ch;
  }

  .landing-map-actions {
    align-items: stretch;
  }

  .landing-map-actions .btn {
    flex: 1 1 150px;
  }

  .landing-map-stats {
    gap: var(--sp-3);
  }
}

/* Namecard ---------------------------------------------------------------- */
#namecard-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0;
  transition: opacity 160ms ease;
}

#namecard-overlay.visible {
  opacity: 1;
}

#namecard-overlay canvas {
  position: absolute;
  top: 0;
  left: 0;
  cursor: grab;
}

#namecard-overlay.visible canvas {
  pointer-events: auto;
}

#namecard-overlay canvas.dragging {
  cursor: grabbing;
}

.namecard-embed {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 7 / 4;
  margin-inline: auto;
  cursor: grab;
}

/* The canvas bleeds past the frame by --namecard-bleed (set from namecard.js)
   so tilted card corners aren't cut off at the frame border; the card itself
   still renders at the same size, centered in the frame. */
.namecard-embed canvas {
  display: block;
  position: absolute;
  width: calc(100% * var(--namecard-bleed, 1)) !important;
  height: calc(100% * var(--namecard-bleed, 1)) !important;
  left: calc(50% - 50% * var(--namecard-bleed, 1));
  top: calc(50% - 50% * var(--namecard-bleed, 1));
  pointer-events: none;
}

.namecard-embed.dragging {
  cursor: grabbing;
}

.namecard-hint {
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: var(--sp-3);
}

.namecard-edit-btn {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  z-index: 2;
}

@media (max-width: 640px) {
  .site-header .container {
    flex-wrap: wrap;
    padding-block: var(--sp-2);
  }

  .header-actions {
    margin-left: 0;
  }

  .dashboard-filter-strip form {
    grid-template-columns: 1fr;
  }

  .startup-preview-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dashboard-filter-strip {
    max-height: none;
  }

  .dashboard-filter-strip form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .startup-preview-panel {
    position: static;
  }

  .pipeline {
    flex-wrap: wrap;
    gap: var(--sp-2);
  }

  .pipeline .link {
    display: none;
  }

  .list-row {
    flex-wrap: wrap;
  }

  .list-row-body {
    order: 2;
    width: 100%;
  }

  .list-row-metric,
  .list-row-meta {
    order: 3;
    text-align: left;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .dashboard-filter-strip form {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------- membership plan cards */

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--sp-4);
  align-items: stretch;
}
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-6) var(--sp-5) var(--sp-5);
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius-lg);
}
.plan-card.highlight { border-color: var(--copper); }
.plan-flag { position: absolute; top: 14px; right: 14px; }
.plan-name { margin: 0; font-size: var(--text-lg); }
.plan-price { display: flex; align-items: baseline; gap: 4px; }
.plan-price strong { font-family: var(--font-mono); font-size: var(--text-2xl); font-weight: 600; }
.plan-price span { color: var(--ink-muted); font-size: var(--text-sm); }
.plan-perks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-2);
  align-content: start;
  flex: 1;
  color: var(--ink-muted);
  font-size: var(--text-sm);
}
.plan-perks li { position: relative; padding-left: 18px; line-height: 1.5; }
.plan-perks li::before { content: "✓"; position: absolute; left: 0; color: var(--copper); }

/* ------------------------------------------- segmented view tabs + 찜 */

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  border: var(--border);
}
.seg-btn {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.seg-btn.on { background: var(--copper); color: #06101f; }

/* favorite ("interested") heart button — sits inline in list rows and cards */
.fav-btn {
  flex-shrink: 0;
  align-self: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface-2);
  cursor: pointer;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease),
    background var(--dur) var(--ease);
  will-change: transform;
}
.fav-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--ink-muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fav-btn:hover { transform: scale(1.1); border-color: rgba(255, 90, 95, 0.5); }
.fav-btn.on { border-color: rgba(255, 90, 95, 0.6); background: rgba(255, 90, 95, 0.12); }
.fav-btn.on svg { fill: var(--danger); stroke: var(--danger); animation: fav-pop 0.3s var(--ease); }
@keyframes fav-pop { 0% { transform: scale(0.7); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* ------------------------------------- profile follow suggestions rail */

.suggest-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 158px;
  gap: var(--sp-3);
  overflow-x: auto;
  padding-bottom: var(--sp-2);
  scrollbar-width: thin;
}
.suggest-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-3);
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
  will-change: transform;
}
.suggest-card:hover { transform: translateY(-2px); border-color: rgba(110, 168, 255, 0.4); }
.suggest-mark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 700;
  font-size: var(--text-lg);
  color: #fff;
  background: linear-gradient(135deg, #4f8cff, #2f6fe0);
}
.suggest-mark img { width: 100%; height: 100%; object-fit: cover; }
.suggest-name {
  max-width: 100%;
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggest-sub { font-size: var(--text-xs); color: var(--ink-faint); }
.suggest-card .btn { margin-top: var(--sp-1); }

/* ------------------------------------------ map node hover avatar badge */

.map-hover-badge {
  position: absolute;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transform: translate(-50%, calc(-100% - 12px));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.map-hover-badge.show { opacity: 1; }
.map-hover-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: var(--text-lg);
  color: #fff;
  background: linear-gradient(135deg, #4f8cff, #2f6fe0);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(79, 140, 255, 0.25);
}
.map-hover-name {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  background: rgba(8, 11, 18, 0.82);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
