/*
Theme Name: Twenty Twelve Child Theme For Readnote
Theme URI: https://minuo.me/themes/twenty-twelve-child-theme-for-readnote
Template: twentytwelve
Author: Minuo.St
Author URI: https://minuo.me
Description: Twenty Twelve Child Theme For Readnote
Version: 1.0.1630631180
Updated: 2021-09-03 09:06:20
*/

/* ==========================================================================
   1. 高级字体栈与全局排版优化
   ========================================================================== */
html{
	font-size:100%;
}
body,
body.custom-font-enabled { 
    /* 核心：补全跨平台最优无衬线字体栈，强行覆盖主题可能存在的旧字体开关以确保全站统一 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 1rem;
    line-height: 1.85;
    overflow-wrap: break-word;

    /* 全平台高级文本平滑渲染 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-smoothing: antialiased;
    
    /* 现代排版特性：字距微调、标准连字，大幅提升长文可读性 */
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern", "liga", "calt";
    font-kerning: normal;
}

/* 标题文字：移除重复的 font-family（自然继承 body），专注雕琢形态 */
.entry-title,
.h1, .h2, .h3, .h4, .h5, .h6, 
h1, h2, h3, h4, h5, h6 {
    font-weight: 700; /* 700 足够沉稳有力，比 900 更具人文气，不易糊字 */
    line-height: 1.2;
    word-break: break-word;
    overflow-wrap: break-word;
    letter-spacing: 0.2px; /* 微调字距，使大字号标题凝聚力更强、更精致 */
}
.entry-header .entry-title{
	line-height:1.5;
}
.entry-content,
.entry-summary {
    font-weight: 400;
}
.entry-content p{
	line-height:1.85;
}

.entry-content h2 {
    color: #333; /* 相比纯黑，#333 正文标题更柔和温润 */
}

/* ==========================================================================
   2. 链接与导航样式
   ========================================================================== */
/* 合并冗余声明，优化文章内链接下划线动效 */
.site-content a:not(.button):not(.grid-item-thumbnail):not(.notusercontentlink) {
    position: relative;
    color: #3858e9;
    text-decoration: none;
    background-repeat: no-repeat;
    background-position: 100%;
    background-size: 100% 100%;
    background-image: linear-gradient(transparent calc(100% - 1px), #3858e9 1px);
    transition: all .2s;
}

.site-content a:hover:not(.button):not(.grid-item-thumbnail):not(.notusercontentlink) {
    background-size: 0 100%;
}

/* 合并主导航链接样式，精简字体栈保持纯净视觉 */
.main-navigation li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    position: relative;
    color: inherit;
	font-size:1rem;
    text-decoration: none;
    background-image: linear-gradient(transparent calc(100% - 2px), currentColor 2px);
    background-position: 0 -1rem;
    background-repeat: no-repeat;
    background-size: 0 100%;
    transition: background-size .2s, color .2s;
}

.main-navigation li a:hover {
    background-size: 100% 100%;
}

/* ==========================================================================
   3. 按钮与表单元素
   ========================================================================== */
/* 移除过时的浏览器私有前缀 (-moz-, -webkit-) */
button, .button {
    display: inline-block;
    margin: 0;
    padding: 1.175em 1.75em;
    color: #fff;
    background-color: #007c89;
    border: none;
    border-radius: .3rem;
    font-size: .8888em;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: opacity .15s linear;
}

button, .button:hover {
    color: #fff;
    text-decoration: underline;
}

.report-error-button {
    color: #088178;
    background-color: #f4f8fb;
    border-color: transparent;
}

.report-error-button:hover {
    color: #088178;
    text-decoration: underline;
}

/* 搜索表单 */
#searchform {
    display: inline-block;
    border: 1px solid #dfdfdf;
    width: 100%;
}

#searchform div {
    display: flex;
}

.widget-area #s {
    padding: 10px 10px;
    width: calc(100% - 65px);
    border: 0;
    color: #999;
    font-size: 12px;
}

.widget-area #s:focus {
    outline: none;
}

.widget-area #searchsubmit {
    display: inline-block;
    margin: 0 0 0 4px;
    padding: 5px 8px;
    width: 60px;
    height: 34px;
    background: #dfdfdf;
    border: 0;
    border-left: 1px solid #dfdfdf;
    border-radius: 0;
    box-shadow: none;
    font-weight: 500;
    text-transform: uppercase;
}

.widget-area #searchsubmit:hover {
    font-weight: 700;
}

/* ==========================================================================
   4. 小工具、评论与相关文章
   ========================================================================== */
.widget-title{
	    font-size: 16px;
    font-size:1rem;
}
.widget-area .widget.widget_tag_cloud li {
    line-height: 1.714285714;
}

.widget-area .widget li a,
.template-front-page .widget-area .widget li a {
    color: black;
}

.related-posts {
    margin-top: 5.142857143rem;
    padding-top: 1.714285714rem;
    border-top: 1px solid #ededed;
}

h2.related-posts-title {
    margin-top: 0;
    margin-bottom: 1.714285714rem;
    line-height: 1.714285714;
}

.related-posts li {
    margin-bottom: 8px;
    line-height: 1.714285714;
    list-style-type: square;
    list-style-position: inside;
}

.comments-area {
    margin-top: 5.142857143rem;
    padding-top: 1.714285714rem;
    border-top: 1px solid #ededed;
}

/* ==========================================================================
   5. 页面与文章布局
   ========================================================================== */
footer.entry-meta {
}

.category-ebooks .entry-header img.wp-post-image {
    max-width: 140px;
}

.entry-download-info-grid p {
    margin: 0 0 2.4rem 0; /* 合并 margin 简写，统一规范 */
	font-size:87.5%;
}

.download-link-buttons span {
    display: flex;
    justify-content: space-around;
}

.extra-byline-info {
    margin-top: 1rem;
    line-height: 1.5;
}

.entry-header {
    position: relative;
}

.entry-header span.post-id-for-logged-user {
    position: absolute;
    top: -3rem;
    right: 0;
    padding: .2em .4em;
    background-color: #1a1a1a;
    color: #efefef;
    font-size: 10px;
}

.entry-download-info {
    clear: both;
}

.book-author-description p.author-bio {
    margin: 0 0 1.714285714rem;
    line-height: 1.714285714;
}

.widget-area .widget p, .widget-area .widget li, .widget-area .widget .textwidget {
	font-size:87.5%;
	line-height:1.85;
}

/* ==========================================================================
   6. 首页网格布局 (Posts Grid)
   ========================================================================== */
.template-front-page #content {
    display: block;
    margin-bottom: 3.428571428rem;
    padding: 0 0 3.428571428rem;
    border-bottom: 1px solid #ededed;
    overflow: hidden;
}

.template-front-page .section {
    clear: both;
    margin-top: 3.428571428rem;
}

.template-front-page .homepage-results-row .section-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.template-front-page .section .section-top h2 {
    margin-bottom: 0;
    color: #343a3d;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    text-transform: none;
    text-align: left;
}

.posts-grid {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-left: -20px;
    padding: 0;
    width: calc(100% + 40px);
    line-height: 1.5;
}

.posts-grid .grid-item {
    width: calc(50% - 40px);
}

.grid-item {
    position: relative;
    margin: 0 20px 30px;
    border-radius: 6px;
}

.grid-item .grid-item-thumbnail {
    display: block;
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 166.66%; /* 相当于 3/5 比例 (5 / 3 * 100%) */
    border-radius: 0;
    overflow: hidden;
}

.section-computers-technology .grid-item .grid-item-thumbnail {
    padding-top: 123.45%; /* 相当于 405/500 比例 (500 / 405 * 100%) */
}

.section-best-sellers .grid-item .grid-item-thumbnail {
    padding-top: 151.51%; /* 相当于 330/500 比例 (500 / 330 * 100%) */
}

.section-nyt-best-sellers .grid-item .grid-item-thumbnail {
    padding-top: 75%; /* 相当于 624/468 -> 4/3 比例 (468 / 624 * 100%) */
}

/* 缩略图图片绝对定位填满父容器 */
.grid-item .grid-item-thumbnail__image,
.grid-item .grid-item-thumbnail__picture,
.grid-item .grid-item-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保证图片不变形 */
}

.grid-item .grid-item-thumbnail-actions__controls {
    position: absolute;
    top: 16px;
    right: 16px;
    margin: 0;
    display: block;
    background-color: #fff;
    border-radius: 4px;
}

.grid-item .grid-item-info {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 5px 0 0;
    width: 100%;
}

.grid-item .grid-item-details {
    width: 100%;
    overflow: hidden;
}

.grid-item .grid-item-details__title {
    display: inline-block;
    margin-bottom: 1rem;
    color: #383836;
    font-size: 16px;
    font-weight: 700;
}

.grid-item .grid-item-info__attribution {
    color: #899298;
    font-size: 14px;
    line-height: 1.3;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* ==========================================================================
   7. 响应式媒体查询 (Responsive Media Queries)
   ========================================================================== */
@media screen and (min-width: 600px) {
    body.template-front-page .site-content, 
    body.attachment .site-content, 
    body.full-width .site-content {
        padding: 0 0 3.428571428rem;
    }
    
    .widget-area {
        width: 31.25%;
    }
    
    .template-front-page.has-post-thumbnail article {
        width: 65.104166667%;
    }
    
    .entry-download-info-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .entry-download-info-grid > .columns {
        min-height: 250px;
    }
    
    .ads-content {
        width: 300px;
    }
    
    .download-info-content {
        padding-left: 30px;
        width: calc(100% - 330px);
    }
    
    .template-front-page.has-post-thumbnail .entry-page-image {
        width: 31.25%;
    }
    
    .template-front-page.has-post-thumbnail article .wp-block-quote cite {
        float: right;
        padding: 0 1rem;
    }
    
    .template-front-page.has-post-thumbnail article .wp-block-quote cite:before {
        padding-right: 1em;
        content: "-";
    }
    
    .widget-area .widget .textwidget.custom-html-widget {
        text-align: center;
    }
    
    .template-front-page .homepage-results-row .section-top {
        flex-wrap: nowrap;
    }
    
    .posts-grid .grid-item {
        width: calc(20% - 40px);
    }
    
    .grid-item .grid-item-info {
        padding: 10px 0 0;
    }
    
    .template-front-page.two-sidebars .widget-area .front-widgets,
    .template-front-page.two-sidebars .widget-area .front-widgets + .front-widgets {
        margin-top: 1.714285714rem;
    }
}

@media screen and (min-width: 1000px) {
    .template-front-page .section .section-top h2 {
        margin-bottom: 0;
        font-size: 22px;
    }
    
    .grid-item .grid-item-thumbnail-actions,
    .sp-product-card .product-card-thumbnail-actions {
        opacity: 0;
        pointer-events: none;
        transition: opacity .5s ease-in-out;
    }
}

@media screen and (min-width: 600px) {
    #custom_html-2 {
        position: sticky;
        top: 70px;
    }
}

.entry-header img.wp-post-image{
	width:200px;
}
/* 缩略图 + 广告 弹性布局 */
.thumbnail-ad-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}
/* 缩略图容器固定宽度 */
.post-thumbnail-wrap {
    flex-shrink: 0;
    width: 200px;
}
.post-thumbnail-wrap img {
    width: 100%;
    height: auto;
    display: block;
}
/* 广告区域自动占满剩余宽度 */
.thumbnail-ad-area {
    flex: 1;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* 手机端自适应：堆叠显示 */
@media (max-width: 600px) {
    .thumbnail-ad-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    .thumbnail-ad-area {
        width: 100%;
    }
}