/* ============================================================
   DEARDEN2007 — REUSABLE 50-STATE NETWORK
   Ten state buttons per row on wide screens
   No JavaScript required: state sections open with :target
   ============================================================ */

.state-network {
    width: min(1520px, calc(100% - 48px));
    margin: 110px auto;
    padding: 64px;
    border: 1px solid #31577f;
    border-radius: 28px;
    background:
        radial-gradient(circle at 4% 8%, rgba(52,120,255,.15), transparent 25rem),
        radial-gradient(circle at 96% 8%, rgba(255,53,71,.13), transparent 25rem),
        #070b12;
}

.state-network__header {
    max-width: 1080px;
    margin-bottom: 42px;
}

.state-network__header > span {
    color: #ff3547;
    font-size: .78rem;
    font-weight: 1000;
    letter-spacing: .18em;
}

.state-network__header h2 {
    margin: 13px 0 17px;
    font-size: clamp(2.5rem, 4.8vw, 5.2rem);
    line-height: .96;
}

.state-network__header h2 strong {
    display: block;
    color: #83b2ff;
}

.state-network__header p {
    color: #b7c9e3;
    line-height: 1.7;
}

.state-network__grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 10px;
}

.state-network__grid a {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 84px;
    padding: 10px 5px;
    overflow: hidden;
    border: 1px solid #355477;
    border-top: 4px solid #3478ff;
    border-radius: 12px;
    color: #fff;
    background:
        linear-gradient(145deg, #111b2b, #06090f);
    text-align: center;
    text-decoration: none;
    transition:
        transform .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

.state-network__grid a:nth-child(3n + 1) {
    border-top-color: #ff3547;
}

.state-network__grid a::after {
    content: "";
    position: absolute;
    right: -22px;
    bottom: -30px;
    width: 58px;
    height: 58px;
    border: 10px solid rgba(52,120,255,.12);
    border-radius: 50%;
}

.state-network__grid a:hover,
.state-network__grid a:focus-visible {
    z-index: 2;
    transform: translateY(-5px) scale(1.03);
    border-color: #83b2ff;
    box-shadow: 0 15px 32px rgba(0,0,0,.38);
}

.state-network__grid span {
    position: relative;
    z-index: 1;
    font-size: 1.35rem;
    font-weight: 1000;
    letter-spacing: .08em;
}

.state-network__grid small {
    position: relative;
    z-index: 1;
    display: block;
    max-width: 100%;
    margin-top: 4px;
    overflow: hidden;
    color: #9fb4cf;
    font-size: .6rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.state-network__instruction {
    margin-top: 22px;
    padding: 20px;
    border-left: 6px solid #ff3547;
    border-radius: 10px;
    background: #0b121f;
}

.state-network__instruction strong {
    color: #83b2ff;
    letter-spacing: .11em;
}

.state-network__instruction p {
    margin-bottom: 0;
    color: #b7c9e3;
}

.state-network__panels {
    margin-top: 28px;
}

.state-panel {
    display: none;
    scroll-margin-top: 24px;
    padding: 34px;
    border: 1px solid #3b5f89;
    border-left: 8px solid #ff3547;
    border-radius: 20px;
    background:
        linear-gradient(145deg, rgba(14,30,57,.96), rgba(7,10,16,.98));
    box-shadow: 0 28px 65px rgba(0,0,0,.42);
}

.state-panel:target {
    display: block;
    animation: statePanelReveal .28s ease;
}

@keyframes statePanelReveal {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.state-panel__top {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    align-items: center;
    padding-bottom: 25px;
    border-bottom: 1px solid #34506f;
}

.state-panel__identity {
    display: flex;
    gap: 20px;
    align-items: center;
}

.state-panel__identity > span {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border: 4px solid #3478ff;
    border-radius: 18px;
    background:
        linear-gradient(145deg, #131f31, #05080e);
    font-size: 2rem;
    font-weight: 1000;
}

.state-panel__identity small {
    color: #ff3547;
    font-weight: 1000;
    letter-spacing: .14em;
}

.state-panel__identity h3 {
    margin: 5px 0 0;
    font-size: clamp(2rem, 4vw, 4rem);
}

.state-panel__top > a {
    padding: 12px 15px;
    border: 1px solid #496a93;
    border-radius: 8px;
    color: #fff;
    background: #0a1422;
    font-weight: 900;
    text-decoration: none;
}

.state-panel__summary {
    max-width: 1000px;
    padding: 25px 0;
}

.state-panel__summary p {
    color: #c1d0e5;
    font-size: 1.06rem;
    line-height: 1.7;
}

.state-resource-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.state-resource-card {
    min-width: 0;
    padding: 24px;
    border: 1px solid #29496f;
    border-top: 5px solid #3478ff;
    border-radius: 16px;
    background: #080e18;
}

.state-resource-card:nth-child(2) {
    border-top-color: #ff3547;
}

.state-resource-card__label {
    color: #83b2ff;
    font-size: .72rem;
    font-weight: 1000;
    letter-spacing: .13em;
}

.state-resource-card h4 {
    margin: 28px 0 20px;
    font-size: 1.35rem;
}

.state-resource-card dl {
    margin: 0;
}

.state-resource-card dl > div {
    padding: 11px 0;
    border-top: 1px solid #263c56;
}

.state-resource-card dt {
    color: #ff3547;
    font-size: .69rem;
    font-weight: 1000;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.state-resource-card dd {
    margin: 5px 0 0;
    color: #b7c9e3;
    line-height: 1.5;
}

.state-panel__note {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #6f202b;
    border-left: 6px solid #ff3547;
    border-radius: 12px;
    background: rgba(75,8,17,.36);
}

.state-panel__note strong {
    color: #83b2ff;
    letter-spacing: .1em;
}

.state-panel__note p {
    margin-bottom: 0;
    color: #c1d0e5;
}

@media (max-width: 1200px) {
    .state-network__grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .state-network {
        width: min(100% - 24px, 1520px);
        padding: 25px;
    }

    .state-network__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .state-resource-grid {
        grid-template-columns: 1fr;
    }

    .state-panel__top {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .state-network__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .state-network__grid a {
        min-height: 72px;
    }

    .state-network__grid small {
        display: none;
    }

    .state-panel {
        padding: 20px;
    }
}


.state-resource-card dd a {
    color: #83b2ff;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.state-resource-card--empty {
    grid-column: 1 / -1;
    min-height: 230px;
    border-top-color: #ff3547;
    text-align: center;
}

.state-resource-card--empty p {
    max-width: 720px;
    margin: 0 auto 22px;
    color: #b7c9e3;
    line-height: 1.65;
}

.state-resource-card--empty > a {
    display: inline-block;
    padding: 12px 17px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, #ff3547, #173e9d);
    font-weight: 1000;
    text-decoration: none;
}
