/* Public Goal Hub + Goal detail
   Hub hero matches home campus photo language; stats live below the fold. */

body.site-public .page-hero.page-hero--goals {
    position: relative;
    overflow: hidden;
    padding: clamp(2.8rem, 6vw, 4.4rem) 0 clamp(3rem, 6.5vw, 4.8rem);
    border-bottom: 0;
    color: #0b2742 !important;
    background-color: #f4e7b0;
    background-image:
        linear-gradient(105deg, rgba(255, 248, 220, .9) 0%, rgba(255, 248, 220, .58) 36%, rgba(255, 248, 220, .14) 60%, rgba(255, 248, 220, 0) 78%),
        url("../img/theme/rru-hero-background.webp");
    background-position: center right;
    background-repeat: no-repeat;
    background-size: cover;
}

body.site-public .page-hero.page-hero--goals::after {
    opacity: 0;
}

body.site-public .page-hero.page-hero--goals .goals-hub-hero__atmosphere {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

body.site-public .page-hero.page-hero--goals .goals-hub-hero__sdg-strip {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(17, minmax(0, 1fr));
    height: 10px;
}

body.site-public .page-hero.page-hero--goals .goals-hub-hero__sdg-chip { display: block; min-height: 10px; }
body.site-public .page-hero.page-hero--goals .goals-hub-hero__sdg-chip--1 { background: #e5243b; }
body.site-public .page-hero.page-hero--goals .goals-hub-hero__sdg-chip--2 { background: #dda63a; }
body.site-public .page-hero.page-hero--goals .goals-hub-hero__sdg-chip--3 { background: #4c9f38; }
body.site-public .page-hero.page-hero--goals .goals-hub-hero__sdg-chip--4 { background: #c5192d; }
body.site-public .page-hero.page-hero--goals .goals-hub-hero__sdg-chip--5 { background: #ff3a21; }
body.site-public .page-hero.page-hero--goals .goals-hub-hero__sdg-chip--6 { background: #26bde2; }
body.site-public .page-hero.page-hero--goals .goals-hub-hero__sdg-chip--7 { background: #fcc30b; }
body.site-public .page-hero.page-hero--goals .goals-hub-hero__sdg-chip--8 { background: #a21942; }
body.site-public .page-hero.page-hero--goals .goals-hub-hero__sdg-chip--9 { background: #fd6925; }
body.site-public .page-hero.page-hero--goals .goals-hub-hero__sdg-chip--10 { background: #dd1367; }
body.site-public .page-hero.page-hero--goals .goals-hub-hero__sdg-chip--11 { background: #fd9d24; }
body.site-public .page-hero.page-hero--goals .goals-hub-hero__sdg-chip--12 { background: #bf8b2e; }
body.site-public .page-hero.page-hero--goals .goals-hub-hero__sdg-chip--13 { background: #3f7e44; }
body.site-public .page-hero.page-hero--goals .goals-hub-hero__sdg-chip--14 { background: #0a97d9; }
body.site-public .page-hero.page-hero--goals .goals-hub-hero__sdg-chip--15 { background: #56c02b; }
body.site-public .page-hero.page-hero--goals .goals-hub-hero__sdg-chip--16 { background: #00689d; }
body.site-public .page-hero.page-hero--goals .goals-hub-hero__sdg-chip--17 { background: #19486a; }

body.site-public .page-hero.page-hero--goals .page-hero__grid--goals {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    max-width: 44rem;
}

body.site-public .page-hero.page-hero--goals .page-hero__copy {
    max-width: 40rem;
    color: #0b2742 !important;
}

body.site-public .page-hero.page-hero--goals .page-hero__brand {
    margin: 0 0 .35rem !important;
    font-size: clamp(2.35rem, 5.4vw, 3.7rem) !important;
    line-height: .92 !important;
    letter-spacing: -.045em;
    font-weight: 800 !important;
    color: #0b2742 !important;
    animation: goals-hub-rise .55s ease both;
}

body.site-public .page-hero.page-hero--goals h1 {
    margin: 0 0 .9rem !important;
    color: #0b2742 !important;
    font-size: clamp(1.45rem, 2.8vw, 2rem) !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    letter-spacing: -.02em;
    text-wrap: balance;
    animation: goals-hub-rise .55s ease .06s both;
}

body.site-public .page-hero.page-hero--goals p,
body.site-public .page-hero.page-hero--goals .page-hero__support {
    margin: 0 !important;
    max-width: 38rem;
    color: #334155 !important;
    font-size: clamp(1.02rem, 1.4vw, 1.12rem) !important;
    font-weight: 500 !important;
    line-height: 1.7 !important;
    animation: goals-hub-rise .55s ease .12s both;
}

body.site-public .page-hero.page-hero--goals .goals-hub-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.35rem;
    animation: goals-hub-rise .55s ease .18s both;
}

body.site-public .page-hero.page-hero--goals .button {
    min-height: 46px;
    border-color: #0b2742 !important;
    background: #0b2742 !important;
    color: #fff !important;
    font-weight: 700;
}

body.site-public .page-hero.page-hero--goals .button:hover {
    background: #071e33 !important;
    border-color: #071e33 !important;
    color: #fff !important;
}

body.site-public .page-hero.page-hero--goals .button--outline {
    background: rgba(255, 255, 255, .55) !important;
    color: #0b2742 !important;
    border-color: rgba(11, 39, 66, .55) !important;
}

body.site-public .page-hero.page-hero--goals .button--outline:hover {
    background: rgba(255, 255, 255, .82) !important;
    color: #071e33 !important;
}

body.site-public .sdg-detail-hero .button--outline {
    background: rgba(255, 255, 255, .08) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, .75) !important;
}

body.site-public .sdg-detail-hero .button--outline:hover {
    background: rgba(255, 255, 255, .16) !important;
    color: #fff !important;
}

@media (max-width: 900px) {
    body.site-public .page-hero.page-hero--goals {
        background-image:
            linear-gradient(180deg, rgba(255, 248, 220, .92) 0%, rgba(255, 248, 220, .74) 48%, rgba(255, 248, 220, .38) 100%),
            url("../img/theme/rru-hero-background.webp");
        background-position: 70% center;
    }
}

.goals-hub-section {
    padding-top: clamp(1.75rem, 3.5vw, 2.4rem);
    padding-bottom: clamp(2.4rem, 5vw, 3.5rem);
}

.goals-hub-section__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: 1.25rem 1.75rem;
    margin-bottom: 1.35rem;
}

.goals-hub-section__head h2 {
    margin: 0 0 .4rem;
    color: #0b2742;
}

.goals-hub-section__head p {
    margin: 0;
    max-width: 36rem;
    color: #475569;
}

.goals-hub-pulse {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: .85rem 1.35rem;
    margin: 0;
    padding: 0;
}

.goals-hub-pulse > div {
    display: grid;
    gap: .1rem;
    min-width: 0;
}

.goals-hub-pulse dt {
    margin: 0;
    color: #64748b;
    font-size: .82rem;
    font-weight: 600;
}

.goals-hub-pulse dd {
    margin: 0;
    color: #0b2742;
    font-size: clamp(1.35rem, 2.4vw, 1.7rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.goals-hub-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.goals-hub-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: .95rem;
    padding: 1rem;
    border: 1px solid var(--border, #d6e1ea);
    border-radius: 18px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease, opacity .2s ease;
    border-top: 4px solid var(--goal-color, #006B3F);
    animation: goals-hub-card-in .45s ease both;
    animation-delay: calc(var(--hub-stagger, 0) * 28ms);
}

.goals-hub-card:hover {
    border-color: color-mix(in srgb, var(--goal-color, #006B3F) 45%, #d6e1ea);
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(17, 56, 92, .08);
}

.goals-hub-card:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--goal-color, #006B3F) 55%, #11385c);
    outline-offset: 3px;
}

.goals-hub-card--empty {
    opacity: .78;
}

.goals-hub-card--empty .goals-hub-card__metric {
    color: #64748b;
    font-weight: 600;
}

.goals-hub-card--empty:hover,
.goals-hub-card--empty:focus-visible {
    opacity: 1;
}

.goals-hub-card--active {
    box-shadow: 0 1px 0 rgba(17, 56, 92, .04);
}

.goals-hub-card--active .goals-hub-card__metric {
    color: color-mix(in srgb, var(--goal-color, #006B3F) 72%, #11385c);
}

.goals-hub-card__visual img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}

.goals-hub-card__body {
    display: grid;
    gap: .35rem;
    align-content: start;
    min-width: 0;
}

.goals-hub-card__code {
    display: inline-flex;
    width: max-content;
    padding: .15rem .5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--goal-color, #006B3F) 14%, #fff);
    color: color-mix(in srgb, var(--goal-color, #006B3F) 78%, #11385c);
    font-size: .78rem;
    font-weight: 700;
}

.goals-hub-card h3 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.35;
    color: var(--text, #1f2937);
}

.goals-hub-card__metric {
    margin: 0;
    color: var(--rru-primary, #11385c);
    font-weight: 700;
}

.goals-hub-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    color: var(--text-muted, #64748b);
    font-size: .86rem;
}

.goals-hub-card__cta {
    margin-top: .25rem;
    color: var(--rru-accent-strong, #087a82);
    font-weight: 700;
    font-size: .9rem;
}

.goals-hub-card__cta::after {
    content: " →";
    display: inline;
}

.sdg-detail-headline {
    display: grid;
    gap: .25rem;
    margin-top: 1rem;
    padding: .95rem 1.05rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .12);
    max-width: 40rem;
}
.sdg-detail-headline strong {
    font-size: clamp(1.15rem, 2.4vw, 1.45rem);
    color: #fff;
}
.sdg-detail-headline span {
    color: rgba(255, 255, 255, .82);
    font-size: .92rem;
}

.breadcrumb-lite--on-dark {
    margin-bottom: .75rem;
    color: rgba(255, 255, 255, .78);
}
.breadcrumb-lite--on-dark a { color: #fff; text-decoration: none; }
.breadcrumb-lite--on-dark a:hover { text-decoration: underline; }

.sdg-detail-featured {
    display: grid;
    gap: 1.35rem;
}

.sdg-detail-featured__note {
    margin: .35rem 0 0;
    color: var(--text-muted, #64748b);
    font-size: .92rem;
}

.sdg-detail-latest-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

@media (min-width: 720px) {
    .sdg-detail-latest-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.65rem 1.5rem;
    }
}

.sdg-detail-latest-grid .project-card {
    height: 100%;
}

.goals-hub-framework-note {
    margin: 0 0 1.25rem;
    max-width: 52rem;
}

.sdg-framework-source {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .85rem 1.25rem;
    margin: 0 0 1.25rem;
    padding: .85rem 0;
    border-bottom: 1px solid rgba(17, 56, 92, .12);
}

.sdg-framework-source__label {
    margin: 0;
    color: var(--text-muted, #64748b);
    font-size: .95rem;
    max-width: 40rem;
    overflow-wrap: anywhere;
}

.sdg-framework-source .button {
    min-height: 44px;
}

.sdg-framework-panel__body {
    margin: .35rem 0 0;
    color: var(--text-muted, #64748b);
    max-width: 42rem;
}

.sdg-framework-toolbar {
    margin: 0 0 1rem;
}

.sdg-framework-search {
    display: grid;
    gap: .4rem;
    max-width: 28rem;
}

.sdg-framework-search span {
    font-weight: 600;
    color: var(--rru-primary, #11385c);
    font-size: .92rem;
}

.sdg-framework-search input[type="search"] {
    width: 100%;
    min-height: 44px;
    padding: .65rem .85rem;
    border: 1px solid var(--border, #d6e1ea);
    border-radius: 10px;
    background: #fff;
    color: var(--text, #1f2937);
    font: inherit;
}

.sdg-framework-search input[type="search"]:focus {
    outline: 2px solid rgba(0, 163, 168, .45);
    outline-offset: 1px;
    border-color: var(--rru-accent, #00a3a8);
}

.sdg-framework-list {
    display: grid;
    gap: 1.15rem;
}

.sdg-framework-target {
    margin: 0;
    padding: 0 0 1.05rem;
    border-bottom: 1px solid rgba(17, 56, 92, .1);
    background: transparent;
    box-shadow: none;
}

.sdg-framework-target:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.sdg-framework-target__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .75rem 1rem;
    align-items: start;
}

.sdg-framework-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.25rem;
    min-height: 2rem;
    padding: .35rem .55rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--goal-color, #006B3F) 16%, #fff);
    color: var(--goal-color, #006B3F);
    font-weight: 800;
    font-size: .86rem;
    line-height: 1.2;
    white-space: nowrap;
}

.sdg-framework-code--indicator {
    min-width: 3.75rem;
    border-radius: 8px;
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--goal-color, #006B3F) 35%, #fff);
    font-weight: 700;
}

.sdg-framework-target__meta {
    display: grid;
    gap: .25rem;
    min-width: 0;
}

.sdg-framework-target__meta h3 {
    margin: 0;
    color: var(--text, #1f2937);
    font-size: clamp(1.02rem, 2vw, 1.15rem);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.sdg-framework-target__count {
    color: var(--text-muted, #64748b);
    font-size: .86rem;
}

.sdg-framework-indicators {
    list-style: none;
    margin: .85rem 0 0;
    padding: 0 0 0 1rem;
    display: grid;
    gap: .7rem;
    border-left: 3px solid color-mix(in srgb, var(--goal-color, #006B3F) 55%, #fff);
}

.sdg-framework-indicator {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .65rem .85rem;
    align-items: start;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
}

.sdg-framework-indicator__body {
    min-width: 0;
}

.sdg-framework-indicator__name {
    margin: 0;
    color: var(--text, #1f2937);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.sdg-framework-indicator__desc {
    margin: .35rem 0 0;
    color: var(--text-muted, #64748b);
    font-size: .9rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.sdg-framework-empty {
    margin-top: .75rem;
}

.sdg-detail-side-card__source {
    margin: 0 0 .75rem;
    color: var(--text-muted, #64748b);
    font-size: .86rem;
    line-height: 1.45;
}

.sdg-detail-side-card .button--outline {
    margin-bottom: .65rem;
}

.sdg-detail-snapshot {
    display: grid;
    gap: .65rem;
    margin: 0 0 1rem;
}
.sdg-detail-snapshot > div {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    padding: .7rem .8rem;
    border: 1px solid rgba(17, 56, 92, .1);
    border-radius: 12px;
    background: #f8fafc;
}
.sdg-detail-snapshot dt {
    margin: 0;
    color: var(--text-muted, #64748b);
}
.sdg-detail-snapshot dd {
    margin: 0;
    font-weight: 800;
    color: var(--rru-primary, #11385c);
}

.sdg-detail-side-card .button--ghost {
    margin-top: .75rem;
}

@keyframes goals-hub-rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes goals-hub-card-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.site-public .page-hero.page-hero--goals .page-hero__brand,
    body.site-public .page-hero.page-hero--goals h1,
    body.site-public .page-hero.page-hero--goals .page-hero__support,
    body.site-public .page-hero.page-hero--goals .goals-hub-hero__actions,
    .goals-hub-card {
        animation: none;
    }
    .goals-hub-card:hover {
        transform: none;
    }
}

@media (max-width: 1080px) {
    .goals-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .goals-hub-section__head {
        align-items: start;
        flex-direction: column;
    }
    .goals-hub-pulse {
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .65rem;
        padding: .85rem .9rem;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        background: #f8fafc;
    }
    .goals-hub-grid { grid-template-columns: 1fr; }
    .goals-hub-card { grid-template-columns: 78px minmax(0, 1fr); }
    .sdg-framework-source {
        align-items: stretch;
        flex-direction: column;
    }
    .sdg-framework-source .button {
        width: 100%;
        justify-content: center;
    }
    .sdg-framework-search { max-width: none; }
    .sdg-framework-indicators { padding-left: .75rem; }
}

@media (max-width: 520px) {
    .goals-hub-pulse { grid-template-columns: 1fr; }
    .goals-hub-hero__actions .button { width: 100%; }
    .sdg-framework-target__head,
    .sdg-framework-indicator {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 390px) {
    .sdg-framework-indicators {
        padding-left: .55rem;
        gap: .55rem;
    }
}
