/*
Theme Name: Simple Flat
Theme URI: https://example.com/simpleflat
Author: Grok
Description: 极简扁平化响应式博客主题。单栏布局，首页纯标题列表，阅读体验干净。
Version: 2.0.0
Requires at least: 5.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: simpleflat
Tags: blog, one-column, custom-menu, featured-images, threaded-comments, translation-ready, responsive-layout
*/

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: #2c2c2c;
  background: #fafafa;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: #2c2c2c;
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: #000; }

/* ---------- Layout ---------- */
#page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid #ececec;
  padding: 22px 0 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-branding {
  margin-bottom: 4px;
}

.site-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.site-title a { color: #111; }
.site-title a:hover { color: #444; }

.site-description {
  font-size: .8rem;
  color: #999;
  margin-top: 2px;
}

/* Nav */
.main-nav {
  border-top: 1px solid #f3f3f3;
  margin-top: 12px;
}
.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.4rem;
}
.main-nav a {
  display: block;
  padding: 11px 0;
  font-size: .9rem;
  font-weight: 500;
  color: #444;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
  color: #111;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 1.1rem;
  cursor: pointer;
  color: #333;
  position: absolute;
  top: 22px;
  right: 20px;
}

/* ---------- Content ---------- */
.site-content {
  flex: 1;
  padding: 32px 0 56px;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: .8rem;
  color: #999;
  margin-bottom: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  align-items: center;
}
.breadcrumbs a { color: #999; }
.breadcrumbs a:hover { color: #333; }
.breadcrumb-sep { color: #ccc; }
.breadcrumb-current { color: #666; }

/* ---------- Homepage title list ---------- */
.post-title-list {
  list-style: none;
}
.post-title-list li {
  border-bottom: 1px solid #f0f0f0;
}
.post-title-list li:last-child {
  border-bottom: none;
}
.post-title-list a {
  display: block;
  padding: 13px 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.45;
}
.post-title-list a:hover {
  color: #666;
}

/* ---------- Single / Page ---------- */
.entry-header {
  margin-bottom: 1.6rem;
}
.entry-title {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.02em;
  color: #111;
  margin-bottom: .6rem;
}
.entry-meta {
  font-size: .8rem;
  color: #999;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}
.entry-meta .sep { color: #ddd; }
.entry-meta a { color: #999; }
.entry-meta a:hover { color: #333; }

.entry-thumbnail {
  margin-bottom: 1.5rem;
  border-radius: 6px;
  overflow: hidden;
}

.entry-content {
  font-size: 1.02rem;
  line-height: 1.85;
  color: #2c2c2c;
}
.entry-content p { margin-bottom: 1.15rem; }
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin: 1.8rem 0 .7rem;
  font-weight: 650;
  color: #111;
  line-height: 1.35;
}
.entry-content h2 { font-size: 1.3rem; }
.entry-content h3 { font-size: 1.15rem; }
.entry-content ul,
.entry-content ol {
  margin: 0 0 1.15rem 1.4rem;
}
.entry-content blockquote {
  margin: 1.4rem 0;
  padding: .7rem 1.1rem;
  border-left: 3px solid #ddd;
  background: #f7f7f7;
  color: #555;
}
.entry-content a {
  color: #2563eb;
  border-bottom: 1px solid transparent;
}
.entry-content a:hover {
  border-bottom-color: #2563eb;
}
.entry-content img {
  border-radius: 4px;
  margin: 1.2rem 0;
}
.entry-content code {
  font-size: .9em;
  background: #f3f3f3;
  padding: .15em .4em;
  border-radius: 3px;
}
.entry-content pre {
  background: #1e1e1e;
  color: #e5e5e5;
  padding: 1rem 1.2rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.2rem 0;
  font-size: .9rem;
  line-height: 1.6;
}

/* Post nav */
.post-navigation {
  margin-top: 2.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: .9rem;
}
.post-navigation a { color: #555; }
.post-navigation a:hover { color: #111; }
.post-navigation .nav-subtitle {
  display: block;
  font-size: .75rem;
  color: #aaa;
  margin-bottom: 2px;
}

/* ---------- Pagination ---------- */
.pagination,
.nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2.2rem;
  padding-top: 1.4rem;
  border-top: 1px solid #eee;
}
.pagination a,
.pagination span,
.nav-links a,
.nav-links span {
  display: inline-block;
  padding: 6px 12px;
  font-size: .85rem;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  color: #555;
  background: #fff;
}
.pagination a:hover,
.nav-links a:hover {
  background: #f5f5f5;
  color: #111;
}
.pagination .current {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* ---------- Comments ---------- */
.comments-area {
  margin-top: 2.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid #eee;
}
.comments-title {
  font-size: 1.1rem;
  font-weight: 650;
  margin-bottom: 1.2rem;
  color: #111;
}
.comment-list { list-style: none; }
.comment {
  padding: 1rem 0;
  border-bottom: 1px solid #f3f3f3;
}
.comment:last-child { border-bottom: none; }
.comment-author { font-weight: 600; font-size: .9rem; margin-bottom: 2px; }
.comment-meta { font-size: .75rem; color: #999; margin-bottom: 6px; }
.comment-content { font-size: .92rem; color: #444; }
.comment-content p { margin-bottom: .5rem; }

.comment-respond { margin-top: 1.6rem; }
.comment-reply-title { font-size: 1.05rem; font-weight: 650; margin-bottom: .9rem; }
.comment-form label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  margin-bottom: 4px;
  color: #333;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: .92rem;
  font-family: inherit;
  margin-bottom: 12px;
  background: #fff;
}
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: #999;
}
.comment-form .submit {
  background: #111;
  color: #fff;
  border: none;
  padding: 9px 22px;
  border-radius: 5px;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
}
.comment-form .submit:hover { background: #333; }

/* ---------- Search form ---------- */
.search-form {
  display: flex;
  gap: 6px;
  margin-top: 1rem;
}
.search-form .search-field {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: .9rem;
  background: #fff;
}
.search-form .search-field:focus {
  outline: none;
  border-color: #999;
}
.search-form .search-submit {
  padding: 9px 16px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: .9rem;
  cursor: pointer;
}
.search-form .search-submit:hover { background: #333; }

/* ---------- 404 / empty ---------- */
.error-404,
.no-results {
  text-align: center;
  padding: 3rem 0;
}
.error-404 .page-title {
  font-size: 3.2rem;
  font-weight: 700;
  color: #111;
  margin-bottom: .4rem;
}
.page-title {
  font-size: 1.25rem;
  font-weight: 650;
  color: #111;
  margin-bottom: 1rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #fff;
  border-top: 1px solid #ececec;
  padding: 22px 0;
  text-align: center;
  font-size: .8rem;
  color: #999;
}
.site-footer a { color: #777; }
.site-footer a:hover { color: #333; }

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

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .site-header { padding: 16px 0 0; position: relative; }
  .site-header .wrap { position: relative; }
  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    margin-top: 8px;
  }
  .main-nav.toggled { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a {
    padding: 10px 0;
    border-bottom: 1px solid #f3f3f3;
  }
  .site-title { font-size: 1.2rem; padding-right: 48px; }
  .entry-title { font-size: 1.35rem; }
  .post-title-list a { font-size: 1rem; padding: 11px 0; }
  .site-content { padding: 24px 0 40px; }
  .wrap { padding: 0 16px; }
}
