/* ========================================
   GREENLAND ACQUISITION
   Terms.Law Theme - Consistent with main site
   ======================================== */

:root {
  /* Terms.Law Theme Colors */
  --gl-primary: #2563eb;        /* Blue */
  --gl-primary-dark: #1d4ed8;
  --gl-primary-light: #3b82f6;
  --gl-accent: #8b5cf6;         /* Purple */
  --gl-accent-light: #a78bfa;

  /* Legal Status Colors */
  --gl-lawful: #22c55e;         /* Green for valid paths */
  --gl-contested: #f97316;      /* Orange for contested */
  --gl-unlawful: #dc2626;       /* Red for unlawful */
  --gl-unclear: #8b5cf6;        /* Purple for unclear */

  /* Risk Barometer */
  --gl-risk-safe: #22c55e;
  --gl-risk-moderate: #f59e0b;
  --gl-risk-high: #ef4444;

  /* Actor Colors */
  --gl-actor-us: #3b82f6;
  --gl-actor-us-bg: #dbeafe;
  --gl-actor-denmark: #dc2626;
  --gl-actor-denmark-bg: #fee2e2;
  --gl-actor-greenland: #22c55e;
  --gl-actor-greenland-bg: #dcfce7;
  --gl-actor-nato: #6366f1;
  --gl-actor-nato-bg: #e0e7ff;

  /* Neutrals (matching base) */
  --gl-dark: #0f172a;
  --gl-dark-lighter: #1e293b;
  --gl-gray-50: #f8fafc;
  --gl-gray-100: #f1f5f9;
  --gl-gray-200: #e2e8f0;
  --gl-gray-300: #cbd5e1;
  --gl-gray-400: #94a3b8;
  --gl-gray-500: #64748b;
  --gl-gray-600: #475569;
  --gl-gray-700: #334155;
  --gl-gray-800: #1e293b;
}

/* ========================================
   BASE OVERRIDES FOR ARCTIC THEME
   ======================================== */

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gl-gray-50);
  color: var(--gl-gray-700);
  line-height: 1.6;
}

/* Hero with Terms.Law gradient */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #312e81 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

/* Hub header Terms.Law theme */
.hub-header {
  background: var(--gl-dark);
}

.hub-header nav a.active {
  color: #60a5fa;
  border-bottom-color: #60a5fa;
}

.hub-header nav a.cta {
  background: var(--gl-primary);
}

.hub-header nav a.cta:hover {
  background: var(--gl-primary-light);
}

/* ========================================
   CONSENT MATRIX STYLES
   ======================================== */

.consent-matrix-container {
  background: white;
  border: 1px solid var(--gl-gray-200);
  border-radius: 16px;
  overflow: hidden;
  margin: 24px 0;
}

.consent-matrix-header {
  background: var(--gl-gray-50);
  padding: 20px 24px;
  border-bottom: 1px solid var(--gl-gray-200);
}

.consent-matrix-header h4 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gl-gray-800);
}

/* Pathway selector buttons */
.pathway-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pathway-btn {
  padding: 10px 18px;
  background: white;
  border: 2px solid var(--gl-gray-200);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gl-gray-600);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pathway-btn:hover {
  border-color: var(--gl-primary);
  color: var(--gl-primary);
}

.pathway-btn.active {
  background: var(--gl-primary);
  border-color: var(--gl-primary);
  color: white;
}

.pathway-btn.lawful::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gl-lawful);
}

.pathway-btn.unlawful::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gl-unlawful);
}

.pathway-btn.active.lawful::before,
.pathway-btn.active.unlawful::before {
  background: white;
}

/* Matrix grid */
.consent-matrix-grid {
  padding: 0;
  overflow-x: auto;
}

.consent-matrix-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}

.consent-matrix-table th,
.consent-matrix-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--gl-gray-100);
}

.consent-matrix-table th {
  background: var(--gl-gray-50);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gl-gray-600);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.consent-matrix-table th:first-child {
  width: 40%;
}

.consent-matrix-table tbody tr:hover {
  background: var(--gl-gray-50);
}

.consent-matrix-table tbody tr:last-child td {
  border-bottom: none;
}

/* Actor label with badge */
.actor-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.actor-badge {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.actor-badge.us {
  background: var(--gl-actor-us-bg);
  color: var(--gl-actor-us);
}

.actor-badge.denmark {
  background: var(--gl-actor-denmark-bg);
  color: var(--gl-actor-denmark);
}

.actor-badge.greenland {
  background: var(--gl-actor-greenland-bg);
  color: var(--gl-actor-greenland);
}

.actor-badge.nato {
  background: var(--gl-actor-nato-bg);
  color: var(--gl-actor-nato);
}

.actor-name {
  font-weight: 600;
  color: var(--gl-gray-800);
  font-size: 0.95rem;
}

/* Consent status cells */
.consent-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.consent-status:hover {
  transform: scale(1.05);
}

.consent-status.required {
  background: var(--gl-lawful);
  background: rgba(34, 197, 94, 0.15);
  color: #166534;
}

.consent-status.required::before {
  content: '\2713';
  font-weight: 700;
}

.consent-status.not-required {
  background: rgba(239, 68, 68, 0.1);
  color: #991b1b;
}

.consent-status.not-required::before {
  content: '\2717';
  font-weight: 700;
}

.consent-status.unclear {
  background: rgba(139, 92, 246, 0.15);
  color: #5b21b6;
}

.consent-status.unclear::before {
  content: '?';
  font-weight: 700;
}

.consent-status.bypassed {
  background: rgba(239, 68, 68, 0.2);
  color: #991b1b;
  text-decoration: line-through;
}

.consent-status.bypassed::before {
  content: '\26A0';
}

/* Export buttons */
.matrix-export {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  background: var(--gl-gray-50);
  border-top: 1px solid var(--gl-gray-200);
}

.export-btn {
  padding: 8px 16px;
  background: white;
  border: 1px solid var(--gl-gray-300);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gl-gray-600);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.export-btn:hover {
  background: var(--gl-gray-100);
  border-color: var(--gl-gray-400);
}

.export-btn.copied {
  background: var(--gl-lawful);
  color: white;
  border-color: var(--gl-lawful);
}

/* ========================================
   PATHWAY SELECTOR (PROGRESSIVE DISCLOSURE)
   ======================================== */

.pathway-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.pathway-card {
  background: white;
  border: 2px solid var(--gl-gray-200);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.pathway-card:hover {
  border-color: var(--gl-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.pathway-card.active {
  border-color: var(--gl-primary);
  background: rgba(12, 74, 110, 0.05);
}

.pathway-card.lawful .pathway-card-indicator {
  background: var(--gl-lawful);
}

.pathway-card.unlawful .pathway-card-indicator {
  background: var(--gl-unlawful);
}

.pathway-card-indicator {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.pathway-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gl-gray-800);
  margin-bottom: 8px;
  padding-right: 20px;
}

.pathway-card-risk {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pathway-card-risk.straightforward {
  background: rgba(34, 197, 94, 0.15);
  color: #166534;
}

.pathway-card-risk.contestable {
  background: rgba(249, 115, 22, 0.15);
  color: #9a3412;
}

.pathway-card-risk.toxic {
  background: rgba(220, 38, 38, 0.15);
  color: #991b1b;
}

/* Pathway detail expansion */
.pathway-detail {
  display: none;
  background: white;
  border: 2px solid var(--gl-primary);
  border-radius: 12px;
  margin: 24px 0;
  overflow: hidden;
  animation: slideDown 0.3s ease;
}

.pathway-detail.active {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pathway-detail-header {
  background: var(--gl-primary);
  color: white;
  padding: 20px 24px;
}

.pathway-detail-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.pathway-detail-body {
  padding: 24px;
}

.pathway-detail-section {
  margin-bottom: 24px;
}

.pathway-detail-section:last-child {
  margin-bottom: 0;
}

.pathway-detail-section h5 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gl-gray-500);
  margin: 0 0 12px;
}

.pathway-detail-section p {
  margin: 0;
  color: var(--gl-gray-700);
  line-height: 1.7;
}

.pathway-detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pathway-detail-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gl-gray-100);
  font-size: 0.95rem;
  color: var(--gl-gray-700);
}

.pathway-detail-list li:last-child {
  border-bottom: none;
}

.pathway-detail-list li::before {
  content: '\2022';
  color: var(--gl-primary);
  font-weight: 700;
}

.pathway-fail-list li::before {
  content: '\2717';
  color: var(--gl-unlawful);
}

/* ========================================
   RULE CARDS (Expandable citations)
   ======================================== */

.rule-card {
  background: var(--gl-gray-50);
  border: 1px solid var(--gl-gray-200);
  border-radius: 8px;
  margin: 8px 0;
  overflow: hidden;
}

.rule-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.rule-card-header:hover {
  background: var(--gl-gray-100);
}

.rule-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gl-gray-800);
}

.rule-card-type {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.rule-card-type.international {
  background: rgba(14, 165, 233, 0.15);
  color: #0369a1;
}

.rule-card-type.treaty {
  background: rgba(99, 102, 241, 0.15);
  color: #4338ca;
}

.rule-card-type.danish-law {
  background: var(--gl-actor-denmark-bg);
  color: var(--gl-actor-denmark);
}

.rule-card-type.us-constitution {
  background: var(--gl-actor-us-bg);
  color: var(--gl-actor-us);
}

.rule-card-toggle {
  font-size: 0.8rem;
  color: var(--gl-gray-400);
  transition: transform 0.3s;
}

.rule-card.open .rule-card-toggle {
  transform: rotate(180deg);
}

.rule-card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.rule-card.open .rule-card-body {
  max-height: 500px;
}

.rule-card-content {
  padding: 16px;
  border-top: 1px solid var(--gl-gray-200);
}

.rule-card-content p {
  margin: 0 0 12px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--gl-gray-700);
}

.rule-card-content p:last-child {
  margin-bottom: 0;
}

.rule-card-content .rule-text {
  background: white;
  border-left: 3px solid var(--gl-primary);
  padding: 12px 16px;
  font-style: italic;
  color: var(--gl-gray-600);
  margin-bottom: 12px;
}

.rule-card-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--gl-primary);
  text-decoration: none;
  font-weight: 500;
}

.rule-card-source:hover {
  text-decoration: underline;
}

/* ========================================
   STRESS TEST TOOL
   ======================================== */

.stress-test-container {
  background: white;
  border: 1px solid var(--gl-gray-200);
  border-radius: 16px;
  overflow: hidden;
  margin: 24px 0;
}

.stress-test-header {
  background: var(--gl-gray-50);
  padding: 20px 24px;
  border-bottom: 1px solid var(--gl-gray-200);
}

.stress-test-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gl-gray-800);
}

.stress-test-inputs {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.stress-test-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stress-test-input label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gl-gray-700);
}

.stress-test-toggle {
  display: flex;
  gap: 4px;
}

.stress-test-toggle button {
  flex: 1;
  padding: 10px 12px;
  border: 2px solid var(--gl-gray-200);
  background: white;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gl-gray-600);
  cursor: pointer;
  transition: all 0.2s;
}

.stress-test-toggle button:first-child {
  border-radius: 6px 0 0 6px;
}

.stress-test-toggle button:last-child {
  border-radius: 0 6px 6px 0;
}

.stress-test-toggle button:not(:last-child) {
  border-right: none;
}

.stress-test-toggle button:hover {
  background: var(--gl-gray-50);
}

.stress-test-toggle button.active {
  background: var(--gl-primary);
  border-color: var(--gl-primary);
  color: white;
}

.stress-test-toggle button.active.yes {
  background: var(--gl-lawful);
  border-color: var(--gl-lawful);
}

.stress-test-toggle button.active.no {
  background: var(--gl-unlawful);
  border-color: var(--gl-unlawful);
}

.stress-test-toggle button.active.unclear {
  background: var(--gl-unclear);
  border-color: var(--gl-unclear);
}

/* Stress test output */
.stress-test-output {
  padding: 24px;
  background: var(--gl-gray-50);
  border-top: 1px solid var(--gl-gray-200);
}

.constraint-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.constraint-card {
  background: white;
  border: 2px solid var(--gl-gray-200);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.3s;
}

.constraint-card.triggered {
  border-color: var(--gl-unlawful);
  background: rgba(220, 38, 38, 0.05);
}

.constraint-card.warning {
  border-color: var(--gl-contested);
  background: rgba(249, 115, 22, 0.05);
}

.constraint-card.clear {
  border-color: var(--gl-lawful);
  background: rgba(34, 197, 94, 0.05);
}

.constraint-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.constraint-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.constraint-card.triggered .constraint-card-icon {
  background: rgba(220, 38, 38, 0.15);
}

.constraint-card.warning .constraint-card-icon {
  background: rgba(249, 115, 22, 0.15);
}

.constraint-card.clear .constraint-card-icon {
  background: rgba(34, 197, 94, 0.15);
}

.constraint-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gl-gray-800);
}

.constraint-card-text {
  font-size: 0.85rem;
  color: var(--gl-gray-600);
  line-height: 1.6;
  margin: 0;
}

/* Risk Barometer */
.risk-barometer {
  background: white;
  border: 2px solid var(--gl-gray-200);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.risk-barometer-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gl-gray-500);
  margin-bottom: 12px;
}

.risk-barometer-meter {
  height: 12px;
  background: linear-gradient(90deg, var(--gl-lawful) 0%, var(--gl-contested) 50%, var(--gl-unlawful) 100%);
  border-radius: 6px;
  position: relative;
  margin-bottom: 12px;
}

.risk-barometer-needle {
  position: absolute;
  top: -4px;
  width: 4px;
  height: 20px;
  background: var(--gl-dark);
  border-radius: 2px;
  transition: left 0.5s ease;
}

.risk-barometer-value {
  font-size: 1.25rem;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 8px;
  display: inline-block;
}

.risk-barometer-value.straightforward {
  background: rgba(34, 197, 94, 0.15);
  color: #166534;
}

.risk-barometer-value.contestable {
  background: rgba(249, 115, 22, 0.15);
  color: #9a3412;
}

.risk-barometer-value.toxic {
  background: rgba(220, 38, 38, 0.15);
  color: #991b1b;
}

/* ========================================
   TIMELINE ENTRIES
   ======================================== */

.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gl-gray-200);
}

.timeline-entry {
  position: relative;
  padding-bottom: 24px;
}

.timeline-entry:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -32px;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--gl-gray-200);
}

.timeline-dot.us {
  background: var(--gl-actor-us);
}

.timeline-dot.denmark {
  background: var(--gl-actor-denmark);
}

.timeline-dot.greenland {
  background: var(--gl-actor-greenland);
}

.timeline-dot.nato {
  background: var(--gl-actor-nato);
}

.timeline-card {
  background: white;
  border: 1px solid var(--gl-gray-200);
  border-radius: 12px;
  padding: 16px 20px;
  transition: all 0.2s;
}

.timeline-card:hover {
  border-color: var(--gl-primary-light);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.timeline-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gl-gray-500);
}

.timeline-actor {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.timeline-actor.us {
  background: var(--gl-actor-us-bg);
  color: var(--gl-actor-us);
}

.timeline-actor.denmark {
  background: var(--gl-actor-denmark-bg);
  color: var(--gl-actor-denmark);
}

.timeline-actor.greenland {
  background: var(--gl-actor-greenland-bg);
  color: var(--gl-actor-greenland);
}

.timeline-summary {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gl-gray-800);
  margin-bottom: 8px;
  line-height: 1.5;
}

.timeline-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.timeline-tag {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.timeline-tag.danger {
  background: rgba(220, 38, 38, 0.1);
  color: #991b1b;
}

.timeline-tag.warning {
  background: rgba(249, 115, 22, 0.1);
  color: #9a3412;
}

.timeline-tag.primary {
  background: rgba(59, 130, 246, 0.1);
  color: #1e40af;
}

.timeline-tag.success {
  background: rgba(34, 197, 94, 0.1);
  color: #166534;
}

.timeline-tag.default {
  background: var(--gl-gray-100);
  color: var(--gl-gray-600);
}

.timeline-sources {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gl-gray-100);
}

.timeline-source {
  font-size: 0.8rem;
  color: var(--gl-primary);
  text-decoration: none;
  margin-right: 12px;
}

.timeline-source:hover {
  text-decoration: underline;
}

/* ========================================
   THREE-LANE ROADMAP
   ======================================== */

.roadmap-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 24px 0;
}

@media (max-width: 900px) {
  .roadmap-container {
    grid-template-columns: 1fr;
  }
}

.roadmap-lane {
  background: white;
  border: 1px solid var(--gl-gray-200);
  border-radius: 12px;
  overflow: hidden;
}

.roadmap-lane-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gl-gray-200);
}

.roadmap-lane-header h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gl-gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
}

.roadmap-lane-header p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--gl-gray-500);
}

.roadmap-lane.rhetoric .roadmap-lane-header {
  background: rgba(59, 130, 246, 0.05);
  border-left: 4px solid var(--gl-actor-us);
}

.roadmap-lane.basing .roadmap-lane-header {
  background: rgba(34, 197, 94, 0.05);
  border-left: 4px solid var(--gl-lawful);
}

.roadmap-lane.domestic .roadmap-lane-header {
  background: rgba(139, 92, 246, 0.05);
  border-left: 4px solid var(--gl-unclear);
}

.roadmap-lane-body {
  padding: 16px 20px;
}

.roadmap-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gl-gray-100);
}

.roadmap-item:last-child {
  border-bottom: none;
}

.roadmap-item-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gl-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.roadmap-item-content {
  flex: 1;
}

.roadmap-item-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gl-gray-800);
  margin-bottom: 2px;
}

.roadmap-item-desc {
  font-size: 0.8rem;
  color: var(--gl-gray-500);
  line-height: 1.5;
}

/* ========================================
   CONDITIONAL FORECAST
   ======================================== */

.forecast-container {
  background: white;
  border: 1px solid var(--gl-gray-200);
  border-radius: 12px;
  margin: 24px 0;
  overflow: hidden;
}

.forecast-header {
  background: var(--gl-gray-50);
  padding: 16px 20px;
  border-bottom: 1px solid var(--gl-gray-200);
}

.forecast-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gl-gray-800);
}

.forecast-body {
  padding: 20px;
}

.forecast-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gl-gray-100);
}

.forecast-item:last-child {
  border-bottom: none;
}

.forecast-if {
  flex-shrink: 0;
  width: 45%;
  padding: 12px 16px;
  background: var(--gl-gray-50);
  border-radius: 8px;
  border-left: 3px solid var(--gl-primary);
}

.forecast-if-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gl-gray-500);
  margin-bottom: 4px;
}

.forecast-if-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gl-gray-800);
}

.forecast-arrow {
  display: flex;
  align-items: center;
  color: var(--gl-gray-400);
  font-size: 1.25rem;
}

.forecast-then {
  flex: 1;
  padding: 12px 16px;
  background: rgba(45, 212, 191, 0.1);
  border-radius: 8px;
  border-left: 3px solid var(--gl-accent);
}

.forecast-then-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gl-gray-500);
  margin-bottom: 4px;
}

.forecast-then-text {
  font-size: 0.9rem;
  color: var(--gl-gray-700);
}

/* ========================================
   UPDATE LOG
   ======================================== */

.update-log {
  background: var(--gl-gray-50);
  border: 1px solid var(--gl-gray-200);
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
}

.update-log-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gl-gray-500);
  margin-bottom: 12px;
}

.update-log-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.85rem;
  color: var(--gl-gray-600);
  border-bottom: 1px solid var(--gl-gray-200);
}

.update-log-item:last-child {
  border-bottom: none;
}

.update-log-date {
  font-weight: 600;
  color: var(--gl-gray-700);
  flex-shrink: 0;
}

/* ========================================
   CALLOUT VARIATIONS FOR GREENLAND
   ======================================== */

.callout-maduro-link {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-left: 4px solid #6366f1;
  padding: 16px 20px;
  border-radius: 8px;
  margin: 24px 0;
}

.callout-maduro-link a {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: none;
}

.callout-maduro-link a:hover {
  text-decoration: underline;
}

.callout-ieepa-link {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
  border-left: 4px solid #f97316;
  padding: 16px 20px;
  border-radius: 8px;
  margin: 24px 0;
}

.callout-ieepa-link a {
  color: #c2410c;
  font-weight: 600;
  text-decoration: none;
}

.callout-ieepa-link a:hover {
  text-decoration: underline;
}

/* ========================================
   WHAT WOULD CHANGE MY VIEW BOX
   ======================================== */

.credibility-box {
  background: linear-gradient(135deg, var(--gl-dark) 0%, var(--gl-dark-lighter) 100%);
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
  color: white;
}

.credibility-box-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gl-accent);
}

.credibility-box ul {
  margin: 0;
  padding-left: 20px;
}

.credibility-box li {
  color: rgba(255,255,255,0.9);
  padding: 6px 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.credibility-box li::marker {
  color: var(--gl-accent);
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
  .consent-matrix-table {
    font-size: 0.85rem;
  }

  .consent-matrix-table th,
  .consent-matrix-table td {
    padding: 10px 12px;
  }

  .pathway-cards {
    grid-template-columns: 1fr;
  }

  .stress-test-inputs {
    grid-template-columns: 1fr;
  }

  .forecast-item {
    flex-direction: column;
    gap: 8px;
  }

  .forecast-if,
  .forecast-then {
    width: 100%;
  }

  .forecast-arrow {
    transform: rotate(90deg);
    justify-content: center;
  }

  /* Mobile: stat row stacks */
  .stat-row {
    flex-direction: column;
    gap: 8px;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-card-value {
    font-size: 1.5rem;
  }

  /* Mobile: key insight stacks */
  .key-insight {
    flex-direction: column;
    text-align: center;
    padding: 16px;
  }

  .key-insight-icon {
    margin: 0 auto;
  }

  .key-insight-text {
    font-size: 1rem;
  }

  /* Mobile: hide hot badge on small screens */
  .live-card.hot::after {
    display: none;
  }

  /* Mobile: smaller section badges */
  .section-badge {
    font-size: 0.65rem;
    padding: 3px 10px;
  }
}

/* ========================================
   VISUAL POLISH - Icons & Flair
   ======================================== */

/* Animated gradient border for featured tools */
.featured-tool-card {
  position: relative;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.featured-tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg, var(--gl-primary), var(--gl-accent), var(--gl-primary));
  background-size: 200% 200%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.featured-tool-card:hover::before {
  opacity: 1;
  animation: gradientShift 2s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Glow effect on tool cards */
.featured-tool-card:hover {
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.2), 0 0 0 1px rgba(37, 99, 235, 0.1);
  transform: translateY(-4px);
}

.featured-tool-card.stress-test:hover {
  box-shadow: 0 8px 32px rgba(239, 68, 68, 0.2), 0 0 0 1px rgba(239, 68, 68, 0.1);
}

/* Pulse animation for live badge */
.live-badge {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Hot card glow */
.live-card.hot {
  position: relative;
  overflow: hidden;
}

.live-card.hot::after {
  content: '🔥 HOT';
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: white;
  padding: 2px 8px;
  border-radius: 100px;
  animation: hotGlow 1.5s ease-in-out infinite alternate;
}

@keyframes hotGlow {
  from { box-shadow: 0 0 4px rgba(239, 68, 68, 0.5); }
  to { box-shadow: 0 0 12px rgba(239, 68, 68, 0.8); }
}

/* Tab styling enhancements */
.page-tab {
  position: relative;
  overflow: hidden;
}

.page-tab.tool-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gl-primary), var(--gl-accent));
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 3px 3px 0 0;
}

.page-tab.tool-tab:hover::after,
.page-tab.tool-tab.active::after {
  width: 80%;
}

/* Section badges */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.section-badge.interactive {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(139, 92, 246, 0.1));
  color: var(--gl-primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.section-badge.analysis {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.1));
  color: #059669;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.section-badge.warning {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(249, 115, 22, 0.1));
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Icon containers */
.icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.icon-circle.blue {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(59, 130, 246, 0.15));
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.icon-circle.purple {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(167, 139, 250, 0.15));
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.icon-circle.red {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(248, 113, 113, 0.15));
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.icon-circle.green {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(74, 222, 128, 0.15));
  border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Gradient text utility */
.gradient-text {
  background: linear-gradient(135deg, var(--gl-primary), var(--gl-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Decorative corner accents */
.corner-accent {
  position: relative;
}

.corner-accent::before,
.corner-accent::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  border: 2px solid;
  opacity: 0.1;
}

.corner-accent::before {
  top: -8px;
  left: -8px;
  border-right: none;
  border-bottom: none;
  border-color: var(--gl-primary);
}

.corner-accent::after {
  bottom: -8px;
  right: -8px;
  border-left: none;
  border-top: none;
  border-color: var(--gl-accent);
}

/* Floating label style */
.floating-label {
  position: absolute;
  top: -10px;
  left: 16px;
  background: white;
  padding: 2px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gl-gray-500);
  border-radius: 4px;
  border: 1px solid var(--gl-gray-200);
}

/* Stat cards */
.stat-row {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}

.stat-card {
  flex: 1;
  background: white;
  border: 1px solid var(--gl-gray-200);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.stat-card-value {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gl-primary), var(--gl-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gl-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 4px;
}

/* Key insight callout */
.key-insight {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 24px 0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.key-insight-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gl-primary), var(--gl-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.key-insight-content {
  flex: 1;
}

.key-insight-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gl-accent-light);
  margin-bottom: 6px;
}

.key-insight-text {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
}

/* Shimmer loading effect utility */
.shimmer {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Country flag badges */
.flag-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.flag-badge.us {
  background: var(--gl-actor-us-bg);
  color: var(--gl-actor-us);
}

.flag-badge.denmark {
  background: var(--gl-actor-denmark-bg);
  color: var(--gl-actor-denmark);
}

.flag-badge.greenland {
  background: var(--gl-actor-greenland-bg);
  color: var(--gl-actor-greenland);
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  .pathway-btn,
  .export-btn,
  .stress-test-toggle button,
  .timeline-dot,
  .timeline::before {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .stress-test-container,
  .consent-matrix-container {
    break-inside: avoid;
  }
}

/* ========================================
   GREENLAND ACQUISITION SIMULATOR
   Strategic Game Interface Styles
   ======================================== */

/* ----------------------------------------
   SIMULATOR COLOR VARIABLES
   ---------------------------------------- */
:root {
  /* Simulator-specific colors */
  --sim-diplomatic: #3b82f6;    /* Blue - Diplomatic actions */
  --sim-economic: #22c55e;      /* Green - Economic actions */
  --sim-security: #ef4444;      /* Red - Security/Military actions */
  --sim-narrative: #a855f7;     /* Purple - Narrative/PR actions */
  --sim-trump: #f59e0b;         /* Gold - Trump approval */

  /* Gate states */
  --sim-locked: #6b7280;        /* Gray - Locked gate */
  --sim-unlocked: #22c55e;      /* Green - Unlocked gate */
  --sim-passed: #3b82f6;        /* Blue - Passed gate */

  /* Event types */
  --sim-shock: #ef4444;         /* Red - Shock events */
  --sim-opportunity: #3b82f6;   /* Blue - Narrative events */
}

/* ----------------------------------------
   SIMULATOR CONTAINER
   ---------------------------------------- */
.simulator-container {
  background: var(--gl-gray-50);
  min-height: 100vh;
  padding: 20px;
}

.simulator-wrapper {
  max-width: 1400px;
  margin: 0 auto;
}

/* ----------------------------------------
   SIMULATOR HEADER
   ---------------------------------------- */
.sim-header {
  background: linear-gradient(135deg, var(--gl-dark) 0%, var(--gl-dark-lighter) 100%);
  border-radius: 16px;
  padding: 24px 32px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.sim-header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.sim-title {
  color: white;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sim-title-icon {
  font-size: 1.75rem;
}

/* Turn Display */
.sim-turn-display {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 12px 24px;
  text-align: center;
}

.sim-turn-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 4px;
}

.sim-turn-number {
  font-size: 2rem;
  font-weight: 800;
  color: white;
  line-height: 1;
}

.sim-turn-max {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Phase Indicator */
.sim-phase-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-phase-badge {
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.sim-phase-badge.phase-planning {
  background: linear-gradient(135deg, var(--sim-diplomatic), #60a5fa);
  color: white;
}

.sim-phase-badge.phase-action {
  background: linear-gradient(135deg, var(--sim-economic), #4ade80);
  color: white;
}

.sim-phase-badge.phase-resolution {
  background: linear-gradient(135deg, var(--sim-narrative), #c084fc);
  color: white;
}

.sim-phase-badge.phase-event {
  background: linear-gradient(135deg, var(--sim-shock), #f87171);
  color: white;
  animation: phasePulse 1.5s ease-in-out infinite;
}

@keyframes phasePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* ----------------------------------------
   METERS DASHBOARD
   ---------------------------------------- */
.sim-meters-dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .sim-meters-dashboard {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .sim-meters-dashboard {
    grid-template-columns: 1fr;
  }
}

.sim-meter-group {
  background: white;
  border: 1px solid var(--gl-gray-200);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.sim-meter-group:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.sim-meter-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gl-gray-100);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sim-meter-header.actor-us {
  background: var(--gl-actor-us-bg);
  border-left: 4px solid var(--gl-actor-us);
}

.sim-meter-header.actor-denmark {
  background: var(--gl-actor-denmark-bg);
  border-left: 4px solid var(--gl-actor-denmark);
}

.sim-meter-header.actor-greenland {
  background: var(--gl-actor-greenland-bg);
  border-left: 4px solid var(--gl-actor-greenland);
}

.sim-meter-header.actor-world {
  background: var(--gl-actor-nato-bg);
  border-left: 4px solid var(--gl-actor-nato);
}

.sim-meter-icon {
  font-size: 1.25rem;
}

.sim-meter-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gl-gray-800);
}

.sim-meter-body {
  padding: 16px;
}

.sim-meter-item {
  margin-bottom: 12px;
}

.sim-meter-item:last-child {
  margin-bottom: 0;
}

.sim-meter-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.sim-meter-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gl-gray-600);
}

.sim-meter-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gl-gray-800);
}

.sim-meter-bar {
  height: 8px;
  background: var(--gl-gray-200);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.sim-meter-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease-out, background-color 0.3s ease;
}

/* Meter fill colors based on value */
.sim-meter-fill.positive {
  background: linear-gradient(90deg, var(--sim-economic), #4ade80);
}

.sim-meter-fill.neutral {
  background: linear-gradient(90deg, var(--sim-trump), #fbbf24);
}

.sim-meter-fill.negative {
  background: linear-gradient(90deg, var(--sim-shock), #f87171);
}

.sim-meter-fill.diplomatic {
  background: linear-gradient(90deg, var(--sim-diplomatic), #60a5fa);
}

/* ----------------------------------------
   LEGITIMACY TRACKER
   ---------------------------------------- */
.sim-legitimacy-tracker {
  background: white;
  border: 1px solid var(--gl-gray-200);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

.sim-legitimacy-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sim-legitimacy-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gl-gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-legitimacy-score {
  font-size: 1.5rem;
  font-weight: 800;
}

.sim-legitimacy-score.high {
  color: var(--sim-economic);
}

.sim-legitimacy-score.medium {
  color: var(--sim-trump);
}

.sim-legitimacy-score.low {
  color: var(--sim-shock);
}

.sim-legitimacy-bar-container {
  position: relative;
  height: 16px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}

.sim-legitimacy-bar-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    var(--sim-shock) 0%,
    var(--sim-trump) 50%,
    var(--sim-economic) 100%
  );
  border-radius: 8px;
}

.sim-legitimacy-marker {
  position: absolute;
  top: -2px;
  width: 4px;
  height: 20px;
  background: var(--gl-dark);
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: left 0.5s ease-out;
}

.sim-legitimacy-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gl-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sim-legitimacy-status {
  text-align: center;
  margin-top: 12px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

.sim-legitimacy-status.high {
  background: rgba(34, 197, 94, 0.15);
  color: #166534;
}

.sim-legitimacy-status.medium {
  background: rgba(245, 158, 11, 0.15);
  color: #92400e;
}

.sim-legitimacy-status.low {
  background: rgba(239, 68, 68, 0.15);
  color: #991b1b;
}

/* ----------------------------------------
   GATES PANEL
   ---------------------------------------- */
.sim-gates-panel {
  background: white;
  border: 1px solid var(--gl-gray-200);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

.sim-gates-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gl-gray-800);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-gates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.sim-gate-card {
  background: var(--gl-gray-50);
  border: 2px solid var(--gl-gray-200);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: default;
}

.sim-gate-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Gate states */
.sim-gate-card.locked {
  border-color: var(--sim-locked);
  background: var(--gl-gray-100);
}

.sim-gate-card.locked .sim-gate-icon {
  color: var(--sim-locked);
}

.sim-gate-card.unlocked {
  border-color: var(--sim-unlocked);
  background: rgba(34, 197, 94, 0.1);
}

.sim-gate-card.unlocked .sim-gate-icon {
  color: var(--sim-unlocked);
}

.sim-gate-card.passed {
  border-color: var(--sim-passed);
  background: rgba(59, 130, 246, 0.1);
}

.sim-gate-card.passed .sim-gate-icon {
  color: var(--sim-passed);
}

.sim-gate-icon {
  font-size: 1.75rem;
  margin-bottom: 8px;
  transition: transform 0.3s ease;
}

.sim-gate-card:hover .sim-gate-icon {
  transform: scale(1.1);
}

.sim-gate-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gl-gray-800);
  margin-bottom: 4px;
}

.sim-gate-status {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sim-gate-card.locked .sim-gate-status {
  color: var(--sim-locked);
}

.sim-gate-card.unlocked .sim-gate-status {
  color: var(--sim-unlocked);
}

.sim-gate-card.passed .sim-gate-status {
  color: var(--sim-passed);
}

.sim-gate-requirements {
  font-size: 0.7rem;
  color: var(--gl-gray-500);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--gl-gray-300);
}

/* ----------------------------------------
   EVENT DISPLAY
   ---------------------------------------- */
.sim-event-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sim-event-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sim-event-card {
  background: white;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s ease;
  animation: eventSlideIn 0.4s ease forwards;
}

@keyframes eventSlideIn {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.sim-event-card.shock {
  border-top: 4px solid var(--sim-shock);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.2), 0 20px 40px rgba(239, 68, 68, 0.2);
}

.sim-event-card.narrative {
  border-top: 4px solid var(--sim-opportunity);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2), 0 20px 40px rgba(59, 130, 246, 0.2);
}

.sim-event-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sim-event-card.shock .sim-event-header {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(248, 113, 113, 0.1));
}

.sim-event-card.narrative .sim-event-header {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(96, 165, 250, 0.1));
}

.sim-event-icon {
  font-size: 2rem;
}

.sim-event-type {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sim-event-card.shock .sim-event-type {
  color: var(--sim-shock);
}

.sim-event-card.narrative .sim-event-type {
  color: var(--sim-opportunity);
}

.sim-event-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gl-gray-800);
  margin: 0;
}

.sim-event-body {
  padding: 0 24px 24px;
}

.sim-event-description {
  font-size: 0.95rem;
  color: var(--gl-gray-600);
  line-height: 1.7;
  margin-bottom: 16px;
}

.sim-event-effects {
  background: var(--gl-gray-50);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.sim-event-effects-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gl-gray-500);
  margin-bottom: 8px;
}

.sim-event-effect {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  padding: 4px 0;
}

.sim-event-effect.positive {
  color: var(--sim-economic);
}

.sim-event-effect.negative {
  color: var(--sim-shock);
}

.sim-event-dismiss {
  width: 100%;
  padding: 12px;
  background: var(--gl-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.sim-event-dismiss:hover {
  background: var(--gl-primary-dark);
}

/* ----------------------------------------
   CARD HAND - FILTERS
   ---------------------------------------- */
.sim-card-hand {
  background: white;
  border: 1px solid var(--gl-gray-200);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

.sim-card-hand-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.sim-card-hand-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gl-gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-card-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sim-filter-btn {
  padding: 6px 14px;
  border: 2px solid var(--gl-gray-200);
  background: white;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gl-gray-600);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sim-filter-btn:hover {
  border-color: var(--gl-gray-300);
  background: var(--gl-gray-50);
}

.sim-filter-btn.active {
  color: white;
}

.sim-filter-btn.active[data-filter="all"] {
  background: var(--gl-dark);
  border-color: var(--gl-dark);
}

.sim-filter-btn.active[data-filter="diplomatic"] {
  background: var(--sim-diplomatic);
  border-color: var(--sim-diplomatic);
}

.sim-filter-btn.active[data-filter="economic"] {
  background: var(--sim-economic);
  border-color: var(--sim-economic);
}

.sim-filter-btn.active[data-filter="security"] {
  background: var(--sim-security);
  border-color: var(--sim-security);
}

.sim-filter-btn.active[data-filter="narrative"] {
  background: var(--sim-narrative);
  border-color: var(--sim-narrative);
}

/* ----------------------------------------
   CARD HAND - CARDS GRID
   ---------------------------------------- */
.sim-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1200px) {
  .sim-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .sim-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .sim-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Individual Cards */
.sim-card {
  background: white;
  border: 1px solid var(--gl-gray-200);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.sim-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sim-card:hover .sim-card-description {
  max-height: 200px;
}

.sim-card.selected {
  border-color: var(--gl-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2), 0 4px 12px rgba(37, 99, 235, 0.15);
  transform: translateY(-4px);
}

.sim-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.sim-card.disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Card category borders */
.sim-card[data-category="diplomatic"] {
  border-left: 4px solid var(--sim-diplomatic);
}

.sim-card[data-category="economic"] {
  border-left: 4px solid var(--sim-economic);
}

.sim-card[data-category="security"] {
  border-left: 4px solid var(--sim-security);
}

.sim-card[data-category="narrative"] {
  border-left: 4px solid var(--sim-narrative);
}

.sim-card-header {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.sim-card[data-category="diplomatic"] .sim-card-header {
  background: rgba(59, 130, 246, 0.08);
}

.sim-card[data-category="economic"] .sim-card-header {
  background: rgba(34, 197, 94, 0.08);
}

.sim-card[data-category="security"] .sim-card-header {
  background: rgba(239, 68, 68, 0.08);
}

.sim-card[data-category="narrative"] .sim-card-header {
  background: rgba(168, 85, 247, 0.08);
}

.sim-card-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gl-gray-800);
  line-height: 1.3;
}

.sim-card-cost {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}

.sim-card[data-category="diplomatic"] .sim-card-cost {
  background: var(--sim-diplomatic);
}

.sim-card[data-category="economic"] .sim-card-cost {
  background: var(--sim-economic);
}

.sim-card[data-category="security"] .sim-card-cost {
  background: var(--sim-security);
}

.sim-card[data-category="narrative"] .sim-card-cost {
  background: var(--sim-narrative);
}

.sim-card-body {
  padding: 12px 14px;
}

.sim-card-category {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.sim-card[data-category="diplomatic"] .sim-card-category {
  color: var(--sim-diplomatic);
}

.sim-card[data-category="economic"] .sim-card-category {
  color: var(--sim-economic);
}

.sim-card[data-category="security"] .sim-card-category {
  color: var(--sim-security);
}

.sim-card[data-category="narrative"] .sim-card-category {
  color: var(--sim-narrative);
}

.sim-card-description {
  font-size: 0.8rem;
  color: var(--gl-gray-600);
  line-height: 1.5;
  max-height: 3.6em;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.sim-card-requirements {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--gl-gray-200);
  font-size: 0.75rem;
  color: var(--gl-gray-500);
}

.sim-card-requirements.unmet {
  color: var(--sim-shock);
}

.sim-card-effects {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.sim-card-effect-tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
}

.sim-card-effect-tag.positive {
  background: rgba(34, 197, 94, 0.15);
  color: #166534;
}

.sim-card-effect-tag.negative {
  background: rgba(239, 68, 68, 0.15);
  color: #991b1b;
}

/* ----------------------------------------
   TURN CONTROLS
   ---------------------------------------- */
.sim-turn-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: white;
  border: 1px solid var(--gl-gray-200);
  border-radius: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.sim-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-btn-primary {
  background: linear-gradient(135deg, var(--gl-primary), var(--gl-primary-dark));
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.sim-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.sim-btn-primary:disabled {
  background: var(--gl-gray-300);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.sim-btn-secondary {
  background: var(--gl-gray-100);
  color: var(--gl-gray-700);
  border: 1px solid var(--gl-gray-200);
}

.sim-btn-secondary:hover {
  background: var(--gl-gray-200);
}

.sim-btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--sim-shock);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.sim-btn-danger:hover {
  background: var(--sim-shock);
  color: white;
}

/* ----------------------------------------
   FORECAST MODAL
   ---------------------------------------- */
.sim-forecast-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sim-forecast-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sim-forecast-modal {
  background: white;
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sim-forecast-header {
  background: linear-gradient(135deg, var(--gl-dark), var(--gl-dark-lighter));
  color: white;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sim-forecast-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sim-forecast-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.sim-forecast-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sim-forecast-body {
  padding: 24px;
  overflow-y: auto;
}

.sim-forecast-section {
  margin-bottom: 24px;
}

.sim-forecast-section:last-child {
  margin-bottom: 0;
}

.sim-forecast-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gl-gray-500);
  margin-bottom: 12px;
}

.sim-forecast-table {
  width: 100%;
  border-collapse: collapse;
}

.sim-forecast-table th,
.sim-forecast-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--gl-gray-100);
}

.sim-forecast-table th {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gl-gray-500);
  text-transform: uppercase;
  background: var(--gl-gray-50);
}

.sim-forecast-outcome {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-forecast-outcome-name {
  font-weight: 600;
  color: var(--gl-gray-800);
}

.sim-forecast-probability {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sim-forecast-prob-bar {
  flex: 1;
  height: 8px;
  background: var(--gl-gray-200);
  border-radius: 4px;
  overflow: hidden;
  min-width: 100px;
}

.sim-forecast-prob-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.sim-forecast-prob-fill.high {
  background: linear-gradient(90deg, var(--sim-economic), #4ade80);
}

.sim-forecast-prob-fill.medium {
  background: linear-gradient(90deg, var(--sim-trump), #fbbf24);
}

.sim-forecast-prob-fill.low {
  background: linear-gradient(90deg, var(--sim-shock), #f87171);
}

.sim-forecast-prob-value {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gl-gray-800);
  min-width: 45px;
  text-align: right;
}

/* ----------------------------------------
   HISTORY PANEL
   ---------------------------------------- */
.sim-history-panel {
  background: white;
  border: 1px solid var(--gl-gray-200);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

.sim-history-header {
  padding: 16px 20px;
  background: var(--gl-gray-50);
  border-bottom: 1px solid var(--gl-gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.sim-history-header:hover {
  background: var(--gl-gray-100);
}

.sim-history-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gl-gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-history-toggle {
  font-size: 0.8rem;
  color: var(--gl-gray-400);
  transition: transform 0.3s ease;
}

.sim-history-panel.collapsed .sim-history-toggle {
  transform: rotate(180deg);
}

.sim-history-body {
  max-height: 300px;
  overflow-y: auto;
  transition: max-height 0.3s ease;
}

.sim-history-panel.collapsed .sim-history-body {
  max-height: 0;
  overflow: hidden;
}

.sim-history-entry {
  padding: 12px 20px;
  border-bottom: 1px solid var(--gl-gray-100);
  display: flex;
  gap: 12px;
  transition: background 0.2s ease;
}

.sim-history-entry:hover {
  background: var(--gl-gray-50);
}

.sim-history-entry:last-child {
  border-bottom: none;
}

.sim-history-turn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--gl-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gl-gray-600);
}

.sim-history-entry.event-shock .sim-history-turn {
  background: rgba(239, 68, 68, 0.15);
  color: var(--sim-shock);
}

.sim-history-entry.event-action .sim-history-turn {
  background: rgba(59, 130, 246, 0.15);
  color: var(--sim-diplomatic);
}

.sim-history-entry.event-gate .sim-history-turn {
  background: rgba(34, 197, 94, 0.15);
  color: var(--sim-economic);
}

.sim-history-content {
  flex: 1;
}

.sim-history-text {
  font-size: 0.9rem;
  color: var(--gl-gray-700);
  margin-bottom: 4px;
}

.sim-history-timestamp {
  font-size: 0.75rem;
  color: var(--gl-gray-400);
}

/* ----------------------------------------
   ANIMATIONS
   ---------------------------------------- */

/* Meter fill animation */
.sim-meter-fill {
  transition: width 0.5s ease-out;
}

/* Gate transitions */
.sim-gate-card {
  transition: all 0.3s ease;
}

/* Card animations */
.sim-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sim-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Shake animation for negative events */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.sim-shake {
  animation: shake 0.6s ease-in-out;
}

/* Pulse animation for positive changes */
@keyframes positivePulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.sim-pulse-positive {
  animation: positivePulse 0.6s ease-out;
}

/* Negative pulse */
@keyframes negativePulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.sim-pulse-negative {
  animation: negativePulse 0.6s ease-out;
}

/* Fade in animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sim-fade-in {
  animation: fadeIn 0.3s ease;
}

/* Slide up animation */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sim-slide-up {
  animation: slideUp 0.4s ease;
}

/* ----------------------------------------
   RESPONSIVE ADJUSTMENTS
   ---------------------------------------- */
@media (max-width: 768px) {
  .sim-header {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .sim-header-left {
    flex-direction: column;
  }

  .sim-title {
    font-size: 1.25rem;
  }

  .sim-turn-number {
    font-size: 1.5rem;
  }

  .sim-card-filters {
    justify-content: center;
  }

  .sim-turn-controls {
    flex-direction: column;
  }

  .sim-btn {
    width: 100%;
    justify-content: center;
  }

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

  .sim-forecast-table {
    font-size: 0.85rem;
  }

  .sim-forecast-table th,
  .sim-forecast-table td {
    padding: 8px;
  }

  .sim-forecast-prob-bar {
    min-width: 60px;
  }
}

@media (max-width: 480px) {
  .sim-gates-grid {
    grid-template-columns: 1fr;
  }

  .sim-phase-badge {
    font-size: 0.75rem;
    padding: 6px 12px;
  }

  .sim-legitimacy-labels {
    font-size: 0.6rem;
  }
}

/* ----------------------------------------
   PRINT STYLES FOR SIMULATOR
   ---------------------------------------- */
@media print {
  .sim-meter-fill,
  .sim-legitimacy-bar-bg,
  .sim-gate-card,
  .sim-card {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .sim-turn-controls,
  .sim-card-filters {
    display: none;
  }

  .sim-history-panel.collapsed .sim-history-body {
    max-height: none;
    overflow: visible;
  }
}

/* ========================================
   SIMULATOR - HTML CLASS NAME MAPPINGS
   Maps actual HTML classes to styles
   ======================================== */

/* Header */
.simulator-header {
  background: linear-gradient(135deg, var(--gl-dark, #1a1a2e) 0%, #2d2d44 100%);
  border-radius: 16px;
  padding: 24px 32px;
  margin-bottom: 24px;
  color: white;
}

.simulator-header h2 {
  color: white;
  margin: 0 0 8px 0;
  font-size: 1.5rem;
}

.simulator-intro {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.turn-display {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}

#sim-turn-label {
  font-size: 1.25rem;
  font-weight: 700;
}

#sim-turn-number {
  font-size: 0.9rem;
  opacity: 0.7;
}

.phase-indicator {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Meters Dashboard */
.meters-dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .meters-dashboard {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .meters-dashboard {
    grid-template-columns: 1fr;
  }
}

.meter-group {
  background: white;
  border: 1px solid var(--gl-gray-200, #e5e7eb);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.meter-group[data-group="greenland"] {
  border-left: 4px solid #22c55e;
}

.meter-group[data-group="denmark"] {
  border-left: 4px solid #dc2626;
}

.meter-group[data-group="us"] {
  border-left: 4px solid #3b82f6;
}

.meter-group[data-group="geopolitical"] {
  border-left: 4px solid #6366f1;
}

.meter-group h3 {
  margin: 0 0 12px 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gl-gray-800, #1f2937);
}

.meter {
  margin-bottom: 12px;
}

.meter:last-child {
  margin-bottom: 0;
}

.meter label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gl-gray-600, #4b5563);
  margin-bottom: 4px;
}

.meter-bar {
  height: 8px;
  background: var(--gl-gray-200, #e5e7eb);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 2px;
}

.meter-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  transition: width 0.5s ease-out;
}

.meter-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gl-gray-800, #1f2937);
}

/* Legitimacy Tracker */
.legitimacy-tracker {
  background: white;
  border: 1px solid var(--gl-gray-200, #e5e7eb);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.legitimacy-tracker > label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gl-gray-800, #1f2937);
  margin-bottom: 8px;
}

.legitimacy-bar {
  height: 12px;
  background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #22c55e 100%);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
  position: relative;
}

.legitimacy-fill {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  background: var(--gl-gray-300, #d1d5db);
  transition: width 0.5s ease-out;
}

#sim-legitimacy-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gl-gray-800, #1f2937);
  margin-right: 8px;
}

#sim-legitimacy-status {
  font-size: 0.85rem;
  color: var(--gl-gray-600, #4b5563);
}

/* Gates Panel */
.gates-panel {
  background: white;
  border: 1px solid var(--gl-gray-200, #e5e7eb);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.gates-panel h3 {
  margin: 0 0 16px 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.gates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.gate {
  background: var(--gl-gray-50, #f9fafb);
  border: 2px solid var(--gl-gray-300, #d1d5db);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: all 0.3s ease;
}

.gate.unlocked {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.gate.passed {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.gate-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.gate-icon.locked { color: #6b7280; }
.gate-icon.unlocked { color: #22c55e; }
.gate-icon.passed { color: #3b82f6; }

.gate-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gl-gray-800, #1f2937);
  display: block;
}

.gate-status {
  font-size: 0.75rem;
  color: var(--gl-gray-600, #4b5563);
  display: block;
  margin-top: 2px;
}

/* Event Display */
.event-display {
  margin-bottom: 24px;
}

.event-display .event-card {
  background: white;
  border: 2px solid var(--gl-gray-200, #e5e7eb);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.event-display .event-card.hidden {
  display: none;
}

.event-display .event-card.shock {
  border-color: #ef4444;
  border-left-width: 4px;
}

.event-display .event-card.narrative {
  border-color: #3b82f6;
  border-left-width: 4px;
}

.event-type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
  background: var(--gl-gray-100, #f3f4f6);
  color: var(--gl-gray-600, #4b5563);
}

.event-card.shock .event-type-badge {
  background: #fef2f2;
  color: #dc2626;
}

.event-card.narrative .event-type-badge {
  background: #eff6ff;
  color: #2563eb;
}

.event-title {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.event-description {
  margin: 0 0 12px 0;
  color: var(--gl-gray-600, #4b5563);
  font-size: 0.9rem;
}

.event-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-effects .effect-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.effect-tag.positive {
  background: #dcfce7;
  color: #166534;
}

.effect-tag.negative {
  background: #fee2e2;
  color: #991b1b;
}

/* Card Hand */
.card-hand {
  background: white;
  border: 1px solid var(--gl-gray-200, #e5e7eb);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.card-hand h3 {
  margin: 0 0 16px 0;
  font-size: 1rem;
  font-weight: 700;
}

#sim-actions-remaining {
  font-weight: 400;
  color: var(--gl-gray-500, #6b7280);
}

.card-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.card-filter {
  padding: 6px 14px;
  border: 1px solid var(--gl-gray-300, #d1d5db);
  border-radius: 100px;
  background: white;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.card-filter:hover {
  background: var(--gl-gray-50, #f9fafb);
}

.card-filter.active {
  background: var(--gl-dark, #1a1a2e);
  color: white;
  border-color: var(--gl-dark, #1a1a2e);
}

.card-filter[data-category="diplomatic"].active { background: #3b82f6; border-color: #3b82f6; }
.card-filter[data-category="economic"].active { background: #22c55e; border-color: #22c55e; }
.card-filter[data-category="security"].active { background: #ef4444; border-color: #ef4444; }
.card-filter[data-category="narrative"].active { background: #a855f7; border-color: #a855f7; }
.card-filter[data-category="trump"].active { background: #f59e0b; border-color: #f59e0b; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

/* Individual Card */
.sim-card {
  background: white;
  border: 1px solid var(--gl-gray-200, #e5e7eb);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left-width: 4px;
}

.sim-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sim-card.selected {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

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

.sim-card.disabled:hover {
  transform: none;
  box-shadow: none;
}

.sim-card[data-category="diplomatic"] { border-left-color: #3b82f6; }
.sim-card[data-category="economic"] { border-left-color: #22c55e; }
.sim-card[data-category="security"] { border-left-color: #ef4444; }
.sim-card[data-category="narrative"] { border-left-color: #a855f7; }
.sim-card[data-category="trump"] { border-left-color: #f59e0b; }

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

.sim-card-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gl-gray-800, #1f2937);
}

.sim-card-cost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--gl-gray-100, #f3f4f6);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gl-gray-600, #4b5563);
  flex-shrink: 0;
}

.sim-card-category {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.sim-card[data-category="diplomatic"] .sim-card-category { color: #3b82f6; }
.sim-card[data-category="economic"] .sim-card-category { color: #22c55e; }
.sim-card[data-category="security"] .sim-card-category { color: #ef4444; }
.sim-card[data-category="narrative"] .sim-card-category { color: #a855f7; }
.sim-card[data-category="trump"] .sim-card-category { color: #f59e0b; }

.sim-card-description {
  font-size: 0.8rem;
  color: var(--gl-gray-600, #4b5563);
  line-height: 1.4;
  margin-bottom: 8px;
}

.sim-card-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.sim-card-coercion {
  display: inline-block;
  padding: 2px 8px;
  background: #fef2f2;
  color: #dc2626;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 8px;
}

/* Turn Controls */
.turn-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.turn-controls .btn-primary,
.turn-controls .btn-secondary,
.turn-controls .btn-danger {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.turn-controls .btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

.turn-controls .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.turn-controls .btn-secondary {
  background: var(--gl-gray-100, #f3f4f6);
  color: var(--gl-gray-700, #374151);
  border: 1px solid var(--gl-gray-300, #d1d5db);
}

.turn-controls .btn-secondary:hover {
  background: var(--gl-gray-200, #e5e7eb);
}

.turn-controls .btn-danger {
  background: white;
  color: #dc2626;
  border: 1px solid #dc2626;
}

.turn-controls .btn-danger:hover {
  background: #dc2626;
  color: white;
}

/* Forecast Modal */
.forecast-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.forecast-modal.hidden {
  display: none;
}

.forecast-content {
  background: white;
  border-radius: 16px;
  padding: 24px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

.forecast-content h3 {
  margin: 0 0 8px 0;
}

.forecast-description {
  color: var(--gl-gray-600, #4b5563);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* History Panel */
.history-panel {
  background: white;
  border: 1px solid var(--gl-gray-200, #e5e7eb);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.history-panel h3 {
  margin: 0 0 12px 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.history-log {
  max-height: 200px;
  overflow-y: auto;
  font-size: 0.8rem;
}

.history-entry {
  padding: 8px 0;
  border-bottom: 1px solid var(--gl-gray-100, #f3f4f6);
  display: flex;
  gap: 10px;
}

.history-entry:last-child {
  border-bottom: none;
}

.history-turn {
  font-weight: 700;
  color: var(--gl-gray-500, #6b7280);
  flex-shrink: 0;
  min-width: 50px;
}

.history-message {
  color: var(--gl-gray-700, #374151);
}

/* Game End Modal */
.game-end-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  padding: 20px;
}

.game-end-modal.hidden {
  display: none;
}

.game-end-content {
  background: white;
  border-radius: 20px;
  padding: 40px;
  max-width: 500px;
  width: 100%;
  text-align: center;
}

.game-end-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.game-end-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 12px 0;
}

.game-end-description {
  color: var(--gl-gray-600, #4b5563);
  margin-bottom: 24px;
}

.game-end-stats {
  background: var(--gl-gray-50, #f9fafb);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  text-align: left;
}

/* Utility */
.hidden {
  display: none !important;
}

/* ========================================
   SIMULATOR HELP SYSTEM
   Tutorial, hints, and tooltips
   ======================================== */

/* Help Button in Header */
.sim-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  color: white;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-left: 12px;
  transition: all 0.2s ease;
  vertical-align: middle;
}

.sim-help-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: white;
  transform: scale(1.1);
}

/* Tutorial Modal */
.sim-tutorial-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 20px;
  animation: simFadeIn 0.3s ease;
}

.sim-tutorial-modal.hidden {
  display: none;
}

@keyframes simFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sim-tutorial-content {
  background: white;
  border-radius: 20px;
  max-width: 650px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: simSlideUp 0.3s ease;
}

@keyframes simSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.sim-tutorial-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
  color: white;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sim-tutorial-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.sim-tutorial-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.2s;
}

.sim-tutorial-close:hover {
  color: white;
  transform: scale(1.1);
}

.sim-tutorial-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.sim-tutorial-section {
  margin-bottom: 24px;
}

.sim-tutorial-section:last-child {
  margin-bottom: 0;
}

.sim-tutorial-section h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-tutorial-section p {
  color: #4b5563;
  margin: 0 0 10px 0;
  line-height: 1.5;
  font-size: 0.9rem;
}

.sim-tutorial-section ul,
.sim-tutorial-section ol {
  margin: 0;
  padding-left: 20px;
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.6;
}

.sim-tutorial-section li {
  margin-bottom: 6px;
}

.sim-coercion-tag {
  display: inline-block;
  background: #fef2f2;
  color: #dc2626;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.sim-tutorial-footer {
  background: #f9fafb;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #e5e7eb;
}

.sim-tutorial-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #6b7280;
  cursor: pointer;
}

.sim-tutorial-checkbox input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.sim-tutorial-footer .btn-primary {
  padding: 10px 24px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.sim-tutorial-footer .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Contextual Hint Banner */
.sim-hint-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #93c5fd;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: simSlideDown 0.3s ease;
}

.sim-hint-banner.hidden {
  display: none;
}

@keyframes simSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.sim-hint-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.sim-hint-text {
  flex: 1;
  font-size: 0.9rem;
  color: #1e40af;
  line-height: 1.4;
}

.sim-hint-dismiss {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.7;
  transition: all 0.2s;
}

.sim-hint-dismiss:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Section Help Labels */
.sim-section-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #6b7280;
  margin-left: auto;
  cursor: help;
}

.sim-section-help:hover {
  color: #3b82f6;
}

/* Card Selection Instruction */
.sim-card-instruction {
  text-align: center;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: #6b7280;
}

.sim-card-instruction strong {
  color: #1f2937;
}

.sim-card-instruction.has-selection {
  background: #eff6ff;
  color: #1e40af;
}

/* Card Tooltips */
.sim-card-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  z-index: 100;
  margin-bottom: 8px;
}

.sim-card-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1a1a2e;
}

.sim-card:hover .sim-card-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Phase-specific hints */
.sim-phase-hint {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 8px;
  font-style: italic;
}

/* Selected card highlight */
.sim-card.selected::before {
  content: '✓ Selected - Click again to play';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #22c55e;
  color: white;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  z-index: 10;
}

.sim-card {
  position: relative;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .sim-tutorial-content {
    max-height: 90vh;
    border-radius: 16px;
  }

  .sim-tutorial-header {
    padding: 16px 20px;
  }

  .sim-tutorial-body {
    padding: 20px;
  }

  .sim-tutorial-footer {
    flex-direction: column;
    gap: 12px;
  }

  .sim-tutorial-footer .btn-primary {
    width: 100%;
  }
}

/* ========================================
   TWO-COLUMN GAME LAYOUT
   Cards on left, Status sidebar on right
   ======================================== */

.sim-game-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}

.sim-main-area {
  min-width: 0; /* Prevent grid blowout */
}

.sim-sidebar {
  position: sticky;
  top: 70px; /* Below sticky header */
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  padding-right: 8px;
}

/* Custom scrollbar for sidebar */
.sim-sidebar::-webkit-scrollbar {
  width: 6px;
}

.sim-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sim-sidebar::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.sim-sidebar::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Compact sidebar styling */
.sim-sidebar .meters-dashboard {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.sim-sidebar .meter-group {
  padding: 12px;
  border-radius: 8px;
}

.sim-sidebar .meter-group h3 {
  font-size: 0.85rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sim-sidebar .meter {
  display: grid;
  grid-template-columns: 80px 1fr 40px;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.sim-sidebar .meter:last-child {
  margin-bottom: 0;
}

.sim-sidebar .meter label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gl-gray-600, #4b5563);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sim-sidebar .meter-bar {
  height: 8px;
  border-radius: 4px;
}

.sim-sidebar .meter-value {
  font-size: 0.75rem;
  font-weight: 700;
  text-align: right;
}

/* Compact legitimacy tracker in sidebar */
.sim-sidebar .legitimacy-tracker {
  padding: 12px;
  margin-bottom: 16px;
  border-radius: 8px;
}

.sim-sidebar .legitimacy-tracker label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sim-sidebar .legitimacy-bar {
  height: 10px;
  margin-bottom: 4px;
}

.sim-sidebar #sim-legitimacy-value {
  font-size: 0.9rem;
}

.sim-sidebar #sim-legitimacy-status {
  font-size: 0.75rem;
}

/* Compact gates panel in sidebar */
.sim-sidebar .gates-panel {
  padding: 12px;
  border-radius: 8px;
}

.sim-sidebar .gates-panel h3 {
  font-size: 0.85rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sim-sidebar .gates-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sim-sidebar .gate {
  display: grid;
  grid-template-columns: 24px 1fr;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  padding: 8px;
  border-radius: 6px;
  background: var(--gl-gray-50, #f9fafb);
  border: 1px solid var(--gl-gray-200, #e5e7eb);
}

.sim-sidebar .gate-icon {
  grid-row: span 2;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sim-sidebar .gate-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gl-gray-700, #374151);
}

.sim-sidebar .gate-status {
  font-size: 0.7rem;
  color: var(--gl-gray-500, #6b7280);
}

.sim-sidebar .gate.unlocked {
  background: #dcfce7;
  border-color: #22c55e;
}

.sim-sidebar .gate.unlocked .gate-icon {
  color: #22c55e;
}

/* Cards area takes full width of main area */
.sim-main-area .card-hand {
  margin-bottom: 16px;
}

.sim-main-area .cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

/* Responsive: Stack on mobile */
@media (max-width: 900px) {
  .sim-game-layout {
    grid-template-columns: 1fr;
  }

  .sim-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
    order: -1; /* Move sidebar above cards on mobile */
  }

  .sim-sidebar .meters-dashboard {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .sim-sidebar .gates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .sim-sidebar .meters-dashboard {
    grid-template-columns: 1fr;
  }

  .sim-sidebar .gates-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   REIGNS-STYLE GAME UI
   Single card, swipe interaction
   ======================================== */

.reigns-game {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  position: relative;
}

/* Top Status Bar */
.reigns-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.reigns-turn-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reigns-date {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
}

.reigns-turn {
  font-size: 0.85rem;
  color: #94a3b8;
}

.reigns-help-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.reigns-help-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* Meter Icons Row */
.reigns-meters {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
}

.reigns-meter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: help;
}

.reigns-meter-icon {
  font-size: 1.5rem;
}

.reigns-meter-bar {
  width: 8px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.reigns-meter-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, #22c55e, #4ade80);
  border-radius: 4px;
  transition: height 0.5s ease;
}

.reigns-meter-bar.inverted .reigns-meter-fill {
  background: linear-gradient(to top, #ef4444, #f87171);
}

.reigns-meter-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
}

/* Preview effects animation */
.reigns-meter.preview-positive .reigns-meter-fill {
  box-shadow: 0 0 12px #22c55e;
}

.reigns-meter.preview-negative .reigns-meter-fill {
  box-shadow: 0 0 12px #ef4444;
}

/* Main Card Area */
.reigns-card-area {
  position: relative;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

/* The Card */
.reigns-card {
  width: 280px;
  height: 300px;
  perspective: 1000px;
  cursor: grab;
  transition: transform 0.3s ease;
}

.reigns-card:active {
  cursor: grabbing;
}

.reigns-card-inner {
  width: 100%;
  height: 100%;
  background: white;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reigns-card:hover .reigns-card-inner {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.reigns-card.swiping-left {
  transform: translateX(-100px) rotate(-15deg);
  opacity: 0.5;
}

.reigns-card.swiping-right {
  transform: translateX(100px) rotate(15deg);
  opacity: 0.5;
}

.reigns-card.played {
  animation: cardPlayedRight 0.4s ease forwards;
}

.reigns-card.skipped {
  animation: cardPlayedLeft 0.4s ease forwards;
}

@keyframes cardPlayedRight {
  to {
    transform: translateX(400px) rotate(30deg);
    opacity: 0;
  }
}

@keyframes cardPlayedLeft {
  to {
    transform: translateX(-400px) rotate(-30deg);
    opacity: 0;
  }
}

.reigns-card-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #3b82f6;
  margin-bottom: 12px;
}

.reigns-card[data-category="diplomatic"] .reigns-card-category { color: #3b82f6; }
.reigns-card[data-category="economic"] .reigns-card-category { color: #22c55e; }
.reigns-card[data-category="security"] .reigns-card-category { color: #ef4444; }
.reigns-card[data-category="narrative"] .reigns-card-category { color: #a855f7; }
.reigns-card[data-category="trump"] .reigns-card-category { color: #f59e0b; }

.reigns-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.reigns-card-description {
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.5;
  margin: 0 0 16px 0;
  flex: 1;
}

.reigns-card-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reigns-card-effects .effect {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.reigns-card-effects .effect.positive {
  background: #dcfce7;
  color: #16a34a;
}

.reigns-card-effects .effect.negative {
  background: #fee2e2;
  color: #dc2626;
}

.reigns-card-coercion {
  margin-top: 12px;
  padding: 6px 12px;
  background: #fef2f2;
  color: #dc2626;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

.reigns-card-coercion.hidden {
  display: none;
}

/* Swipe Hints */
.reigns-swipe-hint {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.3;
  transition: opacity 0.2s;
}

.reigns-swipe-hint.left {
  left: 10px;
}

.reigns-swipe-hint.right {
  right: 10px;
}

.reigns-card-area:hover .reigns-swipe-hint {
  opacity: 0.6;
}

.swipe-icon {
  font-size: 1.5rem;
}

.swipe-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
}

/* Action Buttons */
.reigns-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 0 20px;
}

.reigns-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s;
}

.reigns-btn.skip {
  background: linear-gradient(135deg, #374151, #1f2937);
  color: white;
}

.reigns-btn.skip:hover {
  background: linear-gradient(135deg, #4b5563, #374151);
  transform: scale(1.1);
}

.reigns-btn.play {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}

.reigns-btn.play:hover {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  transform: scale(1.1);
}

.reigns-btn .btn-icon {
  font-size: 1.5rem;
  font-weight: 700;
}

.reigns-btn .btn-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
}

.reigns-cards-remaining {
  font-size: 0.9rem;
  color: #94a3b8;
  font-weight: 500;
}

.reigns-cards-remaining span {
  font-weight: 700;
  color: white;
}

/* Legitimacy Bar */
.reigns-legitimacy {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.reigns-legitimacy-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 8px;
}

.reigns-legitimacy-label span:last-child {
  font-weight: 700;
  color: white;
}

.reigns-legitimacy-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.reigns-legitimacy-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.reigns-legitimacy-status {
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
}

/* Progress Gates */
.reigns-progress {
  text-align: center;
  margin-bottom: 16px;
}

.reigns-progress-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.reigns-gates {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.reigns-gate {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  transition: all 0.3s;
}

.reigns-gate .gate-num {
  font-size: 1rem;
  font-weight: 700;
  color: #64748b;
}

.reigns-gate .gate-check {
  display: none;
  font-size: 1.25rem;
  color: #22c55e;
}

.reigns-gate.unlocked {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
}

.reigns-gate.unlocked .gate-num {
  display: none;
}

.reigns-gate.unlocked .gate-check {
  display: block;
}

/* Bottom Controls */
.reigns-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.reigns-control-btn {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.reigns-control-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

/* ==================== MODALS ==================== */

/* Event Modal */
.reigns-event-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.reigns-event-modal.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reigns-event-content {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
  border-radius: 24px;
  padding: 32px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.reigns-event-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #60a5fa;
  margin-bottom: 16px;
}

.reigns-event-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin: 0 0 12px 0;
}

.reigns-event-description {
  font-size: 1rem;
  color: #94a3b8;
  line-height: 1.6;
  margin: 0 0 20px 0;
}

.reigns-event-effects {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.reigns-event-effects .effect {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
}

.reigns-event-effects .effect.positive {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.reigns-event-effects .effect.negative {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.reigns-event-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.reigns-event-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Tutorial Modal */
.reigns-tutorial-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 20px;
}

.reigns-tutorial-modal.hidden {
  display: none;
}

.reigns-tutorial-content {
  background: white;
  border-radius: 24px;
  max-width: 420px;
  width: 100%;
  overflow: hidden;
}

.reigns-tutorial-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
  color: white;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reigns-tutorial-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.reigns-tutorial-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.reigns-tutorial-close:hover {
  color: white;
}

.reigns-tutorial-body {
  padding: 24px;
}

.tutorial-step {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.tutorial-step:last-child {
  margin-bottom: 0;
}

.step-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.step-text {
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.5;
}

.step-text strong {
  color: #1a1a2e;
}

.reigns-tutorial-footer {
  background: #f9fafb;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #e5e7eb;
}

.tutorial-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #6b7280;
  cursor: pointer;
}

.reigns-start-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.reigns-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Game End Modal */
.reigns-end-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 20px;
}

.reigns-end-modal.hidden {
  display: none;
}

.reigns-end-content {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
  border-radius: 24px;
  padding: 40px;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.reigns-end-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.reigns-end-title {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin: 0 0 16px 0;
}

.reigns-end-description {
  font-size: 1rem;
  color: #94a3b8;
  line-height: 1.6;
  margin: 0 0 24px 0;
}

.reigns-end-content .btn-primary {
  padding: 14px 32px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

/* Preview Panel */
.reigns-preview {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  border-radius: 12px;
  padding: 12px 16px;
  min-width: 200px;
  z-index: 10;
}

.reigns-preview.hidden {
  display: none;
}

.reigns-preview-title {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 8px;
  text-align: center;
}

.reigns-preview-effects {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* Responsive */
@media (max-width: 500px) {
  .reigns-game {
    padding: 16px;
  }

  .reigns-card {
    width: 260px;
    height: 280px;
  }

  .reigns-btn {
    width: 60px;
    height: 60px;
  }
}
