/* 港大论坛 存档 -- the classic LeoBBS X look.
   Colours are the board's own (data/styles.cgi): tablebordercolor #4D76B3,
   titlecolor #73A2DE, row colours #F3F6FA / #FFFFFF, fonthighlight #990000,
   posternamecolor #000088. */
:root {
  --border: #4d76b3; --title: #73a2de; --row1: #f3f6fa; --row2: #fff;
  --hi: #990000; --name: #000088; --line: #c9d6ea; --muted: #777; --nav: #f7f7f7;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: #000; font: 14px/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", "Noto Sans CJK SC", sans-serif; overflow-wrap: break-word; }
a { color: #000; text-decoration: none; }
a:hover { color: var(--hi); text-decoration: underline; }
img { border: 0; max-width: 100%; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 12px; }

/* header */
.top { background: var(--row1); border-bottom: 3px double var(--border); }
.topbar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 10px 12px 9px; }
.topbar .logo img { display: block; width: 170px; height: 60px; }
.brand { flex: 1 1 220px; }
.brand h1 { margin: 0; font-size: 20px; line-height: 1.3; color: var(--name); }
.brand h1 small { font-size: 13px; font-weight: normal; color: var(--hi); margin-left: 8px; }
.brand p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
nav.main { display: flex; gap: 6px; flex-wrap: wrap; }
nav.main a { display: block; padding: 5px 14px; background: linear-gradient(#fff, #e6eefb); border: 1px solid var(--border); border-radius: 3px; }
nav.main a:hover, nav.main a.on { background: var(--title); color: #fff; text-decoration: none; }

/* generic */
.crumb { margin: 10px 0 6px; font-size: 13px; color: #666; }
.crumb b { font-weight: normal; }
.box { border: 1px solid var(--border); background: var(--nav); padding: 6px 10px; margin: 8px 0; font-size: 13px; border-radius: 3px; }
.box .lbl { color: var(--hi); font-weight: bold; }
.box ol { margin: 2px 0; padding-left: 20px; }
.box li { margin: 2px 0; }
.box .date { color: var(--muted); }
.note-arch { border: 1px dashed var(--border); background: #f6f9ff; padding: 8px 12px; margin: 8px 0; font-size: 13px; color: #445; border-radius: 3px; }
.foot { clear: both; margin: 18px 0 22px; padding: 10px 0 0; border-top: 3px double var(--border); font-size: 12px; color: var(--muted); text-align: center; line-height: 1.8; }

/* tables */
table.lb { width: 100%; border-collapse: collapse; border: 1px solid var(--border); background: var(--row2); }
.lb td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lb tr:last-child td { border-bottom: 0; }
.lb tr.catbar td { background: var(--title); color: #fff; font-weight: bold; padding: 5px 10px; border-bottom: 1px solid var(--border); }
.lb tr.head td { background: var(--row1); color: #333; font-weight: bold; }
.lb tbody tr:nth-child(even) td { background: var(--row1); }
.lb .num { text-align: center; white-space: nowrap; }
.lb td.last, .lb th.last { font-size: 12px; line-height: 1.5; color: #444; }
.lb td.last a { color: #000; }

/* forum list */
.forumlist td.ico { width: 52px; text-align: center; }
.forumlist td.ico img { width: 48px; height: 48px; }
.forumlist .fname { font-size: 15px; }
.forumlist .fdesc, .forumlist .mods { font-size: 12px; color: var(--muted); }
.forumlist .fann { font-size: 12px; color: var(--hi); }

/* thread list */
.thead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 2px; }
.thead img { width: 32px; height: 32px; }
.thead h2 { margin: 0; font-size: 18px; color: var(--name); }
.thead .fdesc, .thead .mods { font-size: 12px; color: var(--muted); }
.threadlist td.ico { width: 24px; text-align: center; padding-left: 10px; }
.threadlist .ttitle { font-size: 14px; }
.threadlist .ttitle > a { font-size: 15px; }
.threadlist .by, .threadlist .mini { font-size: 12px; color: var(--muted); }
.threadlist .mini a { color: var(--hi); margin-right: 3px; }
.tag { display: inline-block; font-size: 11px; line-height: 16px; padding: 0 4px; margin-right: 3px; border: 1px solid; border-radius: 2px; vertical-align: 1px; font-weight: normal; }
.tag.top { color: #002299; border-color: #002299; }
.tag.jh { color: #990000; border-color: #990000; }
.tag.poll { color: #0a7c2a; border-color: #0a7c2a; }
.tag.lock { color: #777; border-color: #999; }
tr.sticky td { background: #eef3fc; }
tr.sticky .ttitle > a { color: #002299; }
.threadlist .last-s { display: none; }

/* pager */
.pager { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin: 8px 0; font-size: 13px; }
.pager a, .pager b, .pager i { display: inline-block; min-width: 26px; padding: 1px 7px; border: 1px solid var(--border); background: #fff; text-align: center; font-style: normal; line-height: 1.6; }
.pager b { background: var(--title); color: #fff; border-color: var(--title); }
.pager i { border-color: transparent; }
.pager input { width: 48px; padding: 1px 4px; border: 1px solid var(--border); font: inherit; text-align: center; }
.pager button { font: inherit; padding: 1px 8px; border: 1px solid var(--border); background: #fff; cursor: pointer; }

/* topic */
.tobar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.tobar img { width: 20px; height: 20px; }
.tobar h2 { margin: 0; font-size: 18px; color: var(--name); line-height: 1.4; }
.tobar .meta { font-size: 12px; color: var(--muted); }
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; margin: 4px 0 6px; }
.tools button { font: inherit; padding: 2px 10px; border: 1px solid var(--border); background: #fff; border-radius: 3px; cursor: pointer; }
.tools button:hover { background: var(--title); color: #fff; }
table.postbox { width: 100%; border-collapse: collapse; border: 1px solid var(--border); margin: 8px 0; background: var(--row2); }
table.postbox.alt { background: var(--row1); }
.postbox td { padding: 0; vertical-align: top; }
.postbox td.au { width: 172px; padding: 8px 6px 10px; text-align: center; border-right: 1px solid var(--title); font-size: 12px; line-height: 1.6; }
.postbox .nm { font-size: 13px; }
.postbox .nm b { color: var(--name); font-size: 14px; }
.postbox .role { display: inline-block; font-size: 11px; line-height: 14px; padding: 0 3px; margin-left: 2px; border: 1px solid; border-radius: 2px; vertical-align: 1px; }
.role.ad { color: #990000; border-color: #990000; } .role.smo { color: #990000; border-color: #990000; }
.role.cmo { color: #f76809; border-color: #f76809; } .role.mo { color: #8b008b; border-color: #8b008b; }
.role.rz { color: #0a7c2a; border-color: #0a7c2a; } .role.bn { color: #777; border-color: #999; }
.postbox .ut { color: #555; }
.postbox .av { margin: 4px 0; }
.postbox .av img { max-width: 100px; max-height: 120px; height: auto; vertical-align: top; }
.postbox .rk img { display: block; margin: 2px auto; }
.postbox .rk, .postbox .in { color: #555; }
.postbox .in b { color: #000; }
.postbox td.bd { padding: 0 12px 10px; min-height: 110px; }
.phead { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; margin-bottom: 6px; border-bottom: 1px solid var(--line); font-size: 12px; color: #666; }
.phead .fl { color: var(--hi); }
.pc { font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.pc .em { width: 19px; height: 19px; vertical-align: -4px; margin: 0 1px; }
.pc .quote { margin: 6px 0; padding: 5px 10px; border: 1px solid #000; background: rgba(255, 255, 255, .9); font-size: 14px; line-height: 1.7; }
.pc .hide { margin: 6px 0; padding: 5px 10px; border: 1px dashed #999; background: #f6f6f6; }
.pc .note { margin: 0 0 6px; padding: 3px 8px; background: #fff4e5; border: 1px solid #f0c080; color: #630; font-size: 13px; }
.pc .blocked { padding: 8px; color: var(--name); text-align: center; background: #f3f3f3; }
.pc .adminope { margin: 6px 0; padding: 4px 8px; color: var(--hi); border-top: 1px solid #e3c4c4; border-bottom: 1px solid #e3c4c4; font-size: 13px; }
.pc .editnote { color: var(--name); font-size: 12px; }
.pc pre.code { margin: 6px 0; padding: 8px 10px; background: #f7f7f7; border: 1px solid var(--line); font: 12px/1.5 Consolas, "Courier New", monospace; white-space: pre-wrap; word-break: break-all; }
.pc hr.lb { width: 40%; margin: 8px 0; border: 0; border-top: 1px solid #999; }
.pc .center { text-align: center; } .pc .move, .pc .fly { display: block; }
.pc .s1 { font-size: 12px; } .pc .s2 { font-size: 14px; } .pc .s3 { font-size: 16px; } .pc .s4 { font-size: 18px; }
.pc .s5 { font-size: 20px; } .pc .s6 { font-size: 24px; } .pc .s7 { font-size: 28px; }
.pc a { border-bottom: 1px dotted #4d76b3; }
.extimg { display: inline-block; margin: 4px 0; padding: 2px 8px; border: 1px dashed #9ab; background: #f6f8fc; border-radius: 3px; font-size: 13px; }
.extimg i { color: #888; font-style: normal; margin-left: 6px; }
.extimg a { border-bottom: 0; }
.extimg img { display: block; max-width: 100%; height: auto; margin-top: 6px; }
.extimg.dead { border-color: #c99; background: #fbf3f3; }
.pc .media { margin: 4px 0; padding: 3px 8px; background: #f4f6fa; border: 1px solid var(--line); font-size: 13px; }
.pc .media i { color: #888; font-style: normal; }
.attach { margin: 8px 0; font-size: 13px; color: #333; }
.attach .cap { margin-bottom: 3px; }
.attach .cap span { color: var(--muted); }
.attach a { border-bottom: 0; }
.attach img.ph { display: block; max-width: 100%; height: auto; border: 1px solid #b6c7e0; background: #fff; }
.attach.file a { font-weight: bold; }
.attach.file img { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.sig { margin-top: 14px; font-size: 12px; line-height: 1.6; color: #333; }
.sig img.sep { display: block; height: 12px; margin-bottom: 4px; }
.tnav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 8px 0; font-size: 13px; }

/* search + about */
.pf { --pagefind-ui-scale: 0.95; --pagefind-primary: #4d76b3; --pagefind-ui-border-width: 1px; --pagefind-ui-border-radius: 3px;
  --pagefind-ui-image-fit: contain; --pagefind-ui-font: inherit; --pagefind-ui-text-size: 14px; margin: 8px 0 14px; }
.titles { margin: 18px 0 8px; font-size: 14px; }
.titles summary { cursor: pointer; color: var(--name); }
.search { border: 1px solid var(--border); background: var(--nav); padding: 12px; border-radius: 3px; margin: 8px 0; }
.search input[type=search] { width: 100%; max-width: 560px; padding: 6px 10px; font: inherit; border: 1px solid var(--border); }
.search .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.results li { margin: 6px 0; list-style: none; }
.results ul { margin: 8px 0; padding: 0; }
.results .where { font-size: 12px; color: var(--muted); }
.about { max-width: 820px; }
.about h2 { font-size: 17px; color: var(--name); margin: 20px 0 6px; }
.about table { margin: 8px 0; }
.about th, .about td { border: 1px solid var(--line); padding: 4px 10px; text-align: left; }
.about th { background: var(--row1); font-weight: normal; }
mark { background: #fff2a8; color: #000; }

@media (max-width: 640px) {
  .topbar { gap: 10px; padding: 8px 0 6px; }
  .topbar .logo img { width: 136px; height: 48px; }
  .brand h1 { font-size: 17px; }
  nav.main a { padding: 4px 10px; }
  .lb td.ico, .lb td.num, .lb td.last, .lb .col-ico { display: none; }
  .threadlist .last-s { display: block; }
  .threadlist .mini { display: none; }
  table.postbox, table.postbox tbody { display: block; }
  .postbox tr { display: flex; flex-direction: column; }
  .postbox td.au { display: flex; width: auto; flex-wrap: wrap; align-items: center; gap: 2px 8px; text-align: left; padding: 6px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .postbox .av { margin: 0; }
  .postbox .av img { width: 40px; max-height: 40px; }
  .postbox .nm { font-size: 14px; }
  .postbox .rk, .postbox .in { font-size: 11px; }
  .postbox td.bd { padding: 0 10px 10px; width: 100%; }
  .pc { font-size: 15px; }
  .tobar h2, .thead h2 { font-size: 16px; }
}
