.laca-portal {
    --portal-accent: var(--bright-cyan);
    --portal-accent-2: var(--bio-green);
    position: relative;
    z-index: 2;
    width: min(1380px, calc(100% - 2rem));
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 4rem) 0 5rem;
}

.laca-portal.theme-pink { --portal-accent: var(--neon-pink); --portal-accent-2: var(--golden-yellow); }
.laca-portal.theme-green { --portal-accent: var(--bio-green); --portal-accent-2: var(--bright-cyan); }
.laca-portal.theme-gold { --portal-accent: var(--golden-yellow); --portal-accent-2: var(--neon-pink); }
.laca-portal.theme-purple { --portal-accent: #b794f4; --portal-accent-2: var(--bright-cyan); }

.portal-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(2rem, 6vw, 5.5rem);
    border: 1px solid color-mix(in srgb, var(--portal-accent) 48%, transparent);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(8, 2, 24, 0.92), rgba(34, 11, 66, 0.78)),
        radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--portal-accent) 22%, transparent), transparent 38%);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34), inset 0 0 48px rgba(107, 70, 193, 0.12);
}

.portal-hero::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -180px;
    bottom: -250px;
    border: 1px solid color-mix(in srgb, var(--portal-accent) 42%, transparent);
    border-radius: 50%;
    box-shadow:
        0 0 0 42px color-mix(in srgb, var(--portal-accent) 4%, transparent),
        0 0 0 88px color-mix(in srgb, var(--portal-accent-2) 3%, transparent);
}

.portal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1rem;
    color: var(--portal-accent);
    font: 700 .75rem/1.2 'JetBrains Mono', monospace;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.portal-eyebrow::before {
    content: "";
    width: 2.8rem;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--portal-accent));
}

.portal-hero h1 {
    max-width: 980px;
    margin: 0;
    font: 900 clamp(2.1rem, 5.7vw, 5rem)/1.03 'Orbitron', sans-serif;
    letter-spacing: -.04em;
    color: #fff;
}

.portal-hero h1 span { color: var(--portal-accent); text-shadow: 0 0 28px color-mix(in srgb, var(--portal-accent) 45%, transparent); }

.portal-lede {
    max-width: 930px;
    margin-top: 1.4rem;
    color: rgba(255, 255, 255, .76);
    font-size: clamp(.95rem, 1.5vw, 1.12rem);
    line-height: 1.85;
}

.portal-tags,
.portal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 1.5rem;
}

.portal-tag,
.portal-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .42rem .72rem;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .055);
    color: rgba(255, 255, 255, .78);
    font-size: .72rem;
}

.portal-badge {
    color: var(--portal-accent);
    border-color: color-mix(in srgb, var(--portal-accent) 34%, transparent);
    background: color-mix(in srgb, var(--portal-accent) 8%, transparent);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.portal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 44px;
    padding: .72rem 1.05rem;
    border: 1px solid color-mix(in srgb, var(--portal-accent) 58%, transparent);
    border-radius: 10px;
    color: #061018;
    background: var(--portal-accent);
    text-decoration: none;
    font-size: .78rem;
    font-weight: 800;
    transition: transform .2s ease, box-shadow .2s ease;
}

.portal-button.secondary {
    color: #fff;
    background: rgba(255, 255, 255, .045);
}

.portal-button:hover { transform: translateY(-2px); box-shadow: 0 10px 26px color-mix(in srgb, var(--portal-accent) 24%, transparent); }

.portal-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: .8rem;
    margin: 1rem 0 0;
}

.portal-metric {
    padding: 1.15rem;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 14px;
    background: rgba(10, 1, 24, .72);
}

.portal-metric strong {
    display: block;
    color: var(--portal-accent);
    font: 800 clamp(1.05rem, 2vw, 1.45rem)/1.2 'Orbitron', sans-serif;
}

.portal-metric span { display: block; margin-top: .4rem; color: rgba(255, 255, 255, .58); font-size: .7rem; }

.portal-featured-models {
    margin-top: clamp(2.2rem, 5vw, 4.5rem);
}

.portal-featured-models .portal-section-head {
    margin-bottom: 1.35rem;
}

.portal-featured-models .portal-section-head h2 {
    margin: .55rem 0 .75rem;
    color: #fff;
    font: 800 clamp(1.35rem, 3vw, 2.35rem)/1.2 'Orbitron', sans-serif;
}

.portal-featured-models .portal-section-head p {
    color: rgba(255, 255, 255, .68);
    font-size: .9rem;
    line-height: 1.78;
}

.portal-model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
    gap: 1rem;
}

.portal-model-link {
    min-width: 0;
    color: inherit;
    text-decoration: none;
    border-radius: 18px;
    outline: none;
}

.portal-model-link:focus-visible {
    outline: 2px solid var(--portal-accent-2);
    outline-offset: 4px;
}

.portal-model-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 1.35rem 1.1rem 1.15rem;
    border: 1px solid rgba(183, 148, 244, .27);
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 0, rgba(183, 148, 244, .12), transparent 42%),
        linear-gradient(155deg, rgba(20, 7, 47, .94), rgba(5, 0, 15, .86));
    box-shadow: inset 0 1px rgba(255, 255, 255, .035);
    text-align: center;
    transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}

.portal-model-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(0, 240, 255, .08), rgba(255, 46, 151, .08));
    opacity: 0;
    transition: opacity .28s ease;
}

.portal-model-link:hover .portal-model-card,
.portal-model-link:focus-visible .portal-model-card {
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--portal-accent-2) 62%, transparent);
    box-shadow: 0 18px 46px rgba(0, 0, 0, .3), 0 0 26px color-mix(in srgb, var(--portal-accent-2) 12%, transparent);
}

.portal-model-link:hover .portal-model-card::before,
.portal-model-link:focus-visible .portal-model-card::before {
    opacity: 1;
}

.portal-model-card.is-highlighted {
    border-color: rgba(255, 215, 0, .43);
    background:
        radial-gradient(circle at 50% 0, rgba(255, 215, 0, .12), transparent 42%),
        linear-gradient(155deg, rgba(26, 11, 45, .96), rgba(5, 0, 15, .86));
}

.portal-model-card.is-highlighted::before {
    background: linear-gradient(135deg, rgba(255, 215, 0, .1), rgba(255, 46, 151, .08));
}

.portal-model-link:hover .portal-model-card.is-highlighted,
.portal-model-link:focus-visible .portal-model-card.is-highlighted {
    border-color: var(--golden-yellow);
    box-shadow: 0 18px 46px rgba(0, 0, 0, .3), 0 0 28px rgba(255, 215, 0, .16);
}

.portal-model-image {
    position: relative;
    display: grid;
    place-items: center;
    width: 104px;
    height: 104px;
    margin-bottom: 1rem;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
    background: linear-gradient(160deg, #fff, #e9edf3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .34);
}

.portal-model-placeholder {
    color: #4a3b68;
    font: 800 2rem/1 'Orbitron', sans-serif;
}

.portal-model-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .32s ease;
}


.portal-model-reason {
    position: absolute;
    z-index: 5;
    inset: .85rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 1rem;
    border: 1px solid color-mix(in srgb, var(--portal-accent-2) 46%, transparent);
    border-radius: 14px;
    background: linear-gradient(155deg, rgba(7, 1, 20, .97), rgba(28, 9, 55, .96));
    box-shadow: 0 16px 38px rgba(0, 0, 0, .42);
    color: rgba(255, 255, 255, .84);
    font-size: .68rem;
    line-height: 1.58;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(.98);
    transition: opacity .22s ease, transform .22s ease;
}

.portal-model-reason strong {
    display: block;
    margin-bottom: .45rem;
    color: var(--portal-accent-2);
    font-size: .58rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}


.portal-model-image:hover + .portal-model-reason,
.portal-model-link:focus-visible .portal-model-reason {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.portal-model-link:hover .portal-model-image img,
.portal-model-link:focus-visible .portal-model-image img {
    transform: scale(1.08);
}

.portal-model-group {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    margin: 0 0 .55rem;
    padding: .25rem .52rem;
    border: 1px solid color-mix(in srgb, var(--portal-accent-2) 28%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--portal-accent-2) 7%, transparent);
    color: var(--portal-accent-2);
    font-size: .56rem;
    font-weight: 800;
    letter-spacing: .07em;
    line-height: 1.2;
    text-transform: uppercase;
}

.portal-model-card.is-highlighted .portal-model-group {
    border-color: rgba(255, 215, 0, .34);
    background: rgba(255, 215, 0, .07);
    color: var(--golden-yellow);
}

.portal-model-card h3 {
    position: relative;
    margin: 0;
    min-height: 2.7em;
    color: #fff;
    font: 800 clamp(.9rem, 1.35vw, 1.08rem)/1.35 'Orbitron', sans-serif;
}

.portal-model-card.is-highlighted h3 {
    color: var(--golden-yellow);
}

.portal-model-latin {
    position: relative;
    min-height: 2.6em;
    margin: .35rem 0 .8rem;
    color: var(--bright-cyan);
    font: 600 .76rem/1.3 'Crimson Pro', serif;
}

.portal-model-meta {
    position: relative;
    width: 100%;
    margin: 0 0 .9rem;
    padding: .68rem 0;
    border-top: 1px solid rgba(255, 255, 255, .09);
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.portal-model-meta > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
}

.portal-model-meta > div + div {
    margin-top: .45rem;
}

.portal-model-meta dt {
    color: rgba(255, 255, 255, .54);
    font-size: .61rem;
    letter-spacing: .06em;
    text-align: left;
    text-transform: uppercase;
}

.portal-model-meta dt::before {
    content: "▸";
    margin-right: .35rem;
    color: var(--bright-cyan);
}

.portal-model-meta dd {
    margin: 0;
    color: var(--bio-green);
    font: 700 .68rem/1.2 'JetBrains Mono', monospace;
    white-space: nowrap;
}

.portal-model-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: auto;
    color: rgba(255, 255, 255, .48);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    transition: color .25s ease;
}

.portal-model-cta span {
    transition: transform .25s ease;
}

.portal-model-link:hover .portal-model-cta,
.portal-model-link:focus-visible .portal-model-cta {
    color: var(--portal-accent-2);
}

.portal-model-link:hover .portal-model-cta span,
.portal-model-link:focus-visible .portal-model-cta span {
    transform: translateX(4px);
}

.portal-section { margin-top: clamp(2.2rem, 5vw, 4.5rem); }

.portal-section-head {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-bottom: 1.25rem;
}

.portal-kicker {
    color: var(--portal-accent);
    font: 700 .7rem/1.2 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: .14em;
}

.portal-section h2 {
    margin: .55rem 0 .75rem;
    color: #fff;
    font: 800 clamp(1.35rem, 3vw, 2.35rem)/1.2 'Orbitron', sans-serif;
}

.laca-portal .portal-section-head h2 {
    max-width: 100%;
    font-size: clamp(1.3rem, 2.55vw, 2.25rem);
    overflow-wrap: anywhere;
}

.portal-section-head p,
.portal-copy {
    color: rgba(255, 255, 255, .68);
    font-size: .9rem;
    line-height: 1.78;
}

.portal-section-head > p { max-width: 960px; }

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1rem;
}

.portal-grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.portal-grid.four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); }

.portal-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 1.35rem;
    border: 1px solid rgba(255, 255, 255, .115);
    border-radius: 17px;
    background: linear-gradient(145deg, rgba(18, 6, 42, .88), rgba(5, 0, 15, .78));
    box-shadow: inset 0 1px rgba(255, 255, 255, .035);
    transition: transform .24s ease, border-color .24s ease, background .24s ease;
}

.portal-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--portal-accent) 42%, transparent);
    background: linear-gradient(145deg, color-mix(in srgb, var(--portal-accent) 8%, rgba(18, 6, 42, .9)), rgba(5, 0, 15, .88));
}

.portal-card-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: .95rem;
    border-radius: 11px;
    color: var(--portal-accent);
    background: color-mix(in srgb, var(--portal-accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--portal-accent) 24%, transparent);
    font-size: 1.25rem;
}

.portal-card h3 {
    margin: 0;
    color: #fff;
    font: 800 1rem/1.35 'Orbitron', sans-serif;
}

.portal-card p {
    margin-top: .7rem;
    color: rgba(255, 255, 255, .65);
    font-size: .78rem;
    line-height: 1.72;
}

.portal-card-meta {
    margin-top: .8rem;
    padding-top: .8rem;
    border-top: 1px solid rgba(255, 255, 255, .075);
    color: rgba(255, 255, 255, .56);
    font-size: .7rem;
    line-height: 1.65;
}

.portal-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: auto;
    padding-top: 1rem;
}

.portal-link {
    color: var(--portal-accent);
    font-size: .72rem;
    font-weight: 700;
    text-decoration: none;
}

.portal-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.portal-notice {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid color-mix(in srgb, var(--portal-accent) 30%, transparent);
    border-left: 4px solid var(--portal-accent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--portal-accent) 6%, rgba(8, 2, 24, .86));
    color: rgba(255, 255, 255, .72);
    font-size: .76rem;
    line-height: 1.65;
}

.portal-list { margin: .7rem 0 0 1.2rem; color: rgba(255, 255, 255, .68); font-size: .76rem; line-height: 1.75; }
.portal-list li + li { margin-top: .35rem; }

.portal-table-wrap {
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    background: rgba(5, 0, 15, .82);
}

.portal-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
    font-size: .72rem;
}

.portal-table th,
.portal-table td {
    padding: .78rem .85rem;
    border-bottom: 1px solid rgba(255, 255, 255, .075);
    text-align: left;
    vertical-align: top;
}

.portal-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #12062a;
    color: var(--portal-accent);
    font-weight: 800;
    letter-spacing: .04em;
}

.portal-table td { color: rgba(255, 255, 255, .7); }
.portal-table tbody tr:hover { background: color-mix(in srgb, var(--portal-accent) 5%, transparent); }

.portal-filterbar {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    align-items: end;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px;
    background: rgba(10, 1, 24, .72);
}

.portal-field { display: grid; gap: .35rem; min-width: 150px; flex: 1 1 170px; }
.portal-field.compact { flex: 0 1 130px; min-width: 110px; }
.portal-field label { color: rgba(255, 255, 255, .58); font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; }

.portal-input,
.portal-select {
    width: 100%;
    min-height: 42px;
    padding: .62rem .72rem;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 9px;
    outline: none;
    color: #fff;
    background: rgba(5, 0, 15, .86);
    font: 400 .75rem/1.2 'Azeret Mono', monospace;
}

.portal-input:focus,
.portal-select:focus { border-color: var(--portal-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--portal-accent) 12%, transparent); }
.portal-select option { color: #fff; background: #12062a; }

.portal-status { color: rgba(255, 255, 255, .58); font-size: .72rem; }
.portal-status.error { color: #ff7eaa; }

.portal-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: .9rem;
}

.portal-pagination .portal-button { min-height: 38px; padding: .52rem .8rem; cursor: pointer; }
.portal-pagination .portal-button:disabled { opacity: .38; cursor: not-allowed; transform: none; box-shadow: none; }

.portal-references {
    display: grid;
    gap: .65rem;
    counter-reset: refs;
}

.portal-reference {
    position: relative;
    padding: .85rem 1rem .85rem 3.2rem;
    border: 1px solid rgba(255, 255, 255, .085);
    border-radius: 12px;
    background: rgba(5, 0, 15, .6);
    color: rgba(255, 255, 255, .68);
    font-size: .72rem;
    line-height: 1.6;
}

.portal-reference::before {
    counter-increment: refs;
    content: counter(refs);
    position: absolute;
    left: 1rem;
    top: .86rem;
    color: var(--portal-accent);
    font-weight: 800;
}

.portal-reference a { color: var(--portal-accent); overflow-wrap: anywhere; }

.portal-empty {
    padding: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, .55);
}

@media (min-width: 1360px) {
    .portal-model-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (min-width: 761px) and (max-width: 1359px) {
    .portal-model-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
    .portal-model-link { grid-column: span 2; }
    .portal-model-link:nth-child(9) { grid-column: 3 / span 2; }
    .portal-model-link:nth-child(10) { grid-column: 5 / span 2; }
}

@media (min-width: 840px) {
    .laca-portal .portal-section-head h2 {
        white-space: nowrap;
        overflow-wrap: normal;
        word-break: normal;
    }
}
@media (max-width: 760px) {
    .laca-portal { width: min(100% - 1rem, 1380px); }
    .portal-hero { padding: 2rem 1.15rem; border-radius: 18px; }
    .portal-grid,
    .portal-grid.two,
    .portal-grid.four { grid-template-columns: 1fr; }
    .portal-model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-model-link:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        width: calc((100% - 1rem) / 2);
        justify-self: center;
    }
    .portal-model-card { padding: 1.1rem .75rem 1rem; }
    .portal-model-image { width: 88px; height: 88px; }
    .portal-model-reason {
        position: relative;
        inset: auto;
        z-index: auto;
        width: 100%;
        margin: 0 0 .75rem;
        padding: .7rem;
        border-radius: 10px;
        font-size: .62rem;
        opacity: 1;
        transform: none;
    }
    .portal-model-reason strong { margin-bottom: .3rem; }
    .portal-model-card h3 { font-size: .8rem; }
    .portal-model-meta > div {
        align-items: flex-start;
        flex-direction: column;
        gap: .2rem;
    }
    .portal-filterbar { align-items: stretch; }
    .portal-field,
    .portal-field.compact { flex-basis: 100%; }
    .portal-pagination { align-items: stretch; flex-direction: column; }
}

@media (hover: none) {
    .portal-model-reason {
        position: relative;
        inset: auto;
        z-index: auto;
        display: block;
        width: 100%;
        margin: 0 0 .75rem;
        padding: .7rem;
        border-radius: 10px;
        font-size: .62rem;
        opacity: 1;
        transform: none;
    }
    .portal-model-reason strong { margin-bottom: .3rem; }
}
@media (prefers-reduced-motion: reduce) {
    .portal-card,
    .portal-button,
    .portal-model-card,
    .portal-model-card::before,
    .portal-model-image img,
    .portal-model-reason,
    .portal-model-cta,
    .portal-model-cta span { transition: none; }
    .portal-model-link:hover .portal-model-card,
    .portal-model-link:focus-visible .portal-model-card,
    .portal-model-link:hover .portal-model-image img,
    .portal-model-link:focus-visible .portal-model-image img { transform: none; }
}
