/* Daily writing goal on the Studio shelf. */
.studio-goal {
    margin-bottom: 0;
    padding: 0;
}
.studio-goal-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
}
.studio-goal-top > span:first-child {
    font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    color: color-mix(in srgb, var(--text) 45%, transparent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
}
.studio-goal-num {
    font-size: 15px;
}
.studio-goal-streak {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 400;
    color: color-mix(in srgb, var(--text) 45%, transparent);
}
.studio-goal-pill {
    border: 0;
    border-radius: 0;
    padding: 0;
    font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    font-size: 19px;
    font-weight: 600;
    color: color-mix(in srgb, var(--text) 45%, transparent);
    font-variant-numeric: lining-nums tabular-nums;
}
.studio-goal-track {
    position: relative;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}
.studio-goal-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: var(--accent, #7c3aed);
    transition: width 0.3s ease, background 0.2s ease;
}
/* Checkpoint notches — a tick on the bar where each checkpoint sits. */
.studio-goal-notches { position: absolute; inset: 0; pointer-events: none; }
.studio-goal-notch {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    margin-left: -1px;
    background: color-mix(in srgb, var(--text) 45%, transparent);
}
.studio-goal-notch.is-hit { background: color-mix(in srgb, #fff 75%, transparent); }
/* Track My Writing — no target, no bar: a tight left-aligned stack, not a
   spread row with an empty band where the progress track would be. */
.studio-goal--track .studio-goal-track { display: none; }
.studio-goal--track .studio-goal-top {
    display: block;
    margin-bottom: 0;
}
.studio-goal--track .studio-goal-pill {
    display: block;
    margin-top: 4px;
    font-size: 24px;
}
/* Daily Goal with a target, shown — one progress bar toward the next mark, no dots. */
.studio-goal--track.has-goal-bar .studio-goal-track { display: block; }
.studio-goal--track.has-goal-bar .studio-goal-top {
    display: flex;
    margin-bottom: 10px;
}
.studio-goal--track.has-goal-bar .studio-goal-pill {
    display: inline;
    margin-top: 0;
    font-size: 19px;
}
/* Daily Goal set to "hidden" — the card only lights up once the goal is reached.
   Use full-strength --text so it reads on any theme (the muted pill is 45%). */
.studio-goal.is-celebrating .studio-goal-pill {
    color: var(--text);
    animation: studioGoalPop 0.4s ease both;
}
.studio-goal.is-celebrating .studio-goal-top > span:first-child {
    color: color-mix(in srgb, var(--text) 75%, transparent);
}
@keyframes studioGoalPop {
    0% { transform: scale(0.96); opacity: 0.4; }
    60% { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}
/* Maintain Your Pace — bar tinted by where today sits in the writer's own range */
.studio-goal-fill.is-green { background: #4ade80; }
.studio-goal-fill.is-yellow { background: #facc15; }
.studio-goal-fill.is-purple { background: var(--accent, #a855f7); }
.studio-goal--pace .studio-goal-track { min-width: 40px; }
