@charset "UTF-8";

/*
   小过的布拉格 · Hacker News 风格
   适用于 Emacs Org mode 导出的默认 HTML 结构：
   #preamble / #content / #postamble / .outline-* / .org-src-container
*/

:root {
  --hn-orange: #ff6600;
  --hn-page: #f6f6ef;
  --hn-text: #000;
  --hn-muted: #828282;
  --hn-line: #d7d1be;
  --hn-link: #000;
  --hn-code: #f0eee5;
}

* { box-sizing: border-box; }

html {
  background: #fff;
  color: var(--hn-text);
  font-size: 10pt;
}

body {
  width: 760px;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: var(--hn-page);
  color: var(--hn-text);
  font-family: "LXGWWenKai", "LXGW WenKai", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

a {
  color: var(--hn-link);
  text-decoration: none;
}

a:visited { color: #4d4d4d; }
a:hover { text-decoration: underline; }

/* 顶部导航：用 Org 默认的 preamble 直接模拟 HN 顶栏。 */
#preamble {
  min-height: 24px;
  margin: 0;
  padding: 3px 7px;
  background: var(--hn-orange);
  color: #000;
  font-size: 13px;
  line-height: 18px;
}

#preamble a {
  margin: 0;
  color: #000;
  white-space: nowrap;
}

#preamble a + a::before {
  content: "  ";
  color: #000;
  text-decoration: none;
}

#preamble hr,
#postamble hr { display: none; }

/* 主内容保持紧凑、平整，没有博客卡片或阴影。 */
#content {
  width: 100%;
  margin: 0;
  padding: 10px 12px 16px;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  color: #000;
  font-family: inherit;
  font-weight: 600;
  line-height: 1.25;
}

h1.title {
  margin: 0 0 10px;
  padding: 0 0 5px;
  border-bottom: 1px solid var(--hn-line);
  font-size: 18px;
  text-align: left;
}

h1 { margin: 20px 0 6px; font-size: 17px; }
h2 { margin: 18px 0 5px; font-size: 16px; }
h3 { margin: 16px 0 4px; font-size: 15px; }
h4, h5, h6 { margin: 14px 0 3px; font-size: 14px; }

.outline-2, .outline-3, .outline-4, .outline-5, .outline-6 {
  margin: 0 0 14px;
}

p { margin: 0 0 9px; }

ul, ol {
  margin: 4px 0 10px;
  padding-left: 24px;
}

li { margin: 2px 0; }
ul { list-style: square; }

blockquote {
  margin: 9px 0;
  padding: 1px 0 1px 10px;
  border-left: 2px solid var(--hn-line);
  color: #4d4d4d;
}

blockquote p:last-child { margin-bottom: 0; }

/* Org 的代码块、示例和行内代码。 */
code, kbd, samp {
  padding: 1px 3px;
  background: var(--hn-code);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .92em;
}

pre, .example, .src, .org-src-container pre {
  margin: 8px 0 11px;
  padding: 8px 10px;
  border: 1px solid var(--hn-line);
  border-radius: 0;
  background: var(--hn-code);
  color: #111;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.4;
  overflow-x: auto;
}

pre.src { position: relative; }
pre.src::before {
  top: 0;
  right: 0;
  padding: 1px 4px;
  border: 0;
  border-left: 1px solid var(--hn-line);
  border-bottom: 1px solid var(--hn-line);
  border-radius: 0;
  background: #e5e1d8;
  color: var(--hn-muted);
  font-size: 10px;
}

pre code { padding: 0; background: transparent; }

table {
  width: auto;
  max-width: 100%;
  margin: 8px 0 12px;
  border-collapse: collapse;
  background: #fff;
  font-size: 13px;
}

th, td {
  padding: 4px 7px;
  border: 1px solid var(--hn-line);
  text-align: left;
  vertical-align: top;
}

th { background: #e5e1d8; font-weight: 600; }

.figure, figure { margin: 10px 0; }
img { max-width: 100%; height: auto; border: 0; border-radius: 0; }
.figure p, .figure-number, .caption { color: var(--hn-muted); font-size: 12px; }

.tag, .timestamp, .timestamp-wrapper, .org-info-js_info-navigation {
  color: var(--hn-muted);
  font-size: 12px;
}

.tag span { margin-left: 6px; }
.todo { color: #aa0000; font-weight: 700; }
.done { color: #4d4d4d; font-weight: 700; }
.priority { color: #aa0000; }

#table-of-contents {
  margin: 0 0 14px;
  padding: 7px 9px;
  border: 1px solid var(--hn-line);
  background: #f0eee5;
  font-size: 13px;
}

#table-of-contents h2 { margin: 0 0 4px; font-size: 14px; }
#table-of-contents ul { margin: 0; }

.footnotes {
  margin-top: 18px;
  padding-top: 8px;
  border-top: 1px solid var(--hn-line);
  color: #4d4d4d;
  font-size: 12px;
}

.org-dl { margin: 8px 0; }
.org-dl dt { font-weight: 600; }
.org-dl dd { margin: 0 0 5px 18px; }

hr { margin: 16px 0; border: 0; border-top: 1px solid var(--hn-line); }

/* 页脚采用 HN 常见的低调灰色。 */
#postamble {
  margin: 0;
  padding: 10px 12px 14px;
  border-top: 1px solid var(--hn-line);
  color: var(--hn-muted);
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

#postamble a { color: var(--hn-muted); }
#postamble a:hover { color: #000; }

@media (max-width: 767px) {
  body {
    width: 100%;
    margin: 0;
    font-size: 14px;
  }

  #preamble { padding: 5px 7px; line-height: 20px; }
  #content { padding: 9px 9px 14px; }
  h1.title { font-size: 17px; }
  table { display: block; overflow-x: auto; }
}
