/* Existing PKU CMO markup, including the site's native slider and registration. */
body:has(> #container > .banner > .nav, > .frmsubmit > #frmOrder) {
  --pkc-paper: #f5f1e9;
  --pkc-surface: #fffdfa;
  --pkc-tint: #f2eae1;
  --pkc-text: #2a211e;
  --pkc-muted: #6b5c53;
  --pkc-deep: #591d25;
  --pkc-accent: #852c38;
  --pkc-line: #e4d9ce;
  --pkc-gap: clamp(15px, 2.4vw, 28px);
  margin: 0;
  background: var(--pkc-paper);
  color: var(--pkc-text);
  font: 16px/1.65 Inter, "Microsoft YaHei", "PingFang SC", sans-serif;
}

#container:has(> .banner > .nav),
#container:has(> .banner > .nav) *,
#container:has(> .banner > .nav) *::before,
#container:has(> .banner > .nav) *::after { box-sizing: border-box; }

#container:has(> .banner > .nav) {
  width: min(1180px, calc(100% - 48px)) !important;
  margin: 18px auto 0;
  color: inherit;
  font-size: inherit;
}

body > div.hide:has(> img[src="/Template/yxb/images/wx.jpg"]) { display: none !important; }

#container > .banner {
  width: 100%;
  height: auto;
  overflow: hidden;
  background: var(--pkc-deep);
  border-radius: 10px 10px 4px 4px;
}

#container > .banner::before {
  display: block;
  width: 100%;
  aspect-ratio: 1002 / 121;
  background: #f4f4f4 url("/Template/yxb/images/banner_bg.jpg") center top / 100% auto no-repeat;
  content: "";
}

#container .banner > .nav { position: static; width: 100%; background: var(--pkc-deep); }
#container .banner > .nav > ul { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); }
#container .banner > .nav li { float: none; width: auto; margin: 0; }
#container .banner > .nav li.hide { display: list-item; }
#container .banner > .nav li > a {
  display: grid;
  min-height: 52px;
  place-content: center;
  padding: 8px 4px;
  background: none;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}
#container .banner > .nav li:last-child > a { background: #742833; }
#container .banner > .nav li > a:hover,
#container .banner > .nav li > a:focus-visible { background: #963c48; color: #fff; }
#container :is(a, button, select, input, textarea):focus-visible {
  outline: 2px solid #a64c59;
  outline-offset: 2px;
}
#container .banner > .nav a:focus-visible { outline-offset: -3px; outline-color: #ffdfb8; }
#container a { color: inherit; }
#container a:hover { color: var(--pkc-accent); text-underline-offset: .2em; }

#container > .main,
#container .main_2 > .main_top_2 {
  display: grid;
  align-items: start;
  gap: var(--pkc-gap);
}
#container > .main {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.46fr);
  margin: var(--pkc-gap) 0 0;
}
#container .main_2 > .main_top_2 {
  grid-template-columns: minmax(220px, .9fr) minmax(0, 2.6fr);
}
#container :is(.main_left, .main_right, .main_left_2, .main_right_2) {
  float: none;
  width: auto;
  min-width: 0;
  background: transparent;
}
#container :is(.main_left, .main_right, .main_left_2) {
  display: grid;
  gap: var(--pkc-gap);
}
#container .main_right > .clear,
#container .main_left_top > .clear,
#container .main_left_title > .clear,
#container .articlelist > ul > br { display: none; }

#container #show {
  display: block;
  top: auto;
  width: 100%;
  height: auto;
  margin: 0;
  aspect-ratio: 588 / 300;
  z-index: 1;
  overflow: hidden;
  border-radius: 8px;
  background: var(--pkc-deep);
}
#container #show > .d2,
#container #show > .d2 > a,
#container #show > .d2 img {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
}
#container #show img { object-fit: cover; }
#container #show:not(:has(> .d2)) > .loading { display: none; }
#container #show:not(:has(> .d2)) > ul,
#container #show:not(:has(> .d2)) > ul > li:first-child,
#container #show:not(:has(> .d2)) > ul > li:first-child :is(a, img) {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
}
#container #show:not(:has(> .d2)) > ul > li + li { display: none; }
#container #show > .num_list {
  bottom: 0;
  height: 42px;
  padding: 0 102px 0 12px;
  background: #321a21;
  color: #fff;
  font-size: 13px;
  line-height: 42px;
}
#container #show > .num_list > span {
  display: block;
  overflow: hidden;
  height: auto;
  margin: 0 !important;
  padding: 0;
  color: inherit;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#container #show > .button { right: 0; bottom: 0; display: flex; }
#container #show > .button a {
  display: grid;
  width: 43px;
  min-height: 42px;
  place-content: center;
  margin: 0;
  padding: 0;
  background: #3c2429;
  color: #fff;
}
#container #show > .button .b2 { background: var(--pkc-accent); color: #fff; }

#container :is(.main_left_top, .main_right_top, .left_top_2, .nr_list, .content) {
  min-width: 0;
  margin: 0;
  padding: 0;
  background: var(--pkc-surface);
  border: 1px solid var(--pkc-line);
  border-top: 2px solid var(--pkc-accent);
  border-radius: 4px;
}
#container :is(.main_left_title, .main_right_top > h2, .nr_list > h2, .left_top_2 > h3) {
  width: auto;
  margin: 0;
  padding: 11px 15px;
  background: var(--pkc-tint);
  color: var(--pkc-deep);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}
#container .main_left_title > ul { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#container .main_left_title li { float: none; width: auto; margin: 0; padding: 0; border: 0; background: none; }
#container .main_left_title .more,
#container .main_right_top > .right_more { color: var(--pkc-muted); font-size: 13px; font-weight: 500; }
#container .main_right_top > h2 { padding-right: 80px; }
#container .main_right_top > .right_more { right: 15px; top: 12px; }
#container .main_right_top > .right_more > a,
#container .main_left_title .more > a { display: inline-flex; align-items: center; min-height: 24px; }
#container :is(.main_left_nr, .main_right_nr) { margin: 0; padding: 0 15px; }
#container :is(.main_left_nr, .main_right_nr) li {
  height: auto !important;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--pkc-line) !important;
  background: none;
  line-height: 1.5 !important;
}
#container :is(.main_left_nr, .main_right_nr) li:last-child { border: 0 !important; }
#container :is(.main_left_nr, .main_right_nr) li > a,
#container .main_right_nr td > a {
  display: block;
  padding: 10px 2px;
  color: var(--pkc-text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
#container :is(.main_left_nr, .main_right_nr) li > a:hover,
#container .main_right_nr td > a:hover { color: var(--pkc-accent); text-decoration: underline; }

/* One visual line for the existing homepage link text, including the alumni table. */
#container > .main :is(.main_left_nr li, .main_right_nr li, .main_right_nr td) > a {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#container > .main .main_right_nr table { width: 100%; table-layout: fixed; border-collapse: collapse; }
#container > .main .main_right_nr td { min-width: 0; padding: 0; border-bottom: 1px solid var(--pkc-line); }
#container > .main .main_right_nr tr:last-child > td { border: 0; }

#container .weizhi { padding: 13px 1px; color: var(--pkc-muted); font-size: 14px; overflow-wrap: anywhere; }
#container .weizhi .font { font-size: inherit; }
#container .main_2 { overflow: visible; background: transparent; }
#container .left_top_2 > img { display: block; margin: 8px auto; max-width: 100%; height: auto; }
#container .nr_list li {
  min-height: 42px;
  height: auto;
  margin: 0 15px;
  padding: 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--pkc-line);
  line-height: 1.6;
}
#container .nr_list li > a { display: block; padding: 10px 2px; overflow-wrap: anywhere; }
#container .nr_list .date:empty { display: none; }
#container :is(#fenye, .plist) { width: auto; max-width: 100%; margin: 8px 14px 14px !important; overflow-wrap: anywhere; }
#container :is(#fenye, .plist) table { width: 100%; }
#container :is(#fenye, .plist) a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 8px;
  margin: 2px;
  border: 1px solid var(--pkc-line);
  border-radius: 3px;
}
#container .content { padding: clamp(14px, 3.8vw, 42px); line-height: 1.85; overflow-wrap: anywhere; }
#container .content > :is(h1, h5) {
  margin: 0 0 .45em;
  padding: 0;
  color: var(--pkc-deep);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.34;
  text-align: center;
}
#container .content :is(.p_style, .weekly-date) { color: var(--pkc-muted); text-align: center; }
#container .content img { max-width: 100% !important; height: auto; }
#container .content :is(table, iframe, video) { max-width: 100% !important; }
#container .content table { display: block; overflow-x: auto; }
#container .content pre { overflow-x: auto; white-space: pre-wrap; }
#container > .bottom,
#container .main_2 > .bottom {
  width: 100%;
  margin: var(--pkc-gap) auto 0;
  padding: 14px 0 18px;
  border-top: 1px solid var(--pkc-line);
  color: var(--pkc-muted);
  font-size: 13px;
}
#container .bottom > .bottom { padding: 0; }
#container .bottom p { margin: 5px 0; }
#container .bottom p.style1 { background: transparent; color: var(--pkc-deep); font-size: 15px; line-height: 1.6; }

body:has(> .frmsubmit > #frmOrder) > :is(.logo, .frmsubmit, .about) {
  box-sizing: border-box;
  width: min(640px, calc(100% - 28px));
  max-width: 100%;
  margin-inline: auto;
}
body:has(> .frmsubmit > #frmOrder) > .frmsubmit {
  margin-top: 16px;
  background: var(--pkc-surface) !important;
  border: 1px solid var(--pkc-line);
  border-top: 2px solid var(--pkc-accent);
  border-radius: 4px;
}
body:has(> .frmsubmit > #frmOrder) > .frmsubmit h2 { color: var(--pkc-deep); }
#frmOrder input:not([type="hidden"]) { box-sizing: border-box; max-width: 100%; }
#frmOrder input[type="submit"] { min-height: 44px; background: var(--pkc-deep); color: #fff; }

@media (max-width: 820px) {
  #container:has(> .banner > .nav) { width: min(100% - 28px, 700px) !important; margin-top: 12px; }
  #container .banner > .nav > ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #container .banner > .nav li > a { min-height: 44px; font-size: 14px; }
  #container > .main, #container .main_2 > .main_top_2 { grid-template-columns: minmax(0, 1fr); }
  #container > .main > .main_right { display: contents; }
  #container > .main #show { order: -2; }
  #container > .main .main_right > .main_right_top:nth-last-child(2) { order: -1; }
  #container .main_right_2 { grid-row: 1; }
  #container .main_left_2 { display: none; }
}

@media (max-width: 640px) {
  #container > .banner::before { aspect-ratio: 1002 / 226; background-position: left top; background-size: 186% auto; }
  #container .content { overflow: clip; }
  body:has(> #container > .banner > .nav, > .frmsubmit > #frmOrder) {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }
  body:has(> #container > .banner > .nav, > .frmsubmit > #frmOrder) > .fixed-bottom {
    display: block;
    position: fixed;
    z-index: 100;
    inset: auto 0 0;
    width: 100%;
    padding: 0 0 env(safe-area-inset-bottom);
    background: var(--pkc-deep);
    color: #fff;
  }
  body:has(> #container > .banner > .nav, > .frmsubmit > #frmOrder) > .fixed-bottom > ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  body:has(> #container > .banner > .nav, > .frmsubmit > #frmOrder) > .fixed-bottom li { width: auto; border-color: #ffffff29; }
  body:has(> #container > .banner > .nav, > .frmsubmit > #frmOrder) > .fixed-bottom li > a {
    display: grid;
    min-height: 56px;
    place-content: center;
    justify-items: center;
    gap: 4px;
    padding: 5px 0;
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
    text-decoration: none;
  }
  body:has(> #container > .banner > .nav, > .frmsubmit > #frmOrder) > .fixed-bottom li img {
    display: block; width: 22px; height: 22px; object-fit: contain;
  }
  #container .weizhi { padding-top: 11px; }
  #container .cmo-registration { scroll-margin-bottom: 72px; }
}

@media (prefers-reduced-motion: no-preference) {
  #container .banner > .nav a, #container .main a { transition: color .15s ease, background-color .15s ease; }
}
