@font-face {
    font-family: "Portal Inter";
    src: url("../fonts/preview/inter-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
}

@font-face {
    font-family: "Portal DM Mono";
    src: url("../fonts/preview/dm-mono-regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

:root {
    --portal-ink: #0a0a0a;
    --portal-paper: #eeece3;
    --portal-white: #f8f8f4;
    --portal-red: #ef4338;
    --portal-amber: #f4aa18;
    --portal-line: rgba(10, 10, 10, 0.28);
    --portal-bg-image: none;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
    background: var(--portal-paper);
}

.portal-home {
    min-width: 320px;
    margin: 0;
    overflow-x: hidden;
    color: var(--portal-ink);
    background: var(--portal-paper);
    font-family: "Portal Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
    letter-spacing: 0;
}

.portal-home *,
.portal-home *::before,
.portal-home *::after {
    box-sizing: border-box;
    letter-spacing: 0;
}

.portal-home a {
    color: inherit;
    text-decoration: none;
}

.portal-home button,
.portal-home input,
.portal-home select {
    color: inherit;
    font: inherit;
    letter-spacing: 0;
}

.portal-home a:focus-visible,
.portal-home button:focus-visible,
.portal-home input:focus-visible,
.portal-home select:focus-visible {
    outline: 3px solid var(--portal-red);
    outline-offset: 3px;
}

.portal-sr-only,
.portal-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.portal-topbar {
    position: sticky;
    z-index: 100;
    top: 0;
    min-height: 64px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: stretch;
    color: var(--portal-white);
    background: var(--portal-ink);
    border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

.portal-brand {
    min-width: 164px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.22);
}

.portal-brand img {
    width: 42px;
    height: 42px;
    display: block;
}

.portal-brand strong {
    font-size: 18px;
    line-height: 1;
    font-weight: 900;
}

.portal-category-nav {
    min-width: 0;
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    scrollbar-width: none;
}

.portal-category-nav::-webkit-scrollbar {
    display: none;
}

.portal-category-nav a {
    min-width: max-content;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 13px;
    border-right: 1px solid rgba(255, 255, 255, 0.16);
    transition: color 160ms ease, background-color 160ms ease;
}

.portal-category-nav a:hover,
.portal-category-nav a:focus-visible {
    color: var(--portal-ink);
    background: var(--portal-white);
}

.portal-category-nav span {
    color: var(--portal-red);
    font-family: "Portal DM Mono", Consolas, monospace;
    font-size: 9px;
}

.portal-category-nav em {
    font-size: 11px;
    font-style: normal;
    font-weight: 750;
}

.portal-tools {
    display: flex;
    align-items: stretch;
    border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.portal-icon-button {
    width: 52px;
    min-height: 52px;
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--portal-white);
    background: transparent;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
    cursor: pointer;
    font-size: 17px;
    transition: color 160ms ease, background-color 160ms ease;
}

.portal-icon-button:hover {
    color: var(--portal-ink);
    background: var(--portal-amber);
}

.portal-icon-button[hidden] {
    display: none;
}

.portal-command {
    position: relative;
    min-height: 176px;
    display: grid;
    align-items: center;
    overflow: hidden;
    color: var(--portal-ink);
    background-color: var(--portal-paper);
    background-image: var(--portal-bg-image);
    background-position: center;
    background-size: cover;
    border-bottom: 1px solid var(--portal-ink);
}

.portal-command::before {
    content: "";
    position: absolute;
    inset: 0;
    background: transparent;
    pointer-events: none;
}

.portal-home.has-custom-background .portal-command {
    color: var(--portal-white);
}

.portal-home.has-custom-background .portal-command::before {
    background: rgba(5, 6, 8, 0.62);
}

.portal-command-inner {
    position: relative;
    z-index: 1;
    width: min(1040px, calc(100% - 64px));
    margin: 0 auto;
    padding: 46px 0;
}

.portal-search {
    height: 64px;
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr) 64px;
    color: var(--portal-ink);
    background: var(--portal-white);
    border: 2px solid currentColor;
}

.portal-search select,
.portal-search input,
.portal-search button {
    min-width: 0;
    height: 100%;
    border: 0;
    border-radius: 0;
}

.portal-search select {
    padding: 0 14px;
    background: var(--portal-white);
    border-right: 1px solid var(--portal-ink);
    cursor: pointer;
    font-family: "Portal DM Mono", Consolas, monospace;
    font-size: 10px;
}

.portal-search input {
    width: 100%;
    padding: 0 20px;
    color: var(--portal-ink);
    background: transparent;
    outline: 0;
    font-size: 16px;
}

.portal-search input::placeholder {
    color: rgba(10, 10, 10, 0.52);
}

.portal-search button {
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--portal-ink);
    background: var(--portal-amber);
    border-left: 1px solid var(--portal-ink);
    cursor: pointer;
    font-size: 17px;
}

.portal-search button:hover {
    color: var(--portal-white);
    background: var(--portal-red);
}

.portal-home.has-custom-background .portal-search {
    color: var(--portal-white);
    background: rgba(5, 6, 8, 0.74);
    border-color: var(--portal-white);
}

.portal-home.has-custom-background .portal-search select,
.portal-home.has-custom-background .portal-search input {
    color: var(--portal-white);
    background: transparent;
    border-color: var(--portal-white);
}

.portal-home.has-custom-background .portal-search select option {
    color: var(--portal-ink);
    background: var(--portal-white);
}

.portal-home.has-custom-background .portal-search input::placeholder {
    color: rgba(248, 248, 244, 0.72);
}

.portal-directory {
    width: min(1340px, calc(100% - 64px));
    margin: 0 auto;
    padding: 46px 0 76px;
}

.portal-section {
    scroll-margin-top: 78px;
}

.portal-section + .portal-section {
    margin-top: 62px;
}

.portal-section-heading {
    min-height: 54px;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: center;
    border-top: 1px solid var(--portal-ink);
    border-bottom: 1px solid var(--portal-ink);
}

.portal-section-heading span {
    align-self: stretch;
    display: grid;
    place-items: center;
    color: var(--portal-red);
    border-right: 1px solid var(--portal-ink);
    font-family: "Portal DM Mono", Consolas, monospace;
    font-size: 11px;
}

.portal-section-heading h2 {
    margin: 0;
    padding: 0 18px;
    overflow-wrap: anywhere;
    font-size: 24px;
    line-height: 1.08;
    font-weight: 850;
}

.portal-grid {
    margin-top: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.portal-home .site-poster {
    aspect-ratio: 1 / 1;
    border: 1px solid var(--portal-ink);
    border-radius: 0;
    box-shadow: none;
}

.portal-home .site-poster::before {
    display: none;
}

.portal-home .site-poster:hover,
.portal-home .site-poster:focus-visible,
.motion-ready .portal-home .site-poster.is-visible:hover,
.motion-ready .portal-home .site-poster.is-visible:focus-visible {
    transform: translateY(-4px);
    box-shadow: 6px 6px 0 var(--portal-red);
}

.portal-home .poster-topline {
    top: 12px;
    left: 12px;
    right: 12px;
}

.portal-home .poster-favicon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
}

.portal-home .poster-favicon img {
    width: 23px;
    height: 23px;
}

.portal-home .poster-arrow {
    width: 36px;
    height: 36px;
    font-size: 13px;
}

.portal-external-icon {
    transform: rotate(45deg);
}

.portal-home .site-poster:hover .portal-external-icon,
.portal-home .site-poster:focus-visible .portal-external-icon {
    transform: rotate(45deg);
}

.portal-home .poster-logo-stage {
    inset: 54px 14px 48px;
}

.portal-home .poster-copy {
    left: 14px;
    right: 14px;
    bottom: 13px;
}

.portal-home .poster-brand {
    font-size: 18px;
    line-height: 1.15;
}

.portal-footer {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px max(32px, calc((100% - 1340px) / 2));
    color: var(--portal-white);
    background: var(--portal-ink);
    font-family: "Portal DM Mono", Consolas, monospace;
    font-size: 10px;
}

.portal-footer nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.portal-footer a:hover {
    color: var(--portal-amber);
}

@media (max-width: 1180px) {
    .portal-category-nav em {
        display: none;
    }

    .portal-category-nav a {
        min-width: 42px;
        justify-content: center;
        padding: 0 10px;
    }

    .portal-home .poster-brand {
        font-size: 15px;
    }

}

@media (max-width: 767px) {
    .portal-topbar {
        min-height: 58px;
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .portal-brand {
        min-width: 0;
        gap: 7px;
        padding: 7px 10px;
    }

    .portal-brand img {
        width: 38px;
        height: 38px;
    }

    .portal-brand strong {
        font-size: 15px;
    }

    .portal-category-nav a {
        min-width: 34px;
        padding: 0 8px;
    }

    .portal-tools {
        border-left: 0;
    }

    .portal-icon-button {
        width: 42px;
        min-height: 42px;
        font-size: 15px;
    }

    .portal-command {
        min-height: 150px;
    }

    .portal-command-inner {
        width: calc(100% - 28px);
        padding: 32px 0;
    }

    .portal-search {
        height: 58px;
        grid-template-columns: 88px minmax(0, 1fr) 56px;
    }

    .portal-search select {
        padding: 0 8px;
        font-size: 9px;
    }

    .portal-search input {
        padding: 0 12px;
        font-size: 15px;
    }

    .portal-directory {
        width: calc(100% - 28px);
        padding: 34px 0 58px;
    }

    .portal-section + .portal-section {
        margin-top: 46px;
    }

    .portal-section-heading {
        min-height: 48px;
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .portal-section-heading h2 {
        padding: 0 12px;
        font-size: 20px;
    }

    .portal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 8px;
    }

    .portal-home .site-poster {
        aspect-ratio: 4 / 5;
    }

    .portal-home .poster-topline {
        top: 9px;
        left: 9px;
        right: 9px;
    }

    .portal-home .poster-favicon {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .portal-home .poster-favicon img {
        width: 19px;
        height: 19px;
    }

    .portal-home .poster-arrow {
        width: 31px;
        height: 31px;
        font-size: 11px;
    }

    .portal-home .poster-logo-stage {
        inset: 44px 10px 46px;
    }

    .portal-home .poster-copy {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .portal-home .poster-brand {
        font-size: 15px;
    }

    .portal-footer {
        min-height: 112px;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 22px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .portal-home *,
    .portal-home *::before,
    .portal-home *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }
}
