/* pulse.css — Story page Pulse pill + panel + chart. (split from design3.css) */

/* ===== Pulse pill + panel ===== */
.pulse-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pulse-pill:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.pulse-pill[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.pulse-pill .pulse-icon {
  width: 14px;
  height: 14px;
}

.pulse-panel {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.pulse-panel-inner {
  padding: 14px 0 16px;
  position: relative;
}

.pulse-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pulse-panel-metric {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.pulse-close {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.pulse-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.pulse-close svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.pulse-icon-lg {
  width: 20px;
  height: 20px;
  align-self: center;
  color: var(--text-secondary);
}

.pulse-panel-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.pulse-panel-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pulse-help {
  width: 18px;
  height: 18px;
  align-self: center;
  margin-left: 2px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pulse-help:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.pulse-chart-wrap {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.pulse-chart-col {
  flex: 1;
  min-width: 0;
}

.pulse-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  height: 96px;
  flex-shrink: 0;
  padding: 1px 0;
}

.pulse-axis-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  line-height: 1;
}

.pulse-chart {
  position: relative;
  width: 100%;
  height: 96px;
}

.pulse-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.pulse-xaxis {
  position: relative;
  height: 16px;
  margin-top: 4px;
}

.pulse-xtick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.pulse-xtick:first-child {
  transform: translateX(0);
}

.pulse-xtick:last-child {
  transform: translateX(-100%);
}

.pulse-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.pulse-area {
  fill: url(#pulse-fill-grad);
  stroke: none;
}

.pulse-chart-msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-tertiary);
}

.pulse-chart-msg[hidden] {
  display: none;
}

.pulse-ranges {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.pulse-range-btn {
  padding: 4px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pulse-range-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.pulse-range-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pulse-explainer {
  position: absolute;
  top: 44px;
  left: 0;
  z-index: 95;
  max-width: 340px;
  padding: 12px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.pulse-explainer p {
  margin: 0 0 8px;
}

.pulse-explainer p:last-child {
  margin-bottom: 0;
}

.pulse-explainer strong {
  color: var(--text-primary);
}

