/* LynCareOS concept maps — Calm Care chrome (local-first, portal-ready) */
:root {
  --canvas: #f5f7f9;
  --ink: #25303b;
  --muted: #6b7785;
  --brand-500: #4fb3fe;
  --brand-600: #1a9af2;
  --brand-700: #0d7ec4;
  --healing-500: #19b5a6;
  --apricot-500: #f59a5c;
  --sage-500: #6b9e78;
  --lilac-500: #9b7fd4;
  --shadow: 0 4px 24px rgba(37, 48, 59, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --connector-bg: #e8f4fc;
  --connector-border: #0d7ec4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.5;
}

.font-display {
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
}

#map {
  width: 100vw;
  height: 100vh;
}

.map-body--hub #map {
  display: none;
}

/* Panels */
.lc-panel {
  position: absolute;
  z-index: 10;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(37, 48, 59, 0.08);
  box-shadow: var(--shadow);
  border-radius: var(--radius-sm);
  color: var(--ink);
}

.lc-title {
  top: 12px;
  left: 12px;
  right: 12px;
  max-width: 520px;
  padding: 12px 16px;
  font-size: 15px;
}

.lc-title b, .lc-title .font-display {
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  font-weight: 700;
}

.lc-title .sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.lc-detail {
  bottom: 12px;
  left: 12px;
  width: min(400px, calc(100vw - 24px));
  max-height: min(42vh, 420px);
  overflow-y: auto;
  padding: 16px;
  display: none;
}

.lc-detail.is-open { display: block; }

.lc-detail h3 {
  margin: 0 0 8px;
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  border-bottom: 1px solid rgba(37, 48, 59, 0.08);
  padding-bottom: 8px;
}

.lc-detail .summary {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.lc-detail .body {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
}

.lc-detail .actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.lc-btn--primary {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  color: white;
}

.lc-btn--accent {
  background: var(--apricot-500);
  color: white;
}

.lc-btn--ghost {
  background: white;
  color: var(--ink);
  border: 1px solid rgba(37, 48, 59, 0.12);
}

.lc-btn:hover { opacity: 0.92; }

.lc-toolbar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 11;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: calc(100vw - 24px);
}

.lc-sources {
  bottom: 12px;
  right: 12px;
  max-width: 300px;
  max-height: 36vh;
  overflow: auto;
  padding: 12px 14px;
  font-size: 12px;
  display: none;
}

.lc-sources.is-open { display: block; }

.lc-sources h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
}

.lc-sources ul {
  margin: 0;
  padding-left: 18px;
}

.lc-sources a {
  color: var(--brand-700);
  text-decoration: none;
}

.lc-sources a:hover { text-decoration: underline; }

.lc-legend {
  bottom: 12px;
  right: 12px;
  padding: 12px 14px;
  font-size: 11px;
  max-width: 220px;
}

.lc-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.lc-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--connector-border);
  background: var(--connector-bg);
  flex-shrink: 0;
}

.lc-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  margin-right: 4px;
}

.lc-badge--live { background: #dcfce7; color: #166534; }
.lc-badge--beta { background: #e0f2fe; color: #0369a1; }
.lc-badge--planned { background: #fef3c7; color: #b45309; }

/* Hub */
.lc-hub {
  min-height: 100vh;
  padding: 24px 20px 48px;
  max-width: 960px;
  margin: 0 auto;
}

.lc-hub-header {
  text-align: center;
  margin-bottom: 32px;
}

.lc-hub-header h1 {
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin: 0 0 8px;
}

.lc-hub-header p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 560px;
  margin-inline: auto;
}

.lc-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.lc-hub-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(37, 48, 59, 0.06);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lc-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(37, 48, 59, 0.12);
}

.lc-hub-card h2 {
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  font-size: 17px;
  margin: 0;
}

.lc-hub-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  flex: 1;
}

.lc-hub-card .lc-btn {
  align-self: flex-start;
}

.lc-hub-card--investor { border-top: 4px solid var(--apricot-500); }
.lc-hub-card--clinical { border-top: 4px solid var(--healing-500); }
.lc-hub-card--engineering { border-top: 4px solid var(--brand-600); }

.lc-hub-meta {
  background: white;
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  font-size: 13px;
  color: var(--muted);
}

.lc-hub-meta strong { color: var(--ink); }

.lc-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--brand-700);
  text-decoration: none;
  font-weight: 600;
}

.lc-back:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .lc-title { max-width: none; }
  .lc-toolbar { top: auto; bottom: auto; position: relative; padding: 0 12px 8px; }
  .map-body--map .lc-toolbar {
    position: absolute;
    top: auto;
    bottom: calc(42vh + 20px);
    left: 12px;
    right: 12px;
  }
  #map { height: 58vh; }
}
