/* "Move your whole team up the curve" story beat (src/_includes/story-curve.njk). Styles from the Nov 12
   problem page (PR #30). The graph sits straight on the page, no card or outline. */
.sc-wave-beat { --sv-ink: var(--theme-ink); --sv-flowline: color-mix(in srgb, var(--palette-holly-300) 60%, var(--palette-greyscale-300)); }
.sc-wave-beat .st-h { max-width: 30ch; }
.sc-wave-beat .st-how-lead { text-wrap: pretty; }
.sc-wave-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; width: 100%; max-width: 640px; min-width: 0; margin-top: 12px; text-align: left; }
.sc-wave-state { display: grid; place-items: center; min-height: 2.4em; margin: 0; font: 500 clamp(17px, 2vw, 20px)/1.2 var(--font-heading); text-align: center; text-wrap: balance; color: var(--sv-ink); transition: opacity 160ms ease; }
.sc-wave-chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; min-width: 0; }
.sc-wave-main { display: grid; gap: 8px; min-width: 0; }
.sc-wave-y, .sc-wave-x { margin: 0; font: 500 14px/1.2 var(--font-body); color: var(--sv-ink); white-space: nowrap; }
.sc-wave-y { align-self: end; margin-bottom: 65px; writing-mode: vertical-rl; transform: rotate(180deg); text-align: left; }
.sc-wave-x { text-align: right; }
.sc-wave-labels { position: relative; height: 62px; margin-top: -8px; }
.sc-wave-l { position: absolute; bottom: 0; left: 20%; padding: 5px 10px; border-radius: 999px; background: var(--palette-red-400); font: 500 13px/1.2 var(--font-body); color: var(--palette-greyscale-900); white-space: nowrap; transform: translateX(-50%); transition: background-color 500ms ease, opacity 160ms ease; }
.sc-wave-l-ok { background: var(--palette-holly-300); }
.sc-wave-l-out { bottom: 32px; left: 86%; background: var(--theme-accent); color: var(--theme-accent-contrast); transform: translateX(-80%); }
/* With script, each label sits on its own hump: a pill, a line down, and a dot on the curve. */
.sc-wave-pinned .sc-wave-labels { height: 34px; }
.sc-wave-plot .sc-wave-l { --ax: 50%; bottom: auto; z-index: 1; transform: translate(calc(-1 * var(--ax)), calc(-100% - 18px)); }
.sc-wave-plot .sc-wave-l::before, .sc-wave-plot .sc-wave-l::after { content: ""; position: absolute; left: var(--ax); background: var(--sv-ink); }
.sc-wave-plot .sc-wave-l::before { top: 100%; width: 2px; height: 14px; margin-left: -1px; }
.sc-wave-plot .sc-wave-l::after { top: calc(100% + 13px); width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; }
.sc-wave-plot { position: relative; box-shadow: inset 0 -2px 0 var(--sv-ink), inset 2px 0 0 var(--sv-ink); }
.sc-wave-plot::before, .sc-wave-plot::after { content: ""; position: absolute; width: 10px; height: 10px; background: var(--sv-ink); }
.sc-wave-plot::before { top: -6px; left: -4px; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.sc-wave-plot::after { right: -6px; bottom: -4px; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.sc-wave-plot svg { display: block; width: 100%; height: clamp(120px, 22vw, 190px); }
.sc-wave-area { fill: var(--theme-sage-surface); }
.sc-wave-line { fill: none; stroke: var(--theme-action-green); stroke-width: 3; stroke-linejoin: round; }
.sc-wave-ghost { fill: none; stroke: var(--sv-flowline); stroke-width: 2; stroke-dasharray: 4 5; }
.sc-wave-key { display: grid; min-width: 0; padding-top: 6px; }
.sc-wave-key > * { grid-area: 1 / 1; }
.sc-wave-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sc-wave-cols > div { display: grid; justify-items: start; align-content: start; gap: 8px; min-width: 0; }
.sc-wave-cols > div:last-child { justify-items: end; text-align: right; }
.sc-wave-kh { margin: 0; padding: 4px 10px; border-radius: 999px; font: 500 13px/1.2 var(--font-body); color: var(--palette-greyscale-900); white-space: nowrap; }
.sc-wave-fr { background: var(--palette-red-400); }
.sc-wave-ta { background: var(--theme-accent); color: var(--theme-accent-contrast); }
.sc-wave-done { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; font: 500 clamp(15px, 2vw, 18px)/1.2 var(--font-heading); color: var(--sv-ink); white-space: nowrap; opacity: 0; }
