/* ================================================================
   WSS STATUS — Development Pulse page styles
   Extends main.css design system tokens
   ================================================================ */

/* === PULSE HERO === */
.pulse-title {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 700; letter-spacing: -0.03em;
  background: linear-gradient(180deg, var(--text) 0%, rgba(232,230,226,0.5) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}

/* === NAV BACK LINK === */
.nav-back {
  position: absolute; left: 2.5rem;
  font-size: var(--fs-micro); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted);
  text-decoration: none; padding: 0.6rem 0;
  transition: color var(--t-normal);
}
.nav-back:hover { color: var(--accent); }

/* === STATS GRID === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem; width: 100%;
}

.stat-card {
  position: relative; overflow: hidden;
  padding: 1.5rem 1.2rem;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  text-align: center;
  transition: transform var(--t-normal), border-color var(--t-normal);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-light);
}

.stat-num {
  font-family: var(--mono);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700; letter-spacing: -0.03em;
  background: linear-gradient(180deg, var(--text) 20%, var(--text-dim) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: var(--fs-micro);
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-muted); margin-top: 0.3rem;
}

/* === BAR CHART === */
.chart-container { width: 100%; overflow-x: auto; }

.bar-chart {
  display: flex; align-items: flex-end;
  gap: 0.6rem; height: 280px;
  padding: 0 0 2.5rem; width: 100%;
}

.bar-group {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; height: 100%;
  position: relative;
}

.bar-wrapper {
  flex: 1; display: flex; align-items: flex-end;
  width: 100%; position: relative;
}

.bar {
  width: 100%; height: 0;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, rgb(var(--c-accent) / 0.6) 0%, rgb(var(--c-accent) / 0.15) 100%);
  border: 1px solid rgb(var(--c-accent) / 0.2);
  border-bottom: none;
  position: relative;
  transition: height 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

.bar.animated { height: var(--h); }

.bar--peak {
  background: linear-gradient(180deg, rgb(var(--c-accent) / 0.8) 0%, rgb(var(--c-accent) / 0.25) 100%);
  border-color: rgb(var(--c-accent) / 0.35);
  box-shadow: 0 0 20px rgb(var(--c-accent) / 0.1);
}

.bar-tooltip {
  position: absolute; top: -2rem; left: 50%; transform: translateX(-50%);
  font-size: 0.6rem; font-family: var(--mono);
  color: var(--text-dim); white-space: nowrap;
  opacity: 0; transition: opacity var(--t-fast);
  pointer-events: none;
}

.bar:hover .bar-tooltip { opacity: 1; }

.bar-label {
  font-size: 0.58rem; color: var(--text-muted);
  letter-spacing: 0.08em; text-transform: uppercase;
  position: absolute; bottom: 0; text-align: center;
  line-height: 1.3;
}

/* === VELOCITY CHART === */
.velocity-chart {
  display: flex; flex-direction: column;
  gap: 0.35rem; width: 100%;
}

.velocity-row {
  display: flex; align-items: center;
  gap: 0.8rem;
}

.velocity-label {
  font-size: 0.62rem; font-family: var(--mono);
  color: var(--text-muted); min-width: 46px;
  text-align: right; letter-spacing: 0.04em;
}

.velocity-bars {
  flex: 1; display: flex; flex-direction: column;
  gap: 2px;
}

.velocity-add, .velocity-del {
  height: 14px; border-radius: 2px;
  display: flex; align-items: center;
  padding: 0 0.6rem;
  font-size: 0.55rem; font-family: var(--mono);
  white-space: nowrap;
  width: 0;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.velocity-add.animated { width: var(--w); }
.velocity-del.animated { width: var(--w); }

.velocity-add {
  background: linear-gradient(90deg, rgb(var(--c-green) / 0.25) 0%, rgb(var(--c-green) / 0.08) 100%);
  border: 1px solid rgb(var(--c-green) / 0.15);
  color: rgb(var(--c-green));
}

.velocity-del {
  background: linear-gradient(90deg, rgba(220, 80, 80, 0.2) 0%, rgba(220, 80, 80, 0.05) 100%);
  border: 1px solid rgba(220, 80, 80, 0.12);
  color: rgba(220, 100, 100, 0.8);
}

.velocity-row--peak .velocity-add {
  background: linear-gradient(90deg, rgb(var(--c-green) / 0.35) 0%, rgb(var(--c-green) / 0.12) 100%);
  border-color: rgb(var(--c-green) / 0.25);
  box-shadow: 0 0 12px rgb(var(--c-green) / 0.08);
}

/* === MONTH BLOCKS === */
.month-block {
  width: 100%; text-align: left;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: border-color var(--t-normal);
}

.month-block:hover { border-color: var(--border-light); }

.month-block--intense {
  border-color: rgb(var(--c-accent) / 0.1);
  background: linear-gradient(180deg, rgb(var(--c-accent) / 0.03) 0%, var(--card-bg) 15%);
}
.month-block--intense:hover { border-color: rgb(var(--c-accent) / 0.18); }

.month-header {
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 0.8rem;
  padding: 1.4rem 2rem;
  border-bottom: 1px solid var(--border-dim);
  background: rgba(255,255,255,0.01);
}

.month-date { display: flex; align-items: center; gap: 0.8rem; }

.month-name {
  font-size: 1rem; font-weight: 600;
  color: var(--text); letter-spacing: -0.01em;
}

.month-tag {
  font-size: 0.55rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.15rem 0.5rem; border-radius: 100px;
  background: rgb(var(--c-accent) / 0.08);
  color: rgb(var(--c-accent));
}

.month-tag--peak {
  background: rgb(var(--c-accent) / 0.15);
  color: rgb(var(--c-accent));
  box-shadow: 0 0 8px rgb(var(--c-accent) / 0.1);
}

.month-stats {
  display: flex; gap: 0.8rem; flex-wrap: wrap;
}

.month-stat {
  font-size: 0.65rem; font-family: var(--mono);
  color: var(--text-dim); letter-spacing: 0.03em;
}

.month-body { padding: 1.6rem 2rem; }

.month-summary { margin-bottom: 1.2rem; }
.month-summary p { font-size: var(--fs-small); color: var(--text-dim); line-height: 1.8; }

/* HIGHLIGHTS */
.month-highlights {
  display: flex; flex-direction: column;
  gap: 0.3rem; margin-bottom: 1.2rem;
}

.highlight-item {
  display: flex; align-items: baseline;
  gap: 0.6rem; padding: 0.3rem 0;
  font-size: 0.78rem; color: var(--text-dim);
  line-height: 1.5;
}

.highlight-item::before {
  content: '';
  width: 5px; height: 5px; border-radius: 50%;
  flex-shrink: 0; margin-top: 0.35rem;
}

.highlight--feat::before    { background: rgb(var(--c-green)); box-shadow: 0 0 4px rgb(var(--c-green) / 0.4); }
.highlight--refactor::before { background: rgb(var(--c-accent)); box-shadow: 0 0 4px rgb(var(--c-accent) / 0.4); }
.highlight--fix::before     { background: rgba(220, 140, 60, 0.9); box-shadow: 0 0 4px rgba(220, 140, 60, 0.4); }
.highlight--infra::before   { background: rgb(var(--c-vision)); box-shadow: 0 0 4px rgb(var(--c-vision) / 0.4); }
.highlight--version::before { background: #fff; box-shadow: 0 0 6px rgba(255,255,255,0.5); }

.highlight-item code {
  font-family: var(--mono); font-size: 0.72rem;
  color: var(--accent); background: rgb(var(--c-accent) / 0.06);
  padding: 0.1rem 0.35rem; border-radius: 3px;
}

/* PACKAGE TAGS */
.month-packages {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  margin-bottom: 0.8rem;
}

.pkg-tag {
  font-size: 0.62rem; font-family: var(--mono);
  padding: 0.18rem 0.55rem; border-radius: 100px;
  background: rgb(var(--c-w) / 0.04);
  border: 1px solid rgb(var(--c-w) / 0.06);
  color: var(--text-dim); letter-spacing: 0.03em;
}

.pkg-tag small {
  font-size: 0.55rem; color: var(--text-muted);
  margin-left: 0.2rem;
}

.pkg--hot {
  background: rgb(var(--c-accent) / 0.1);
  border-color: rgb(var(--c-accent) / 0.15);
  color: rgb(var(--c-accent));
}

.pkg--warm {
  background: rgb(var(--c-green) / 0.06);
  border-color: rgb(var(--c-green) / 0.1);
  color: rgb(var(--c-green));
}

/* PR TAGS */
.month-prs {
  display: flex; flex-wrap: wrap; gap: 0.3rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-dim);
}

.pr-tag {
  font-size: 0.58rem; font-family: var(--mono);
  padding: 0.15rem 0.5rem; border-radius: 4px;
  background: rgb(var(--c-vision) / 0.05);
  border: 1px solid rgb(var(--c-vision) / 0.08);
  color: rgb(var(--c-vision) / 0.7);
  letter-spacing: 0.02em;
}

/* === HOURLY CHART === */
.hour-chart {
  display: flex; align-items: flex-end;
  gap: 3px; height: 160px;
  padding-bottom: 0.5rem;
}

.hour-bar {
  flex: 1; height: 0;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, rgb(var(--c-accent) / 0.45) 0%, rgb(var(--c-accent) / 0.1) 100%);
  border: 1px solid rgb(var(--c-accent) / 0.12);
  border-bottom: none;
  position: relative;
  transition: height 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

.hour-bar.animated { height: var(--h); }

.hour-bar--peak {
  background: linear-gradient(180deg, rgb(var(--c-accent) / 0.7) 0%, rgb(var(--c-accent) / 0.2) 100%);
  border-color: rgb(var(--c-accent) / 0.25);
  box-shadow: 0 0 10px rgb(var(--c-accent) / 0.1);
}

.hour-val {
  position: absolute; top: -1.4rem; left: 50%; transform: translateX(-50%);
  font-size: 0.52rem; font-family: var(--mono);
  color: var(--text-muted); white-space: nowrap;
  opacity: 0; transition: opacity var(--t-fast);
  pointer-events: none;
}

.hour-bar:hover .hour-val { opacity: 1; }

.hour-labels {
  display: flex; justify-content: space-between;
  font-size: 0.52rem; color: var(--text-muted);
  letter-spacing: 0.06em; padding-top: 0.4rem;
}

/* === DAY OF WEEK === */
.dow-chart {
  display: flex; flex-direction: column;
  gap: 0.4rem; width: 100%;
}

.dow-row { display: flex; align-items: center; gap: 0.8rem; }

.dow-label {
  font-size: 0.65rem; font-family: var(--mono);
  color: var(--text-muted); min-width: 30px;
  text-align: right;
}

.dow-bar-track {
  flex: 1; height: 22px;
  border-radius: 3px;
  background: rgb(var(--c-w) / 0.02);
}

.dow-bar {
  height: 100%; width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, rgb(var(--c-complete) / 0.35) 0%, rgb(var(--c-complete) / 0.1) 100%);
  border: 1px solid rgb(var(--c-complete) / 0.12);
  display: flex; align-items: center;
  padding: 0 0.6rem;
  font-size: 0.55rem; font-family: var(--mono);
  color: rgb(var(--c-complete)); white-space: nowrap;
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.dow-bar.animated { width: var(--w); }

.dow-bar--peak {
  background: linear-gradient(90deg, rgb(var(--c-complete) / 0.45) 0%, rgb(var(--c-complete) / 0.15) 100%);
  border-color: rgb(var(--c-complete) / 0.2);
}

/* === FOOTER EXTRAS === */
.pulse-footer-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 0.8rem; flex-wrap: wrap;
  margin-bottom: 2rem;
}

.pulse-stat {
  font-family: var(--mono); font-size: 0.75rem;
  color: var(--text-dim); letter-spacing: 0.04em;
}

.pulse-divider { color: var(--text-muted); }

.back-link {
  display: inline-flex; align-items: center;
  font-size: var(--fs-micro); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
  text-decoration: none; padding: 0.6rem 1.2rem;
  border-radius: 100px;
  border: 1px solid rgb(var(--c-accent) / 0.15);
  background: rgb(var(--c-accent) / 0.05);
  transition: all var(--t-fast);
}

.back-link:hover {
  background: rgb(var(--c-accent) / 0.12);
  border-color: rgb(var(--c-accent) / 0.25);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .bar-chart { gap: 0.35rem; height: 200px; }
  .month-header { padding: 1rem 1.2rem; }
  .month-body { padding: 1.2rem; }
  .hour-chart { gap: 2px; height: 120px; }
  .nav-back { display: none; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .month-stats { gap: 0.4rem; }
  .month-prs { gap: 0.2rem; }
  .velocity-label { min-width: 36px; font-size: 0.55rem; }
}
