/* ── Shared timeline styles (units + places) ─────────── */

.unit-content,
.place-content {
  max-width: 62rem;
  margin: 0 auto;
  padding: 2.5rem 2rem 6rem;
}

/* ── Info cards ─────────────────────────────────────────── */
.unit-hero-card,
.place-hero-card {
  border: 1px solid var(--border);
  background: var(--bg-inset);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.unit-meta,
.place-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 0.35rem 1.5rem;
  margin-top: 0.8rem;
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 0.83rem;
  color: var(--text-dim);
}

.unit-meta b,
.place-meta b {
  color: var(--text);
  font-weight: 600;
}

/* ── Intro text (places) ───────────────────────────────── */
.place-intro {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 2rem;
  max-width: 52rem;
}

.place-intro p { margin-bottom: 0.8rem; }

/* ── Map embed ─────────────────────────────────────────── */
.map-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2.5rem;
  background: var(--bg-inset);
}

.map-block iframe {
  display: block;
  width: 100%;
  height: 400px;
  border: none;
}

.map-block .map-caption {
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 0.72rem;
  color: var(--text-dim);
  padding: 0.5rem 0.8rem;
  border-top: 1px solid var(--border);
}

/* ── OOB block ─────────────────────────────────────────── */
.oob-block {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 2.5rem;
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 0.82rem;
  line-height: 1.6;
}

.oob-block .oob-heading {
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
}

.oob-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 1.5rem;
}

.oob-unit { color: var(--text); font-weight: 600; }
.oob-cmd { color: var(--text-dim); font-weight: 400; margin-left: 0.3rem; }

/* ── Phase headers ─────────────────────────────────────── */
.phase-header {
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-align: center;
  padding: 2rem 0 1rem;
  position: relative;
}

.phase-header::before,
.phase-header::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 60px;
  height: 1px;
  background: var(--border);
}

.phase-header::before { right: calc(50% + 6rem); }
.phase-header::after { left: calc(50% + 6rem); }
.phase-header:first-of-type { padding-top: 0; }

/* ── Day row (timeline unit) ───────────────────────────── */
.day-row {
  display: grid;
  grid-template-columns: 1fr 140px 1fr;
  gap: 0.5rem;
  padding: 1rem 0;
  position: relative;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.day-row.visible { opacity: 1; transform: translateY(0); }

.day-row::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
  transform: translateX(-50%);
}

.day-row:first-of-type::before { top: 50%; }
.day-row:last-of-type::before { bottom: 50%; }

/* ── Date column ───────────────────────────────────────── */
.date-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 0.2rem;
  position: relative;
  z-index: 2;
}

.date-marker {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 50%;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.day-row.key-day .date-marker {
  border-color: var(--accent);
  background: var(--accent);
  width: 16px;
  height: 16px;
}

/* German accent override */
.day-row.key-day.german .date-marker {
  border-color: var(--amber);
  background: var(--amber);
}

.date-text {
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-top: 0.4rem;
  line-height: 1.3;
}

.day-label {
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 0.62rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.15rem;
}

/* ── Side columns ──────────────────────────────────────── */
.side { display: flex; flex-direction: column; gap: 0.4rem; }
.side.where, .side.who { align-items: flex-end; text-align: right; }
.side.what { align-items: flex-start; text-align: left; }

/* ── Location cards (left — WHERE, units) ────────────── */
.loc-card {
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-right: 3px solid var(--green);
  color: var(--text);
}

.loc-card.german { border-right-color: var(--amber); }

.loc-card .loc-detail {
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--text-dim);
  display: block;
  margin-top: 0.15rem;
}

/* ── Unit cards (left — WHO, places) ─────────────────── */
.unit-card {
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text);
}

.unit-card.allied { border-right: 3px solid var(--green); }
.unit-card.german { border-right: 3px solid var(--amber); }

.unit-card .unit-detail {
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--text-dim);
  display: block;
  margin-top: 0.15rem;
}

/* ── Action cards (right — WHAT) ──────────────────────── */
.action-card {
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
}

.action-card .action-title {
  font-family: "Work Sans", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.79rem;
  color: var(--text-bright);
  display: block;
  margin-bottom: 0.25rem;
}

.action-card .action-detail {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.55;
}

/* ── Event notes ───────────────────────────────────────── */
.event-note {
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 0.72rem;
  font-style: italic;
  color: var(--text-dim);
  padding: 0.3rem 0.65rem;
  background: var(--bg-inset);
  border-radius: 4px;
  border: 1px dashed var(--border);
}

/* ── Stat badges ───────────────────────────────────────── */
.stat-badge {
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  display: inline-block;
  margin-right: 0.3rem;
}

.stat-badge.casualties {
  background: rgba(201, 112, 112, 0.12);
  border: 1px solid rgba(201, 112, 112, 0.25);
  color: var(--red);
}

.stat-badge.strength {
  background: rgba(124, 157, 219, 0.12);
  border: 1px solid rgba(124, 157, 219, 0.25);
  color: var(--accent);
}

.stat-badge.amber {
  background: rgba(217, 181, 106, 0.12);
  border: 1px solid rgba(217, 181, 106, 0.25);
  color: var(--amber);
}

/* ── Casualty / key-facts summary ────────────────────── */
.casualty-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
  text-align: center;
  font-family: "Work Sans", system-ui, sans-serif;
}

.cas-block .cas-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-bright);
}

.cas-block .cas-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

.cas-block.kia .cas-num { color: var(--red); }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  .day-row { grid-template-columns: 1fr; gap: 0.6rem; }
  .date-col { flex-direction: row; gap: 0.6rem; }
  .day-row::before { display: none; }
  .side.where, .side.who { align-items: flex-start; text-align: left; }
  .loc-card { border-right: none; border-left: 3px solid var(--green); }
  .loc-card.german { border-left-color: var(--amber); }
  .unit-card.allied { border-right: none; border-left: 3px solid var(--green); }
  .unit-card.german { border-right: none; border-left: 3px solid var(--amber); }
  .phase-header::before, .phase-header::after { display: none; }
  .oob-cols { grid-template-columns: 1fr; }
  .casualty-summary { grid-template-columns: repeat(2, 1fr); }
  .unit-meta, .place-meta { grid-template-columns: 1fr; }
  .map-block iframe { height: 280px; }
}
