/*=============================================
=                   Setup                   =
=============================================*/

xmp {
  display: none !important;
}

/*
button#main_menu_toggle {
  position: fixed;
  top: 0;
  right: 0;
  width: 3rem;
  height: 3rem;
  margin: var(--block-spacing-vertical) var(--block-spacing-horizontal);
  border-radius: 50%;
  box-shadow: var(--card-box-shadow);
  background-color: var(--base01);
  color: var(--base05);
}
*/
#main_menu li:empty {
  display: none;
}

blockquote>*:last-child {
  margin-bottom: 0;
}

#article-index {
  padding: var(--spacing);
  border-radius: var(--border-radius);
  background: var(--card-background-color);
  box-shadow: var(--card-box-shadow);
  border: none;
  position: sticky;
  top: 0;
  max-height: 50vh;
  overflow: auto;
  opacity: 0.95;
}

#article-index:not([open]):not(:hover):not(:focus-within) {
  opacity: .5;
}

ul.tree-view {
  display: block;
  margin: 0;
  padding: 0.25rem;
  font-size: inherit;
  font-family: inherit;
}

ul.tree-view li {
  list-style-type: none;
}

ul.tree-view a {
  text-decoration: none;
}

ul.tree-view a:visited {
  color: var(--base0E);
  /* 已访问颜色 */
}

ul.tree-view a:hover,
ul.tree-view a:focus {
  text-decoration: underline;
}

ul.tree-view li,
ul.tree-view ul {
  margin-top: 0.1875rem;
}

ul.tree-view ul {
  border-left: 1px dotted var(--base03);
  margin-left: 1rem;
  padding-left: 1rem;
}

ul.tree-view ul>li {
  position: relative;
}

ul.tree-view ul>li:before {
  border-bottom: 0.0625rem dotted var(--base03);
  content: "";
  display: block;
  left: -1rem;
  position: absolute;
  top: 0.6rem;
  width: 0.75rem;
}

ul.tree-view ul>li:last-child:after {
  background: var(--base00);
  bottom: 0;
  content: "";
  display: block;
  left: -1.25rem;
  position: absolute;
  top: 0.6rem;
  width: 0.25rem;
}

.tree-view time {
  font-size: 0.8em;
  opacity: .5;
}

ul.tree-view a.nsfw {
  opacity: 0.1;display:none
}

ul.tree-view a.nsfw:hover,
ul.tree-view a.nsfw:focus {
  opacity: 1;
}

pre>code {
  font-size: inherit;
}

/*============  End of Setup  =============*/

/*=============================================
=                   XP.css Custom                   =
=============================================*/

body {
  margin: 0;

  background-image: url(c39fd8c8f2f8aa2a12dac857fba27cae.jpg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: #3a6ea5;
}

h1 {
  font-size: 2em;
  font-weight: 600;
  line-height: 1.25;
  margin: 0.67em 0;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--base01);
}

h2 {
  font-size: 1.5em;
  font-weight: 600;
  line-height: 1.25;
  margin: 1em 0 0.5em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--base01);
}

h3 {
  font-size: 1.25em;
  font-weight: 600;
  line-height: 1.3;
  margin: 1em 0 0.5em;
}

h4 {
  font-size: 1em;
  font-weight: 600;
  line-height: 1.4;
  margin: 1em 0 0.5em;
}

h5 {
  font-size: 0.875em;
  font-weight: 600;
  line-height: 1.4;
  margin: 1em 0 0.5em;
  color: var(--base05);
}

h6 {
  font-size: 0.85em;
  font-weight: 600;
  line-height: 1.4;
  margin: 1em 0 0.5em;
  color: var(--base05);
}

p {
  font-size: 1rem;
  line-height: 1.5;
  margin: 1em 0;
}

blockquote {
  border-left: 4px solid var(--base01);
  padding: 0 1em;
  margin: 1em 0;
  font-style: normal;
}

ul,
ol {
  padding-left: 1.25em;
  margin: 0.5em 0;
  line-height: 1.5;
}

ul ul,
ul ol,
ol ul,
ol ol {
  margin: 0.25em 0;
}

small {
  font-size: 0.875em;
  line-height: 1.5;
  opacity: 0.8;
}

img {
  max-width: 100%;
  height: auto;
}

.window,
.status-bar-field,
input {
  font-size: 14px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

#main_window {
  max-width: 1024px;
  margin: 1em auto;
  z-index: 1;
}

#main_window .title-bar {
  user-select: none;
    height: 22px;
}

#main_window:not(.maximized) .title-bar-controls button[data-target="main_menu"] {
  display: none;
}

dialog#main_menu,
dialog#fake-button-dialog {
  border: none;
  background-color: transparent;
  z-index: 4;
}

dialog#main_menu .window-body {
  max-height: 75vh;
  overflow: auto;
  margin: 0 3px;
}

dialog#fake-button-dialog * {
  user-select: none;
}

.window-toolbar {
  border-top: 2px groove;
  padding-top: 4px;
  margin-top: 0;
  padding-bottom: 4px;
  margin-bottom: 0;
  user-select: none;
}

.window-menubar {
  margin: 4px 8px;
  word-spacing: 1em;
  user-select: none;
}

#main_window:hover .window-addressbar,
#main_window:focus-within .window-addressbar,
#main_window:hover .window-menubar,
#main_window:focus-within .window-menubar,
#main_window:hover .window-toolbar .fake-buttons,
#main_window:focus-within .window-toolbar .fake-buttons {
  opacity: 0.5;
}

.window-toolbar button {
  min-width: unset;
  font-size: 1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  min-height: unset;
  height: auto;
  padding: 0.5em;
  gap: 4px
}

.window-toolbar button:not(:hover):not(:focus):not(:active) {
  background: none;
  border-color: transparent
}

.window-toolbar button .icon {
  font-size: 1.5em;
}

.title-bar-text {
  /* 强制一行内容并用省略号 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}



#main_window .title-bar-text:after {
  content: " - Lynx TextBrowser Pro";
}

div#window-body {
  margin: 0 3px;
  border: 2px inset;
}

article#content {
  /* 顺序：最终窗口高-标题-菜单-工具栏-地址栏-状态栏-修正 */
  max-height: calc(768px - 28px - 18px - 48px - 24px - 24px - 29px);
  height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: white;
  padding: 1em;
  font-size: 1rem;
  line-height: 1.6;
}

article#content p {
  white-space: pre-wrap;
}

.window-addressbar {
  margin: 0 8px;
  display: flex;
  align-items: center;
  user-select: none;
}

.window-addressbar input {
  flex: 1;
}

.window-addressbar button {
  min-width: unset;
}

#main_window.minimized .window-body,
#main_window.minimized .status-bar {
  display: none !important;
}

#main_window.maximized #window-body {
  position: fixed;
  top: 28px;
  left: 0;
  width: 100vw;
  height: calc(100vh - 26px);
  box-sizing: border-box;
  z-index: 2;
  margin: 0;
}

#main_window.maximized article#content {
  max-height: unset;
  height: 100%;
  box-sizing: border-box;
}

#main_window.maximized .title-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
}

@media (max-width:640px) {
  .window *[aria-hidden="true"] {
    display: none;
  }

  article#content {
    max-height: unset;
    height: 75vh;
  }

  #main_window {
    margin: 0;
  }

  .window-addressbar input {
    display: none;
  }

  #main_window.maximized .window-menubar,
  #main_window.maximized .window-toolbar,
  #main_window.maximized .window-addressbar,
  #main_window.maximized .status-bar {
    display: none;
  }
}

/*=============  End of XP.css Custom  =============*/

/*=============================================
=                   Google Code Prettify                   =
=============================================*/

/* Ivory Light by Baskerville */
:root {
  --base00: #fef9ec;
  --base01: #c5c1b4;
  --base02: #a1a6b2;
  --base03: #00a4c1;
  --base04: #3e424d;
  --base05: #6d727e;
  --base06: #282c36;
  --base07: #282c36;
  --base08: #e75c58;
  --base09: #a08a00;
  --base0A: #208ffb;
  --base0B: #00a250;
  --base0C: #00a4c1;
  --base0D: #208ffb;
  --base0E: #d160c4;
  --base0F: #3e424d;
}

/* background */
pre,
code,
pre * {
  font-family: consolas, Menlo, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;

}

pre.prettyprinted,
pre {
  background-color: var(--base00);
  padding: .5em 1em;
  white-space: pre-wrap;
  word-break: break-all;
  border: 2px solid var(--base01);
}

pre ::selection {
  background-color: var(--base02);
  color: var(--base06);
}

/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
  margin-top: 0;
  margin-bottom: 0;
  color: var(--base01)
}

/* plaintext */
pre.prettyprinted,
pre,
pre .pln {
  color: var(--base05);
}

/* string */
pre .str {
  color: var(--base0B)
}

/* keyword */
pre .kwd {
  font-style: italic;
  color: var(--base0E)
}

/* comment */
pre .com {
  color: var(--base03)
}

/* type */
pre .typ {
  color: var(--base0A)
}

/* declaration */
pre .dec {
  color: var(--base0C)
}

/* literal */
pre .lit,
pre a {
  color: var(--base09)
}

/* punctuation */
pre .pun {
  color: var(--base04)
}

pre .opn,
pre .clo {
  color: var(--base0F)
}

/* variable */
pre .var {
  color: var(--base08)
}

/* html/xml tag */
pre .tag {
  color: var(--base08)
}

/* html/xml attribute name */
pre .atn {
  color: var(--base0D)
}

/* html/xml attribute value */
pre .atv {
  color: var(--base09)
}

/* Markup Italic */
em,
pre i,
pre em {
  color: var(--base0E)
}

/* Markup Bold */
strong,
pre b,
pre strong {
  color: var(--base0A)
}

/* Markup Quotes */
pre q,
pre blockquote {
  color: var(--base0C);
}

/* Diff Inserted */
ins,
pre ins {
  color: var(--base0B);
}

/* Diff Deleted */
del,
pre del {
  color: var(--base08);
}

/* Diff Changed */
mark,
pre mark {
  background-color: var(--base0A);
  color: var(--base00);
}

mark a {
  color: var(--base00);
}

/*============  End of Google Code Prettify  =============*/

/*============ 主页专用表格样式  =============*/

#content>.table:first-of-type {
  text-align: center;
}

#content>h1:first-of-type {
  text-align: center;
}

.table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

td.has-posts {
  box-shadow: 0 0 0 1px inset silver;
  font-weight: bold;
}

td.has-posts[data-posts]:after {
  content: " (" attr(data-posts) ")";
}

td.has-posts[data-posts="1"]:after {
  color: hsl(10, 100%, 50%);
}

td.has-posts[data-posts="2"]:after {
  color: hsl(20, 100%, 50%);
}

td.has-posts[data-posts="3"]:after {
  color: hsl(30, 100%, 40%);
}

td.has-posts[data-posts="4"]:after {
  color: hsl(40, 100%, 40%);
}

td.has-posts[data-posts="5"]:after {
  color: hsl(50, 100%, 40%);
}

td.has-posts[data-posts="6"]:after {
  color: hsl(60, 100%, 30%);
}

td.has-posts[data-posts="7"]:after {
  color: hsl(70, 100%, 30%);
}

td.has-posts[data-posts="8"]:after {
  color: hsl(80, 100%, 30%);
}

td.has-posts[data-posts="9"]:after {
  color: hsl(90, 100%, 30%);
}

td.has-posts[data-posts="10"]:after {
  color: hsl(100, 100%, 30%);
}

td.has-posts[data-posts="11"]:after {
  color: hsl(110, 100%, 30%);
}

td.has-posts[data-posts="12"]:after {
  color: hsl(120, 100%, 30%);
}

td.has-posts[data-posts="18"]:after {
  color: hsl(180, 100%, 35%);
}

td.has-posts[data-posts="29"]:after {
  color: hsl(290, 100%, 50%);
}

/*============  End of 主页专用表格样式  =============*/