/* Strategy overview. The average of every Key Result's progress, drawn over
   time, then one card per top-level Objective. The number and the line are
   computed for display and stored nowhere; nothing here judges, labels or
   projects — the axis is fixed at 0–100% and the line stops at today. */

.overview-chart,
.overview-cards {
    max-width: var(--content-max);
}

/* The chart ---------------------------------------------------------------- */

.overview-chart {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-8);
}

/* Where the average stands now, in the same hand every reading is written in. */
.overview-average {
    font-family: var(--font-numeric);
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    color: var(--ink);
    margin-bottom: var(--space-5);
}

.overview-chart svg {
    display: block;
    width: 100%;
    height: auto;
}

.overview-gridline {
    stroke: var(--line);
    stroke-width: var(--stroke-hair);
}

.overview-axis-value,
.overview-axis-date {
    fill: var(--ink-muted);
    font-family: var(--font-numeric);
    font-size: var(--text-xs);
}

.overview-line {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2px;
    stroke-linejoin: round;
    stroke-linecap: round;
}

/* The cards ---------------------------------------------------------------- */

.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-6);
    align-items: start;
}

.overview-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.overview-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-5);
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--line);
    background: var(--surface-sunken);
}

.overview-card-name {
    color: var(--ink);
    font-size: var(--text-md);
    font-weight: var(--weight-semibold);
    text-decoration: none;
}

.overview-card-name:hover {
    color: var(--accent);
}

.overview-card-owner,
.overview-row-owner {
    color: var(--ink-muted);
    font-size: var(--text-sm);
    white-space: nowrap;
}

.overview-row {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-6);
    min-height: var(--row-height);
}

.overview-row + .overview-row {
    border-top: 1px solid var(--line);
}

/* The same two marks the tree wears: which kind of thing a row is. */
.overview-row-kind {
    flex: none;
    width: 8px;
    height: 8px;
}

.overview-row-kind-objective {
    border-radius: var(--radius-mark);
    background: var(--span-strong);
}

.overview-row-kind-key-result {
    border-radius: 50%;
    background: var(--accent);
}

.overview-row-name {
    flex: 1;
    min-width: 0;
    color: var(--ink);
    font-size: var(--text-base);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-row-name:hover {
    color: var(--accent);
}

.overview-row-progress {
    flex: none;
    width: calc(var(--progress-figure-width) * 3);
}

/* An Objective row has nothing to measure, so its cell stays empty and the
   names still line up against the ones that do. */
.overview-row-objective .overview-row-progress {
    visibility: hidden;
}

@media (max-width: 720px) {
    .overview-cards {
        grid-template-columns: 1fr;
    }

    .overview-row-owner {
        display: none;
    }
}

/* The person is a link to everything that is theirs, as on every screen. */
.overview-card-owner:hover,
.overview-row-owner:hover {
    color: var(--accent-strong);
    text-decoration: underline;
}
