/* ═══════════════════════════════════════════════════════════
   pipeline.css — companion stylesheet for pipeline.html
   Visual language matches Work.jsx in the main React app.
   ═══════════════════════════════════════════════════════════ */

/* ── Reset / base ───────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: #f0f9f9;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  color: #4d6e68;
  min-height: 100dvh;
  overflow-x: hidden;
}

a {
  color: #5d8a82;
  text-decoration: none;
  transition: color 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
a:hover { color: #6b9e7a; }

:focus-visible {
  outline: 2px solid #90a7a5;
  outline-offset: 3px;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(144, 167, 165, 0.2); }

/* ── Layout ─────────────────────────────────────────────── */
main {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px clamp(48px, 6vh, 72px);
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  max-width: 880px;
  margin: 0 auto;
}

.back-link {
  font-family: 'DM Mono', 'SF Mono', monospace;
  font-size: 0.8125rem;
  color: #7a9e97;
  letter-spacing: 0.04em;
}
.back-link:hover { color: #5d8a82; }

.brand {
  font-family: 'DM Mono', 'SF Mono', monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a9e97;
}

/* ── Page header ────────────────────────────────────────── */
.page-header {
  padding: clamp(32px, 5vh, 56px) 0 clamp(40px, 5vh, 56px);
  border-bottom: 1px solid rgba(144, 167, 165, 0.15);
  margin-bottom: clamp(40px, 5vh, 56px);
}

.page-header h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  color: #34504b;
  line-height: 1.3;
  margin: 10px 0 16px;
}

.subtitle {
  font-size: 1rem;
  font-weight: 300;
  color: #4d6e68;
  line-height: 1.7;
  max-width: 580px;
  margin-bottom: 20px;
}

.meta {
  font-family: 'DM Mono', 'SF Mono', monospace;
  font-size: 0.8125rem;
  color: #7a9e97;
}

/* ── Eyebrow labels ─────────────────────────────────────── */
.eyebrow {
  font-family: 'DM Mono', 'SF Mono', monospace;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a9e97;
  display: block;
}

.section-label {
  margin-bottom: 24px;
}

/* ── Overview section ───────────────────────────────────── */
.overview {
  margin-bottom: clamp(48px, 6vh, 64px);
}

/* ── Sankey strip ───────────────────────────────────────── */
.sankey {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

/* ── Sankey node ────────────────────────────────────────── */
.sankey-node {
  flex: 0 0 auto;
  width: 96px;
  min-height: 112px;
  background: #ffffff;
  border-left: 2px solid var(--level-color, #90a7a5);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-left-width 200ms cubic-bezier(0.16, 1, 0.3, 1),
              background 200ms cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

.sankey-node:hover {
  border-left-width: 3px;
}

.sankey-node__chip {
  font-family: 'DM Mono', 'SF Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  color: #34504b;
  background: var(--chip-bg, rgba(144, 167, 165, 0.15));
  padding: 2px 6px;
  display: inline-block;
  align-self: flex-start;
  line-height: 20px;
}

.sankey-node__name {
  font-size: 0.75rem;
  font-weight: 500;
  color: #34504b;
  line-height: 1.3;
}

.sankey-node__metric {
  font-family: 'DM Mono', 'SF Mono', monospace;
  font-size: 0.6875rem;
  color: #7a9e97;
  margin-top: auto;
}

/* ── Sankey connector ───────────────────────────────────── */
.sankey-connector {
  flex: 0 0 auto;
  width: 20px;
  align-self: center;
  height: 2px;
  opacity: 0.5;
}

/* ── Anatomy section ────────────────────────────────────── */
.anatomy {
  margin-bottom: clamp(48px, 6vh, 72px);
}

/* ── Level card ─────────────────────────────────────────── */
.level-card {
  background: #ffffff;
  border-left: 3px solid var(--level-color, #90a7a5);
  padding: 24px 28px;
  margin-bottom: 20px;
  transition: border-left-width 200ms cubic-bezier(0.16, 1, 0.3, 1),
              background 200ms cubic-bezier(0.16, 1, 0.3, 1),
              padding-left 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.level-card:hover {
  border-left-width: 4px;
  padding-left: 29px;
}

.level-card__chip {
  font-family: 'DM Mono', 'SF Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: #34504b;
  background: var(--chip-bg, rgba(144, 167, 165, 0.15));
  padding: 0 8px;
  display: inline-block;
  line-height: 24px;
  margin-bottom: 10px;
}

.level-card__title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 500;
  color: #34504b;
  margin-bottom: 10px;
}

.level-card__description {
  font-size: 0.9375rem;
  font-weight: 300;
  color: #4d6e68;
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 16px;
}

/* ── Metrics list ───────────────────────────────────────── */
.level-card__metrics {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 16px;
}

.level-card__metrics li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.level-card__metrics .key {
  font-family: 'DM Mono', 'SF Mono', monospace;
  font-size: 0.75rem;
  color: #7a9e97;
  letter-spacing: 0.04em;
}

.level-card__metrics .value {
  font-family: 'DM Mono', 'SF Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #34504b;
}

/* ── Status badge ───────────────────────────────────────── */
.level-card__status {
  font-family: 'DM Mono', 'SF Mono', monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  display: inline-block;
}

.level-card__status--operational {
  color: #6b9e7a;
  background: rgba(107, 158, 122, 0.10);
}

.level-card__status--in_development {
  color: #bfa87a;
  background: rgba(191, 168, 122, 0.15);
}

.level-card__status--deprecated {
  color: #a8796e;
  background: rgba(168, 121, 110, 0.10);
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  border-top: 1px solid rgba(144, 167, 165, 0.15);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-footer p {
  font-family: 'DM Mono', 'SF Mono', monospace;
  font-size: 0.75rem;
  color: #7a9e97;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  main { padding: 0 16px clamp(40px, 6vh, 64px); }
  .site-header { padding: 16px; }
  .level-card { padding: 18px 16px; }
  .level-card:hover { padding-left: 17px; }
  .sankey-node { width: 80px; min-height: 96px; }
}
