/* Base */
:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-2: #10b981;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

/* Layout helpers */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.span-2 {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: span 1;
  }
}

/* Typography */
.h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.h2 {
  margin: 0 0 0.25rem 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.p {
  margin: 0;
  line-height: 1.5;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.8rem;
}

.kicker {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

/* Buttons */
.btn {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

.btn:hover {
  background: #f9fafb;
}

.btn-secondary {
  background: #f3f4f6;
}

/* Header */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-title {
  font-weight: 800;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
}

.top-actions {
  display: flex;
  gap: 0.5rem;
}

/* Timeline */
.timeline-section {
  margin-top: 1rem;
}

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

.timeline {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.timeline-items {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.timeline-items button {
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 0.8rem;
  white-space: nowrap;
}

.timeline-items button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Card */
.card-section {
  margin-top: 1rem;
}

.card-shell {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.card-topbar {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.card-title {
  font-weight: 800;
}

.card-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.card-tags span {
  background: #eef2ff;
  color: #1e3a8a;
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

/* Card body */
.card-body {
  padding: 1rem;
}

.panel {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
}

.list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
}

.list li {
  margin-bottom: 0.25rem;
}

/* Terms */
.terms {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.terms strong {
  font-weight: 700;
}

/* Why + Connections */
.why,
.connections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 700px) {
  .why,
  .connections {
    grid-template-columns: 1fr;
  }
}

/* Footer */
.card-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hint {
  font-size: 0.75rem;
  color: var(--muted);
}

.site-footer {
  margin-top: 1rem;
  text-align: center;
}