/* Elle Pattern Analysis - Archive Documentation Style */
:root {
  --bg: #fefefe;
  --text: #222;
  --accent: #8b0000;
  --border: #ccc;
  --code-bg: #f5f5f5;
  --quote-bg: #f9f9f9;
  --quote-border: #ddd;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  line-height: 1.7;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3, h4 {
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.2rem;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 0.5rem;
}

h2 {
  font-size: 1.6rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3rem;
}

h3 {
  font-size: 1.3rem;
  color: #444;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

h4 {
  font-size: 1.1rem;
  color: #555;
  margin-top: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

blockquote {
  margin: 1rem 0;
  padding: 1rem 1.5rem;
  background: var(--quote-bg);
  border-left: 4px solid var(--accent);
  font-style: italic;
}

blockquote p {
  margin: 0;
}

blockquote cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #666;
  font-style: normal;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

th, td {
  border: 1px solid var(--border);
  padding: 0.75rem;
  text-align: left;
}

th {
  background: var(--code-bg);
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
  font-weight: 600;
}

tr:nth-child(even) {
  background: #fafafa;
}

tr.highlight {
  background: #fff3cd;
}

tr.total {
  background: #333;
  color: #fff;
}

tr.total td {
  border-color: #333;
}

tr.timeline-seduction {
  background: #e8f5e9;
  border-left: 4px solid #4caf50;
}

tr.timeline-pivot {
  background: #fff3e0;
  border-left: 4px solid #ff9800;
}

tr.timeline-burnout {
  background: #f3e5f5;
  border-left: 4px solid #9c27b0;
}

code {
  background: var(--code-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.9em;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

ul, ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

strong {
  font-weight: 700;
}

/* Navigation */
.nav {
  background: #333;
  padding: 1rem;
  margin: -2rem -2rem 2rem -2rem;
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

.nav a {
  color: #fff;
  margin-right: 1.5rem;
  font-size: 0.9rem;
}

.nav a:hover {
  color: #fcc;
}

.nav a.active {
  color: #fcc;
}

/* Hero Header */
.hero {
  text-align: center;
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.hero h1 {
  border: none;
  margin-bottom: 0.5rem;
  font-size: 2.8rem;
}

.subtitle {
  font-size: 1.3rem;
  color: #666;
  margin: 0;
}

/* Status Badges */
.status-badges {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.badge {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-red {
  background: var(--accent);
  color: #fff;
}

.badge-gray {
  background: #666;
  color: #fff;
}

.badge-dark {
  background: #333;
  color: #fff;
}

.badge-yellow {
  background: #ffc107;
  color: #333;
}

.badge-orange {
  background: #fd7e14;
  color: #fff;
}

/* Summary Box with Stats */
.summary-box {
  background: linear-gradient(135deg, #f8f8f8, #fff);
  border: 2px solid var(--accent);
  padding: 2rem;
  margin: 2rem 0;
  border-radius: 8px;
}

.summary-box h2 {
  margin-top: 0;
  border: none;
  color: var(--accent);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat {
  text-align: center;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

.stat-label {
  font-size: 0.85rem;
  color: #666;
}

/* Hint text */
.hint {
  color: #888;
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 1rem;
}

/* Interactive Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent), #666);
}

.timeline-item {
  position: relative;
  margin-bottom: 1rem;
  padding: 1rem 1.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.timeline-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.35rem;
  top: 1.5rem;
  width: 12px;
  height: 12px;
  background: #fff;
  border: 3px solid var(--accent);
  border-radius: 50%;
}

.timeline-item.timeline-critical::before {
  background: var(--accent);
}

.timeline-date {
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.timeline-content h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.timeline-content > p {
  margin: 0;
  color: #555;
}

.expand-icon {
  font-family: monospace;
  font-size: 1.2rem;
  color: #999;
  transition: transform 0.2s;
}

.timeline-details {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.timeline-item.expanded .timeline-details {
  display: block;
}

.timeline-item.expanded .expand-icon {
  transform: rotate(45deg);
}

.source-links {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.source-links a {
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
  background: var(--code-bg);
  border-radius: 4px;
}

.source-links a:hover {
  background: #e0e0e0;
  text-decoration: none;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0;
  border-bottom: 2px solid var(--border);
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  background: var(--code-bg);
  cursor: pointer;
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.95rem;
  border-radius: 8px 8px 0 0;
  transition: all 0.2s;
}

.tab-btn:hover {
  background: #e0e0e0;
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
}

.tab-content {
  display: none;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
}

.tab-content.active {
  display: block;
}

.equivalents {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--code-bg);
  border-radius: 4px;
}

.equivalents h4 {
  margin-bottom: 0.5rem;
}

.equivalents ul {
  margin: 0;
}

/* Person Cards */
.person-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.person-card {
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

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

.person-card h4 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.person-card > p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
}

.person-details {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.person-card.expanded .person-details {
  display: block;
}

.person-details p {
  margin: 0 0 0.5rem 0;
}

.person-details a {
  font-size: 0.9rem;
}

/* Pattern List */
.pattern-list {
  list-style: none;
  padding: 0;
  counter-reset: pattern;
}

.pattern-list li {
  position: relative;
  padding: 1rem 1rem 1rem 3.5rem;
  margin-bottom: 0.75rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.pattern-list li:hover {
  border-color: var(--accent);
}

.pattern-list li::before {
  counter-increment: pattern;
  content: counter(pattern);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.pattern-list strong {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pattern-summary {
  margin: 0.25rem 0 0 0;
  color: #666;
  font-size: 0.9rem;
}

.pattern-details {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.pattern-list li.expanded .pattern-details {
  display: block;
}

/* Quote Grid */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.quote-card {
  padding: 1.5rem;
  background: linear-gradient(135deg, #fff, #f8f8f8);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
}

.quote-card blockquote {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  font-size: 0.95rem;
}

.quote-card cite {
  display: block;
  margin-top: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

/* Move Cards */
.move-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.move-card {
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.move-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.move-card h4 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.move-card > p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
}

.move-details {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.move-card.expanded .move-details {
  display: block;
}

.stage-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

/* Warning/Alert boxes */
.warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  padding: 1rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.alert-danger {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  padding: 1rem;
  margin: 1.5rem 0;
  border-radius: 4px;
  color: #721c24;
}

/* TOC */
.toc {
  background: var(--code-bg);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 4px;
}

.toc h3 {
  margin-top: 0;
}

.toc ul {
  margin-bottom: 0;
}

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: #666;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  .nav {
    margin: -1rem -1rem 1.5rem -1rem;
    padding: 0.75rem;
  }

  .nav a {
    display: block;
    margin: 0.5rem 0;
  }

  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .quote-grid {
    grid-template-columns: 1fr;
  }

  .tabs {
    flex-wrap: wrap;
  }

  .tab-btn {
    flex: 1;
    min-width: 100px;
  }

  .hero h1 {
    font-size: 2rem;
  }
}

/* Glasl Conflict Escalation Analysis */
.glasl-stage {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    margin-left: 8px;
    color: white;
}

.glasl-stage.win-win {
    background: #28a745;
}

.glasl-stage.win-lose {
    background: #ffc107;
    color: #000;
}

.glasl-stage.lose-lose {
    background: #dc3545;
}

/* Large oversized stage numbers */
.stage-number {
    font-size: 120px;
    font-weight: bold;
    line-height: 1;
    opacity: 0.2;
    position: absolute;
    left: -80px;
    top: -20px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.stage-number.stage-1,
.stage-number.stage-2,
.stage-number.stage-3 {
    color: #28a745;
}

.stage-number.stage-4,
.stage-number.stage-5,
.stage-number.stage-6 {
    color: #ffc107;
}

.stage-number.stage-7,
.stage-number.stage-8,
.stage-number.stage-9 {
    color: #dc3545;
}

.escalation-tracker {
    background: linear-gradient(to right, #28a745 0%, #28a745 33%, #ffc107 33%, #ffc107 66%, #dc3545 66%, #dc3545 100%);
    height: 40px;
    border-radius: 8px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.escalation-marker {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 100%;
    background: #000;
    transition: left 0.3s ease;
}

.escalation-marker::after {
    content: attr(data-stage);
    position: absolute;
    top: -25px;
    left: -15px;
    background: #000;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    white-space: nowrap;
}

.message-exchange {
    border-left: 4px solid #ddd;
    padding-left: 20px;
    margin: 20px 0;
}

.message-exchange.escalating {
    border-left-color: #ffc107;
}

.message-exchange.deescalating {
    border-left-color: #28a745;
}

.message-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0 10px 100px;
    position: relative;
}

.message-item .speaker {
    font-weight: bold;
    margin-bottom: 5px;
}

.message-item .stage-analysis {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    font-size: 0.9em;
    color: #666;
}

.escalation-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.comparison-side {
    padding: 20px;
    border-radius: 8px;
}

.comparison-side.elle {
    background: #fff3cd;
    border: 2px solid #ffc107;
}

.comparison-side.others {
    background: #d4edda;
    border: 2px solid #28a745;
}

.comparison-side h4 {
    margin-top: 0;
    color: #000;
}
