/* ==========================================================================
   AIBeige — Monevator 风格主题
   参照 monevator.com (Thesis classic-r skin) 精确复刻
   ========================================================================== */

/* ---------- reset ---------- */
* { margin: 0; padding: 0; }

html {
  word-break: break-word;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

h1, h2, h3, h4, h5, h6 { font-weight: normal; }

table { border-collapse: collapse; border-spacing: 0; }
img { border: 0; max-width: 100%; height: auto; display: block; }
iframe, video, embed, object { display: block; max-width: 100%; }
img[align=left]  { display: block; float: left; }
img[align=right] { display: block; float: right; }
img[align=middle]{ display: block; float: none; margin: 0 auto; }

input[type=submit], button { cursor: pointer; overflow: visible; -webkit-appearance: none; }

/* ---------- 变量 ---------- */
:root {
  --mv-blue: #1d4ba1;        /* 标题蓝 */
  --mv-link: #2361a1;        /* 链接蓝 */
  --mv-text: #111111;
  --mv-gray: #888888;
  --mv-line: #dddddd;
  --mv-box: #eeeeee;
  --mv-outer: #44443f;       /* 页面外围深灰 */
  --mv-border: #3e3e3a;      /* 容器描边 */
  --mv-serif: Georgia, "Times New Roman", "Songti SC", "STSong", "Noto Serif SC", SimSun, serif;
  --mv-ui: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mv-mono: Consolas, Menlo, Monaco, Courier, Verdana, monospace;
}

/* ---------- 基础 ---------- */
body {
  font-family: var(--mv-serif);
  font-size: 18px;
  line-height: 30px;
  color: var(--mv-text);
  background-color: var(--mv-outer);
  padding-top: 30px;
}

.container {
  width: 1024px;
  margin: 0 auto;
  background-color: white;
  border: 0.4em solid var(--mv-border);
}

/* ---------- 双栏 ---------- */
.columns { box-sizing: border-box; overflow: hidden; }
.columns > .content {
  box-sizing: border-box;
  width: calc(100% - 320px);  /* 自适应：容器变窄时左栏收缩，侧栏不再掉到底部 */
  float: left;
  border-width: 0 1px 0 0;
  border-style: solid;
  border-color: var(--mv-line);
  min-height: 600px;
}
.columns > .sidebar {
  box-sizing: border-box;
  width: 320px;
  float: right;
  padding: 30px 30px 0 30px;
}

/* ---------- 链接 ---------- */
a { color: var(--mv-link); text-decoration: none; }
p a { text-decoration: underline; }
p a:hover { text-decoration: none; }

/* ---------- 顶部小导航（右上角） ---------- */
.topnav {
  text-align: right;
  font-family: var(--mv-ui);
  font-size: 13px;
  line-height: 20px;
  padding: 6px 20px 0 20px;
  color: var(--mv-gray);
}
.topnav ul { list-style: none; display: inline; }
.topnav li { display: inline; }
.topnav a { color: var(--mv-gray); }
.topnav a:hover { color: var(--mv-text); }
.topnav .sep { color: var(--mv-line); padding: 0 4px; }

/* ---------- 站名 / 标语 ---------- */
.header {
  border-bottom: 3px double var(--mv-line);
  padding: 14px 30px 24px 30px;
}
#site_title {
  font-size: 47px;
  line-height: 1.31em;
  font-weight: bold;
  color: var(--mv-text);
}
#site_title a { color: var(--mv-text); }
#site_title a:hover { color: var(--mv-link); }
#site_title img {
  display: block;
  width: auto;
  max-height: 90px;
  max-width: 100%;
}
.header.has-logo #site_tagline { display: none; }
#site_tagline {
  font-size: 17px;
  color: var(--mv-gray);
  line-height: 1.6em;
  margin-top: 6px;
  max-width: 34em;
}

/* ---------- 水平菜单栏（灰色方块） ---------- */
.menu-wrap {
  position: relative;
  z-index: 50;
  border-bottom: 1px solid var(--mv-line);
  overflow: hidden;
}
.nav {
  position: relative;
  list-style: none;
  border-width: 0 0 1px 1px;
  border-style: solid;
  border-color: var(--mv-line);
}
.nav li {
  position: relative;
  float: left;
  margin-bottom: -1px;
}
.nav a {
  display: block;
  font-family: var(--mv-ui);
  font-size: 14px;
  line-height: 20px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--mv-text);
  background-color: var(--mv-box);
  padding: 9px 16px;
  border-width: 1px 1px 1px 0;
  border-style: solid;
  border-color: var(--mv-line);
  transition: background-color .12s ease;
}
.nav a:hover { background-color: var(--mv-line); }
.nav .nav-current > a {
  border-bottom-color: white;
  background-color: white;
}
.nav .sub-menu {
  display: none;
  position: absolute;
  z-index: 110;
  left: -1px;
  list-style: none;
  margin-top: -1px;
}
.nav .sub-menu li { width: 178px; clear: both; }
.nav li:hover > .sub-menu { display: block; }

.menu_control {
  display: none;
  font-family: var(--mv-ui);
  font-size: 14px;
  line-height: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--mv-text);
  padding: 9px 14px;
}

/* ---------- 文章排版（GRT） ---------- */
.grt h1, .grt .headline, h1.headline { font-size: 32px; line-height: 48px; }
.grt h1 { margin-bottom: 30px; }
.grt .headline, .headline { color: var(--mv-blue); margin: 0; }
.grt .headline a, .headline a { color: var(--mv-blue); }
.grt .headline a:hover, .headline a:hover { color: var(--mv-link); }
.grt h2, .grt h3, .grt h4 { color: var(--mv-blue); }
.grt h2 { font-size: 29px; line-height: 44px; margin-top: 49px; margin-bottom: 19px; }
.grt h3 { font-size: 23px; line-height: 36px; margin-top: 42px; margin-bottom: 12px; }
.grt h4 { font-size: 18px; line-height: 30px; font-weight: bold; margin-bottom: 7px; }
.grt h2:first-child, .grt h3:first-child { margin-top: 0; }
.grt ul { list-style-type: square; margin-left: 30px; margin-bottom: 30px; }
.grt ol { margin-left: 30px; margin-bottom: 30px; }
.grt ul li a { text-decoration: underline; }
.grt ul li a:hover { text-decoration: none; }
.grt blockquote {
  color: var(--mv-gray);
  padding-left: 19px;
  border-left: 1px solid var(--mv-line);
  margin-bottom: 30px;
}
.grt code, .grt pre, .grt kbd { font-size: 16px; font-family: var(--mv-mono); }
.grt code {
  background-color: rgba(0, 0, 0, 0.08);
  padding: 4px 5px;
  border-radius: 7px;
  margin: 0 1px;
}
.grt pre {
  background-color: var(--mv-box);
  padding: 19px 19px 19px 12px;
  border-left: 7px solid rgba(0, 0, 0, 0.15);
  overflow: auto;
  margin-bottom: 30px;
}
.grt p, .grt dl, .grt dd { margin-bottom: 30px; }
.grt li { margin-bottom: 7px; }
.grt img { margin-bottom: 30px; }
.grt table { margin-bottom: 30px; width: 100%; font-size: 16px; }
.grt th, .grt td { border: 1px solid var(--mv-line); padding: 7px 10px; text-align: left; }
.grt th { background-color: var(--mv-box); }
.grt hr { border: 0; border-top: 1px dotted var(--mv-line); margin: 30px 0; }

/* ---------- 文章条目 ---------- */
.post_box {
  padding: 30px 30px 0 30px;
  border-top: 1px dotted var(--mv-line);
}
.post_box.top { border-top: 0; }

.headline_area { margin-bottom: 7px; }

.byline { color: var(--mv-gray); font-family: var(--mv-ui); font-size: 14px; line-height: 22px; }
.byline a {
  color: var(--mv-gray);
  border-bottom: 1px solid var(--mv-line);
}
.byline a:hover { color: var(--mv-text); }
.byline .by-author, .byline .by-date {
  text-transform: uppercase;
  letter-spacing: 1px;
}
.byline .intro { font-style: italic; text-transform: none; letter-spacing: 0; }
.byline .by-date { margin-left: 6px; }

.teaser { margin-bottom: 30px; }
.teaser .excerpt-text { margin-bottom: 19px; }

.num_comments_link {
  display: inline-block;
  color: var(--mv-gray);
  text-decoration: none;
  margin-bottom: 30px;
  font-family: var(--mv-ui);
  font-size: 16px;
}
.num_comments_link:hover { background-color: var(--mv-box); }
.num_comments { font-size: 30px; color: var(--mv-text); }
.bracket { font-size: 30px; color: var(--mv-line); font-family: Georgia, serif; }

/* ---------- 归档页头 ---------- */
.archive_intro {
  border-bottom: 1px solid var(--mv-line);
  padding: 30px 30px 0 30px;
}
.archive_intro .headline { margin-bottom: 30px; }
.archive_intro .archive-desc { color: var(--mv-gray); margin-bottom: 30px; }

/* ---------- 分页 ---------- */
.prev_next {
  clear: both;
  padding: 0 30px 30px 30px;
  font-family: var(--mv-ui);
  font-size: 15px;
  overflow: hidden;
}
.prev_next a { border-bottom: 1px solid var(--mv-line); }
.prev_next .prev { float: left; }
.prev_next .next { float: right; }
.pagination { clear: both; padding: 0 30px 30px 30px; text-align: center; font-family: var(--mv-ui); font-size: 15px; }
.pagination .page-number { color: var(--mv-gray); margin-left: 14px; }
.pagination a { border-bottom: 1px solid var(--mv-line); }

/* ---------- 正文页附加 ---------- */
.post_tags {
  font-family: var(--mv-ui);
  font-size: 14px;
  color: var(--mv-gray);
  padding-top: 19px;
  border-top: 1px dotted var(--mv-line);
  margin: 0 30px 30px 30px;
}
.post_tags a { color: var(--mv-gray); border-bottom: 1px solid var(--mv-line); }
.post_tags a:hover { color: var(--mv-text); }

.prev_next_posts {
  overflow: hidden;
  padding: 19px 30px 30px 30px;
  border-top: 1px dotted var(--mv-line);
  font-family: var(--mv-ui);
  font-size: 15px;
  line-height: 24px;
}
.prev_next_posts .pn-label { color: var(--mv-gray); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.prev_next_posts .pn-prev { float: left; width: 48%; }
.prev_next_posts .pn-next { float: right; width: 48%; text-align: right; }

/* ---------- 侧栏 ---------- */
.sidebar {
  font-family: var(--mv-ui);
  font-size: 15px;
  line-height: 22px;
}
.sidebar .widget { margin-bottom: 44px; }
.sidebar .widget_title, .sidebar .headline {
  font-size: 22px;
  line-height: 32px;
  font-variant: small-caps;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--mv-text);
  padding-bottom: 4px;
  margin-bottom: 16px;
}
.sidebar p { margin-bottom: 22px; }
.sidebar ul { list-style-type: none; }
.sidebar ul li {
  background: url("data:image/gif;base64,R0lGODlhBgAEAIAAAP///////yH5BAAAAAAALAAAAAAGAAQAAAIMjB+gyc2snKtT0wUAOw==") left center no-repeat;
  padding-left: 1.5em;
  margin-bottom: 14px;
}
.sidebar ul li a { color: black; }
.sidebar ul li a:hover { text-decoration: underline; }
.sidebar .widget p a { color: var(--mv-link); }

.sidebar .email-box input[type="email"],
.sidebar .email-box input[type="text"] {
  box-sizing: border-box;
  width: 100%;
  margin-bottom: 14px;
  padding: 9px;
  font-family: var(--mv-ui);
  font-size: 15px;
  border: 1px solid #aaaaaa;
}
.sidebar .email-box button,
.sidebar .email-box input[type="submit"] {
  display: block;
  width: 100%;
  padding: 9px 14px;
  font-family: var(--mv-ui);
  font-size: 15px;
  background-color: var(--mv-link);
  border: 1px solid #1d4ba1;
  color: #fff;
  transition: background-color .12s ease;
}
.sidebar .email-box button:hover { background-color: var(--mv-blue); }

/* ---------- 页脚 ---------- */
.footer {
  clear: both;
  font-family: var(--mv-ui);
  font-size: 14px;
  line-height: 25px;
  color: var(--mv-gray);
  text-align: right;
  padding: 19px 30px;
  border-top: 3px double var(--mv-line);
}
.footer a { color: var(--mv-gray); }
.footer a:hover { color: var(--mv-text); }
.footer-nav {
  text-align: left;
  font-size: 13px;
  line-height: 22px;
  margin: 0 0 8px 0;
}
.footer-nav a { color: var(--mv-gray); border-bottom: 1px solid transparent; }
.footer-nav a:hover { color: var(--mv-text); border-bottom-color: var(--mv-line); }
.footer-nav .sep { color: var(--mv-line); padding: 0 4px; }

/* 仅屏幕阅读器与搜索引擎可见（用于归档页保留语义标题） */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.footer-legal {
  font-size: 13px;
  line-height: 22px;
  color: var(--mv-gray);
  text-align: left;
  margin: 0 0 10px 0;
}
.footer-legal a { color: var(--mv-gray); border-bottom: 1px solid var(--mv-line); }
.footer-legal a:hover { color: var(--mv-text); }

/* ---------- 评论 ---------- */
.comments-area { padding: 0 30px 30px 30px; border-top: 1px dotted var(--mv-line); }
.comments-area h3 { font-size: 23px; color: var(--mv-blue); margin-bottom: 19px; }

/* ---------- KG 卡片（Ghost 内容卡片兼容） ---------- */
.kg-card { margin-bottom: 30px; }
.kg-width-wide,
.kg-width-full {
  width: calc(100% + 60px);
  margin-left: -30px;
  max-width: none;
}
.kg-width-wide figcaption,
.kg-width-full figcaption {
  font-size: 14px;
  line-height: 24px;
  color: var(--mv-gray);
  text-align: center;
  margin-top: 7px;
}
.kg-image-card img { width: auto; max-width: 100%; margin: 0 auto; }
.kg-callout-card {
  background-color: var(--mv-box);
  border: 1px solid var(--mv-line);
  padding: 19px;
}
.kg-bookmark-card { border: 1px solid var(--mv-line); }
.kg-bookmark-card .kg-bookmark-container { display: block; padding: 19px; color: var(--mv-text); }
.kg-bookmark-title { font-weight: bold; }
.kg-bookmark-description { color: var(--mv-gray); font-size: 15px; }

/* ---------- 细节打磨 ---------- */
.headline a:hover { text-decoration: none; }
.grt figcaption,
.grt .kg-image-card figcaption {
  font-size: 14px;
  line-height: 24px;
  color: var(--mv-gray);
  margin-top: -19px;
  margin-bottom: 30px;
  text-align: center;
}
.grt .kg-gallery-card figcaption { margin-top: 7px; }
.grt figure { margin: 0 0 30px 0; }
.grt figure img { margin-bottom: 7px; }

/* 键盘可达性 */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--mv-link);
  outline-offset: 2px;
}

/* 首字下沉（仅西文，中文不套用） */
.grt .drop_cap::first-letter {
  font-size: 56px;
  line-height: 1;
  float: left;
  margin: 4px 10px 0 0;
}

/* 表格（Monevator 式淡黄行） */
.grt table th { background-color: #f0f0d8; }
.grt table tr:nth-child(even) td { background-color: #fafafa; }

/* 文章页正文与页脚留白 */
.post_box .grt.post_content > *:last-child { margin-bottom: 30px; }

/* 侧栏小字说明 */
.sidebar .widget > p:last-child { margin-bottom: 0; }

/* 评论框（Ghost 原生评论） */
.comments-area .gh-comments { font-family: var(--mv-ui); font-size: 15px; }

/* ---------- 防覆盖护栏 ----------
   后台代码注入里遗留的旧 CSS 会覆盖 body 背景 / a:hover，
   这里用更高优先级钉死主题核心视觉。 */
body { background-color: var(--mv-outer) !important; }
.nav a:hover, .topnav a:hover, .footer a:hover, .footer-legal a:hover,
.num_comments_link:hover, .menu_control:hover { text-decoration: none !important; }
.grt .headline a, .headline a, .grt h2, .grt h3 { color: var(--mv-blue) !important; }

/* ---------- 文末作者块与逐篇免责 ---------- */
.post_signoff {
  clear: both;
  margin: 0 30px 19px 30px;
  padding: 24px 26px 22px 26px;
  background-color: var(--mv-box);
  border-left: 4px solid var(--mv-blue);
}
.post_signoff p {
  font-family: var(--mv-serif);
  font-size: 16px;
  line-height: 27px;
  margin-bottom: 12px;
}
.post_signoff p:last-child { margin-bottom: 0; }
.post_signoff .signoff_title {
  font-family: var(--mv-ui);
  font-size: 13px;
  line-height: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--mv-gray);
  margin-bottom: 10px;
}
.post_signoff strong { font-weight: bold; }
.post_signoff .signoff_links {
  font-family: var(--mv-ui);
  font-size: 14px;
  color: var(--mv-gray);
}
.post_signoff .signoff_links a { border-bottom: 1px solid var(--mv-line); }
.post_signoff .signoff_links a:hover { color: var(--mv-text); }

.post_disclaimer {
  margin: 0 30px 24px 30px;
  padding-top: 14px;
  border-top: 1px dotted var(--mv-line);
  font-family: var(--mv-ui);
  font-size: 13px;
  line-height: 22px;
  color: var(--mv-gray);
}
.post_disclaimer a { border-bottom: 1px solid var(--mv-line); }

/* 署名行里的作者名不要被拉成宽字距 */
.byline .by-author { text-transform: none; letter-spacing: 0; }
.byline .by-date { text-transform: none; letter-spacing: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .container { width: 96%; }
}
@media (max-width: 900px) {
  body { padding-top: 0; }
  .columns > .content { width: 100%; float: none; border-right: 0; }
  .columns > .sidebar { width: 100%; float: none; padding: 30px; }
  .nav { display: none; }
  .menu_control { display: block; cursor: pointer; }
  .menu-open .nav { display: block; overflow: hidden; }
  .menu-open .nav li { float: none; }
  #site_title { font-size: 34px; }
  .grt h1, .grt .headline { font-size: 26px; line-height: 38px; }
  .grt h2 { font-size: 24px; line-height: 36px; }
}

/* --- 文章题图 --- */
.post_cover{margin:4px 0 4px}
.post_cover img{display:block;width:100%;height:auto;border:1px solid #ddd8cd;border-radius:2px}
