:root {
  --bg: #0c0e14;
  --bg-gradient: linear-gradient(135deg, #0c0e14 0%, #151825 100%);
  --surface: #181c28;
  --surface-hover: #1e2333;
  --surface-raised: #212636;
  --border: #2a2f3e;
  --border-light: #353b4e;
  --text: #eaedf3;
  --text-muted: #7d839a;
  --text-dim: #555b72;

  /* Mina brand colors */
  --orange: #e39844;
  --orange-light: #f0b86e;
  --orange-bg: rgba(227, 152, 68, 0.12);
  --orange-glow: rgba(227, 152, 68, 0.25);
  --green: #2dd4a0;
  --green-bg: rgba(45, 212, 160, 0.1);
  --yellow: #f0c040;
  --yellow-bg: rgba(240, 192, 64, 0.1);
  --red: #ef6b5e;
  --red-bg: rgba(239, 107, 94, 0.1);
  --blue: #6cb4ee;
  --blue-bg: rgba(108, 180, 238, 0.1);
  --purple: #9b8afb;
  --purple-bg: rgba(155, 138, 251, 0.1);

  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px 48px;
}

/* ============ SIDEBAR LAYOUT ============ */
.layout {
  display: flex;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px 48px;
  gap: 0;
}

.sidebar {
  flex: 0 0 180px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px 12px 0;
  position: sticky;
  top: 16px;
  align-self: flex-start;
  border-right: 1px solid var(--border);
  margin-right: 12px;
}

.sidebar-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  text-align: left;
  width: 100%;
}

.sidebar-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.sidebar-btn.active {
  background: var(--surface);
  color: var(--orange);
}

.sidebar-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--orange);
  border-radius: 0 3px 3px 0;
}

.sidebar-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.sidebar-label {
  font-size: 16px;
  font-weight: 700;
}

.sidebar-btn.locked .sidebar-icon { opacity: 0.5; }
.sidebar-btn.locked .sidebar-label { opacity: 0.5; }

.main-content {
  flex: 1;
  min-width: 0;
  padding: 0 8px;
}

/* ============ HERO BANNER ============ */
.hero {
  background: var(--bg-gradient);
  border-bottom: 1px solid var(--border);
  padding: 28px 24px 24px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--red-bg) 0%, transparent 70%);
  pointer-events: none;
  animation: chaos-drift 8s ease-in-out infinite alternate;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -60px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(155, 138, 251, 0.12) 0%, transparent 70%);
  pointer-events: none;
  animation: chaos-drift 6s ease-in-out infinite alternate-reverse;
}

@keyframes chaos-drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.1); }
  100% { transform: translate(-20px, 15px) scale(0.95); }
}

.hero-inner {
  max-width: 1140px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 24px;
}

.hero-logo {
  flex-shrink: 0;
}

.hero-logo svg {
  width: 120px;
  height: auto;
  color: var(--text);
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.hero-badge {
  display: inline-block;
  background: var(--red-bg);
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(239, 107, 94, 0.35);
}

.hero h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, var(--text) 0%, var(--red) 50%, var(--purple) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: chaos-gradient 6s ease-in-out infinite alternate;
  white-space: nowrap;
}

@keyframes chaos-gradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.hero .subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.last-updated {
  color: var(--text-dim);
  font-size: 12px;
  margin: 0;
}

/* ============ HERO CARDS ============ */
.hero-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.hero-card {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(4px);
}

.hero-card-warn { border-color: rgba(240, 192, 64, 0.3); }
.hero-card-ok { border-color: rgba(45, 212, 160, 0.2); }

.hero-card-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
  padding-top: 2px;
}

.hero-card-body { flex: 1; min-width: 0; }

.hero-card-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.hero-card-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

/* Config tags */
.cfg-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cfg-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
}

.cfg-tag.cfg-ok { background: var(--green-bg); color: var(--green); }
.cfg-tag.cfg-warn { background: var(--yellow-bg); color: var(--yellow); }
.cfg-tag.cfg-off { background: var(--surface-raised); color: var(--text-dim); }

/* Issue items */
.issue-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--yellow-bg);
  color: var(--yellow);
  margin-left: 4px;
}

.issue-count.fixed { background: var(--green-bg); color: var(--green); }

.issue-item {
  font-size: 13px;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.issue-item.issue-open { color: var(--yellow); }
.issue-item.issue-fixed { color: var(--text-muted); }
.issue-item.issue-fixed span { text-decoration: line-through; }

.issue-link {
  font-size: 11px;
  font-weight: 700;
  font-family: 'SF Mono', Menlo, monospace;
  color: var(--orange);
  text-decoration: none;
  background: var(--orange-bg);
  padding: 1px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

.issue-link:hover { background: rgba(227, 152, 68, 0.2); }

/* ============ PHASE BANNER (horizontal) ============ */
.phase-strip {
  display: flex;
  gap: 0;
  margin-top: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.phase-cell {
  flex: 1;
  padding: 12px 10px;
  background: var(--surface);
  text-align: center;
  position: relative;
  transition: all 0.2s;
  border-right: 1px solid var(--border);
}

.phase-cell:last-child { border-right: none; }

.phase-cell.done {
  background: var(--surface);
}

.phase-cell.active {
  background: var(--surface-raised);
  box-shadow: inset 0 3px 0 var(--orange);
}

.phase-cell.pending {
  opacity: 0.5;
}

.phase-cell .phase-icon {
  font-size: 20px;
  margin-bottom: 4px;
  display: block;
}

.phase-cell .phase-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  display: block;
}

.phase-cell.active .phase-name {
  color: var(--orange);
}

.phase-cell.done .phase-name {
  color: var(--green);
}

.phase-cell .phase-status-text {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
  display: block;
}

.phase-cell.done .phase-status-text { color: var(--green); }
.phase-cell.active .phase-status-text { color: var(--orange); }
.phase-cell.pending .phase-status-text { color: var(--text-dim); }

/* Arrow connector between phases */
.phase-cell { cursor: pointer; transition: all 0.15s; }
.phase-cell:hover { background: var(--surface-hover); }
.phase-cell.expanded { background: var(--surface-raised); box-shadow: inset 0 -3px 0 var(--orange); }

.phase-cell::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid var(--border);
  z-index: 2;
}

.phase-cell:last-child::after { display: none; }

/* ============ PHASE EXPAND PANEL ============ */
#phaseExpand {
  animation: fadeSlide 0.2s ease-out;
}

.phase-expand-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--orange);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 28px 32px 32px;
  margin-bottom: 32px;
}

.pe-top {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.pe-info { flex: 1; }

.pe-label {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.pe-duration {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 8px;
}

.pe-goal {
  font-size: 16px;
  color: var(--orange-light);
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.5;
}

.pe-what {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.pe-roles-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ============ ROLE TILES ============ */
.role-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.role-tile {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 0.15s, transform 0.1s;
}

.role-tile:hover {
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.role-tile-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.role-tile-icon { font-size: 20px; }

.role-tile-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--orange);
}

.role-tile-actions {
  list-style: none;
  padding: 0;
  margin: 0;
}

.role-tile-actions li {
  font-size: 13px;
  color: var(--text);
  padding: 5px 0 5px 18px;
  position: relative;
  line-height: 1.5;
}

.role-tile-actions li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  opacity: 0.5;
}

/* ============ TABS ============ */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--surface);
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  width: fit-content;
}

.tab {
  padding: 12px 28px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 7px;
  transition: all 0.15s;
}

.tab:hover { color: var(--text); background: var(--surface-hover); }
.tab.active { color: var(--orange); background: var(--surface-raised); box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.tab.locked::after { content: ' \1F512'; font-size: 11px; }

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

/* ============ TIMELINE HEADER ============ */
.tl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.tz-controls {
  text-align: right;
  flex-shrink: 0;
}

.utc-clock {
  font-size: 20px;
  font-weight: 700;
  font-family: 'SF Mono', Menlo, monospace;
  color: var(--orange);
  margin-bottom: 6px;
}

.tz-toggle {
  display: inline-flex;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px;
  margin-bottom: 4px;
}

.tz-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  background: none;
  border: none;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.tz-btn:hover { color: var(--text); }
.tz-btn.active { background: var(--orange); color: white; }

.tz-note {
  font-size: 11px;
  color: var(--text-dim);
}

/* ============ TIMELINE GRID ============ */
.timeline-grid {
  margin-bottom: 32px;
  padding: 8px 0;
}

/* --- Bundle separator --- */
.bundle-separator {
  padding: 16px 20px;
  margin: 24px 0 8px;
  border-radius: var(--radius);
  border-left: 4px solid var(--blue);
  background: var(--surface);
  position: relative;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.bundle-separator:first-child { margin-top: 0; }
.bundle-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px; display: flex; align-items: center; gap: 8px; }
.bundle-title { font-size: 18px; font-weight: 700; color: var(--text); }
.bundle-desc { font-size: 13px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }

/* Bundle status badge */
.bundle-status {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
}
.bundle-status-done {
  background: rgba(45, 212, 160, 0.15);
  color: var(--green);
  border: 1px solid rgba(45, 212, 160, 0.3);
}
.bundle-status-active {
  background: rgba(255, 165, 0, 0.15);
  color: var(--orange);
  border: 1px solid rgba(255, 165, 0, 0.3);
  animation: pulse-badge 2s infinite;
}
.bundle-status-pending {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 6px rgba(255, 165, 0, 0.2); }
  50% { box-shadow: 0 0 14px rgba(255, 165, 0, 0.4); }
}

/* Bundle done state */
.bundle-separator.bundle-done {
  opacity: 0.7;
}
.bundle-separator.bundle-done .bundle-title { color: var(--text-muted); }

/* Bundle active state */
.bundle-separator.bundle-active {
  box-shadow: 0 0 20px rgba(255, 165, 0, 0.1);
  border-left-width: 5px;
}

/* Bundle pending state */
.bundle-separator.bundle-pending {
  opacity: 0.5;
}

.bundle-blue { border-left-color: var(--blue); }
.bundle-blue .bundle-label { color: var(--blue); }
.bundle-yellow { border-left-color: var(--yellow); }
.bundle-yellow .bundle-label { color: var(--yellow); }
.bundle-orange { border-left-color: var(--orange); }
.bundle-orange .bundle-label { color: var(--orange); }
.bundle-purple { border-left-color: var(--purple); }
.bundle-purple .bundle-label { color: var(--purple); }
.bundle-red { border-left-color: var(--red); }
.bundle-red .bundle-label { color: var(--red); }
.bundle-green { border-left-color: var(--green); }
.bundle-green .bundle-label { color: var(--green); }

/* --- Vertical connector --- */
.tl-connector {
  width: 2px;
  height: 20px;
  background: var(--border-light);
  margin: 0 0 0 35px;
}

/* Time-gap connector: height proportional to actual time between milestones,
   left rail rendered as a pseudo-element so the label can sit alongside it. */
.tl-connector-gap {
  width: auto;
  height: var(--gap-h, 28px);
  background: transparent;
  margin: 0 0 0 24px;
  display: flex;
  align-items: center;
  position: relative;
}
.tl-connector-gap::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-light);
  border-radius: 1px;
}
.tl-connector-gap.tier-tight::before  { background: linear-gradient(180deg, var(--orange) 0%, var(--orange-light) 100%); width: 3px; left: 10.5px; }
.tl-connector-gap.tier-short::before  { background: linear-gradient(180deg, var(--yellow) 0%, var(--orange) 100%); width: 2.5px; }
.tl-connector-gap.tier-medium::before { background: var(--border-light); }
.tl-connector-gap.tier-long::before   { background: repeating-linear-gradient(180deg, var(--border-light) 0 6px, transparent 6px 12px); }

.tl-gap-label {
  margin-left: 28px;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 9px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-weight: 500;
  letter-spacing: 0.3px;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}
.tl-connector-gap.tier-tight .tl-gap-label {
  color: var(--orange);
  border-color: var(--orange);
  background: var(--orange-bg);
  font-weight: 600;
}
.tl-connector-gap.tier-short .tl-gap-label {
  color: var(--yellow);
  border-color: rgba(240, 192, 64, 0.45);
  background: var(--yellow-bg);
}

/* Day divider — visually separates the timeline by calendar day in the active TZ */
.tl-day-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 14px;
}
.tl-day-divider::before, .tl-day-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border) 50%, transparent 100%);
}
.tl-day-divider span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--text-muted);
  padding: 4px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  white-space: nowrap;
}

/* --- Node card (horizontal layout) --- */
.tl-node-row {
  padding: 0;
}

.tl-node {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  cursor: pointer;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  position: relative;
}

.tl-node:hover {
  background: var(--surface);
  border-color: var(--border-light);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.tl-node.selected {
  background: var(--surface);
  border-color: var(--orange);
  box-shadow: 0 0 16px var(--orange-bg);
}

.tl-node-left { flex-shrink: 0; }
.tl-node-body { flex: 1; min-width: 0; }
.tl-node-meta { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }

/* Dot */
.tl-dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  border: 3px solid var(--border);
  background: var(--bg);
  transition: transform 0.2s, box-shadow 0.2s;
}

.tl-node:hover .tl-dot { transform: scale(1.15); }
.tl-node.selected .tl-dot { transform: scale(1.15); }

.tl-node.done .tl-dot {
  background: var(--green);
  border-color: var(--green);
  color: white;
  box-shadow: 0 0 14px rgba(45, 212, 160, 0.3);
}

.tl-node.active .tl-dot {
  background: var(--orange);
  border-color: var(--orange);
  color: white;
  box-shadow: 0 0 18px var(--orange-glow);
  animation: pulse 2s infinite;
}

.tl-node.pending .tl-dot {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-dim);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 18px var(--orange-glow); }
  50% { box-shadow: 0 0 30px var(--orange-glow); }
}

/* --- "You are here" indicator --- */
.tl-node.tl-here {
  background: linear-gradient(90deg, var(--orange-bg) 0%, transparent 70%);
  border-color: var(--orange);
  box-shadow: 0 0 24px var(--orange-glow);
}
.tl-here-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--orange);
  color: #fff;
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-left: 8px;
  vertical-align: middle;
}
.tl-here-time {
  font-weight: 500;
  letter-spacing: 0.2px;
  text-transform: none;
  opacity: 0.95;
  margin-left: 4px;
}
.tl-here-dot {
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  flex-shrink: 0;
  animation: here-blink 1.4s ease-in-out infinite;
}
@keyframes here-blink {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.4; }
}
.tl-connector-here::before {
  background: linear-gradient(180deg, var(--green) 0%, var(--orange) 50%, var(--border-light) 100%) !important;
  width: 3px !important;
}
.tl-connector-here .tl-here-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange);
  color: #fff;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 14px;
  box-shadow: 0 4px 12px var(--orange-glow);
  position: relative;
  z-index: 1;
}

/* Date & time (inline in meta row) */
.tl-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.tl-node.pending .tl-date { color: var(--text-dim); }

.tl-time {
  font-size: 13px;
  font-weight: 600;
  font-family: 'SF Mono', Menlo, monospace;
  color: var(--orange);
}

.tl-node.pending .tl-time { color: var(--text-dim); }

/* Name */
.tl-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tl-node.pending .tl-name { color: var(--text-muted); }
.tl-node:hover .tl-name { color: var(--orange-light); }

/* Bundle tag inline with name */
.tl-bundle-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--blue-bg);
  color: var(--blue);
}
.tl-bundle-tag.bundle-blue { background: var(--blue-bg); color: var(--blue); }
.tl-bundle-tag.bundle-yellow { background: var(--yellow-bg); color: var(--yellow); }
.tl-bundle-tag.bundle-orange { background: var(--orange-bg); color: var(--orange); }
.tl-bundle-tag.bundle-purple { background: var(--purple-bg); color: var(--purple); }
.tl-bundle-tag.bundle-red { background: var(--red-bg); color: var(--red); }
.tl-bundle-tag.bundle-green { background: var(--green-bg); color: var(--green); }

.tl-summary {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 2px;
}
.tl-node.pending .tl-summary { color: var(--text-dim); }
.tl-node.tl-fallback .tl-summary { color: var(--yellow); opacity: 0.8; }
.tl-node.tl-second-fork .tl-summary { color: var(--purple); opacity: 0.8; }

/* Phase tag */
.milestone-phase-h {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 6px;
}

.milestone-phase-h.pre-upgrade { background: var(--blue-bg); color: var(--blue); }
.milestone-phase-h.state-finalization { background: var(--yellow-bg); color: var(--yellow); }
.milestone-phase-h.upgrade { background: var(--orange-bg); color: var(--orange); }
.milestone-phase-h.post-upgrade { background: var(--green-bg); color: var(--green); }

/* ============ SECTION TITLES ============ */
.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: -12px;
  margin-bottom: 20px;
}

/* ============ CARDS ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-row {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 14px;
  border-bottom: 1px solid var(--border);
}

.card-row:last-child { border-bottom: none; }
.card-row:hover { background: var(--surface-hover); }

.artifact-status {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.artifact-status.available { background: var(--green); box-shadow: 0 0 10px rgba(45, 212, 160, 0.35); }
.artifact-status.pending { background: var(--border-light); }

.artifact-label { flex: 1; font-size: 15px; }
.artifact-label.pending { color: var(--text-muted); }

.artifact-link {
  color: var(--orange);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  background: var(--orange-bg);
  border-radius: 6px;
  transition: all 0.15s;
}

.artifact-link:hover { background: rgba(227, 152, 68, 0.2); }

/* ============ ANNOUNCEMENTS ============ */
.announcement {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.announcement:last-child { border-bottom: none; }

.announcement-date {
  font-size: 12px;
  color: var(--orange);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.announcement-text { font-size: 15px; margin-top: 4px; }

/* ============ PASSWORD GATE ============ */
.password-gate {
  text-align: center;
  padding: 80px 20px;
}

.password-gate p { color: var(--text-muted); margin-bottom: 20px; font-size: 15px; }

.password-input-group {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.password-input-group input {
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  width: 240px;
}

.password-input-group input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-bg); }

.btn {
  padding: 12px 24px;
  background: var(--orange);
  border: none;
  border-radius: var(--radius);
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.btn:hover { background: var(--orange-light); }

.error-msg { color: var(--red); font-size: 13px; margin-top: 10px; display: none; }

/* (Clickable milestone styles now in .tl-node above) */

/* ============ MILESTONE DETAIL PANEL ============ */
.milestone-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--orange);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 28px 32px 32px;
  margin-top: 12px;
  margin-bottom: 8px;
  position: relative;
  animation: fadeSlide 0.2s ease-out;
}

/* Inline variant: rendered directly under the clicked milestone, indented to align
   with the node body and visually anchored by a left rail in the timeline color. */
.milestone-detail-inline {
  margin: -2px 0 0 36px;
  padding: 18px 22px 22px;
  border-left: 3px solid var(--orange);
  border-top: 1px solid var(--border);
  border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg);
  box-shadow: 0 6px 22px rgba(0,0,0,0.18);
  position: relative;
}
.milestone-detail-inline::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -3px;
  width: 20px;
  height: 18px;
  border-left: 3px solid var(--orange);
  border-top: 1px solid var(--border);
  border-top-left-radius: 8px;
}

.md-general {
  margin-top: 16px;
}

.md-general-item {
  font-size: 14px;
  color: var(--text);
  padding: 8px 14px;
  background: var(--surface-raised);
  border-radius: var(--radius);
  margin-bottom: 6px;
  line-height: 1.5;
  border-left: 3px solid var(--orange);
}

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

.md-status {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  flex-shrink: 0;
  display: inline-block;
}

.md-status.done { background: var(--green-bg); color: var(--green); }
.md-status.active { background: var(--orange-bg); color: var(--orange); }
.md-status.pending { background: var(--surface-raised); color: var(--text-dim); }

.md-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}

.md-close:hover { color: var(--text); }

.md-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* (Phase detail is now in the expand panel above) */

/* ============ INTERNAL: PHASE ACCORDION ============ */
.int-phase {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.int-phase:hover { border-color: var(--border-light); }
.int-phase.active { border-color: var(--orange); box-shadow: 0 0 16px var(--orange-bg); }
.int-phase.done { border-left: 4px solid var(--green); }

.int-phase-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 28px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.int-phase-header:hover { background: var(--surface-hover); }
.int-phase-icon { font-size: 32px; }
.int-phase-label { font-size: 20px; font-weight: 700; flex: 1; }

.int-phase-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.int-phase-arrow {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.2s;
  display: inline-block;
}

.int-phase-arrow.open { transform: rotate(90deg); }

.int-phase-body { padding: 0 24px 24px; }

.int-artifacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--surface-raised);
  border-radius: var(--radius);
}

.int-artifacts-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin-right: 4px;
}

/* ============ INTERNAL: RUNBOOK CARDS ============ */
.runbook-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.runbook-card:hover { border-color: var(--border-light); }

.runbook-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface-raised);
  border: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.runbook-header:hover { background: var(--surface-hover); }

.runbook-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.runbook-id {
  font-size: 13px;
  font-weight: 700;
  font-family: 'SF Mono', Menlo, monospace;
  color: var(--orange);
  background: var(--orange-bg);
  padding: 4px 10px;
  border-radius: 6px;
  flex-shrink: 0;
}

.runbook-title { font-size: 16px; font-weight: 600; }

.runbook-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.runbook-arrow {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.2s;
  display: inline-block;
}

.runbook-arrow.open { transform: rotate(90deg); }

.runbook-body { padding: 20px 20px; }

.runbook-meta {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius);
}

.runbook-desc {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.6;
}

/* ============ PROGRESS BARS ============ */
.progress-bar {
  width: 120px;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--green));
  border-radius: 4px;
  transition: width 0.3s;
}

.progress-mini {
  width: 80px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-mini-fill {
  height: 100%;
  background: var(--green);
  border-radius: 3px;
  transition: width 0.3s;
}

.progress-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 40px;
  text-align: right;
}

/* ============ VALIDATION CHECKBOXES ============ */
.val-list { display: flex; flex-direction: column; gap: 6px; }

.val-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid transparent;
}

.val-row:hover { background: var(--surface-hover); border-color: var(--border); }
.val-row.checked { opacity: 0.5; background: rgba(45, 212, 160, 0.05); }
.val-row.checked .val-title { text-decoration: line-through; }

.val-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
  cursor: pointer;
  flex-shrink: 0;
}

.val-id {
  font-size: 12px;
  font-family: 'SF Mono', Menlo, monospace;
  color: var(--text-dim);
  background: var(--surface);
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

.val-title { font-size: 15px; color: var(--text); }

/* ============ SHARED ============ */
.step-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--orange);
  text-decoration: none;
  background: var(--orange-bg);
  padding: 5px 12px;
  border-radius: 6px;
  transition: background 0.15s;
}

.step-link:hover { background: rgba(227, 152, 68, 0.2); }

/* ============ CTA BUTTONS ============ */
.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s;
}

.cta-primary {
  background: var(--orange);
  color: white;
}

.cta-primary:hover { background: var(--orange-light); }

.cta-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.cta-secondary:hover { border-color: var(--orange); color: var(--orange); }

.cta-icon { font-size: 18px; }

/* ============ ARTIFACTS TAB ============ */
.art-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.art-section:hover { border-color: var(--border-light); }

.art-section-pending { opacity: 0.75; }

.art-section-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

.art-section-icon { font-size: 32px; flex-shrink: 0; }
.art-section-title { font-size: 20px; font-weight: 700; }
.art-section-desc { font-size: 14px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }

.art-section-body { padding: 20px 28px 24px; }

.art-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.art-image-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.art-image-row:last-of-type { border-bottom: none; }

.art-image-label {
  font-size: 15px;
  font-weight: 600;
  min-width: 180px;
  flex-shrink: 0;
}

.art-image-tag {
  font-size: 12px;
  font-family: 'SF Mono', Menlo, monospace;
  color: var(--text-muted);
  background: var(--surface-raised);
  padding: 6px 12px;
  border-radius: 6px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.art-copy {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 16px;
  background: var(--orange-bg);
  color: var(--orange);
  border: 1px solid rgba(227, 152, 68, 0.2);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.art-copy:hover { background: rgba(227, 152, 68, 0.25); border-color: var(--orange); }

.art-pending-text {
  font-size: 14px;
  color: var(--text-dim);
  font-style: italic;
  padding: 4px 0;
}

.art-kv {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.art-kv-key {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 100px;
}

.art-kv-val {
  font-size: 14px;
  font-family: 'SF Mono', Menlo, monospace;
}

.art-kv-val.pending { color: var(--text-dim); font-style: italic; font-family: inherit; }

.art-details {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.art-details summary {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface-raised);
  color: var(--text-muted);
  transition: color 0.15s;
}

.art-details summary:hover { color: var(--orange); }

.art-json {
  padding: 16px;
  margin: 0;
  font-size: 12px;
  font-family: 'SF Mono', Menlo, monospace;
  color: var(--text-muted);
  background: var(--bg);
  overflow-x: auto;
  line-height: 1.6;
}

.art-static-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.art-static-row:last-child { border-bottom: none; }
.art-static-label { font-size: 15px; font-weight: 600; }
.art-static-note { font-size: 13px; color: var(--text-dim); }
.art-static-note code { background: var(--surface-raised); padding: 1px 6px; border-radius: 3px; }
.art-static-row .artifact-link { margin-left: auto; flex-shrink: 0; }

/* ============ INTERNAL: PIPELINE CONFIG ============ */
.pipe-details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}

.pipe-summary {
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  list-style: none;
}

.pipe-summary::-webkit-details-marker { display: none; }
.pipe-summary::before { content: '\u25B6 '; font-size: 12px; color: var(--text-muted); margin-right: 8px; transition: transform 0.2s; display: inline-block; }
.pipe-details[open] .pipe-summary::before { transform: rotate(90deg); }

.pipe-body { padding: 0 24px 16px; }

.pipe-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.pipe-row:last-child { border-bottom: none; }

.pipe-key {
  font-size: 13px;
  font-weight: 600;
  font-family: 'SF Mono', Menlo, monospace;
  color: var(--orange);
  min-width: 280px;
  flex-shrink: 0;
}

.pipe-val {
  font-size: 13px;
  font-family: 'SF Mono', Menlo, monospace;
  color: var(--text-muted);
  word-break: break-all;
}

/* ============ CHANGELOG ============ */
.cl-section { margin-top: 24px; }

.cl-details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cl-summary {
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  list-style: none;
}

.cl-summary::-webkit-details-marker { display: none; }
.cl-summary::before { content: '\25B6 '; font-size: 12px; color: var(--text-muted); margin-right: 8px; transition: transform 0.2s; display: inline-block; }
.cl-details[open] .cl-summary::before { transform: rotate(90deg); }

.cl-count {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--surface-raised);
  color: var(--text-muted);
  margin-left: 6px;
}

.cl-body { padding: 0 24px 16px; }

.cl-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

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

.cl-user {
  font-weight: 700;
  color: var(--orange);
  min-width: 80px;
  flex-shrink: 0;
}

.cl-comment {
  flex: 1;
  color: var(--text);
}

.cl-time {
  font-size: 12px;
  font-family: 'SF Mono', Menlo, monospace;
  color: var(--text-dim);
  flex-shrink: 0;
  white-space: nowrap;
}

.cl-empty {
  color: var(--text-dim);
  font-size: 14px;
  padding: 8px 0;
}

/* ============ FOOTER ============ */
.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 24px 32px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-logo svg { color: var(--text-muted); }

.footer-tagline {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 8px;
}

.footer-heading {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer-link {
  display: block;
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.15s;
  cursor: pointer;
}

.footer-link:hover { color: var(--orange); }

.footer-bottom {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-sep { color: var(--border); }

/* ============ PREVIOUS DRY RUNS ============ */
.prev-dryruns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.prev-dr-label {
  color: var(--text-muted);
  font-size: 0.85em;
}
.prev-dr-link {
  display: inline-block;
  padding: 4px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--blue);
  text-decoration: none;
  font-size: 0.82em;
  transition: all 0.2s;
}
.prev-dr-link:hover {
  background: var(--blue-bg);
  border-color: var(--blue);
}

/* ============ FALLBACK MILESTONES ============ */
.tl-fallback-passed {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(45, 212, 160, 0.15);
  color: var(--green);
  border: 1px solid rgba(45, 212, 160, 0.3);
  margin-left: 4px;
}
.tl-node.tl-fallback {
  border-color: var(--yellow);
  background: var(--yellow-bg);
}
.tl-node.tl-fallback:hover {
  background: rgba(240, 192, 64, 0.15);
  box-shadow: 0 4px 16px rgba(240, 192, 64, 0.1);
}
.tl-node.tl-fallback .tl-dot {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--bg);
  box-shadow: 0 0 10px rgba(240, 192, 64, 0.25);
}
.tl-node.tl-fallback .tl-name {
  color: var(--yellow);
}
.tl-node.tl-fallback .tl-date,
.tl-node.tl-fallback .tl-time {
  color: var(--text-dim);
  font-style: italic;
}
/* Fallback that passed (done) — green success glow */
.tl-node.tl-fallback.done {
  border-color: var(--green);
  background: rgba(45, 212, 160, 0.08);
}
.tl-node.tl-fallback.done .tl-dot {
  background: var(--green);
  border-color: var(--green);
  color: white;
  box-shadow: 0 0 14px rgba(45, 212, 160, 0.3);
}
.tl-node.tl-fallback.done .tl-name {
  color: var(--green);
}

/* ============ SECOND FORK / EMERGENCY MILESTONES ============ */
.tl-node.tl-second-fork {
  border-color: var(--purple);
  background: var(--purple-bg);
}
.tl-node.tl-second-fork:hover {
  background: rgba(155, 138, 251, 0.15);
  box-shadow: 0 4px 16px rgba(155, 138, 251, 0.1);
}
.tl-node.tl-second-fork .tl-dot {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
  box-shadow: 0 0 10px rgba(155, 138, 251, 0.25);
}
.tl-node.tl-second-fork .tl-name {
  color: var(--purple);
}

/* second-fork phase badge */
.milestone-phase-h.second-fork {
  background: var(--purple-bg);
  color: var(--purple);
}

/* Phase strip: second-fork */
.phase-cell[data-pid="second-fork"] .phase-icon { font-size: 1.2em; }

/* Fallback artifact sections */
.art-section-fallback {
  border-left: 3px solid var(--yellow);
}
.art-section-fallback .art-section-title {
  color: var(--yellow);
}

/* Tooltip styling for milestone hover */
.tl-node[title] {
  cursor: pointer;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 700px) {
  .hero-top { flex-direction: column; text-align: center; }
  .hero-title-row { justify-content: center; }
  .hero-meta { justify-content: center; }
  .hero h1 { font-size: 24px; white-space: normal; }
  .hero .subtitle { font-size: 14px; }
  .layout { flex-direction: column; }
  .sidebar { flex-direction: row; position: static; justify-content: center; flex: none; }
  .sidebar-btn.active::before { display: none; }
  .phase-strip { flex-direction: column; }
  .phase-cell::after { display: none; }
  .phase-cell { border-right: none; border-bottom: 1px solid var(--border); }
  .phase-cell:last-child { border-bottom: none; }
  .tl-header { flex-direction: column; }
  .tz-controls { text-align: left; }
  .tl-node { width: 200px; padding: 16px 12px; }
  .tl-node .tl-dot { width: 44px; height: 44px; font-size: 18px; }
  .tl-curve-h { flex: 0 0 16px; }
  .password-input-group { flex-direction: column; align-items: center; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

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

/* ============ FAQ / KNOWN ISSUES ============ */
.faq-category {
  margin-bottom: 28px;
}
.faq-category-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.faq-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.faq-card:hover {
  border-color: var(--border-light);
  transform: translateY(-1px);
}
.faq-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.faq-id {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--orange);
  background: var(--orange-bg);
  padding: 3px 8px;
  border-radius: 6px;
  text-decoration: none;
  flex-shrink: 0;
}
.faq-id:hover { background: var(--orange-glow); }
.faq-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  flex: 1;
  min-width: 0;
}
.faq-title:hover { color: var(--orange-light); }
.faq-status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.faq-status-open {
  color: var(--yellow);
  background: var(--yellow-bg);
}
.faq-status-closed {
  color: var(--green);
  background: var(--green-bg);
}
.faq-labels {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.faq-label {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--surface-raised);
  color: var(--text-muted);
  text-transform: lowercase;
}
.faq-label-bug { background: rgba(239, 107, 94, 0.15); color: var(--red); }
.faq-label-priority-low { background: rgba(108, 180, 238, 0.15); color: var(--blue); }
.faq-label-post-mesa { background: rgba(155, 138, 251, 0.15); color: var(--purple); }
.faq-label-cleanup { background: rgba(125, 131, 154, 0.15); color: var(--text-muted); }
.faq-label-testing { background: var(--green-bg); color: var(--green); }
.faq-summary {
  font-size: 14px;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 8px;
}
.faq-workaround {
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(108, 180, 238, 0.06);
  border-left: 2px solid var(--blue);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  line-height: 1.5;
}
.faq-workaround strong {
  color: var(--blue);
  margin-right: 4px;
}
.faq-mock-note {
  margin-top: 24px;
  padding: 12px 16px;
  background: var(--yellow-bg);
  border: 1px dashed var(--yellow);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--yellow);
  text-align: center;
}

/* ============ USEFUL LINKS ============ */
.links-section {
  margin-bottom: 32px;
}
.links-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.links-section-icon {
  font-size: 24px;
}
.links-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.link-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.link-card:hover {
  border-color: var(--orange);
  background: var(--surface-hover);
  transform: translateY(-2px);
}
.link-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.link-card-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.link-card-arrow {
  color: var(--text-muted);
  font-size: 14px;
  transition: color 0.15s ease, transform 0.15s ease;
}
.link-card:hover .link-card-arrow {
  color: var(--orange);
  transform: translate(2px, -2px);
}
.link-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}
.link-card-url {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--text-dim);
  word-break: break-all;
}
