@font-face {
    font-family: "FontAwesomeLegacy";
    src: url("../fonts/fontawesome-webfont.woff2") format("woff2");
    font-display: swap;
}

:root {
    --bg: #f6f7f8;
    --surface: #ffffff;
    --surface-muted: #f0f2f4;
    --text: #202428;
    --muted: #687078;
    --line: #dfe3e6;
    --accent: #176b5b;
    --accent-dark: #0f5145;
    --accent-soft: #e9f4f1;
    --warning-bg: #fff8e8;
    --warning-border: #efd99b;
    --warning-text: #5d4a16;
    --radius: 6px;
    --content: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 320px;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    letter-spacing: 0;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.header-inner { max-width: var(--content); min-height: 62px; margin: 0 auto; padding: 10px 24px; display: grid; grid-template-columns: 1fr minmax(240px, 420px) 1fr; align-items: center; gap: 20px; }
.brand { color: var(--text); font-weight: 750; font-size: 18px; text-decoration: none; }
.contact-link { justify-self: end; padding: 4px 0; border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.contact-link:hover { color: var(--accent-dark); }
.search { position: relative; display: block; }
.search input { width: 100%; height: 40px; padding: 0 44px 0 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); outline: none; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.search kbd { position: absolute; top: 9px; right: 10px; min-width: 22px; height: 22px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; color: var(--muted); background: var(--surface); text-align: center; line-height: 19px; font-size: 12px; }

.layout { max-width: var(--content); margin: 0 auto; padding: 34px 24px 60px; display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 42px; }
.catalog-nav { position: sticky; top: 96px; align-self: start; }
.nav-label { margin: 0 0 10px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.catalog-nav a { display: flex; justify-content: space-between; gap: 10px; padding: 7px 9px; border-left: 2px solid transparent; color: var(--muted); font-size: 14px; text-decoration: none; }
.catalog-nav a:hover, .catalog-nav a.active { border-left-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
.catalog-nav a span:last-child { color: #92989e; font-variant-numeric: tabular-nums; }
.catalog-content { min-width: 0; }
.intro { padding: 4px 0 32px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 5px; color: var(--accent); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.intro h1, .product-header h1, .article-header h1, .legal-page h1 { margin: 0; font-size: 32px; line-height: 1.25; }
.intro > p:not(.eyebrow), .product-header p:last-child, .article-header p:last-child { max-width: 720px; margin: 10px 0 0; color: var(--muted); }
.stats { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 20px; color: var(--muted); font-size: 14px; }
.stats strong { color: var(--text); font-size: 17px; }

.catalog-section, .content-section { padding: 30px 0 8px; scroll-margin-top: 78px; }
.section-heading { min-height: 48px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.section-heading h2 { margin: 0; font-size: 19px; line-height: 1.35; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.section-heading > span { flex: 0 0 auto; color: var(--muted); font-size: 13px; }
.software-list { display: flex; flex-direction: column; gap: 10px; }
.version-list { border-top: 1px solid var(--line); }
.software-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.software-card-head { min-height: 68px; display: flex; align-items: stretch; transition: background-color .15s; }
.software-card-head:hover, .software-card.is-open > .software-card-head { background: var(--accent-soft); }
.software-main { min-width: 0; flex: 1; padding: 12px 16px; display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.software-main > span:last-child, .version-row > span:nth-child(2) { min-width: 0; }
.software-main strong, .version-row strong { display: block; overflow-wrap: anywhere; }
.software-main small, .version-row small { display: block; margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.software-summary { min-width: 0; }
.app-icon, .version-icon, .product-icon { flex: 0 0 auto; object-fit: cover; border: 1px solid var(--line); background: var(--surface); }
.app-icon { width: 42px; height: 42px; border-radius: 8px; }
.version-icon { width: 44px; height: 44px; border-radius: 8px; }
.product-icon { width: 72px; height: 72px; border-radius: 8px; }
.icon-fallback { display: inline-flex; align-items: center; justify-content: center; color: var(--accent-dark); background: var(--accent-soft); font-weight: 750; }
.software-toggle { width: 82px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.software-toggle:hover { color: var(--accent); }
.software-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.software-count { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--surface-muted); font-size: 12px; font-weight: 700; line-height: 24px; text-align: center; }
.software-chevron { width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .18s; }
.software-card.is-open .software-chevron { transform: rotate(225deg) translate(-1px, -1px); }
.software-versions { padding: 14px; border-top: 1px solid var(--line); background: var(--bg); }
.version-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.version-button { min-height: 44px; padding: 9px 12px; display: flex; align-items: center; justify-content: center; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); text-align: center; text-decoration: none; font-size: 14px; }
.version-button:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.version-empty { grid-column: 1 / -1; margin: 0; padding: 8px; color: var(--muted); text-align: center; }
.muted, .empty-state, .search-empty { color: var(--muted); }
.search-empty { margin: 24px 0 0; padding: 16px; border: 1px dashed var(--line); text-align: center; }

.page-shell, .article-shell { max-width: 920px; min-height: calc(100vh - 150px); margin: 0 auto; padding: 30px 24px 64px; }
.article-shell { max-width: 820px; }
.breadcrumb { margin-bottom: 28px; display: flex; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 13px; }
.breadcrumb a { color: var(--muted); }
.product-header, .article-header { display: flex; align-items: flex-start; gap: 20px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.product-header > div, .article-header > div { min-width: 0; }
.metadata { margin: 24px 0 0; border-top: 1px solid var(--line); }
.metadata > div { display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.metadata dt { color: var(--muted); }
.metadata dd { margin: 0; }
.version-row { min-height: 76px; padding: 13px 0; display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 14px; align-items: center; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
.version-row:hover strong, .row-action { color: var(--accent); }
.row-action { font-size: 13px; }
.notice { margin: 24px 0; padding: 14px 16px; border: 1px solid var(--warning-border); border-radius: var(--radius); background: var(--warning-bg); color: var(--warning-text); }
.notice > :first-child, .prose > :first-child { margin-top: 0; }
.notice > :last-child, .prose > :last-child { margin-bottom: 0; }
.tutorial { margin-top: 30px; }
.tutorial > h2 { padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 20px; }
.prose { overflow-wrap: anywhere; }
.prose h1 { font-size: 30px; }
.prose h2 { margin-top: 32px; font-size: 22px; }
.prose h3 { margin-top: 26px; font-size: 18px; }
.prose img { height: auto; margin: 16px auto; border: 1px solid var(--line); border-radius: var(--radius); }
.prose pre { max-width: 100%; padding: 14px; overflow: auto; background: #202428; color: #f7f7f7; border-radius: var(--radius); }
.prose code { padding: 1px 4px; background: var(--surface-muted); border-radius: 3px; }
.prose pre code { padding: 0; background: transparent; }
.prose blockquote { margin: 18px 0; padding: 2px 0 2px 16px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; }
.article-back { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); }
.legal-page article { max-width: 720px; }

.status-page { min-height: calc(100vh - 150px); padding: 100px 24px; text-align: center; }
.status-code { margin: 0; color: var(--accent); font-size: 64px; font-weight: 800; line-height: 1; }
.status-page h1 { margin: 14px 0 4px; font-size: 28px; }
.status-page > p:not(.status-code) { color: var(--muted); }
.primary-link { display: inline-block; margin-top: 14px; padding: 9px 15px; border-radius: var(--radius); background: var(--accent); color: white; text-decoration: none; }
.primary-link:hover { background: var(--accent-dark); color: white; }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { max-width: var(--content); min-height: 72px; margin: 0 auto; padding: 18px 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--muted); font-size: 13px; }
.footer-inner nav { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.footer-inner a { color: var(--muted); }
.footer-inner .feedback-link { min-height: 34px; padding: 5px 11px; display: inline-flex; align-items: center; border: 1px solid var(--accent); border-radius: var(--radius); color: var(--accent); text-decoration: none; }
.footer-inner .feedback-link:hover, .footer-inner .feedback-link:focus-visible { background: var(--accent-soft); color: var(--accent-dark); }

.contact-dialog { width: min(420px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: 0 18px 55px rgba(31, 41, 51, .2); }
.contact-dialog::backdrop { background: rgba(31, 41, 51, .42); }
.contact-dialog-head { min-height: 58px; padding: 12px 14px 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.contact-dialog-head h2 { margin: 0; font-size: 19px; }
.contact-close { width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); font-size: 25px; line-height: 1; cursor: pointer; }
.contact-close:hover, .contact-close:focus-visible { background: var(--surface-muted); color: var(--text); }
.contact-list { padding: 8px 20px 20px; }
.contact-item { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.contact-item:last-child { border-bottom: 0; }
.contact-item div { min-width: 0; display: grid; gap: 3px; }
.contact-item span { color: var(--muted); font-size: 13px; }
.contact-item strong { overflow-wrap: anywhere; font-size: 17px; }
.contact-item > button { min-width: 68px; min-height: 36px; padding: 7px 13px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--surface); color: var(--accent); font: inherit; cursor: pointer; }
.contact-item > button:hover, .contact-item > button:focus-visible { background: var(--accent-soft); }

[hidden] { display: none !important; }

@media (max-width: 820px) {
    .header-inner { grid-template-columns: 1fr auto; }
    .search { grid-column: 1 / -1; grid-row: 2; }
    .layout { grid-template-columns: 1fr; padding-top: 24px; }
    .catalog-nav { position: static; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 7px; scrollbar-width: none; }
    .catalog-nav::-webkit-scrollbar { display: none; }
    .nav-label { display: none; }
    .catalog-nav a { flex: 0 0 auto; border-left: 0; border-bottom: 2px solid transparent; }
    .catalog-nav a:hover, .catalog-nav a.active { border-left-color: transparent; border-bottom-color: var(--accent); }
    .version-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .header-inner { padding: 9px 16px; gap: 12px; }
    .layout, .page-shell, .article-shell { padding-left: 16px; padding-right: 16px; }
    .software-main { padding: 11px 12px; }
    .software-toggle { width: 66px; }
    .software-versions { padding: 10px; }
    .version-grid { grid-template-columns: 1fr; gap: 8px; }
    .intro h1, .product-header h1, .article-header h1, .legal-page h1 { font-size: 27px; }
    .product-header, .article-header { gap: 14px; }
    .product-icon { width: 58px; height: 58px; }
    .metadata > div { grid-template-columns: 1fr; gap: 3px; }
    .version-row { grid-template-columns: 44px minmax(0,1fr); }
    .row-action { display: none; }
    .footer-inner { align-items: flex-start; flex-direction: column; gap: 6px; }
    .contact-dialog-head { padding-left: 16px; }
    .contact-list { padding: 6px 16px 16px; }
}
