/* EasyPLC modern technology theme — spacious, minimal and product focused. */

:root {
    --portal-ink: #1d1d1f;
    --portal-primary: #0071e3;
    --portal-primary-deep: #0058b0;
    --portal-accent: #2997ff;
    --portal-accent-soft: #e9f3ff;
    --portal-canvas: #f5f5f7;
    --portal-card: #ffffff;
    --portal-card-strong: #ffffff;
    --portal-border: rgba(0, 0, 0, 0.08);
    --portal-muted: #6e6e73;
    --portal-subtle: #86868b;
    --portal-shadow: 0 14px 38px rgba(0, 0, 0, 0.055);
    --portal-shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.045);
    --portal-radius: 28px;
    --portal-font-body: "Segoe UI Variable Text", "HarmonyOS Sans SC", "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
    --portal-font-display: "Segoe UI Variable Display", "HarmonyOS Sans SC", "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

html,
body {
    background: var(--portal-canvas);
}

body {
    color: var(--portal-ink);
    background-image: none;
    font-family: var(--portal-font-body);
    font-optical-sizing: auto;
    line-height: 1.72;
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

p,
li,
td,
th,
label,
input,
select,
textarea,
button {
    font-family: var(--portal-font-body);
}

p {
    line-height: 1.78;
    text-wrap: pretty;
}

::selection {
    color: #fff;
    background: var(--portal-primary);
}

.portal-header {
    background: rgba(250, 250, 252, 0.82);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: none;
    backdrop-filter: saturate(180%) blur(20px);
}

.portal-header-inner {
    max-width: 1200px;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.portal-brand {
    gap: 0.72rem;
}

.portal-brand:hover {
    transform: none;
}

.portal-brand-logo-shell {
    width: 42px;
    height: 42px;
    padding: 0.18rem;
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 67, 160, 0.11);
}

.portal-brand:hover .portal-brand-logo-shell {
    transform: scale(1.035);
    box-shadow: 0 6px 18px rgba(0, 67, 160, 0.15);
}

.portal-brand-copy strong {
    color: var(--portal-ink);
    font-size: 0.98rem;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.portal-brand-copy span {
    color: var(--portal-subtle);
    font-size: 0.75rem;
}

.portal-header-actions {
    gap: 1rem;
}

.portal-header-badge {
    padding: 0.38rem 0.66rem;
    color: var(--portal-muted);
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.045);
    box-shadow: none;
    font-size: 0.76rem;
    font-weight: 500;
}

.portal-header-badge-dot {
    width: 0.42rem;
    height: 0.42rem;
    background: #30d158;
    box-shadow: none;
}

.portal-nav-surface {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.portal-nav {
    gap: 0.15rem;
}

.portal-nav a,
.portal-nav button {
    padding: 0.5rem 0.7rem;
    color: #424245;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-size: 0.82rem;
    font-weight: 500;
}

.portal-nav a::after {
    left: 50%;
    right: auto;
    bottom: 0.15rem;
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 50%;
    background: var(--portal-primary);
    transform: translateX(-50%) scale(0);
}

.portal-nav a:hover,
.portal-nav a:focus-visible,
.portal-nav button:hover,
.portal-nav button:focus-visible {
    color: #000;
    background: rgba(0, 0, 0, 0.035);
    box-shadow: none;
    transform: none;
}

.portal-nav a:hover::after,
.portal-nav a:focus-visible::after,
.portal-nav a.active::after {
    transform: translateX(-50%) scale(1);
}

.portal-nav a.active {
    color: #000;
    background: transparent;
    box-shadow: none;
}

.portal-main {
    max-width: 1200px;
    padding-top: 1.6rem;
    padding-bottom: 4.5rem;
}

.portal-hero {
    min-height: 540px;
    padding: clamp(2.5rem, 6vw, 5.25rem);
    display: flex;
    align-items: center;
    color: var(--portal-ink);
    border: 0;
    border-radius: 34px;
    background:
        radial-gradient(circle at 86% 18%, rgba(41, 151, 255, 0.18), transparent 27%),
        radial-gradient(circle at 72% 80%, rgba(111, 188, 255, 0.13), transparent 30%),
        linear-gradient(145deg, #ffffff 0%, #fbfbfd 56%, #eef6ff 100%);
    box-shadow: none;
}

.portal-hero::before {
    width: 470px;
    height: 470px;
    right: -190px;
    top: -210px;
    border-radius: 50%;
    opacity: 1;
    background: radial-gradient(circle, rgba(0, 113, 227, 0.1), rgba(0, 113, 227, 0) 70%);
    animation: none;
}

.portal-hero::after {
    width: 320px;
    height: 320px;
    left: auto;
    right: 19%;
    bottom: -230px;
    border-radius: 50%;
    opacity: 1;
    background: radial-gradient(circle, rgba(41, 151, 255, 0.11), rgba(41, 151, 255, 0) 72%);
    animation: none;
}

.portal-hero > * {
    width: 100%;
}

.portal-hero-eyebrow {
    margin-bottom: 1rem;
    color: var(--portal-primary);
    font-size: 0.9rem;
    font-weight: 650;
    letter-spacing: 0.01em;
}

.portal-hero h1,
.portal-hero .display-5 {
    max-width: 720px;
    color: var(--portal-ink);
    font-size: clamp(3rem, 6.2vw, 5rem);
    font-weight: 700 !important;
    line-height: 1.1;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.portal-hero h1 > span {
    color: transparent;
    background: linear-gradient(90deg, #0066cc 0%, #4c9eff 75%);
    -webkit-background-clip: text;
    background-clip: text;
}

.portal-hero .fs-5 {
    max-width: 650px !important;
    color: var(--portal-muted);
    font-size: clamp(1.06rem, 2vw, 1.3rem) !important;
    line-height: 1.72;
    letter-spacing: -0.008em;
}

.hero-chip {
    padding: 0;
    color: var(--portal-subtle);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    font-size: 0.8rem;
}

.hero-chip + .hero-chip::before {
    content: "·";
    margin-right: 0.5rem;
    color: #b6b6ba;
}

.hero-actions {
    margin-top: 1.6rem;
}

.portal-btn-primary,
.portal-btn-light,
.portal-btn-outline,
.portal-launch-btn,
.portal-skill-quick-install,
.portal-launch-modal-actions a,
.portal-launch-modal-actions button {
    min-height: 42px;
    padding: 0.72rem 1.22rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 550;
    letter-spacing: -0.005em;
    box-shadow: none;
}

.portal-btn-primary,
.portal-btn-light,
.portal-hero .portal-btn-light,
.portal-launch-btn,
.portal-launch-modal-actions .primary {
    color: #fff;
    background: var(--portal-primary);
    box-shadow: none;
}

.portal-btn-primary:hover,
.portal-btn-primary:focus-visible,
.portal-btn-light:hover,
.portal-btn-light:focus-visible,
.portal-hero .portal-btn-light:hover,
.portal-hero .portal-btn-light:focus-visible,
.portal-launch-btn:hover,
.portal-launch-btn:focus-visible {
    color: #fff;
    background: var(--portal-primary-deep);
    box-shadow: none;
    transform: translateY(-1px);
}

.portal-btn-outline,
.portal-skill-quick-install {
    color: var(--portal-primary);
    border: 1px solid rgba(0, 113, 227, 0.24);
    background: transparent;
    box-shadow: none;
}

.portal-btn-outline:hover,
.portal-btn-outline:focus-visible,
.portal-skill-quick-install:hover,
.portal-skill-quick-install:focus-visible {
    color: var(--portal-primary-deep);
    border-color: rgba(0, 88, 176, 0.34);
    background: rgba(0, 113, 227, 0.055);
    box-shadow: none;
}

.portal-hero-brand-panel {
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    color: var(--portal-ink);
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.portal-hero-logo-shell {
    width: 142px;
    height: 142px;
    padding: 0.55rem;
    border: 0;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 24px 60px rgba(0, 73, 164, 0.13);
}

.portal-hero-brand-panel span:not(.portal-hero-logo-shell) {
    color: var(--portal-subtle);
    font-size: 0.78rem;
    font-weight: 550;
    letter-spacing: 0;
    text-transform: none;
}

.portal-hero-brand-panel strong {
    max-width: 250px;
    color: var(--portal-ink);
    font-size: 1.12rem;
    line-height: 1.55;
    letter-spacing: -0.01em;
}

.portal-hero .portal-kv-grid {
    margin-top: 1.8rem;
    gap: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.portal-hero .portal-kv-item {
    min-height: 86px;
    padding: 1rem;
    border: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.36);
    box-shadow: none;
    backdrop-filter: blur(10px);
}

.portal-hero .portal-kv-item span {
    color: var(--portal-subtle);
    font-size: 0.78rem;
}

.portal-hero .portal-kv-item strong {
    color: var(--portal-ink);
    font-size: 1.1rem;
}

.portal-hero .portal-soft {
    color: var(--portal-ink) !important;
    border: 1px solid rgba(0, 0, 0, 0.07) !important;
    background: rgba(255, 255, 255, 0.62) !important;
    box-shadow: none;
    backdrop-filter: saturate(150%) blur(18px);
}

.portal-hero .text-white-50 {
    color: var(--portal-muted) !important;
}

.portal-info-grid {
    gap: 1rem;
}

.portal-info-card {
    min-height: 112px;
    padding: 1.35rem 1.4rem;
    border: 0;
    border-radius: 22px;
    background: #fff;
    box-shadow: none;
}

.portal-info-card::before {
    display: none;
}

.portal-info-card strong {
    font-size: 1.08rem;
    letter-spacing: -0.018em;
}

.portal-info-card span {
    margin-top: 0.45rem;
    font-size: 0.86rem;
    line-height: 1.66;
}

.portal-card,
.portal-soft,
.portal-list-item,
.portal-stat-card,
.portal-announcement-card,
.portal-feature-card,
.portal-step-card,
.portal-focus-card,
.portal-chart-shell,
.portal-callout,
.portal-empty-state,
.portal-download-meta-item,
.portal-skill-card,
.portal-md-preview,
.portal-launch-modal,
.portal-table-wrap,
.portal-skills-toolbar {
    border-radius: 24px;
}

.portal-card {
    border: 0;
    background: #fff;
    box-shadow: none;
    backdrop-filter: none;
}

.portal-card-accent::before,
.portal-card-accent::after,
.portal-feature-card::before,
.portal-step-card::before {
    display: none;
}

.portal-list-item,
.portal-stat-card,
.portal-announcement-card,
.portal-feature-card,
.portal-step-card,
.portal-focus-card,
.portal-chart-shell,
.portal-callout {
    border: 0;
    background: #f7f7f9;
    box-shadow: none;
}

.portal-list-item:hover,
.portal-skill-card:hover {
    border-color: transparent;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.075);
    transform: translateY(-3px);
}

.portal-section-title h2,
.portal-section-title h3,
.display-5,
.h1,
.h2,
.h3,
.h4 {
    line-height: 1.24;
    letter-spacing: -0.018em;
    text-wrap: balance;
}

.portal-subtitle,
.portal-note,
.portal-mini-note,
.portal-density-copy,
.portal-download-note,
.portal-table-note,
.portal-skill-desc,
.portal-comment-body,
.portal-announcement-content,
.portal-announcement-foot {
    line-height: 1.76;
}

.portal-card p,
.portal-list-item p,
.portal-feature-card p,
.portal-step-card p,
.portal-focus-card p,
.portal-callout p,
.portal-empty-state p {
    line-height: 1.78;
}

.portal-table-wrap .table th,
.portal-table-wrap .table td {
    line-height: 1.62;
}

.portal-input,
.portal-skills-toolbar input,
.portal-comment-form textarea {
    line-height: 1.55;
}

.portal-btn-primary,
.portal-btn-light,
.portal-btn-outline,
.portal-launch-btn,
.portal-skill-quick-install {
    line-height: 1.35;
}

.portal-md-preview {
    line-height: 1.8;
}

.portal-section-badge {
    padding: 0;
    color: var(--portal-primary);
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.015em;
}

.portal-pill,
.portal-tag-soft,
.portal-glance-chip,
.portal-inline-meta > span,
.portal-skill-tag,
.portal-comment-tag {
    color: #515154;
    border: 0;
    border-radius: 999px;
    background: #f0f0f2;
}

.portal-pill-accent {
    color: #087c2d;
    background: #e7f8ec;
}

.portal-mark,
.portal-mark-sm,
.portal-step-index {
    color: var(--portal-primary);
    border: 0;
    border-radius: 16px;
    background: var(--portal-accent-soft);
    box-shadow: none;
}

.portal-app-logo-shell {
    border: 0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 73, 164, 0.1);
}

.portal-progress {
    height: 8px;
    border-radius: 999px;
    background: #e7e7e9;
}

.portal-progress > span {
    border-radius: inherit;
    background: linear-gradient(90deg, #0071e3, #58a9ff);
}

.portal-tab {
    border: 0;
    border-radius: 999px;
    color: var(--portal-muted);
    background: #f0f0f2;
    box-shadow: none;
}

.portal-tab:hover {
    color: var(--portal-ink);
    background: #e5e5e7;
    box-shadow: none;
}

.portal-tab.active,
.portal-tab[aria-selected="true"] {
    color: #fff;
    background: var(--portal-ink);
    box-shadow: none;
}

.portal-input,
.portal-skills-toolbar input,
.portal-comment-form textarea {
    border: 1px solid rgba(0, 0, 0, 0.13);
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
}

.portal-input:focus,
.portal-skills-toolbar input:focus,
.portal-comment-form textarea:focus {
    border-color: rgba(0, 113, 227, 0.55);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.portal-table-wrap {
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.07);
    background: #fff;
}

.portal-table-wrap .table thead th {
    color: var(--portal-muted);
    border-color: rgba(0, 0, 0, 0.07);
    background: #f5f5f7;
}

.portal-table-wrap .table tbody tr:hover {
    background: #f7fbff;
}

.portal-announcement-card.is-pinned {
    border: 1px solid rgba(0, 113, 227, 0.18);
    box-shadow: none;
}

.portal-announcement-card.is-pinned::after {
    width: 54px;
    height: 3px;
    border-radius: 999px;
    background: var(--portal-primary);
}

.portal-skills-toolbar {
    border: 0;
    background: #fff;
    box-shadow: none;
}

.portal-sort-tabs {
    border-radius: 999px;
    background: #e9e9eb;
}

.portal-sort-tabs a {
    border-radius: 999px;
}

.portal-sort-tabs a.active,
.portal-pagination .is-active {
    color: #fff;
    background: var(--portal-ink);
    box-shadow: none;
}

.portal-skill-card {
    border: 0;
    background: #fff;
    box-shadow: none;
}

.portal-skill-card::before {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #0071e3, #69b1ff);
}

.portal-launch-modal-backdrop {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
}

.portal-launch-modal {
    border: 0;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.2);
}

.portal-footer {
    padding: 0;
    color: var(--portal-subtle);
    text-align: left;
    background: #f5f5f7;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.portal-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.4rem 1.35rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.portal-footer strong {
    color: #515154;
}

.portal-footer-code {
    color: #86868b;
    font-size: 0.75rem;
}

@media (max-width: 992px) {
    .portal-header-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-header-actions,
    .portal-nav-surface {
        width: 100%;
    }

    .portal-hero {
        min-height: auto;
        padding: 3rem 2.4rem;
    }
}

@media (max-width: 768px) {
    .portal-header-inner {
        padding: 0.72rem 1rem;
    }

    .portal-brand-logo-shell {
        width: 40px;
        height: 40px;
        border-radius: 11px;
    }

    .portal-header-actions {
        gap: 0.55rem;
    }

    .portal-nav-surface {
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.72);
        box-shadow: none;
    }

    .portal-nav a,
    .portal-nav button {
        padding: 0.5rem 0.68rem;
    }

    .portal-main {
        padding-top: 1rem;
    }

    .portal-hero {
        padding: 2.4rem 1.35rem;
        border-radius: 26px;
    }

    .portal-hero h1,
    .portal-hero .display-5 {
        font-size: clamp(2.55rem, 12vw, 3.45rem);
        line-height: 1.11;
        letter-spacing: -0.025em;
    }

    .portal-hero-logo-shell {
        width: 92px;
        height: 92px;
        border-radius: 24px;
    }

    .portal-hero-brand-panel {
        justify-content: flex-start;
    }

    .portal-info-grid {
        grid-template-columns: 1fr;
    }

    .portal-card,
    .portal-soft,
    .portal-list-item,
    .portal-info-card,
    .portal-stat-card,
    .portal-announcement-card,
    .portal-feature-card,
    .portal-step-card,
    .portal-focus-card,
    .portal-chart-shell,
    .portal-callout,
    .portal-empty-state,
    .portal-download-meta-item,
    .portal-skill-card,
    .portal-md-preview,
    .portal-launch-modal,
    .portal-table-wrap,
    .portal-skills-toolbar {
        border-radius: 20px;
    }

    .portal-footer-inner {
        padding-inline: 1rem;
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portal-list-item,
    .portal-skill-card,
    .portal-brand-logo-shell {
        transition: none;
    }
}
