
.goals-page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px 24px 56px;
}

.goals-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 22px;
    padding: 28px 30px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 22px;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.96),
        rgba(30, 41, 59, 0.92)
    );
    color: #f8fafc;
}

.goals-hero.compact {
    padding-block: 22px;
}

.goals-hero h1,
.scorecard h2,
.goals-panel h2 {
    margin: 4px 0 8px;
}

.goals-hero p {
    max-width: 760px;
    margin: 0;
    color: #cbd5e1;
}

.eyebrow {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
}

.artifact-card {
    min-width: 230px;
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.artifact-card.verified {
    border-color: rgba(34, 197, 94, 0.45);
}

.artifact-card.warning {
    border-color: rgba(245, 158, 11, 0.55);
}

.artifact-card span,
.artifact-card strong,
.artifact-card code {
    display: block;
}

.artifact-card strong {
    margin: 5px 0;
}

.goals-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
}

.goals-tabs a {
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.goals-tabs a.active {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

.milestone-card,
.goals-panel,
.scorecard {
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.98);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.milestone-card {
    padding: 18px 20px;
    margin-bottom: 20px;
}

.milestone-card strong {
    display: block;
    font-size: 1.2rem;
    margin: 4px 0;
}

.progress-track {
    height: 9px;
    margin-top: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.progress-fill {
    height: 100%;
    min-width: 0;
    background: linear-gradient(
        90deg,
        #0f172a,
        #334155
    );
}

.goals-scorecards {
    display: grid;
    grid-template-columns: repeat(
        2,
        minmax(0, 1fr)
    );
    gap: 18px;
    margin-bottom: 20px;
}

.scorecard {
    padding: 22px;
}

.scorecard-heading,
.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(
        4,
        minmax(0, 1fr)
    );
    gap: 12px;
    margin-top: 18px;
}

.metric-grid > div {
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
}

.metric-grid span,
.metric-grid strong {
    display: block;
}

.metric-grid span {
    font-size: 0.78rem;
    color: #64748b;
}

.metric-grid strong {
    margin-top: 4px;
    font-size: 1.02rem;
}

.goals-panel {
    padding: 22px;
    margin-bottom: 20px;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 14px;
}

.goals-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.goals-table th,
.goals-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.goals-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.goals-table td small {
    display: block;
    margin-top: 3px;
    color: #64748b;
}

.positive {
    font-weight: 800;
    color: #15803d;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
}

.status-pill.neutral {
    background: #e2e8f0;
    color: #334155;
}

.status-pill.good {
    background: #dcfce7;
    color: #166534;
}

.status-pill.bad {
    background: #fee2e2;
    color: #991b1b;
}

.empty-state {
    padding: 34px 20px;
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    color: #64748b;
}

.empty-state strong {
    display: block;
    color: #0f172a;
    margin-bottom: 6px;
}

.subtle-link {
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 900px) {
    .goals-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .goals-scorecards {
        grid-template-columns: 1fr;
    }

    .metric-grid {
        grid-template-columns: repeat(
            2,
            minmax(0, 1fr)
        );
    }
}

@media (max-width: 560px) {
    .goals-page {
        padding-inline: 14px;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }
}

/* GOALS-3.1 — contrast correction for dark global theme */

.goals-page .milestone-card,
.goals-page .scorecard,
.goals-page .goals-panel {
    color: #0f172a;
}

.goals-page .milestone-card h1,
.goals-page .milestone-card h2,
.goals-page .milestone-card strong,
.goals-page .scorecard h1,
.goals-page .scorecard h2,
.goals-page .scorecard strong,
.goals-page .goals-panel h1,
.goals-page .goals-panel h2,
.goals-page .goals-panel strong {
    color: #0f172a;
}

.goals-page .milestone-card p,
.goals-page .scorecard p,
.goals-page .goals-panel p {
    color: #475569;
}

.goals-page .metric-grid > div {
    color: #0f172a;
}

.goals-page .metric-grid span {
    color: #64748b;
}

.goals-page .metric-grid strong {
    color: #0f172a;
}

.goals-page .goals-table {
    color: #0f172a;
}

.goals-page .goals-table td {
    color: #0f172a;
}

.goals-page .goals-table th {
    color: #64748b;
}

.goals-page .empty-state {
    color: #64748b;
}

.goals-page .empty-state strong {
    color: #0f172a;
}

.goals-page .panel-heading h2 {
    color: #0f172a;
}
