.milestones-page {
    gap: 30px;
}

.milestones-hero {
    background: radial-gradient(circle at 20% 20%, rgba(0, 193, 152, 0.16), transparent 35%),
        radial-gradient(circle at 80% 0%, rgba(65, 191, 255, 0.2), transparent 40%),
        var(--surface-gradient);
    border: 1px solid var(--surface-border);
    border-radius: 28px;
    padding: 28px 30px;
    box-shadow: var(--shadow-card);
    display: grid;
    gap: 10px;
}

.milestones-hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent-green);
    margin: 0;
    font-weight: 600;
}

.milestones-hero__title {
    font-size: clamp(2.2rem, 3vw, 3rem);
    margin: 0;
}

.milestones-hero__lede {
    color: var(--text-secondary);
    margin: 0;
    max-width: 720px;
}
.milestone-scope {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.milestone-scope__label {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
}

.milestone-scope__controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 4px;
}

.milestone-scope__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.milestone-scope__option {
    padding: 8px 14px;
    border-radius: 14px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.milestone-scope__input:checked + .milestone-scope__option {
    background: linear-gradient(135deg, rgba(65, 191, 255, 0.16), rgba(0, 193, 152, 0.16));
    color: var(--text-primary);
    box-shadow: 0 6px 18px rgba(65, 191, 255, 0.12);
    font-weight: 700;
}

.milestones-filter {
    display: grid;
    gap: 8px;
    max-width: 520px;
}

.milestones-filter__label {
    font-weight: 600;
    margin: 0;
}

.milestones-filter__field {
    position: relative;
}

.milestones-filter input {
    width: 100%;
    padding: 14px 16px 14px 42px;
    border-radius: 16px;
    border: 1px solid var(--surface-border);
    background: var(--surface);
    color: var(--text-primary);
    box-shadow: inset 0 0 0 1px rgba(65, 191, 255, 0.08);
}

.milestones-filter input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(65, 191, 255, 0.25);
}

.milestones-filter__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.milestones-filter__hint {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
}

.milestone-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    align-items: start;
}

.milestone-card {
    background: var(--surface-gradient);
    border: 1px solid var(--surface-border);
    border-radius: 28px;
    padding: 20px;
    box-shadow: var(--shadow-card);
    display: grid;
    gap: 14px;
}

.milestone-card.is-hidden {
    display: none;
}

.milestone-card__header {
    display: grid;
    gap: 4px;
}

.milestone-card__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-highlight);
    margin: 0;
    font-weight: 600;
}

.milestone-card__lede {
    margin: 0;
    color: var(--text-secondary);
}

.milestone-card__body {
    display: grid;
    gap: 12px;
}

.milestone-group {
    background: linear-gradient(135deg, rgba(5, 38, 54, 0.75), rgba(6, 24, 36, 0.9));
    border: 1px solid var(--surface-border);
    border-radius: 18px;
    padding: 12px 14px;
    transition: border-color 150ms ease, box-shadow 150ms ease, opacity 160ms ease;
}

.milestone-group.is-muted {
    opacity: 0.55;
}

.milestone-group[open] {
    border-color: var(--primary);
    box-shadow: 0 12px 26px var(--accent-shadow);
}

.milestone-group__summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    gap: 12px;
}

.milestone-group__summary::-webkit-details-marker {
    display: none;
}

.milestone-group__titles {
    display: grid;
    gap: 2px;
}

.milestone-group__label {
    font-weight: 700;
}

.milestone-group__count {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.milestone-group__chevron {
    transition: transform 150ms ease;
    color: var(--text-secondary);
}

.milestone-group[open] .milestone-group__chevron {
    transform: rotate(180deg);
}

.milestone-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.milestone-item {
    background: rgba(9, 48, 68, 0.6);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    padding: 12px 14px;
    display: grid;
    gap: 4px;
}

.milestone-item__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.milestone-item__title {
    margin: 0;
    font-weight: 700;
}

.milestone-item__fixture {
    margin: 0;
    color: var(--text-secondary);
}

.milestone-empty,
.milestones-empty {
    margin: 0;
    padding: 12px 0;
    color: var(--text-muted);
}

.is-hidden {
    display: none !important;
}

html[data-theme="light"] .milestone-group {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(235, 243, 255, 0.95));
}

html[data-theme="light"] .milestone-item {
    background: rgba(255, 255, 255, 0.94);
}

@media (max-width: 680px) {
    .milestone-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .milestone-group__summary {
        align-items: flex-start;
    }
}
