@import url("/brand/palette.css?v=20261002-palette-1");

html { font-family: sans-serif; text-size-adjust: 100%; }
body { margin: 0px; }
* { box-sizing: border-box; }
::before, ::after { box-sizing: border-box; }
/* One uploaded image is shared by desktop and mobile without cropping or stretching. */
.adbanner { width: 100%; max-width: 1020px; }
.adbanner a { display: block; }
.adbanner img { display: block; width: 100%; height: auto; margin: 0; }
/* Keep administrator controls beside the image, including short mobile banners. */
#navs .adbanner .a5-front-admin-wrap.is-banner { padding-inline-end: 30px; min-height: 29px; }
html { font-size: 10px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
body { font-family: "Microsoft Yahei", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.42857; color: var(--wx-text); background-color: var(--wx-bg); }
a { color: rgb(255, 255, 255); text-decoration: none; }
a:focus { color: var(--wx-focus); text-decoration: none; }
a:focus { outline: -webkit-focus-ring-color auto 5px; outline-offset: -2px; }
h1, h2 { font-family: inherit; font-weight: 500; line-height: 1.1; color: inherit; }
h1, h2 { margin: 20px 0px 10px; }
h1 { font-size: 36px; }
h2 { font-size: 30px; }
p { margin: 0px 0px 10px; }
ul { margin: 0px; padding: 0px; list-style: none; }
.container::before, .container::after { content: " "; display: table; }
.container::after { clear: both; }
body { background-color: var(--wx-bg); position: relative; }
.container { position: relative; margin: 0px auto; max-width: 1149px; }
#footer { clear: both; padding: 40px 30px; font-size: 12px; line-height: 12px; text-align: center; color: var(--wx-muted); background-color: var(--wx-bg); }
#footer a { color: var(--wx-muted); }
#footer a:hover { color: var(--wx-link); }
.pageheader { overflow: hidden; background-color: var(--wx-primary); padding: 1px 20px; margin: 0; color: rgb(255, 255, 255); }
.pageheader h1 { font-size: 36px; font-weight: bold; float: left; margin: 12px auto; }
.pageheader .container .note { margin-top: 32px; margin-bottom: 15px; margin-left: 12px; float: left; }
#navs { color: rgb(170, 170, 170); margin-top: 2px; }
#navs h2 { font-size: 20px; font-weight: normal; color: rgb(255, 255, 255); padding: 10px; background-color: var(--wx-primary); margin: 0px; }
#navs .item { overflow: hidden; margin: 10px 0px 20px; }
#navs .item h2 { width: 140px; padding: 11px 16px; margin: 0px; font-size: 17px; }
#navs .item ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 7px; width: 100%; margin: 7px 0 0; }
#navs .item li { display: flex; min-width: 0; min-height: 40px; background: var(--wx-panel); }
#navs .item li a { display: block; flex: 1; min-width: 0; width: 100%; min-height: 40px; padding: 8px 13px; font-size: 14px; line-height: 24px; font-weight: bold; color: var(--wx-link); overflow-wrap: anywhere; }
#navs .item li a:hover { color: var(--wx-link-hover); border-bottom-color: var(--wx-link-hover); }
#navs nav { background-color: var(--wx-primary); }
#navs nav a { display: block; padding: 7px 8px; color: rgb(255, 255, 255); border-bottom: 1px solid var(--wx-hover); }
#navs nav a:hover { background-color: var(--wx-hover); color: rgb(255, 255, 255); }
.mina { float: right; margin: 11px 10px 0px 0px; color: var(--wx-muted); }
.mina a { color: var(--wx-link); font-weight: bold; }
.mina a:hover { color: var(--wx-link-hover); text-decoration: underline; }
li { list-style: none; }
@media (max-width: 1280px) {
  #navs .items { margin-right: 10px; }
}
@media (max-width: 1024px) {
  .pageheader { margin-top: 0px; }
  #navs .item { margin-top: 10px; }
  #navs .items { margin: 0px 10px; }
  #navs .item ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 770px) {
  .pageheader .container .note { margin-top: 0px; margin-left: 0px; }
}
@media (max-width: 640px) {
  #navs .item ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #navs .item li a { padding-inline: 8px; }
  #navs .item h2 { width: auto; text-align: center; }
  /* On phones the heading spans behind these links in both light and dark themes. */
  #navs .mina, #navs .mina a, #navs .mina a:hover { color: var(--wx-on-primary); }
  .pageheader { padding: 0px 10px; margin-bottom: 0px; }
  .pageheader h1 { font-weight: bold; font-size: 18px; }
  .pageheader .note { font-size: 12px; }
}

.theme-toggle {
  position: absolute;
  top: 17px;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 64px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 4px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  font: 13px/1 "Microsoft Yahei", sans-serif;
  cursor: pointer;
}
.theme-toggle:hover { background: rgba(255, 255, 255, .22); }
.theme-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.theme-icon { font-size: 17px; line-height: 1; }
.theme-toggle .theme-icon svg { display: block; width: 1em; height: 1em; }

@media (max-width: 1280px) {
  .theme-toggle { right: 10px; }
}
@media (max-width: 640px) {
  .theme-toggle { top: 10px; right: 0; width: 36px; min-width: 36px; height: 32px; padding: 0; }
  .theme-label { display: none; }
}

/* Legacy inline colors also follow the shared theme palette. */
html[data-theme="dark"] #navs .item li span[style*="#000000"],
html[data-theme="dark"] #navs .item li span[style*="#0000FF"] { color: var(--wx-link) !important; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) #navs .item li span[style*="#000000"],
  html:not([data-theme="light"]) #navs .item li span[style*="#0000FF"] { color: var(--wx-link) !important; }
}

/* Keep page tools below the category list, even with many categories or a short viewport. */
#navs {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
}
#navs::before, #navs::after { content: none; }
#navs .items { min-width: 0; margin-left: 0; }
#navs .site-sidebar {
  position: sticky;
  top: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100vh - 104px);
  max-height: var(--sidebar-available-height, calc(100dvh - 104px));
}
#navs .site-sidebar > nav {
  position: static;
  flex: 0 1 auto;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.sidebar-tools {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.sidebar-tools .sidebar-tool {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 6px;
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 8px;
  border: 1px solid var(--wx-control);
  border-radius: 5px;
  color: var(--wx-link);
  background: var(--wx-panel);
  font: 13px/1 "Microsoft Yahei", Helvetica, Arial, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}
.sidebar-tools .sidebar-tool[hidden] { display: none; }
.sidebar-tools .sidebar-tool:hover { color: var(--wx-link-hover); background: var(--wx-tint); }
.sidebar-tools .sidebar-tool:disabled { color: var(--wx-muted); background: var(--wx-panel); opacity: .55; cursor: default; }
.sidebar-tools .sidebar-tool:focus-visible { outline: 2px solid var(--wx-focus); outline-offset: 2px; }
.sidebar-tool svg { width: 20px; height: 20px; flex: none; }
.sidebar-tools .theme-icon { font-size: 21px; }

@media (max-width: 1024px) {
  #navs { display: block; }
  #navs .items { margin-left: 10px; }
  #navs .site-sidebar {
    position: sticky;
    z-index: 30;
    top: 0;
    width: 100%;
    max-height: none;
  }
  #navs .site-sidebar > nav {
    display: flex;
    flex-flow: row nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 1px solid var(--wx-line);
  }
  #navs .site-sidebar > nav > [data-category-menu-item] { flex: 0 0 auto; }
  #navs .site-sidebar > nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px;
    white-space: nowrap;
    border-bottom: 0;
    border-right: 1px solid var(--wx-hover);
  }
  #navs [data-managed-category] { scroll-margin-top: var(--category-scroll-offset, 76px); }
  .sidebar-tools {
    position: fixed;
    right: 12px;
    bottom: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    width: 44px;
    max-height: calc(100vh - 76px);
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    margin-top: 0;
  }
  .sidebar-tools .sidebar-tool {
    width: 44px;
    height: 44px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  }
  .sidebar-tools .theme-label, .sidebar-tool-label { display: none; }
  .sidebar-tool svg { width: 22px; height: 22px; }
}

/* Short desktop windows must keep both the categories and tools reachable. */
@media (min-width: 1025px) and (max-height: 600px) {
  #navs .site-sidebar { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  #navs .site-sidebar > nav { flex: none; overflow-y: visible; }
}
