:root {
  --site-link-blue: #096cc1;
  --site-sky-blue: #0188fb;
  --site-link-active: #a45000;
}

.global-header .submenu-group a, .ch-channel li a, .ch-resource li a,
.ch-section-head > a, .ch-guide-strip nav a, .ch-topic-nav a, .hero-channels a,
.archive-subjects .subjects a, .expert-copy .btn-secondary, .hero-actions .btn-secondary {
  color: var(--site-link-blue);
}
.ch-channel li a:is(:hover,:focus-visible), .ch-resource li a:is(:hover,:focus-visible),
.ch-guide-strip nav a:is(:hover,:focus-visible), .hero-channels a:is(:hover,:focus-visible),
.global-header .submenu-group a:is(:hover,:focus-visible,[aria-current="page"]) {
  color: var(--site-link-active);
  background: #fff6e8;
}
.hero-actions .btn-secondary, .expert-copy .btn-secondary { border-color: #90bfe8; }
.global-header .nav-actions .nav-cta { color: #fff; background: #096cc1; border-color: #096cc1; }
.global-header .nav-actions .nav-cta:hover { background: #07599f; }

.help-rail {
  position: fixed;
  z-index: 160;
  right: max(12px,env(safe-area-inset-right));
  bottom: max(28px,env(safe-area-inset-bottom));
  display: grid;
  gap: 5px;
  justify-items: end;
  font: 16px/1.5 system-ui, "Microsoft YaHei", sans-serif;
  color: #153b56;
}
.help-rail [hidden] { display: none !important; }
.rail-items { display: grid; gap: 5px; }
.help-rail details { margin: 0; padding: 0; border: 0; background: transparent; }
.site-footer .rail-icon {
  display: grid; place-items: center; box-sizing: border-box; width: 48px; height: 48px;
  margin: 0; padding: 0; border: 0; border-radius: 50%; color: #fff;
  box-shadow: 0 2px 8px #173c5526; cursor: pointer; text-decoration: none; list-style: none;
}
.rail-icon::-webkit-details-marker { display: none; }
.rail-icon img { display: block; width: 25px; height: 25px; }
.rail-qq { background: var(--site-sky-blue); }
.rail-phone { background: #8656c3; }
.rail-top { background: #e98300; font: 700 30px/1 system-ui,sans-serif; }
.site-footer .rail-icon:is(:hover,:focus-visible) { color: white; text-decoration: none; filter: brightness(.92); }
.help-rail :is(a,button,summary,input):focus-visible { outline: 3px solid #123a52; outline-offset: 2px; }
.rail-panel {
  position: absolute; right: calc(100% + 10px); bottom: 0; box-sizing: border-box;
  width: min(270px,calc(100vw - 84px)); max-height: calc(100dvh - 50px); overflow: auto;
  padding: 16px; border: 1px solid #cbdde9; border-radius: 12px; background: white;
  color: #18394e; box-shadow: 0 6px 26px #123b5626; text-align: left;
}
.rail-panel strong { display: block; font-size: 1.05rem; }
.rail-panel p { margin: 5px 0 10px; color: #425e70; font-size: .9rem; }
.rail-panel label { display: block; margin: 0 0 3px; font-size: .85rem; font-weight: 650; }
.rail-number { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }
.rail-number input { flex: 1 1 105px; box-sizing: border-box; min-width: 0; width: 110px; margin: 0; padding: 4px; border: 1px solid #c8dcea; border-radius: 4px; background: #f5f9fc; color: #133e57; font: 650 1rem/1.4 system-ui,sans-serif; }
.rail-number button { width: auto; margin: 0; padding: 6px 9px; border: 0; border-radius: 5px; background: #096cc1; color: #fff; font: 650 .85rem/1.45 system-ui,sans-serif; cursor: pointer; }
.site-footer .rail-panel a { color: var(--site-link-blue); font-size: .89rem; text-decoration: underline; text-underline-offset: 3px; }
.rail-status:not(:empty) { display: block; margin-bottom: 5px; color: #226044; font-size: .85rem; }
.site-footer .rail-launch { background: #096cc1; font: 700 .9rem/1 system-ui,sans-serif; }
.help-rail.ready .rail-launch { display: none; }
@media (max-width: 700px) {
  .help-rail { right: max(8px,env(safe-area-inset-right)); bottom: calc(80px + env(safe-area-inset-bottom)); }
  .help-rail.ready .rail-launch { display: grid; }
  .help-rail.ready:not(.expanded) .rail-items, .nav-open .help-rail { display: none; }
  .site-footer .rail-icon { width: 44px; height: 44px; }
}
@media print { .help-rail { display: none; } }
