/* Shared type scale for the directory, member pages and administration only.
 * Keep brand artwork, icon sizes, per-link settings and authored rich text intact.
 * This stylesheet is deliberately not loaded by installation/maintenance pages.
 */
:root {
  --wx-font-family: Arial, "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wx-font-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --wx-font-page: 24px;
  --wx-font-section: 20px;
  --wx-font-card: 16px;
  --wx-font-body: 14px;
  --wx-font-caption: 13px;
  --wx-font-meta: 12px;
  --wx-font-stat: 28px;
  --wx-font-input: 14px;
  --wx-leading-body: 1.6;
  --wx-leading-heading: 1.35;
  --wx-leading-control: 1.4;
  --wx-weight-regular: 400;
  --wx-weight-medium: 600;
  --wx-weight-bold: 700;
  /* Existing administration components use these names. */
  --font-display: var(--wx-font-page);
  --font-section: var(--wx-font-section);
  --font-card: var(--wx-font-card);
  --font-body: var(--wx-font-body);
  --font-meta: var(--wx-font-meta);
}
@media (max-width: 600px) {
  :root {
    --wx-font-page: 22px;
    --wx-font-input: 16px;
  }
}

html body {
  font-family: var(--wx-font-family);
  font-size: var(--wx-font-body);
  font-weight: var(--wx-weight-regular);
  line-height: var(--wx-leading-body);
}

/* Legacy directory templates explicitly set text children to 12px. Reset only
 * directory text containers, never the icon buttons or popup content trees. */
body[data-page] .meinv .info,
body[data-page] .meinv .info > ul:not(.site-search-results),
body[data-page] .meinv .info > ul:not(.site-search-results) > li {
  font-size: var(--wx-font-body);
  line-height: var(--wx-leading-body);
}
body[data-page] .meinv .info > ul:not(.site-search-results) > li > :is(a, span) {
  font-family: var(--wx-font-family);
  font-size: calc(var(--wx-font-body) - 1px);
  line-height: var(--wx-leading-body);
}
body[data-page] .meinv .info > ul:not(.site-search-results) > li > :is(a, span) :is(font, span, b, strong, em, i) {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}
body[data-page] .meinv .class:not(.nav-bar) > strong:first-child,
body[data-page] .meinv .class:not(.nav-bar) > strong:first-child > a {
  font-family: var(--wx-font-family);
  font-size: calc(var(--wx-font-card) - 1px);
  font-weight: var(--wx-weight-bold);
  line-height: var(--wx-leading-heading);
}
body[data-page] .meinv .class:not(.nav-bar) > strong:first-child :is(font, span) {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}
body[data-page] .meinv .class.section-header .section-header__content,
body[data-page] .meinv .class.section-header .section-header__content > :is(strong, a, span),
body[data-page] .meinv .class.section-header .section-header__content .section-header__item {
  font-family: var(--wx-font-family);
  font-size: var(--wx-font-caption);
}
body[data-page] .meinv .class.section-header .section-header__content .section-header__item :is(a, font, span, strong) {
  font-family: inherit;
  font-size: inherit;
}
body[data-page] .meinv .class.nav-bar a,
body[data-page="member"] .member-site-nav :is(a, button) {
  font-family: var(--wx-font-family);
  font-size: var(--wx-font-body);
  line-height: var(--wx-leading-control);
}
body[data-page] .meinv .class.nav-bar a :is(font, span),
body[data-page="member"] .member-site-nav :is(a, button) span {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}
body[data-page] #menue a {
  font-family: var(--wx-font-family);
  font-size: var(--wx-font-caption);
}
body[data-page] #logo :is(p, strong, font),
body[data-page="member"] .member-announcement {
  font-family: var(--wx-font-family);
  font-size: var(--wx-font-meta);
}
/* Historical announcement spans carry an inline Simsun declaration. */
body[data-page] #logo span {
  font-family: var(--wx-font-family) !important;
}
body[data-page] #footer,
body[data-page] #footer :is(p, div, span, a, font),
body[data-page="member"] .member-footer {
  font-family: var(--wx-font-family);
  font-size: var(--wx-font-caption);
  line-height: var(--wx-leading-body);
}

/* Member page and the same forms embedded in the homepage dialog. */
html body dialog.a1-member-dialog {
  font-family: var(--wx-font-family);
  font-size: var(--wx-font-body);
  line-height: var(--wx-leading-body);
}
body[data-page="member"] .member-main h1 {
  font-size: var(--wx-font-page);
  font-weight: var(--wx-weight-bold);
  line-height: var(--wx-leading-heading);
}
body[data-page="member"] .member-main h2,
html body dialog.a1-member-dialog h2 {
  font-size: var(--wx-font-section);
  font-weight: var(--wx-weight-bold);
  line-height: var(--wx-leading-heading);
}
body[data-page="member"] .member-main h3,
body[data-page="member"] #member-promotion .member-promotion-orders-title,
html body dialog.a1-member-dialog h3,
html body dialog.a1-member-dialog .member-secret-box h3 {
  font-size: var(--wx-font-card);
  font-weight: var(--wx-weight-bold);
  line-height: var(--wx-leading-heading);
}
body[data-page="member"] .member-main :is(button, .button-link),
html body dialog.a1-member-dialog button:not(.a1-member-dialog__close),
html body dialog.a1-member-dialog .button-link {
  font-family: var(--wx-font-family);
  font-size: var(--wx-font-body);
  line-height: var(--wx-leading-control);
}
body[data-page="member"] .member-main :is(input, select, textarea),
html body dialog.a1-member-dialog :is(input, select, textarea) {
  font-family: var(--wx-font-family);
  font-size: var(--wx-font-input);
  line-height: var(--wx-leading-control);
}
body[data-page="member"] .member-main :is(.member-muted, .field-help, .member-eyebrow, .member-current-ip, .referral-date),
body[data-page="member"] .member-summary dt,
body[data-page="member"] .member-recovered-account dt,
html body dialog.a1-member-dialog :is(.member-muted, .field-help, .member-eyebrow, .member-current-ip, .referral-date),
html body dialog.a1-member-dialog .member-summary dt,
html body dialog.a1-member-dialog .member-recovered-account dt {
  font-size: var(--wx-font-caption);
  line-height: var(--wx-leading-body);
}
body[data-page="member"] .member-main .member-current-ip code,
html body dialog.a1-member-dialog .member-current-ip code {
  font-family: var(--wx-font-mono);
  font-size: inherit;
}
body[data-page="member"] .member-main .member-secret-value,
html body dialog.a1-member-dialog input.member-secret-value {
  font-family: var(--wx-font-mono);
  font-size: var(--wx-font-input);
}
body[data-page="member"] .member-summary dd,
html body dialog.a1-member-dialog .member-summary dd {
  font-size: var(--wx-font-stat);
  font-weight: var(--wx-weight-bold);
  line-height: var(--wx-leading-heading);
}

/* Search styles can be inserted after this file by the server. Explicit
 * component selectors keep their type scale stable in either loading order. */
html body .site-search,
html body dialog.a1-search-dialog {
  font-family: var(--wx-font-family);
  font-size: var(--wx-font-body);
  line-height: var(--wx-leading-body);
}
html body .site-search h1 {
  font-size: var(--wx-font-page);
  font-weight: var(--wx-weight-bold);
  line-height: var(--wx-leading-heading);
}
html body dialog.a1-search-dialog h2 {
  font-family: var(--wx-font-family);
  font-size: var(--wx-font-section);
  font-weight: var(--wx-weight-bold);
  line-height: var(--wx-leading-heading);
}
html body .site-search :is(.search-label, legend, .site-search-status),
html body .site-search .site-search-engine-options span,
html body .site-search .site-search-pagination span,
html body .site-search button,
html body dialog.a1-search-dialog .a1-search-dialog__close,
html body dialog.a1-search-dialog .a1-search-dialog__full-page a {
  font-family: var(--wx-font-family);
  font-size: var(--wx-font-body);
  line-height: var(--wx-leading-control);
}
html body .site-search input[type="search"],
body[data-page] .search-fallback input[type="search"] {
  font-family: var(--wx-font-family);
  font-size: var(--wx-font-input);
  line-height: var(--wx-leading-control);
}
html body .site-search :is(.site-search-intro, .site-search-engine-hint, .site-search-category, .site-search-address) {
  font-size: var(--wx-font-caption);
  line-height: var(--wx-leading-body);
}
/* Override only the historical 17px !important default. A configured link
 * size remains solely controlled by link-display.css and its data attribute. */
html body .info .site-search-results .site-search-link:not([data-link-style-size]) {
  font-size: var(--wx-font-card) !important;
}
html body .info .site-search-results .site-search-link {
  font-family: var(--wx-font-family);
  font-weight: var(--wx-weight-medium);
  line-height: var(--wx-leading-heading);
}

/* Website submission: eliminate mixed legacy <font size> and nested span
 * sizes within one instruction without touching link targets or colors. */
body[data-page="link"] .submission-backlink-note {
  font-family: var(--wx-font-family);
  font-size: var(--wx-font-body);
  line-height: var(--wx-leading-body);
}
body[data-page="link"] .submission-backlink-note :is(font, span, u, a) {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}
body[data-page="link"] .submission-panel h2 {
  font-size: var(--wx-font-section);
  font-weight: var(--wx-weight-bold);
  line-height: var(--wx-leading-heading);
}
body[data-page="link"] .submission-field label,
body[data-page="link"] .submission-actions button {
  font-family: var(--wx-font-family);
  font-size: var(--wx-font-body);
  font-weight: var(--wx-weight-medium);
  line-height: var(--wx-leading-control);
}
body[data-page="link"] .submission-field label :is(b, span) {
  font-size: inherit;
  line-height: inherit;
}
body[data-page="link"] .submission-field :is(input, select, textarea) {
  font-family: var(--wx-font-family);
  font-size: var(--wx-font-input);
  line-height: var(--wx-leading-control);
}
body[data-page="link"] :is(.submission-intro, .submission-status) {
  font-size: var(--wx-font-caption);
  line-height: var(--wx-leading-body);
}

/* Announcement chrome only. Rich content retains its authored/semantic sizes;
 * close glyphs and transparent image-loading artwork retain their own styles. */
html body dialog.a1-popup {
  font-family: var(--wx-font-family);
  font-size: var(--wx-font-body);
  line-height: var(--wx-leading-body);
}
html body dialog.a1-popup .a1-popup__title {
  font-size: var(--wx-font-section);
  font-weight: var(--wx-weight-bold);
  line-height: var(--wx-leading-heading);
}
html body dialog.a1-popup .a1-popup__text {
  font-size: var(--wx-font-body);
  line-height: var(--wx-leading-body);
}
html body dialog.a1-popup button:not(.a1-popup__close) {
  font-size: var(--wx-font-body);
  font-weight: var(--wx-weight-medium);
  line-height: var(--wx-leading-control);
}
html body div.a1-popup-rich {
  font-family: var(--wx-font-family);
}

/* Administration uses one hierarchy without changing its tables or controls.
 * Scope all overrides to .shell, excluding the separately mounted popup. */
html body .shell :is(h1, h2, h3, h4):not(.a1-popup-rich *) {
  font-weight: var(--wx-weight-bold);
  line-height: var(--wx-leading-heading);
}
html body .shell h1:not(.a1-popup-rich *) { font-size: var(--wx-font-page); }
html body .shell h2:not(.a1-popup-rich *) { font-size: var(--wx-font-section); }
html body .shell :is(h3, h4):not(.a1-popup-rich *) { font-size: var(--wx-font-card); }
html body .shell :is(button, .button):not(.a1-popup-rich *) {
  font-family: var(--wx-font-family);
  font-size: var(--wx-font-body);
  font-weight: var(--wx-weight-medium);
  line-height: var(--wx-leading-control);
}
html body .shell :is(input, select, textarea):not(.a1-popup-rich *) {
  font-size: var(--wx-font-input);
  line-height: var(--wx-leading-control);
}
html body .shell :is(label, summary, .tab-button, .category-filter-button, .link-import-target):not(.a1-popup-rich *) {
  font-weight: var(--wx-weight-medium);
}
html body .shell :is(.muted, .field-note, .location, .link-import-help, .upload-status, .category-header-help, .category-header-empty, .category-header-removed, .category-header-count, .link-style-help, .popup-image-settings > summary, .site-share-preview-description, .traffic-total small, .traffic-table td small) {
  font-size: var(--wx-font-caption);
  line-height: var(--wx-leading-body);
}
html body .shell :is(th, .status-badge, .module-list-head, .banner-list-head, .category-list-head, .recovery-state, .eyebrow, .site-share-preview-host, .popup-image-thumbnail > span):not(.a1-popup-rich *) {
  font-size: var(--wx-font-meta);
  font-weight: var(--wx-weight-medium);
}
html body .shell :is(.stat, .traffic-total) > strong {
  font-size: var(--wx-font-stat);
  font-weight: var(--wx-weight-bold);
  line-height: var(--wx-leading-heading);
}
html body .shell .stat > span { font-size: var(--wx-font-caption); }
html body .shell .submission-title-cell h3 { font-size: var(--wx-font-body); }
html body .shell .popup-card-title { font-size: var(--wx-font-section); }
html body .shell .site-share-preview-title {
  font-size: var(--wx-font-card);
  line-height: var(--wx-leading-heading);
}
html body .shell :is(.site-share-preview-heading, .search-engines-list-heading h4, .search-engine-row-heading h4) {
  font-size: var(--wx-font-body);
}
html body .shell :is(.location, .submission-id, .category-header-color-hex, .member-ip, .popup-html-input, code, pre) {
  font-family: var(--wx-font-mono);
}
