/*
Theme Name: Twenty Twelve for Typecho
Theme URI: https://els.cc
Author: NP
Author URI: https://els.cc
Description: 模仿 WordPress Twenty Twelve 视觉风格的 Typecho 1.3.0 主题：灰底白卡、960px 双栏、蓝色链接、大写小工具标题、简洁克制的中文排版。
Version: 1.0.0
License: GPL-2.0-or-later
Tags: two-columns, responsive, blog, clean
*/

/* ========== 基础重置 ========== */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, dl, blockquote, pre, figure, form, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }
a { color: #21759b; text-decoration: none; }
a:hover, a:focus { color: #0f3647; }
button, input, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; border-spacing: 0; }

body {
    background: #e6e6e6;
    color: #444;
    font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    word-wrap: break-word;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    clip: rect(0 0 0 0); clip-path: inset(50%);
    overflow: hidden;
}

/* ========== 站点外框 ========== */
.site {
    max-width: 960px;
    margin: 48px auto;
    background: #fff;
    box-shadow: 0 2px 6px rgba(100, 100, 100, 0.25);
}

/* ========== 头部 ========== */
.site-header { padding: 40px 40px 0; }
.site-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
}
.site-title a { color: #515151; }
.site-title a:hover { color: #21759b; }
.site-description {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 400;
    color: #777;
}

/* 导航 */
.main-navigation { margin-top: 24px; }
.nav-menu { display: flex; flex-wrap: wrap; }
.nav-menu .menu-item { margin-right: 28px; }
.nav-menu .menu-item:last-child { margin-right: 0; }
.nav-menu a {
    display: block;
    padding: 10px 0;
    font-size: 14px;
    line-height: 1.4;
    color: #5e5e5e;
    border-bottom: 2px solid transparent;
}
.nav-menu a:hover, .nav-menu a:focus { color: #21759b; }
.nav-menu .current-menu-item a { color: #21759b; border-bottom-color: #21759b; }

/* ========== 主区域布局 ========== */
.wrapper {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    padding: 32px 40px 0;
}
.site-content { flex: 1 1 auto; min-width: 0; width: 66%; }
.widget-area { flex: 0 0 240px; width: 240px; }

/* ========== 文章列表 ========== */
.hentry { margin-bottom: 56px; }
.entry-header { margin-bottom: 20px; }
.entry-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.35;
}
.entry-title a { color: #222; }
.entry-title a:hover, .entry-title a:focus { color: #21759b; }
.archive-title {
    margin-bottom: 32px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.35;
    color: #222;
}
.entry-meta {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.8;
    color: #757575;
}
.entry-meta a { color: #757575; }
.entry-meta a:hover { color: #21759b; }
.entry-meta .sep { color: #bbb; padding: 0 2px; }
.entry-thumbnail { display: block; margin-bottom: 20px; }
.entry-thumbnail img { display: block; width: 100%; border-radius: 3px; }
.entry-summary { font-size: 16px; }
.entry-summary p { margin-bottom: 16px; }
.read-more { margin-top: 8px; }
.more-link { white-space: nowrap; }

/* ========== 正文排版 ========== */
.entry-content { font-size: 17px; line-height: 1.85; color: #333; }
.entry-content p { margin-bottom: 24px; }
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 {
    margin: 36px 0 16px;
    font-weight: 700;
    line-height: 1.4;
    color: #222;
}
.entry-content h1 { font-size: 26px; }
.entry-content h2 { font-size: 23px; }
.entry-content h3 { font-size: 20px; }
.entry-content h4 { font-size: 18px; }
.entry-content h5, .entry-content h6 { font-size: 16px; }
.entry-content ul, .entry-content ol { margin: 0 0 24px 28px; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 8px; }
.entry-content blockquote {
    margin-bottom: 24px;
    padding-left: 20px;
    border-left: 4px solid #ededed;
    font-style: italic;
    color: #555;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content a { text-decoration: underline; }
.entry-content a:hover { text-decoration: none; }
.entry-content img { border-radius: 2px; }
.entry-content figure { margin-bottom: 24px; }
.entry-content figcaption { margin-top: 8px; font-size: 13px; color: #757575; text-align: center; }
.entry-content hr { margin: 32px 0; border: 0; border-top: 1px solid #ededed; }
.entry-content table { width: 100%; margin-bottom: 24px; font-size: 15px; }
.entry-content th, .entry-content td { padding: 8px 12px; border: 1px solid #ededed; text-align: left; }
.entry-content th { background: #f7f7f7; font-weight: 700; }
.entry-content code {
    padding: 2px 6px;
    background: #f1f1f1;
    border-radius: 3px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.9em;
}
.entry-content pre {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #f7f7f7;
    border: 1px solid #ededed;
    border-radius: 3px;
    overflow-x: auto;
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
    line-height: 1.7;
}
.entry-content pre code { padding: 0; background: none; }
.alignleft { float: left; margin: 6px 24px 12px 0; }
.alignright { float: right; margin: 6px 0 12px 24px; }
.aligncenter { display: block; margin: 0 auto 24px; }
.entry-footer { margin-top: 24px; }
.no-results .entry-content p { margin-bottom: 20px; }

/* ========== 上下篇导航 ========== */
.nav-single {
    margin: -16px 0 48px;
    padding: 16px 0;
    border-top: 1px solid #ededed;
    border-bottom: 1px solid #ededed;
    font-size: 14px;
}
.nav-single span { display: block; margin: 6px 0; color: #757575; }
.nav-single a { color: #21759b; }

/* ========== 分页 ========== */
.page-navigator {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 48px;
    font-size: 14px;
}
.page-navigator li a, .page-navigator li > span {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #e2e2e2;
    border-radius: 3px;
    color: #5e5e5e;
    background: #fff;
}
.page-navigator li a:hover { border-color: #21759b; color: #21759b; }
.page-navigator li.current a, .page-navigator li.current > span {
    background: #21759b;
    border-color: #21759b;
    color: #fff;
}

/* ========== 侧边栏 ========== */
.widget { margin-bottom: 40px; font-size: 14px; }
.widget-title {
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #777;
}
.widget ul li { padding: 5px 0; line-height: 1.6; }
.widget ul li a { color: #5e5e5e; }
.widget ul li a:hover { color: #21759b; }
.widget ul.children, .widget-categories ul { margin-left: 16px; }
.tagcloud { line-height: 2; }
.tag-cloud-link { display: inline-block; margin: 0 10px 4px 0; }
.tag-count { color: #999; font-size: 12px; margin-left: 2px; }

/* 搜索表单 */
.search-form { display: flex; gap: 8px; margin-bottom: 8px; }
.search-field {
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    font-size: 14px;
}
.search-field:focus { outline: none; border-color: #21759b; box-shadow: 0 0 0 2px rgba(33, 117, 155, 0.12); }
.search-submit, .submit {
    flex: 0 0 auto;
    padding: 8px 18px;
    border: 1px solid #21759b;
    border-radius: 3px;
    background: #21759b;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}
.search-submit:hover, .submit:hover { background: #0f3647; border-color: #0f3647; }

/* ========== 评论区 ========== */
.comments-area { margin: 8px 0 48px; }
.comments-title { margin-bottom: 24px; font-size: 20px; font-weight: 700; color: #222; }
.comment-list { margin-bottom: 32px; }
.comment-list li { list-style: none; }
.comment-body {
    margin-bottom: 24px;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #ededed;
    border-radius: 3px;
    font-size: 14px;
}
.comment-body .comment-author { margin-bottom: 8px; }
.comment-author .avatar {
    float: left;
    width: 44px; height: 44px;
    margin-right: 12px;
    border-radius: 50%;
}
.comment-author .fn { font-weight: 700; font-style: normal; color: #333; }
.comment-author .fn a { color: #333; }
.comment-meta { font-size: 12px; color: #999; margin-bottom: 10px; }
.comment-meta a { color: #999; }
.comment-meta a:hover { color: #21759b; }
.comment-content p, .comment-body p { margin-bottom: 10px; }
.comment-reply { font-size: 13px; }
.comment-children, .comment-list .children { margin: 16px 0 0 24px; }
.comment-list > li > .comment-body:last-child { margin-bottom: 0; }
.bypostauthor > .comment-body { background: #f0f6f9; }

/* 评论表单 */
.respond { margin-top: 32px; }
.comment-reply-title { margin-bottom: 16px; font-size: 18px; font-weight: 700; color: #222; }
.cancel-comment-reply { margin-left: 12px; font-size: 13px; font-weight: 400; }
.comment-form p { margin-bottom: 14px; }
.comment-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #5e5e5e;
}
.comment-form label.required::after { content: " *"; color: #c00; }
.comment-form .text, .comment-form .textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    font-size: 14px;
}
.comment-form .text:focus, .comment-form .textarea:focus {
    outline: none;
    border-color: #21759b;
    box-shadow: 0 0 0 2px rgba(33, 117, 155, 0.12);
}
.comment-form .textarea { resize: vertical; }
.logged-in-as { font-size: 14px; color: #757575; }
.comments-closed { color: #757575; font-size: 14px; }

/* ========== 页脚 ========== */
#colophon { margin: 48px 40px 0; }
.site-info {
    padding: 24px 0 32px;
    border-top: 1px solid #ededed;
    text-align: center;
    font-size: 13px;
    line-height: 2;
    color: #777;
}
.site-info a { color: #777; }
.site-info a:hover { color: #21759b; }
.site-info .sep { color: #bbb; }
.footer-text { margin-bottom: 6px; }

/* ========== 响应式 ========== */
@media (max-width: 860px) {
    .widget-area { flex-basis: 200px; width: 200px; }
}
@media (max-width: 720px) {
    .site { margin: 0; box-shadow: none; }
    .site-header { padding: 28px 24px 0; }
    .wrapper { display: block; padding: 24px 24px 0; }
    .site-content, .widget-area { width: 100%; }
    .widget-area { margin-top: 8px; }
    .entry-title { font-size: 22px; }
    .entry-content { font-size: 16px; }
    #colophon { margin: 32px 24px 0; }
    .comment-children, .comment-list .children { margin-left: 12px; }
}
