/* ==========================================================================
   中国经济时报 · 数字报    视觉层
   适用：首页 / 版面页（DigitaNewspaper.aspx）、文章页（articlecontent2.aspx）
   在页面内联 <style> 之后引入，用于统一排版、留白与控件样式。
   ========================================================================== */

:root {
    --brand: #ed261f;
    --brand-dark: #c81d17;
    --ink: #1f2328;
    --ink-2: #5b6470;
    --ink-3: #8a919c;
    --line: #e4ded4;
    --card: #fffdfa;
    --bg: #f4f1ea;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Microsoft YaHei", sans-serif !important;
    font-size: 14px !important;
    line-height: 1.7;
    color: var(--ink);
    background: var(--bg) !important;
}

a { color: #1f4e79 !important; }
a:hover { color: var(--brand) !important; }

/* ---------- 报头：灰带换成一条干净的分隔条 ---------- */
/* 原来是一个 100px 灰块 + top-l1/top-l2 两张切片拼的深色带，
   左边切片带斜切角、右边是直角，不对称。这里改成一条通栏分隔条。 */
div[style*="background-color:#686868"] {
    display: block !important;
    height: 4px !important;
    background: var(--brand) !important;
    background-image: none !important;
}
td[style*="top-l1.jpg"],
td[style*="top-l2.jpg"] { display: none !important; }
td[style*="background-color:#686868"],
table[style*="#686868"] { background: transparent !important; }

/* 搜索条：两栏各占一半、各自居中，左右对称 */
table[style*="height: 38px"] {
    height: auto !important;
    border-collapse: collapse;
}
table[style*="height: 38px"] td {
    width: 50% !important;
    text-align: center !important;
    vertical-align: middle !important;
    padding: 16px 8px !important;
}

/* ---------- 搜索条 ---------- */
#_frm_sch input[type="text"],
#_frm_sch2 input[type="text"] {
    height: 34px !important;
    padding: 0 14px !important;
    border: 1px solid var(--line) !important;
    border-radius: 18px !important;
    background: #fff !important;
    color: var(--ink) !important;
    font-size: 13px !important;
    box-sizing: border-box;
    outline: none;
}
#_frm_sch input[type="text"]:focus,
#_frm_sch2 input[type="text"]:focus { border-color: var(--brand) !important; }

#_frm_sch input[type="submit"],
#_frm_sch2 input[type="submit"] {
    height: 34px !important;
    padding: 0 18px !important;
    margin-left: 6px;
    border: 0 !important;
    border-radius: 18px !important;
    background: var(--brand) !important;
    color: #fff !important;
    font-size: 13px !important;
    cursor: pointer;
}
#_frm_sch input[type="submit"]:hover,
#_frm_sch2 input[type="submit"]:hover { background: var(--brand-dark) !important; }

/* ---------- 书页里的版面目录 ---------- */
div[style*="line-height: 24px"] {
    padding: 3px 6px !important;
    border-radius: 6px;
}
div[style*="line-height: 24px"]:hover { background: #f6f0e4; }
div[style*="line-height: 24px"] a {
    font-size: 14px !important;
    color: #2c333a !important;
}
div[style*="line-height: 24px"] a:hover { color: var(--brand) !important; }
/* 去掉年代感很强的绿色小箭头，改为品牌色圆点 */
div[style*="line-height: 24px"] img { display: none !important; }
div[style*="line-height: 24px"] a::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--brand);
    vertical-align: middle;
}

/* ---------- 近期回顾（期号表格） ---------- */
#footer1_dl_jqhg {
    border: 1px solid var(--line) !important;
    border-radius: 10px;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #fff;
    overflow: hidden;
}
#footer1_dl_jqhg td {
    border: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    border-right: 1px solid var(--line) !important;
    height: 42px !important;
    font-size: 13px;
}
#footer1_dl_jqhg tr:last-child td { border-bottom: 0 !important; }
#footer1_dl_jqhg td:last-child { border-right: 0 !important; }
#footer1_dl_jqhg tr:nth-child(even) td { background: #faf8f4; }
#footer1_dl_jqhg tr:hover td { background: #f3ece1; }
#footer1_dl_jqhg a { color: #4a5560 !important; }
#footer1_dl_jqhg a:hover { color: var(--brand) !important; }

/* ---------- 文章页：面包屑 / 上下篇 ---------- */
div[style*="width: 680px"] {
    font-size: 13px;
    color: var(--ink-3);
}
div[style*="width: 680px"] a { color: var(--ink-2) !important; }
div[style*="width: 680px"] a:hover { color: var(--brand) !important; }

#hl_pre1, #hl_next1, #hl_pre, #hl_next {
    display: inline-block;
    padding: 3px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    font-size: 13px;
    background: #fff;
}
#hl_pre, #hl_next { margin-right: 8px; }

/* ---------- 文章页：正文卡片 ---------- */
div[style*="width: 620px"] {
    border: 1px solid var(--line) !important;
    border-radius: 12px;
    background: var(--card) !important;
    background-image: none !important;
    padding: 26px 32px 30px !important;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

/* 标题组 */
.title_2 {
    font-family: inherit !important;
    font-weight: 500 !important;
    font-size: 17px !important;
    color: var(--ink-2) !important;
    letter-spacing: .04em;
    margin: 0 !important;
}
.title_1 {
    font-family: inherit !important;
    font-size: 30px !important;
    line-height: 1.45 !important;
    letter-spacing: .01em;
    color: var(--ink) !important;
    margin: 8px 0 12px !important;
}

/* 来源 / 日期 / 作者 / 浏览量 */
div[style*="font-size: 11px"] {
    font-size: 13px !important;
    color: var(--ink-3) !important;
    margin-top: 12px !important;
}
div[style*="font-size: 11px"] a { color: var(--ink-3) !important; }
div[style*="font-size: 11px"] span { margin-left: 12px; }
div[style*="font-size: 11px"] span:first-of-type { margin-left: 4px; }

/* 正文 */
.div_content {
    font-family: inherit !important;
    font-size: 17px !important;
    line-height: 1.95 !important;
    color: #22262b;
    text-align: justify;
    padding: 0 6px;
}
.div_content p {
    font-family: inherit !important;
    font-size: 17px !important;
    line-height: 1.95 !important;
    margin: 0 0 1em !important;
}
.div_content img { max-width: 100%; height: auto; }

.div_content_end {
    border-top: 1px solid var(--line) !important;
    padding-top: 14px;
    margin-top: 18px;
}

/* ---------- 文章页：右侧同版文章 ---------- */
div[style*="width: 315px"] {
    border: 1px solid var(--line) !important;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    padding-bottom: 12px;
    box-sizing: border-box;
}
#rep_vername {
    border-bottom: 0 !important;
    background: var(--brand);
    color: #fff !important;
    margin: 0 !important;
    padding: 12px 16px !important;
    width: auto !important;
}
#rep_vername h3 {
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 600;
    color: #fff;
    line-height: 1.5;
}
#rep_article { padding: 4px 18px 0 16px; }

/* JS 生成的条目写死了 width:300px + margin-left:10px，
   在卡片内边距之下会溢出被裁切，这里让它自适应 */
#rep_article > div {
    width: auto !important;
    margin-left: 0 !important;
}
#rep_article a { display: block; }
#rep_article a span { width: auto !important; }

/* 版面名后面的两个 <br> 收掉，避免红色标题栏过高 */
#rep_vername h3 br { display: none; }
#rep_article a {
    display: block;
    padding: 9px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 14px !important;
    color: #2c333a !important;
    line-height: 1.7;
    overflow-wrap: break-word;
    word-break: break-word;
}
#rep_article a:hover { color: var(--brand) !important; }

/* ---------- 首页右侧：本版文章目录 ---------- */
table[width="267"] {
    border: 1px solid var(--line) !important;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}
table[width="267"] td {
    background: #fff !important;
    background-image: none !important;
}
/* 原来的 61px 红色渐变抬头压成一条品牌色边 */
table[width="267"] tr:first-child td {
    height: 12px !important;
    background: var(--brand) !important;
}
table[width="267"] li {
    padding: 9px 0 !important;
    min-height: 0 !important;
    border-bottom: 1px dashed var(--line);
    line-height: 1.7 !important;
}
table[width="267"] li:last-child { border-bottom: 0; }
table[width="267"] li img { display: none !important; }
table[width="267"] li a {
    font-size: 14px !important;
    color: #2c333a !important;
}
table[width="267"] li a::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--brand);
    vertical-align: middle;
}
table[width="267"] li a:hover { color: var(--brand) !important; }

/* ---------- 页脚友链 ---------- */
.div_friendly_link {
    width: auto !important;
    border: 1px solid var(--line) !important;
    border-top: 2px solid var(--brand) !important;
    border-radius: 8px;
    background: #faf8f4 !important;
    padding: 10px 12px;
    line-height: 2 !important;
}
.div_friendly_link a {
    font-size: 12.5px !important;
    color: var(--ink-2) !important;
}
.div_friendly_link a:hover { color: var(--brand) !important; }

/* ==========================================================================
   搜索页（Search.aspx）
   ========================================================================== */
div[style*="1000px"] {
    width: auto !important;
    max-width: 900px !important;
    margin: 0 auto !important;
    padding: 0 18px;
    border-top: 0 !important;
    text-align: left !important;
}
div[style*="1000px"] > span {
    display: block;
    color: var(--ink-3) !important;
    font-size: 13px !important;
    margin: 18px 0 6px;
}
div[style*="1000px"] > div[style*="800px"] {
    width: auto !important;
    max-width: 900px !important;
    margin: 0 auto !important;
    padding: 18px 0 !important;
    border-bottom: 1px solid var(--line);
}
div[style*="1000px"] > div[style*="800px"] > a {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #1f4e79 !important;
    text-decoration: none !important;
    line-height: 1.6;
}
div[style*="1000px"] > div[style*="800px"] > a:hover {
    color: var(--brand) !important;
    text-decoration: underline !important;
}
div[style*="1000px"] > div[style*="800px"] > span {
    font-size: 14.5px !important;
    color: var(--ink-2) !important;
    line-height: 1.8 !important;
}
div[style*="1000px"] > div[style*="800px"] > span:first-child {
    color: var(--brand) !important;
    font-size: 13px !important;
    font-weight: 600;
}
div[style*="1000px"] > div[style*="800px"] > div {
    width: auto !important;
    text-align: left !important;
    margin-top: 6px !important;
}
div[style*="1000px"] > div[style*="800px"] > div a {
    font-size: 12.5px !important;
    color: var(--ink-3) !important;
    margin-right: 14px;
}
div[style*="1000px"] > div[style*="800px"] > div a:hover { color: var(--brand) !important; }

/* ==========================================================================
   作者聚合页（szb_alb.aspx）
   ========================================================================== */
#body_alb { background: var(--bg) !important; }

#alb_header {
    height: auto !important;
    padding: 30px 0 26px;
    background: var(--brand) !important;
    border-radius: 14px 14px 0 0;
}
#alb_author_name, .alb_author_name {
    color: #fff !important;
    font-size: 24px !important;
    font-weight: 600;
    margin: 0 !important;
    letter-spacing: .04em;
}
body > form > div.text-right.f-mt10 { display: none !important; }

#alb_container {
    border: 1px solid var(--line) !important;
    border-radius: 0 0 14px 14px;
    background: #fff !important;
    padding: 10px 22px 26px;
}
#alb_container table {
    width: 100% !important;
    border: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    border-collapse: separate;
    border-spacing: 0;
    padding-bottom: 6px;
}
#alb_container td { border: 0 !important; vertical-align: top; }
#alb_container h4 { margin: 6px 0 4px !important; }
#alb_container h4 a {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--ink) !important;
    text-decoration: none;
}
#alb_container h4 a:hover { color: var(--brand) !important; }
#alb_container > div > div > table > tbody > tr:last-child td {
    background: #faf8f4 !important;
    border-radius: 8px;
}
#alb_container a[style*="ActiveCaption"] {
    background: var(--brand) !important;
    color: #fff !important;
    font-size: 13px !important;
    height: 28px !important;
    line-height: 23px;
}

/* 作者页：标题左对齐，与列表风格一致 */
#alb_container div[style*="text-align: center"] { text-align: left !important; }

/* ---------- 内部预览版提示行 ----------
   top.ascx.cs 在发布版会把文字置空，但 <p> 仍带 height:40px，
   于是顶部留一条空白带。没文字时整行直接不占位。 */
p[id$="_ptext_internal_text"]:empty {
    display: none !important;
}
/* 有文字时（内部版）整理一下：居中、留出上下呼吸 */
p[id$="_ptext_internal_text"]:not(:empty) {
    text-align: center;
    line-height: 40px;
    margin: 0 !important;
}
