.institutional-panel {
    border: 1px solid rgba(56, 189, 248, 0.22);
    background-image: linear-gradient(135deg, rgba(14, 116, 144, 0.07), transparent 44%);
}

.institutional-header,
.institutional-station-strip {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.institutional-eyebrow,
.institutional-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.institutional-eyebrow {
    color: rgb(103 232 249);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.institutional-link {
    border: 1px solid rgb(56 189 248 / 0.3);
    border-radius: 0.5rem;
    color: rgb(125 211 252);
    font-size: 0.62rem;
    font-weight: 800;
    padding: 0.5rem 0.7rem;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.institutional-link:hover { background: rgb(14 116 144 / 0.18); border-color: rgb(56 189 248 / 0.55); }

.institutional-station-strip {
    background: rgb(15 23 42 / 0.34);
    border: 1px solid rgb(71 85 105 / 0.42);
    border-radius: 0.75rem;
    margin-top: 0.9rem;
    padding: 0.8rem;
}

.institutional-label {
    color: rgb(148 163 184);
    display: block;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.institutional-station-name { color: var(--text-main); display: block; font-size: 0.88rem; margin-top: 0.15rem; }
.institutional-station-meta { color: rgb(148 163 184); display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.58rem; margin-top: 0.2rem; }
.institutional-observation-meta { align-items: flex-end; display: flex; flex-direction: column; gap: 0.45rem; text-align: right; }
.institutional-observation-meta > span { color: rgb(203 213 225); font-size: 0.64rem; font-weight: 700; }

.institutional-context-card {
    background: rgb(15 23 42 / 0.28);
    border: 1px solid rgb(71 85 105 / 0.35);
    border-radius: 0.7rem;
}

.institutional-context-card { display: flex; gap: 0.6rem; min-width: 0; padding: 0.7rem; }
.institutional-context-icon { align-items: center; background: rgb(30 41 59 / 0.7); border-radius: 0.55rem; display: flex; flex: 0 0 auto; height: 2rem; justify-content: center; width: 2rem; }
.institutional-context-card strong { color: var(--text-main); display: block; font-size: 0.68rem; line-height: 1.25; margin-top: 0.15rem; }
.institutional-context-card p { color: rgb(148 163 184); font-size: 0.54rem; line-height: 1.35; margin-top: 0.2rem; }
.institutional-inline-link { color: rgb(125 211 252); display: inline-block; font-size: 0.55rem; font-weight: 800; margin-top: 0.35rem; text-decoration: underline; text-underline-offset: 2px; }
.institutional-context-card[data-applicable="false"] { opacity: 0.72; }

.institutional-method { border-top: 1px solid rgb(71 85 105 / 0.35); margin-top: 0.75rem; padding-top: 0.65rem; }
.institutional-method summary { color: rgb(148 163 184); cursor: pointer; font-size: 0.58rem; font-weight: 800; text-transform: uppercase; }
.institutional-method p { color: rgb(148 163 184); font-size: 0.58rem; line-height: 1.5; margin-top: 0.55rem; }
.institutional-source-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 0.5rem; }
.institutional-source-row a { color: rgb(125 211 252); font-size: 0.56rem; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

.institutional-station-only .institutional-station-strip {
    align-items: center;
}

.institutional-station-only .institutional-method[open] summary {
    color: rgb(103 232 249);
}

#geosphere-grid {
    height: 715px !important;
    min-height: 715px;
    max-height: 715px;
    align-items: stretch;
}

.geosphere-stack {
    display: grid;
    grid-template-rows: 575px 124px;
    gap: 1rem;
    min-width: 0;
    min-height: 715px;
    max-height: 715px;
    height: 715px;
}

.geosphere-primary-panel,
.geosphere-primary-scroll {
    min-width: 0;
    min-height: 0;
}

.geosphere-primary-panel {
    height: 575px;
    min-height: 575px;
    max-height: 575px;
    visibility: visible;
}

#geosphere-seismic-panel {
    height: 715px !important;
    min-height: 715px;
    max-height: 715px;
    visibility: visible;
}

.geosphere-context-panel {
    height: 124px;
    min-height: 124px;
    max-height: 124px;
    overflow-y: auto;
    padding: 0.9rem;
    border-color: rgb(71 85 105 / 0.5);
    background-image: linear-gradient(135deg, rgb(30 41 59 / 0.42), rgb(15 23 42 / 0.16));
}

#geosphere-thunderstorm-card {
    border-color: rgb(139 92 246 / 0.28);
}

#institutional-coastal-card.geosphere-context-panel {
    border-color: rgb(34 211 238 / 0.25);
}

.geosphere-marine-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.geosphere-marine-summary > div {
    min-width: 0;
}

.geosphere-marine-summary span {
    display: block;
    color: rgb(165 243 252);
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.geosphere-marine-summary strong {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-main);
    font-size: 1.45rem;
    line-height: 1.1;
}

.geosphere-marine-summary > div:last-child strong {
    color: rgb(96 165 250);
}

@media (max-width: 1023px) {
    #geosphere-grid {
        height: auto !important;
        min-height: 0;
        max-height: none;
    }

    .geosphere-stack {
        grid-template-rows: minmax(18rem, auto) auto;
        height: auto;
        min-height: 0;
        max-height: none;
    }

    .geosphere-primary-panel {
        height: auto;
        min-height: 18rem;
        max-height: none;
    }

    #geosphere-seismic-panel {
        height: auto !important;
        min-height: 28rem;
        max-height: none;
    }

    .geosphere-context-panel {
        height: auto;
        min-height: 7.8rem;
        max-height: none;
        overflow-y: visible;
    }
}

@media (max-width: 639px) {
    .institutional-header,
    .institutional-station-strip { align-items: stretch; flex-direction: column; }
    .institutional-observation-meta { align-items: flex-start; text-align: left; }
}
