:root {
  --sky: #76aeb5;
  --mist: #edf3f2;
  --surface: #ffffff;
  --ink: #202a35;
  --muted: #697582;
  --line: #e7ebee;
  --accent: #346cef;
  --accent-deep: #2455cf;
  --focus: #e3a53a;
  --shadow: 0 18px 46px rgba(35, 62, 76, .11);
}

html {
  min-height: 100%;
  background: var(--mist);
  scroll-behavior: smooth;
}

html.night-mode {
  --mist: #16212a;
  --surface: #1e2b35;
  --ink: #f2f6f5;
  --muted: #b5c2c9;
  --line: #334653;
  --accent: #91b5ff;
  --accent-deep: #6c9af7;
  --focus: #f6c967;
  --shadow: 0 18px 46px rgba(0, 0, 0, .26);
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  /* The upstream theme declares body as a flex container.  Without this
     reset, its only child shrink-wraps to the width of its contents. */
  display: block !important;
  background: var(--mist);
}

.page-shell {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
}

.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(16, 39, 50, .18) 0%, rgba(16, 39, 50, 0) 36%, rgba(17, 37, 47, .32) 100%);
}

.hero-art {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.015);
}

.topbar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .11em;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 2px 5px rgba(15, 40, 49, .25));
}

.topnav {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 2.4vw, 31px);
  padding: 0 20px;
}

.topnav a {
  position: relative;
  padding: 8px 0;
  color: rgba(255, 255, 255, .92);
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  text-shadow: 0 1px 4px rgba(15, 34, 43, .28);
  transition: color .18s ease, transform .18s ease;
}

.topnav a::after {
  position: absolute;
  bottom: 1px;
  left: 50%;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: #fff;
  content: "";
  transform: translateX(-50%);
  transition: width .18s ease;
}

.topnav a.active::after,
.topnav a:hover::after {
  width: 18px;
}

.topnav a:hover {
  color: #fff;
  transform: translateY(-2px);
}

.theme-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .46);
  border-radius: 50%;
  background: rgba(255, 255, 255, .13);
  place-items: center;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}

.theme-button:hover {
  background: rgba(255, 255, 255, .25);
  transform: translateY(-2px);
}

.night-mode-btn {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.hero-time {
  position: absolute;
  top: 88px;
  right: max(24px, calc((100% - 1180px) / 2));
  display: grid;
  justify-items: end;
  color: rgba(255, 255, 255, .93);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .035em;
  line-height: 1.5;
  text-shadow: 0 2px 7px rgba(12, 33, 42, .32);
}

.hero-time span {
  display: inline-block;
  margin-left: 8px;
}

.hero-time strong {
  margin-top: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(43px, 5.3vw, 67px);
  font-weight: 500;
  letter-spacing: -.08em;
  line-height: 1;
}

.hero-copy {
  position: absolute;
  top: 47%;
  left: 50%;
  width: min(780px, calc(100% - 40px));
  transform: translate(-50%, -50%);
  text-align: center;
  text-shadow: 0 3px 16px rgba(25, 41, 49, .42);
}

.wordmark {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(64px, 11vw, 142px);
  font-weight: 700;
  letter-spacing: .045em;
  line-height: .78;
}

.hero-copy h1 {
  margin: 24px 0 7px;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 750;
  letter-spacing: .06em;
  line-height: 1.2;
}

.hero-copy > p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, .93);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .12em;
}

.content-wrap {
  position: relative;
  z-index: 3;
  width: min(1120px, calc(100% - 40px));
  margin: -72px auto 64px;
}

.search-stage {
  position: relative;
  padding: 21px 26px 25px;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.engine-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  overflow-x: auto;
  /* Keep the lifted selected chip from being clipped by the horizontal scroller. */
  padding: 4px 0 12px;
  scrollbar-width: none;
}

.engine-row::-webkit-scrollbar {
  display: none;
}

.engine-chip {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.engine-chip:hover,
.engine-chip.active {
  border-color: #b9cef9;
  background: #eef4ff;
  color: var(--accent-deep);
  transform: translateY(-2px);
}

.night-mode .engine-chip:hover,
.night-mode .engine-chip.active {
  border-color: #5877a8;
  background: #273a58;
  color: #c9dcff;
}

.engine-chip svg,
.engine-chip img {
  width: 18px;
  height: 18px;
}

.search-container {
  position: relative;
  width: min(900px, 100%);
  margin: 0 auto;
}

.search-container .ss {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  width: 56px;
  height: 60px;
}

.search-container .lg {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  cursor: pointer;
}

.search-container .lg svg,
.search-container .lg img {
  width: 22px;
  height: 22px;
}

.search-container .wd {
  width: 100%;
  height: 60px;
  box-sizing: border-box;
  padding: 0 78px 0 58px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  outline: 0;
}

.search-container .wd::placeholder {
  color: var(--muted);
}

.search-container .wd:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(52, 108, 239, .13);
}

.search-container > button {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  place-items: center;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.search-container > button:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
}

.search-container > button svg {
  width: 23px;
  height: 23px;
  opacity: 1;
}

#word {
  position: absolute;
  z-index: 10;
  top: 68px;
  left: 0;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
}

#word li {
  padding: 10px 16px;
  list-style: none;
  text-align: left;
  cursor: pointer;
}

#word li:hover {
  background: var(--mist);
}

#navigation {
  margin: 36px 0 20px;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: 0;
  padding: 0;
  background: transparent;
}

.breadcrumb-item a,
.breadcrumb-item span {
  display: block;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}

.breadcrumb-item.active a,
.breadcrumb-item a:hover {
  background: var(--surface);
  box-shadow: 0 5px 14px rgba(35, 62, 76, .09);
  color: var(--accent-deep);
}

.breadcrumb-item::after {
  display: none;
}

.nk-content {
  padding: 0;
}

.nk-content-body,
.container-xl {
  width: 100%;
}

.category-card {
  margin: 0 0 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(35, 62, 76, .055);
}

.card-inner {
  padding: 26px 34px 30px;
}

.nya-title {
  /* DashLite's nk-ibx-action-item class absolutely positions this element.
     A group heading must remain in normal flow so the card encloses it. */
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: auto !important;
  min-height: 0 !important;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 23px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 750;
  line-height: 1;
  text-align: left;
}

.nya-title::before {
  display: none;
}

.tool-icon {
  display: inline-grid;
  width: 23px;
  height: 23px;
  place-items: center;
}

.tool-icon img,
.tool-icon svg {
  display: block;
  width: 21px;
  height: 21px;
}

#toollist .row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  margin: 0 -4px;
}

#toollist .row > .col-lg-3,
#toollist .row > .col-md-4,
#toollist .row > .col-6 {
  display: block;
  max-width: none;
  padding: 4px !important;
  flex: none;
}

.btn-block {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none !important;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  text-wrap: pretty;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.btn-block:hover {
  background: var(--mist);
  color: var(--accent-deep);
  transform: translateY(-3px);
}

.link-icon {
  display: grid;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 5px 14px rgba(35, 62, 76, .07);
  place-items: center;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.link-icon img,
.link-icon svg {
  display: block;
  width: 29px;
  height: 29px;
}

.btn-block:hover .link-icon {
  border-color: #b9cef9;
  box-shadow: 0 9px 18px rgba(52, 108, 239, .16);
  transform: translateY(-2px);
}

.theme-button:focus-visible,
.topnav a:focus-visible,
.engine-chip:focus-visible,
.search-container .wd:focus-visible,
.search-container > button:focus-visible,
.breadcrumb-item a:focus-visible,
.tool-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.site-footer {
  margin-top: 0;
  background: #182a35;
  color: rgba(255, 255, 255, .88);
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(320px, 1.45fr) auto;
  align-items: center;
  gap: 42px;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 38px 0 30px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .1em;
  text-decoration: none;
}

.footer-brand img {
  width: 27px;
  height: 27px;
}

.footer-intro p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, .6);
  font-size: 14px;
}

.footer-label {
  display: block;
  margin-bottom: 11px;
  color: rgba(255, 255, 255, .52);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-links a,
.footer-action,
.footer-back-to-top {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .84);
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.footer-links a:hover,
.footer-action:hover,
.footer-back-to-top:hover {
  border-color: rgba(255, 255, 255, .42);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  transform: translateY(-2px);
}

.footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  white-space: nowrap;
}

.footer-bottom {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 15px 0 20px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .42);
  font-size: 12px;
}

.site-footer a:focus-visible,
.site-footer button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.insight-section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto 52px;
}

.insight-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 4px 14px;
}

.insight-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 750;
  letter-spacing: .04em;
}

.insight-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.info-card {
  display: flex;
  min-height: 398px;
  flex-direction: column;
  padding: 22px 22px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(35, 62, 76, .05);
}

.info-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.info-card-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.3;
}

.info-card-header span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.info-mark {
  display: block;
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(52, 108, 239, .09);
  flex: 0 0 auto;
}

.info-mark-news { background: #346cef; }
.info-mark-baidu { background: #465feb; }
.info-mark-weibo { background: #eb4c43; }
.info-mark-bilibili { background: #22a8d8; }
.info-mark-history { background: #8a6acc; }
.info-mark-calendar { background: #dc9b31; }

.info-list {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  margin: 19px 0 15px;
  padding: 0;
  list-style: none;
}

.info-list > li {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
}

.info-rank {
  display: grid;
  width: 23px;
  height: 23px;
  align-items: center;
  border-radius: 5px;
  background: #e7e9ec;
  color: #5d6872;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  place-items: center;
}

.info-rank--1 { background: #ff3b57; color: #fff; }
.info-rank--2 { background: #ff7610; color: #fff; }
.info-rank--3 { background: #ffb30b; color: #fff; }

.info-item-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.info-item-title[href]:hover { color: var(--accent-deep); }

.info-item-meta {
  max-width: 56px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-loading,
.info-error {
  display: flex !important;
  align-items: center !important;
  justify-content: center;
  min-height: 100%;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.info-card-footer {
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.calendar-list {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 13px;
  margin: 21px 0 15px;
}

.calendar-list > div {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
}

.calendar-list dt {
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.calendar-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.night-mode .info-rank { background: #415260; color: #e9eef2; }
.night-mode .info-rank--1 { background: #d9485f; color: #fff; }
.night-mode .info-rank--2 { background: #d86714; color: #fff; }
.night-mode .info-rank--3 { background: #c88f0e; color: #fff; }

@media (max-width: 960px) {
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  #toollist .row {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  }
}

@media (max-width: 760px) {
  .hero { min-height: 520px; }
  .topbar { width: calc(100% - 32px); padding: 18px 0; grid-template-columns: auto auto; }
  .topnav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; gap: 18px; overflow-x: auto; padding: 16px 0 0; scrollbar-width: none; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a { flex: 0 0 auto; font-size: 14px; }
  .theme-button { justify-self: end; }
  .hero-time { top: 116px; right: 18px; width: 104px; font-size: 12px; }
  .hero-time #monthYear { margin-left: 0; }
  .hero-time #date,
  .hero-time #weekday { display: none; }
  .hero-time strong { margin-top: 1px; font-size: 46px; }
  .hero-copy { top: 52%; }
  .wordmark { font-size: clamp(58px, 19vw, 96px); }
  .hero-copy h1 { margin-top: 22px; font-size: 30px; }
  .hero-copy > p:last-child { font-size: 14px; }
  .content-wrap { width: calc(100% - 24px); margin-top: -48px; margin-bottom: 34px; }
  .search-stage { padding: 16px 12px 14px; border-radius: 14px; }
  .engine-row { justify-content: flex-start; padding: 4px 4px 9px; }
  .engine-chip { padding: 7px 11px; font-size: 13px; }
  .topnav a { padding-bottom: 7px; }
  #navigation { margin-top: 28px; overflow-x: auto; }
  .breadcrumb { justify-content: flex-start; width: max-content; padding: 0 3px; }
  .card-inner { padding: 22px 13px 18px; }
  .nya-title { margin-left: 8px; }
  #toollist .row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .btn-block { min-height: 104px; font-size: 13px; }
  .footer-shell { grid-template-columns: 1fr; gap: 25px; width: calc(100% - 32px); padding: 30px 0 24px; }
  .footer-actions { justify-content: flex-start; }
  .footer-bottom { width: calc(100% - 32px); padding-bottom: 18px; }
  .insight-section { width: calc(100% - 24px); margin-bottom: 34px; }
  .insight-heading { margin: 0 3px 12px; }
  .info-grid { grid-template-columns: 1fr; gap: 12px; }
  .info-card { min-height: 344px; padding: 19px 17px 14px; border-radius: 14px; }
  .info-list { margin-top: 16px; }
}

@media (max-width: 390px) {
  #toollist .row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .engine-chip span { display: none; }
  .engine-chip { min-width: 38px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
