/* Social Graph — Brand CSS (single source of truth)
   This file is the CANONICAL design for the social graph page.
   The Python generator (social_graph_intel.py) links to this file
   instead of embedding inline CSS. Any design changes go HERE,
   not in the Python script.
   
   Matches Dear Hueman brand: warm cream, amber, Cormorant Garamond + Inter
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --amber: #C4841D;
  --teal: #1A6B5A;
  --cream: #FAF7F2;
  --card: #FFFFFF;
  --card-border: #E8E0D4;
  --border: #D4C9B8;
  --dim: #6B5E50;
  --text: #2C2416;
  --tag-bg: #EDE7DC;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--cream);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

/* Top gradient line — matches homepage */
.top-line {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #E8927C, #D4A574, #C4841D, #5BA4A4, #4A6FA5, #6B5B95);
  z-index: 100;
}

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Header */
header {
  border-bottom: 1px solid var(--border);
  padding: 32px 0 24px;
}
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.monogram {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--amber);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 16px;
  font-style: italic;
  color: var(--amber);
}
.header-meta { font-size: 13px; color: var(--dim); }
nav {
  display: flex;
  gap: 20px;
  font-size: 14px;
  padding: 12px 0;
  font-family: 'Inter', -apple-system, sans-serif;
}

/* Typography */
h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: 32px;
  margin: 16px 0 4px;
  color: var(--text);
  line-height: 1.2;
}
h1 span { color: var(--amber); }
.subtitle {
  color: var(--dim);
  font-size: 15px;
  font-style: italic;
  font-family: 'Cormorant Garamond', Georgia, serif;
}
h2 {
  color: var(--amber);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 12px;
}

/* Sections */
.section { margin-bottom: 32px; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left;
  color: var(--dim);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
  font-family: 'Inter', -apple-system, sans-serif;
}
td {
  padding: 10px 6px;
  border-bottom: 1px solid var(--card-border);
  vertical-align: top;
}
td.rank { color: var(--amber); font-weight: bold; white-space: nowrap; }
td.num {
  text-align: right;
  font-family: 'Inter', monospace;
  font-size: 13px;
  color: var(--text);
}
.table-scroll { overflow-x: auto; }

/* Tags */
.dim { color: var(--dim); font-size: 12px; }
.tag {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--teal);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  margin: 2px 2px 0 0;
  font-family: 'Inter', -apple-system, sans-serif;
}

/* Bar charts */
.bar-wrap {
  position: relative;
  height: 22px;
  background: var(--tag-bg);
  border-radius: 3px;
  min-width: 120px;
}
.bar { height: 100%; border-radius: 3px; min-width: 2px; }
.bar-val {
  position: absolute;
  right: 6px;
  top: 2px;
  font-size: 12px;
  color: var(--text);
  font-family: 'Inter', monospace;
}

/* Topic rows */
.topic-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--card-border);
}
.topic-name { min-width: 200px; font-size: 14px; }
.topic-row .bar-wrap { flex: 1; }

/* Cards */
.rising-card {
  background: var(--card);
  border-left: 3px solid var(--teal);
  padding: 14px 18px;
  margin: 8px 0;
  border-radius: 0 6px 6px 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.rising-name { color: var(--teal); font-size: 16px; font-weight: 600; }
.rising-stats {
  font-family: 'Inter', monospace;
  font-size: 12px;
  color: var(--amber);
  margin-top: 4px;
}

.alliance { padding: 6px 0; font-size: 14px; }
.interaction { padding: 4px 0; font-size: 13px; }

/* Agent Hue position card */
.hue-position {
  background: var(--card);
  border: 1px solid var(--amber);
  border-radius: 6px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.hue-position h3 { color: var(--amber); margin-bottom: 8px; }

/* Perspective / editorial */
.perspective {
  background: var(--card);
  border-left: 3px solid var(--amber);
  padding: 24px;
  margin: 24px 0;
  font-style: italic;
  line-height: 1.8;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 17px;
  border-radius: 0 6px 6px 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.perspective .sig {
  color: var(--amber);
  font-style: normal;
  margin-top: 12px;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 13px;
}

/* CTA */
.cta {
  text-align: center;
  padding: 48px 24px;
  margin: 48px 0;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.cta h3 {
  color: var(--amber);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 8px;
}
.cta p { color: var(--dim); margin-bottom: 16px; }
.cta a {
  display: inline-block;
  background: var(--amber);
  color: white;
  padding: 12px 32px;
  border-radius: 4px;
  font-weight: 600;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 14px;
  transition: opacity 0.15s;
}
.cta a:hover { opacity: 0.9; text-decoration: none; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  color: var(--dim);
  font-size: 13px;
}

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* Responsive */
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  table { font-size: 12px; }
  td, th { padding: 6px 3px; }
  .topic-row { flex-wrap: wrap; }
  .topic-name { min-width: auto; width: 100%; }
  h1 { font-size: 24px; }
  .bar-wrap { min-width: 80px; }
  .perspective { padding: 16px; font-size: 16px; }
}
