:root {
    --portal-blue: #2c5381;
    --portal-blue-dark: #234469;
    --portal-ink: #27323d;
    --portal-muted: #697887;
    --portal-line: #d7dde4;
    --portal-paper: #ffffff;
    --portal-soft: #f4f6f8;
    --portal-accent: #ffc832;
    --portal-code: #0d1927;
}

body {
    color: var(--portal-ink);
    background: var(--portal-paper);
    font-family: "Source Sans 3", "Segoe UI", "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

.portal-shell {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    height: auto;
    min-height: 56px;
    background: var(--portal-blue);
    border-bottom: 1px solid rgba(0, 0, 0, .18);
}

.site-header-inner {
    width: min(1120px, calc(100% - 40px));
    min-height: 56px;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
}

.site-brand,
.site-nav a {
    color: #fff;
    text-decoration: none;
}

.site-brand {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: .01em;
    gap: 8px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    min-height: 56px;
}

.site-nav {
    display: flex;
    align-items: stretch;
}

.site-nav a {
    display: flex;
    align-items: center;
    padding: 0 15px;
    min-height: 56px;
    font-size: .98rem;
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    background: var(--portal-blue-dark);
    border-color: rgba(255,255,255,.08);
}

.portal-hero {
    background: #eef1f4;
    border-bottom: 1px solid var(--portal-line);
}

.portal-hero-grid {
    min-height: 300px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 54px;
    align-items: center;
    padding: 56px 0;
}

.portal-kicker {
    margin: 0 0 5px;
    color: var(--portal-blue);
    font-weight: 700;
    letter-spacing: .12em;
    font-size: .82rem;
}

.portal-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(2.8rem, 7vw, 4.6rem);
    line-height: 1;
    color: #1f2a35;
    font-weight: 700;
}

.portal-lead {
    max-width: 720px;
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.75;
    color: #475563;
}

.portal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.portal-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 17px;
    border: 1px solid var(--portal-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    border-radius: 2px;
}

.portal-button-primary {
    background: var(--portal-blue);
    color: #fff;
}

.portal-button-primary:hover { background: var(--portal-blue-dark); }

.portal-button-quiet {
    color: var(--portal-blue);
    background: #fff;
}

.portal-mark {
    width: 260px;
    height: 260px;
    justify-self: center;
    align-self: center;
    display: grid;
    place-items: center;
    transform: rotate(0deg) !important;
}

.portal-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    transform: rotate(0deg) !important;
}

.portal-section {
    padding: 52px 0;
}

.portal-intro {
    padding-top: 46px;
    padding-bottom: 46px;
}

.portal-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 70px;
}

.portal-intro-block {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.portal-intro-symbol {
    width: 50px;
    height: 50px;
    border: 2px solid var(--portal-blue);
    color: var(--portal-blue);
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    font-weight: 700;
    border-radius: 50%;
}

.portal-intro h2,
.portal-section-heading h2 {
    margin: 0;
    color: #25303b;
}

.portal-intro h2 { font-size: 1.65rem; }
.portal-intro p { margin: 8px 0 0; line-height: 1.8; color: #566574; }

.portal-demo,
.portal-news,
.portal-supporters {
    border-top: 1px solid var(--portal-line);
}

.portal-demo { background: var(--portal-soft); }

.portal-section-heading {
    margin-bottom: 26px;
}

.portal-section-heading h2 {
    font-size: 2rem;
    font-weight: 650;
}

.portal-section-heading p {
    margin: 7px 0 0;
    color: var(--portal-muted);
    line-height: 1.6;
}

.portal-code-window {
    border: 1px solid #293744;
    background: var(--portal-code);
    color: #e7eef5;
}

.portal-code-title {
    padding: 8px 12px;
    background: #08111b;
    border-bottom: 1px solid #283746;
    color: #aebac5;
    font: 600 .86rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.portal-code-window pre {
    margin: 0;
    padding: 20px 22px;
    overflow-x: auto;
    line-height: 1.65;
    font-size: .94rem;
}

.portal-code-window code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.portal-three-col {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
}

.portal-project-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    padding: 1px;
    background: var(--portal-line);
}

.portal-project-card {
    padding: 26px 22px 24px;
    background: #fff;
}

.portal-project-card:first-child { padding-left: 22px; }
.portal-project-card:last-child { padding-right: 22px; }

.portal-project-icon {
    width: 46px;
    height: 46px;
    margin-bottom: 16px;
    display: grid;
    place-items: center;
    border: 1px solid var(--portal-blue);
    color: var(--portal-blue);
    font-size: 1.25rem;
}

.portal-project-card a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
}

.portal-section-heading h2 i {
    width: 1.25em;
    color: var(--portal-blue);
    font-size: .8em;
    text-align: center;
}

.site-footer-column a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.site-footer-column a i {
    width: 1.15em;
    text-align: center;
}

.portal-project-card h3 {
    margin: 0 0 9px;
    font-size: 1.35rem;
}

.portal-project-card p,
.portal-news-item p {
    color: #5d6a78;
    line-height: 1.7;
}

.portal-project-card a,
.portal-news-item a,
.portal-text-link {
    color: var(--portal-blue);
    text-decoration: none;
}

.portal-project-card a:hover,
.portal-news-item a:hover,
.portal-text-link:hover { text-decoration: underline; }

.portal-news { background: #fff; }

.portal-heading-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
}

.portal-text-link { white-space: nowrap; font-weight: 600; }

.portal-news-item {
    padding: 0 28px;
    border-right: 1px solid var(--portal-line);
}

.portal-news-item:first-child { padding-left: 0; }
.portal-news-item:last-child { padding-right: 0; border-right: 0; }

.portal-news-item time {
    color: #88939d;
    font-size: .86rem;
}

.portal-news-item h3 {
    margin: 8px 0 0;
    font-size: 1.2rem;
    line-height: 1.35;
}

.portal-news-item p { margin-bottom: 0; }
.portal-empty { color: var(--portal-muted); }

.portal-supporters {
    padding-top: 36px;
    padding-bottom: 36px;
    background: var(--portal-soft);
}

.portal-sponsor-table-wrap {
    overflow-x: auto;
    border-top: 1px solid var(--portal-line);
    border-bottom: 1px solid var(--portal-line);
}

.portal-sponsor-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.portal-sponsor-table tr + tr {
    border-top: 1px solid var(--portal-line);
}

.portal-sponsor-table td {
    padding: 18px 22px;
    vertical-align: middle;
    color: #566574;
    line-height: 1.7;
}

.portal-sponsor-table td:first-child {
    width: 230px;
    text-align: center;
}

.portal-sponsor-table img {
    height: auto;
    vertical-align: middle;
}

.portal-sponsor-table a {
    color: var(--portal-blue);
    font-weight: 600;
    text-decoration: none;
}

.portal-sponsor-table a:hover {
    text-decoration: underline;
}

.site-footer {
    background: var(--portal-blue);
    color: #fff;
    padding: 36px 0 20px;
}

.site-footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(220px, 1.2fr);
    gap: 38px;
}

.site-footer-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.site-footer-column h4 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 1rem;
}

.site-footer a {
    color: #dbe6f0;
    text-decoration: none;
    font-size: .93rem;
}

.site-footer a:hover { color: #fff; text-decoration: underline; }

.site-footer-about {
    border-left: 1px solid rgba(255,255,255,.2);
    padding-left: 30px;
}

.site-footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.site-footer-brand img { width: 54px; height: 54px; flex: 0 0 54px; }
.site-footer-about strong { font-size: 1.55rem; }
.site-footer-about p { margin: 4px 0 0; color: #dbe6f0; }

.site-footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.18);
    color: #bfd0df;
    font-size: .82rem;
}


@media (max-width: 1000px) {
    .portal-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .site-header-inner { display: block; }
    .site-brand { min-height: 54px; padding-right: 0; }
    .site-nav { overflow-x: auto; border-top: 1px solid rgba(255,255,255,.15); }
    .site-nav a { min-height: 44px; padding: 0 12px; white-space: nowrap; }
    .portal-hero-grid { grid-template-columns: 1fr; min-height: 0; gap: 30px; }
    .portal-mark { justify-self: start; width: 180px; height: 180px; }
    .portal-two-col,
    .portal-three-col,
    .portal-project-grid,
    .site-footer-grid { grid-template-columns: 1fr; }
    .portal-two-col { gap: 36px; }
    .portal-project-card {
        padding: 22px;
        border: 0;
    }
    .portal-project-card:first-child { padding-left: 22px; }
    .portal-project-card:last-child { padding-right: 22px; }
    .portal-news-item {
        padding: 22px 0;
        border-right: 0;
        border-bottom: 1px solid var(--portal-line);
    }
    .portal-news-item:first-child { padding-top: 0; }
    .portal-news-item:last-child { padding-bottom: 0; border-bottom: 0; }
    .site-footer-about { border-left: 0; border-top: 1px solid rgba(255,255,255,.2); padding: 22px 0 0; }
    .site-footer-bottom { flex-direction: column; gap: 5px; }
    .portal-supporter-list { grid-template-columns: 1fr; }
    .portal-supporter-card:first-child { border-right: 0; border-bottom: 1px solid var(--portal-line); }
}

@media (max-width: 520px) {
    .portal-shell,
    .site-header-inner { width: min(100% - 28px, 1120px); }
    .portal-hero-grid { padding: 42px 0; }
    .portal-lead { font-size: 1.08rem; }
    .portal-section { padding: 42px 0; }
    .portal-intro-block { grid-template-columns: 40px minmax(0, 1fr); gap: 14px; }
    .portal-intro-symbol { width: 40px; height: 40px; font-size: 1.25rem; }
    .portal-heading-row { display: block; }
    .portal-heading-row .portal-text-link { display: inline-block; margin-top: 12px; }
}

@media (max-width: 640px) {
    .portal-sponsor-table td {
        padding: 14px 12px;
    }

    .portal-sponsor-table td:first-child {
        width: 150px;
    }
}
