/* ============================================================
   Intel Comparison Page — Row-aligned, minimal
   ============================================================ */

:root {
  --bg: #0f0f1a;
  --surface: #1a1a2e;
  --surface-2: #1f1f35;
  --border: #2a2a3e;
  --text: #e8e6e3;
  --muted: #6b7280;
  --amber: #a8920f;
  --radius: 4px;
  --mono: 'JetBrains Mono', 'Courier New', monospace;
  --serif: 'Newsreader', Georgia, serif;
}

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

html, body {
  background: #0f0f1a;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* Header */
.comp-header {
  padding: 32px 24px 24px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.back-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  display: inline-block;
  margin-bottom: 12px;
  transition: color 0.15s;
}
.back-link:hover { color: var(--text); }

h1 {
  font-family: var(--mono);
  font-size: clamp(16px, 3vw, 22px);
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--amber);
  text-transform: uppercase;
}

.comp-subtitle {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

/* Row-aligned 3-column grid */
.comp-table {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
  margin: 0;
}

/* Column headers — sticky */
.col-header {
  padding: 12px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.model-name {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text);
}

.model-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

/* Layer label — spans all 3 columns */
.layer-row {
  grid-column: 1 / -1;
  background: var(--bg);
  padding: 12px 16px 4px;
  border-top: 1px solid var(--border);
}

.layer-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Each cell in the grid — one model's card for one row */
.comp-cell {
  background: var(--bg);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-self: stretch; /* key: all cells in a row match height */
}

/* Card */
.obs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  flex: 1;
}

.obs-tag {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
}

.obs-source {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 6px;
}

/* Per-tech source name (Fix 5) */
.obs-source-title {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.obs-insight {
  font-family: var(--serif);
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 6px;
}

/* Fix 2: paragraph spacing */
.obs-insight p,
.obs-prediction p {
  margin-bottom: 6px;
}
.obs-insight p:last-child,
.obs-prediction p:last-child {
  margin-bottom: 0;
}

.obs-prediction {
  font-family: var(--serif);
  font-size: 0.78rem;
  color: var(--amber);
  line-height: 1.5;
  padding: 6px 8px;
  background: rgba(168, 146, 15, 0.06);
  border-left: 2px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 6px;
}

/* Assumptions */
.assumptions-toggle {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  cursor: pointer;
  margin-top: 6px;
  user-select: none;
}
.assumptions-toggle:hover { color: var(--text); }

.assumptions-list {
  display: none;
  padding: 4px 0 0 8px;
  border-left: 1px solid var(--border);
  margin-top: 4px;
}
.assumptions-toggle.open + .assumptions-list { display: block; }

/* Fix 4: evidence as clickable links */
.assumption-item {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  padding: 2px 0;
  line-height: 1.4;
  text-decoration: none;
  display: block;
  transition: color 0.15s;
}
.assumption-item:hover {
  color: var(--text);
}
.assumption-entry {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

/* Suggestions section header row */
.suggestions-header-row {
  border-top: 2px solid var(--border);
  padding-top: 16px;
}

.suggestions-subtitle {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* Suggestions cell — matches obs-card style */
.comp-cell.suggestions-cell {
  background: var(--bg);
  padding: 8px 12px;
}

.suggestions-empty {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  padding: 8px 0;
}

/* Suggestion item card */
.suggestion-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.suggestion-item:hover {
  border-color: var(--muted);
}

.suggestion-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
}

/* Expand/collapse button */
.suggestion-toggle {
  background: none;
  border: none;
  color: var(--amber);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  flex-shrink: 0;
  line-height: 1.5;
  transition: opacity 0.15s;
}
.suggestion-toggle:hover { opacity: 0.7; }

.suggestion-text {
  font-family: var(--serif);
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.5;
}

/* Collapsible detail */
.suggestion-detail {
  display: none;
  padding: 6px 10px 8px 26px;
  border-top: 1px solid var(--border);
}

.suggestion-item.open .suggestion-detail {
  display: block;
}

.suggestion-based-on {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--amber);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: opacity 0.15s;
}
.suggestion-based-on:hover { opacity: 0.7; }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Responsive */
@media (max-width: 900px) {
  .comp-table {
    grid-template-columns: 1fr;
  }
  .layer-row { grid-column: 1; }
}
