@charset "UTF-8";
/* =============================================================================
 * 推荐阅读模块 · rec.css（v1）
 * -----------------------------------------------------------------------------
 * 上传目标：七牛 recommend/v1/rec.css（key 上传后不覆盖，改样式一律升版本）
 * 口径来源：docs/02-tech/03-推荐阅读模块-样式与资源.md §2（数值）、
 *           docs/02-tech/02-推荐阅读模块-产物规约.md §4（class 契约）
 *
 * 三条硬规则（改之前先看）：
 *   1. 不 @import、不引用官网任何 css/js/图片；颜色与尺寸只走 :root 的 --rec-*；
 *   2. CSS 内 url() 一律写相对本文件的路径（brand/xxx.jpg），不写域名 ——
 *      换 CDN 域名只改后台配置，本文件不用重传；
 *   3. 零 JS：导航下拉、hover 全部用 CSS；不做吸顶、不做回到顶部。
 * ========================================================================== */

/* ---------------------------------------------------------------- 1. 令牌 */
:root {
    --rec-color-brand: #00a0ea;
    --rec-color-brand-deep: #005ea4;
    --rec-color-text: #666666;
    --rec-color-title: #333333;
    --rec-color-muted: #999999;
    --rec-color-bg: #fafafa;
    --rec-color-surface: #ffffff;
    --rec-color-border: #e5e5e5;
    --rec-color-border-light: #e4e4e4;
    --rec-color-crumb-line: #e9e9e9;
    --rec-color-dash: #dcdcdc;
    --rec-color-footer-link: #c3c3c3;
    --rec-color-footer-text: #ffffff;

    --rec-font-sans: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;

    --rec-container: 1320px;
    --rec-main-margin: 20px;
    --rec-header-height: 100px;

    --rec-fz-nav: 16px;
    --rec-fz-title: 22px;
    --rec-fz-body: 16px;
    --rec-fz-footer-title: 20px;
    --rec-fz-footer-link: 15px;
    --rec-fz-copyright: 14px;

    --rec-lh-nav: 60px;
    --rec-lh-crumb: 50px;
    --rec-lh-title: 60px;
    --rec-lh-body: 27px;
    --rec-lh-footer: 40px;

    --rec-letter-spacing: 1px;
    --rec-text-indent: 2em;
    --rec-body-width: 90%;
}

/* ---------------------------------------------------------------- 2. reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--rec-font-sans);
    font-size: var(--rec-fz-body);
    color: var(--rec-color-text);
    background: var(--rec-color-bg);
    /* 明确不写 user-select:none：官网有，会让正文选不中，是缺陷 */
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--rec-color-brand);
}

ul,
ol {
    list-style: none;
}

img {
    border: 0;
    vertical-align: middle;
}

:focus-visible {
    outline: 2px solid var(--rec-color-brand);
    outline-offset: 2px;
}

/* ------------------------------------------------------- 3. 容器与页头 */
.rec-container,
.rec-header__inner,
.rec-crumb__inner,
.rec-footer__inner {
    width: var(--rec-container);
    max-width: 100%;
    margin: 0 auto;
}

.rec-header {
    background: var(--rec-color-surface);
    border-bottom: 1px solid var(--rec-color-border);
    /* 不做 position:fixed：本模块零 JS，固定页头会遮挡锚点与移动端内容 */
}

.rec-header__inner {
    display: flex;
    align-items: center;
    min-height: var(--rec-header-height);
}

.rec-header__logo {
    flex: 0 0 auto;
    display: block;
    margin-right: 40px;
}

.rec-header__logo img {
    /* 源图 480×70，按 56px 等比缩放；宽高由 HTML 属性兜底，防布局抖动 */
    height: 56px;
    width: auto;
}

.rec-nav {
    flex: 1 1 auto;
    min-width: 0;
}

.rec-nav__list {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    line-height: var(--rec-lh-nav);
    font-size: var(--rec-fz-nav);
}

.rec-nav__item {
    /* ★ 必须有：二级菜单是 position:absolute，父级缺这行会相对更外层祖先定位，下拉直接飘出页头 */
    position: relative;
    flex: 0 0 auto;
}

.rec-nav__link {
    display: block;
    padding: 0 18px;
    color: var(--rec-color-title);
    position: relative;
    white-space: nowrap;
}

.rec-nav__link::after {
    /* hover 下划线：对应官网 header.css 的 scaleX 效果，纯 CSS 实现 */
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 0;
    height: 3px;
    background: var(--rec-color-brand);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .2s ease;
}

.rec-nav__item:hover > .rec-nav__link,
.rec-nav__item--current > .rec-nav__link {
    color: var(--rec-color-brand);
}

.rec-nav__item:hover > .rec-nav__link::after,
.rec-nav__item--current > .rec-nav__link::after {
    transform: scaleX(1);
}

.rec-nav__sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100px;
    padding-bottom: 10px;
    background: var(--rec-color-surface);
    box-shadow: 0 0 5px rgba(0, 0, 0, .5);
    z-index: 20;
}

.rec-nav__item:hover .rec-nav__sub {
    display: block;
}

.rec-nav__sub li a {
    display: block;
    padding: 0 18px;
    line-height: 50px;
    font-size: var(--rec-fz-footer-link);
    color: var(--rec-color-title);
    white-space: nowrap;
}

.rec-nav__sub li a:hover {
    color: var(--rec-color-brand);
    background: var(--rec-color-bg);
}

/* ---------------------------------------------------------- 4. 面包屑 */
.rec-crumb {
    background: var(--rec-color-surface);
    border-bottom: 2px solid var(--rec-color-crumb-line);
    line-height: var(--rec-lh-crumb);
    font-weight: bold;
    font-size: var(--rec-fz-footer-link);
}

.rec-crumb__inner a {
    color: var(--rec-color-text);
}

.rec-crumb__inner a:hover {
    color: var(--rec-color-brand);
}

.rec-crumb__sep {
    margin: 0 10px;
    color: var(--rec-color-muted);
    font-weight: normal;
}

.rec-crumb__current {
    color: var(--rec-color-title);
}

/* ------------------------------------------------------------ 5. 主体 */
.rec-main {
    margin: var(--rec-main-margin) auto;
}

.rec-article,
.rec-list {
    background: var(--rec-color-surface);
    border: 1px solid var(--rec-color-border);
}

.rec-article {
    padding-bottom: 50px;
}

.rec-article__title {
    width: var(--rec-body-width);
    margin: 30px auto;
    font-size: var(--rec-fz-title);
    line-height: var(--rec-lh-title);
    font-weight: bold;
    color: var(--rec-color-title);
    text-align: center;
    border-bottom: 1px dashed var(--rec-color-dash);
}

.rec-article__meta {
    width: var(--rec-body-width);
    margin: -10px auto 20px;
    font-size: var(--rec-fz-copyright);
    line-height: 24px;
    color: var(--rec-color-muted);
    text-align: center;
}

/* ------------------------------------------------------- 6. 正文 */
.rec-article__body p,
.rec-article__body > span {
    width: var(--rec-body-width);
    margin: 15px auto;
    font-size: var(--rec-fz-body);
    line-height: var(--rec-lh-body);
    letter-spacing: var(--rec-letter-spacing);
    text-indent: var(--rec-text-indent);
    color: var(--rec-color-text);
}

.rec-article__body img {
    display: block;
    max-width: var(--rec-body-width);
    height: auto;
    margin: 15px auto;
}

.rec-article__body a {
    color: var(--rec-color-brand);
    text-decoration: underline;
}

.rec-article__body strong,
.rec-article__body b {
    font-weight: bold;
    color: var(--rec-color-title);
}

/* 编辑器标题下拉会产出 h2/h3（h1 由消毒器归一化掉），这里只管观感 */
.rec-article__body h2,
.rec-article__body h3 {
    width: var(--rec-body-width);
    margin: 26px auto 12px;
    line-height: 1.6;
    font-weight: bold;
    color: var(--rec-color-title);
    text-indent: 0;
}

.rec-article__body h2 {
    font-size: 20px;
}

.rec-article__body h3 {
    font-size: 18px;
}

.rec-article__body ul,
.rec-article__body ol {
    width: var(--rec-body-width);
    margin: 15px auto;
}

.rec-article__body ul {
    list-style: disc;
}

.rec-article__body ol {
    list-style: decimal;
}

.rec-article__body li {
    margin-left: 2em;
    line-height: var(--rec-lh-body);
    letter-spacing: var(--rec-letter-spacing);
}

.rec-article__body blockquote {
    width: var(--rec-body-width);
    margin: 15px auto;
    padding: 10px 16px;
    border-left: 3px solid var(--rec-color-brand);
    background: var(--rec-color-bg);
}

.rec-article__body blockquote p {
    width: 100%;
    margin: 6px 0;
    text-indent: 0;
}

.rec-article__body table {
    width: var(--rec-body-width);
    margin: 15px auto;
    border-collapse: collapse;
    font-size: var(--rec-fz-footer-link);
}

.rec-article__body th,
.rec-article__body td {
    padding: 8px 10px;
    border: 1px solid var(--rec-color-border);
    line-height: 1.7;
    text-align: left;
    text-indent: 0;
}

.rec-article__body th {
    background: var(--rec-color-bg);
    color: var(--rec-color-title);
    font-weight: bold;
}

.rec-article__footer {
    width: var(--rec-body-width);
    margin: 30px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--rec-color-border-light);
}

.rec-article__back {
    color: var(--rec-color-brand);
    font-size: var(--rec-fz-footer-link);
}

.rec-article__back:hover {
    text-decoration: underline;
}

/* ------------------------------------------------------- 7. 列表页 */
.rec-list {
    padding: 40px 0;
}

.rec-list > h1 {
    width: var(--rec-body-width);
    margin: 0 auto 30px;
    font-size: var(--rec-fz-title);
    line-height: var(--rec-lh-title);
    font-weight: bold;
    color: var(--rec-color-title);
    text-align: center;
    border-bottom: 1px dashed var(--rec-color-dash);
}

.rec-list__item {
    width: var(--rec-body-width);
    margin: 0 auto;
    padding: 18px 0;
    border-bottom: 1px solid var(--rec-color-border-light);
}

.rec-list__item:last-child {
    border-bottom: none;
}

.rec-list__title {
    margin: 0;
    font-size: 18px;
    line-height: 30px;
    font-weight: bold;
}

.rec-list__link {
    color: var(--rec-color-title);
}

.rec-list__link:hover {
    color: var(--rec-color-brand);
}

.rec-list__date {
    margin-top: 6px;
    font-size: var(--rec-fz-copyright);
    line-height: 24px;
    color: var(--rec-color-muted);
}

.rec-list__desc {
    margin-top: 6px;
    font-size: var(--rec-fz-footer-link);
    line-height: 26px;
    color: var(--rec-color-text);
}

/* 0 篇空态是 .rec-list 的直接子元素（不在 __item 里），单独补宽度与居中 */
.rec-list > .rec-list__desc {
    width: var(--rec-body-width);
    margin: 0 auto;
}

/* ---------------------------------------------------------- 8. 页脚 */
.rec-footer {
    /* url() 相对本文件解析：rec.css 在 recommend/v1/，图片在 recommend/v1/brand/ */
    background: url("brand/footer-bg.jpg") center top / cover no-repeat;
    color: var(--rec-color-footer-text);
    min-height: 410px;
    margin-top: 30px;
}

.rec-footer__inner {
    display: flex;
    align-items: flex-start;
    padding-top: 60px;
    /* 不用 float：清浮动不到位会让 min-height:410 失效、背景塌成一条 */
}

.rec-footer__col {
    flex: 0 0 auto;
}

.rec-footer__col--contact {
    flex-basis: 400px;
}

.rec-footer__col--qr {
    flex-basis: 500px;
    text-align: center;
}

.rec-footer__col--links {
    flex-basis: 400px;
    display: flex;
    flex-direction: column;
}

.rec-footer__col p {
    line-height: var(--rec-lh-footer);
    font-size: var(--rec-fz-footer-link);
}

.rec-footer__col--qr img {
    display: block;
    margin: 0 auto 10px;
}

.rec-footer__col a {
    color: var(--rec-color-footer-link);
    font-size: var(--rec-fz-footer-link);
    line-height: var(--rec-lh-footer);
}

.rec-footer__col a:hover {
    color: var(--rec-color-footer-text);
}

.rec-footer__copyright {
    margin-top: 40px;
    padding-bottom: 20px;
    font-size: var(--rec-fz-copyright);
    line-height: 28px;
    text-align: center;
    color: var(--rec-color-footer-text);
}

/* ---------------------------------------------------------- 9. 响应式 */
/* 断点直接写字面量：CSS 变量不能用于 @media 条件，写了整条规则会失效 */
@media (max-width: 1024px) {
    .rec-header__inner,
    .rec-crumb__inner,
    .rec-container,
    .rec-footer__inner {
        width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }

    .rec-header__inner {
        flex-wrap: wrap;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .rec-nav__list {
        flex-wrap: wrap;
        justify-content: flex-start;
        line-height: 44px;
    }

    .rec-nav__link {
        padding: 0 12px;
    }

    .rec-nav__link::after {
        left: 12px;
        right: 12px;
    }

    /* 三栏定宽 1300 在 1024 下必然溢出，改为按比例收缩 */
    .rec-footer__col--contact,
    .rec-footer__col--qr,
    .rec-footer__col--links {
        flex: 1 1 auto;
        min-width: 0;
    }

    .rec-footer__inner {
        padding-top: 40px;
    }
}

@media (max-width: 768px) {
    /* 页头改为上下堆叠：logo 固定 288px 宽，留在 flex 行里会把导航挤到几十像素，
       导航项 nowrap 溢出后整页出现横向滚动条（实测 375px 下正文、表格、页脚全被切）。 */
    .rec-header__inner {
        display: block;
        min-height: 0;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .rec-header__logo {
        display: inline-block;
        margin: 0 0 8px;
    }

    .rec-header__logo img {
        height: 42px;
    }

    .rec-nav {
        width: 100%;
    }

    .rec-nav__list {
        flex-direction: column;
        align-items: stretch;
        line-height: 40px;
    }

    .rec-nav__link {
        padding: 0 12px;
    }

    .rec-nav__sub {
        position: static;
        box-shadow: none;
        padding-bottom: 0;
        background: var(--rec-color-bg);
    }

    .rec-nav__sub li a {
        line-height: 40px;
    }

    .rec-article__title,
    .rec-list > h1 {
        font-size: 18px;
        line-height: 40px;
    }

    .rec-article__body p,
    .rec-article__body > span,
    .rec-article__body h2,
    .rec-article__body h3,
    .rec-article__body ul,
    .rec-article__body ol,
    .rec-article__body blockquote,
    .rec-article__body table,
    .rec-article__footer,
    .rec-article__title,
    .rec-article__meta,
    .rec-list > h1,
    .rec-list__item,
    .rec-list > .rec-list__desc {
        width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }

    /* padding 会撑破 100% 宽，表格单独处理 */
    .rec-article__body table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .rec-article__body p,
    .rec-article__body > span {
        text-indent: 0;
    }

    /* 上面统一给了左右 16px 内边距，引用块内的 p 不再重复缩进 */
    .rec-article__body blockquote p {
        padding-left: 0;
        padding-right: 0;
    }

    .rec-footer {
        background-image: url("brand/footer-bg-m.jpg");
        background-size: cover;
        min-height: 0;
    }

    .rec-footer__inner {
        display: block;
        padding-bottom: 10px;
    }

    .rec-footer__col--contact,
    .rec-footer__col--qr,
    .rec-footer__col--links {
        width: 100%;
        flex: none;
        text-align: center;
    }

    .rec-footer__col--links {
        align-items: center;
    }

    .rec-footer__copyright {
        margin-top: 20px;
    }
}
