/* Additions to the old site's stylesheets for the rebuilt pages. */

/* "加载更多" is a link now (it works without script and search engines can follow it). */
a.download_wap_load_more { display: block; text-align: center; cursor: pointer; }

.site_message { padding: 80px 20px; text-align: center; }
.site_message h2 { font-size: 22px; margin-bottom: 16px; }
.site_message p { color: #666; line-height: 2; }
.site_message a { color: #2a6df4; }

/* Rules the old templates carried in page-specific <style> blocks. */
body[data-page="list"] .fast_menu,
body[data-page="tag"] .fast_menu { display: none; }
@media screen and (max-width: 696px) {
  body[data-page="list"] .fast_menu,
  body[data-page="tag"] .fast_menu { display: flex; }
}

body[data-page="tag"] .left_side { background-color: #fff; padding-right: 0; margin-right: 20px; }
@media screen and (max-width: 1024px) {
  body[data-page="tag"] .left_side { padding-right: 0; margin-right: 0; }
}

body[data-page="article"] pre code.hljs::-webkit-scrollbar { height: 10px; }
body[data-page="article"] pre code.hljs::-webkit-scrollbar-track { background: #eee; }
body[data-page="article"] .hljs.language-javascript { color: #000; }

html:has(body[data-page="search"]), body[data-page="search"] { min-height: 100%; }

/* AI工具箱 */
body[data-page="tools"] { background-color: #fff; }
body[data-page="tools"] .ai_map_grid,
body[data-page="tool"] .ai_map_grid,
body[data-page="search"] .ai_map_grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
@media screen and (max-width: 1024px) {
  body[data-page="tools"] .ai_map_grid,
  body[data-page="tool"] .ai_map_grid,
  body[data-page="search"] .ai_map_grid { grid-template-columns: repeat(auto-fill, minmax(166px, 1fr)); }
}
body[data-page="tools"] .news_bg { background: linear-gradient(180deg, #FFFDF7 0%, #FDFAEA 100%); border-bottom: #F9EED0 1px solid; }
body[data-page="tools"] .pb-24 { padding-bottom: 24px; }
body[data-page="tools"] [data-recent][hidden] { display: none; }

/* A notice in the middle of the page fills the window. */
html[data-page="notice"], body[data-page="notice"] { width: 100%; height: 100%; }

/* Lists of models and datasets */
html[data-page="resources"] { height: 100%; }
body[data-page="resources"] { min-height: 100%; }
body[data-page="resources"] > .wrapper { height: auto; }
/* "加载更多" is for phones here; wider screens page with numbers. */
body[data-page="resources"] a.download_wap_load_more { display: none; }
@media screen and (max-width: 1024px) {
  body[data-page="resources"] a.download_wap_load_more { display: block; }
}
body[data-page="resources"] .download_right_gird > .no_data { flex: 1; }

/* A model or dataset */
body[data-page="resource"] .toast {
  width: 316px; height: 82px; line-height: 82px; text-align: center;
  background: rgba(0, 0, 0, 0.7); border-radius: 4px;
  position: fixed; top: calc(50% - 41px); left: calc(50% - 158px);
  font-size: 16px; font-weight: 400; color: #fff; z-index: 100;
}
body[data-page="resource"] .hljs.language-javascript { color: #000; }

/* Everything by one author */
html[data-page="owner"], body[data-page="owner"] { height: 100%; }
body[data-page="owner"] .no_data_flex { display: flex; }
body[data-page="owner"] .cont_tab > div { cursor: pointer; }

/* Messages of the member pages, the comment box and the contact form: the
   old pages' toast. */
.site_toast {
  min-width: 316px; max-width: 80%; padding: 0 20px; box-sizing: border-box;
  height: 82px; line-height: 82px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(0, 0, 0, 0.7); border-radius: 4px;
  position: fixed; top: calc(50% - 41px); left: 50%; transform: translateX(-50%);
  font-size: 16px; font-weight: 400; color: #fff; z-index: 9999;
}
@media screen and (max-width: 696px) {
  .site_toast { min-width: 0; height: 60px; line-height: 60px; font-size: 14px; }
}

/* The member's own page reuses the login page's frame. */
body[data-page="login"] .center_avatar { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
body[data-page="login"] .center_avatar img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #eef1f5; }
body[data-page="login"] .center_avatar_btn { cursor: pointer; color: #2a6df4; font-size: 14px; }
body[data-page="login"] .center_info { color: #666; font-size: 14px; line-height: 2; }
body[data-page="login"] .login_agreement_checkbox { color: #999; font-size: 12px; text-align: center; }

/* Comment avatars keep their shape whatever picture a member uploads. */
body[data-page="article"] .discuss_item_left img,
body[data-page="article"] .discuss_item_sub_left img { object-fit: cover; }

/* Companies and jobs: the blue band at the top of a company's page and of a
   job's (a page-specific <style> in the old templates), and the narrower
   frame those pages had on small screens. */
body[data-page="company"] .com_bg,
body[data-page="job"] .com_bg { background-size: cover; background-position: center; background-color: #017fd4; }
body[data-page="company"] .com_bg { background-image: url("/uploadfile/202306/06c2f095e85c629.jpg"); }
body[data-page="job"] .com_bg { background-image: url("/uploadfile/202306/dff758365e6f1b7.jpg"); }
@media screen and (max-width: 1024px) {
  body[data-page="company"] .cont_box,
  body[data-page="jobs"] .cont_box,
  body[data-page="job"] .cont_box { padding: 0; }
}
/* 企业类别 entries are links now; the old page made them clickable by script. */
body[data-page="companies"] a.category { text-decoration: none; }
body[data-page="jobs"] a#download_wap_load_more { text-decoration: none; }

/* --- Headings (SEO) ---------------------------------------------------------
   Each page's main title is an <h1>. The old templates used an <h2> or a <div>;
   these rules keep the look of what was there. */
.sr_only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* The article title was an <h2> with the browser's own size. */
.article_tit h1 { font-size: 1.5em; font-weight: bold; }
/* Model and dataset pages: the name was the second <p> of the title row. */
.download_details_container .copy_title .copy_slug { font-size: 18px; font-weight: 500; margin: 0 10px 0 0; color: #333333; }
.download_details_container .copy_title p:last-of-type { color: #999999; }

/* Breadcrumbs above an article's title, and its related articles. */
.article_crumbs { font-size: 12px; color: #9B9B9B; padding-bottom: 12px; line-height: 18px; }
.article_crumbs a { color: #9B9B9B; }
.article_crumbs a:hover { color: #1493F4; }
.article_crumbs span { padding: 0 6px; }
.article_related { margin-top: 24px; padding-top: 16px; border-top: 1px solid #eee; }
.article_related_tit { font-size: 16px; font-weight: 600; color: #333333; padding-left: 10px; border-left: 2px solid #1493F4; line-height: 16px; margin-bottom: 12px; }
.article_related ul { padding: 0; margin: 0; list-style: none; }
.article_related li { font-size: 14px; line-height: 30px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.article_related li::before { content: "·"; color: #1493F4; padding-right: 8px; }
.article_related a { color: #333333; }
.article_related a:hover { color: #1493F4; }
