/* ============================================================
   灵犀日报 · 内容页（/daily · /bid）组件层
   ------------------------------------------------------------
   设计语言：延续订阅页的深蓝渐变 + 毛玻璃卡片，
             在此基础上叠加「数据管道」科技感：网格底纹、扫描线、
             等宽控制-label、管道式步骤条、大字号 monospace 指标。
   硬性约束：
   1) CSP 为 style-src 'self'，**不允许内联样式**，所以本文件必须外链；
   2) 明暗由 assets/theme-init.js 按本地时间自动切换（07:00–19:00 浅色），
      本文件用 html[data-theme="day"|"night"] 双向适配，不写死颜色；
   3) 所有动效在 prefers-reduced-motion 下必须停止。
   ============================================================ */

/* ---------- 内容页 shell：覆盖订阅页的 520px 窄容器 ---------- */
body.pg {
    display: block;
    padding: 0;
    align-items: stretch;
}

.pg-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    padding: 0 20px 56px;
}

/* 无障碍：跳转到主内容 */
.pg-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 50;
    padding: 10px 16px;
    border-radius: 0 0 10px 0;
    background: #2563eb;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
}
.pg-skip:focus {
    left: 0;
}

/* ---------- 顶部导航 ---------- */
.pg-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
}
html[data-theme="day"] .pg-nav {
    background: rgba(255, 255, 255, .78);
    border-bottom-color: rgba(15, 23, 42, .08);
}
html[data-theme="night"] .pg-nav {
    background: rgba(11, 23, 48, .72);
    border-bottom-color: rgba(255, 255, 255, .10);
}

.pg-nav-inner {
    max-width: 880px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.pg-nav-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .5px;
    white-space: nowrap;
}
.pg-nav-brand img {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: block;
}
html[data-theme="day"] .pg-nav-brand { color: #0f172a; }
html[data-theme="night"] .pg-nav-brand { color: #f1f5f9; }

.pg-nav-links {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.pg-nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 9px;
    font-size: 13.5px;
    text-decoration: none;
    transition: background .18s ease, color .18s ease;
}
html[data-theme="day"] .pg-nav-links a { color: #475569; }
html[data-theme="night"] .pg-nav-links a { color: rgba(226, 232, 240, .78); }
html[data-theme="day"] .pg-nav-links a:hover { background: rgba(37, 99, 235, .10); color: #1d4ed8; }
html[data-theme="night"] .pg-nav-links a:hover { background: rgba(56, 189, 248, .14); color: #c7e6ff; }
.pg-nav-links a[aria-current="page"] { font-weight: 600; }

.pg-nav-cta {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 16px;
    border-radius: 9px;
    background: #2563eb;
    color: #fff !important;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: background .18s ease, transform .18s ease;
}
.pg-nav-cta:hover { background: #1d4ed8; transform: translateY(-1px); }

/* ---------- 通用 focus 可见环 ---------- */
.pg-nav a:focus-visible,
.pg-wrap a:focus-visible,
.pg-wrap summary:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
    border-radius: 8px;
}

/* ---------- Hero ---------- */
.pg-hero {
    padding: 56px 0 8px;
    text-align: center;
}

.pg-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    font-family: "SF Mono", "JetBrains Mono", "Roboto Mono", ui-monospace, monospace;
    font-size: 11.5px;
    letter-spacing: .18em;
    text-transform: uppercase;
}
html[data-theme="day"] .pg-eyebrow {
    background: rgba(37, 99, 235, .09);
    border: 1px solid rgba(37, 99, 235, .22);
    color: #1d4ed8;
}
html[data-theme="night"] .pg-eyebrow {
    background: rgba(56, 189, 248, .12);
    border: 1px solid rgba(56, 189, 248, .26);
    color: #9fd0ff;
}
.pg-eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 8px #38bdf8;
    animation: pg-pulse 1.8s ease-in-out infinite;
}
@keyframes pg-pulse {
    0%, 100% { opacity: .35; transform: scale(.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.pg-hero h1 {
    font-size: 34px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: .5px;
    margin-bottom: 12px;
}
html[data-theme="day"] .pg-hero h1 { color: #0f172a; }
html[data-theme="night"] .pg-hero h1 { color: #f8fafc; text-shadow: 0 2px 20px rgba(37, 99, 235, .5); }

.pg-hero p {
    font-size: 15.5px;
    line-height: 1.75;
    max-width: 640px;
    margin: 0 auto;
}
html[data-theme="day"] .pg-hero p { color: rgba(15, 23, 42, .70); }
html[data-theme="night"] .pg-hero p { color: rgba(226, 232, 240, .72); }

/* ---------- 标签行 ---------- */
.pg-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
}
.pg-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 12.5px;
}
html[data-theme="day"] .pg-chip {
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(15, 23, 42, .09);
    color: #475569;
}
html[data-theme="night"] .pg-chip {
    background: rgba(15, 23, 48, .70);
    border: 1px solid rgba(255, 255, 255, .13);
    color: rgba(226, 232, 240, .80);
}

/* ---------- 科技感分隔带（纯 CSS，无 canvas，主题自适应） ---------- */
.pg-techband {
    position: relative;
    height: 84px;
    margin: 34px 0 30px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid transparent;
    background-image:
        linear-gradient(90deg, rgba(56, 189, 248, .16) 1px, transparent 1px),
        linear-gradient(0deg, rgba(56, 189, 248, .12) 1px, transparent 1px);
    background-size: 34px 34px, 34px 34px;
}
html[data-theme="day"] .pg-techband {
    border-color: rgba(37, 99, 235, .18);
    background-color: rgba(255, 255, 255, .55);
    box-shadow: inset 0 0 30px rgba(37, 99, 235, .08);
}
html[data-theme="night"] .pg-techband {
    border-color: rgba(56, 189, 248, .20);
    background-color: rgba(13, 28, 56, .45);
    box-shadow: inset 0 0 34px rgba(37, 99, 235, .16);
}
/* 扫描线 */
.pg-techband::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 140px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, .28), transparent);
    animation: pg-scan 4.5s linear infinite;
}
@keyframes pg-scan {
    from { transform: translateX(-160px); }
    to { transform: translateX(900px); }
}
.pg-techband span {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    font-family: "SF Mono", "JetBrains Mono", "Roboto Mono", ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: .22em;
    text-transform: uppercase;
}
html[data-theme="day"] .pg-techband span { color: #1d4ed8; }
html[data-theme="night"] .pg-techband span { color: #9fd0ff; text-shadow: 0 0 12px rgba(56, 189, 248, .45); }

/* ---------- 区块标题 ---------- */
.pg-sec-head {
    margin: 40px 0 18px;
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.pg-sec-head h2 {
    font-size: 21px;
    font-weight: 700;
}
html[data-theme="day"] .pg-sec-head h2 { color: #0f172a; }
html[data-theme="night"] .pg-sec-head h2 { color: #f1f5f9; }
.pg-sec-head em {
    font-style: normal;
    font-family: "SF Mono", "JetBrains Mono", "Roboto Mono", ui-monospace, monospace;
    font-size: 11.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
}
html[data-theme="day"] .pg-sec-head em { color: #94a3b8; }
html[data-theme="night"] .pg-sec-head em { color: rgba(148, 163, 184, .8); }

/* ---------- 玻璃卡 ---------- */
.pg-card {
    padding: 22px 22px 20px;
    border-radius: 18px;
    border: 1px solid transparent;
    transition: transform .22s ease, box-shadow .22s ease;
}
html[data-theme="day"] .pg-card {
    background: rgba(255, 255, 255, .92);
    border-color: rgba(15, 23, 42, .08);
    box-shadow: 0 12px 34px rgba(15, 23, 42, .10);
}
html[data-theme="night"] .pg-card {
    background: rgba(15, 23, 42, .72);
    border-color: rgba(255, 255, 255, .13);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .42);
}
.pg-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}
html[data-theme="day"] .pg-card h3 { color: #0f172a; }
html[data-theme="night"] .pg-card h3 { color: #f1f5f9; }
.pg-card p {
    font-size: 13.5px;
    line-height: 1.75;
}
html[data-theme="day"] .pg-card p { color: #475569; }
html[data-theme="night"] .pg-card p { color: rgba(226, 232, 240, .70); }
/* 同卡片内相邻段落的呼吸间距（CSP 禁内联样式，只能走类） */
.pg-card p + p { margin-top: 10px; }

/* ---------- 能力 / 内容网格 ---------- */
.pg-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
}
@media (min-width: 680px) {
    .pg-grid--3 { grid-template-columns: repeat(3, 1fr); }
    .pg-grid--2 { grid-template-columns: repeat(2, 1fr); }
}

.pg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 18px;
    margin-bottom: 12px;
}
html[data-theme="day"] .pg-icon { background: rgba(37, 99, 235, .10); border: 1px solid rgba(37, 99, 235, .18); }
html[data-theme="night"] .pg-icon { background: rgba(56, 189, 248, .12); border: 1px solid rgba(56, 189, 248, .22); }

/* ---------- 指标行 ---------- */
.pg-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 680px) { .pg-stats { grid-template-columns: repeat(4, 1fr); } }

.pg-stat {
    padding: 16px 14px;
    border-radius: 14px;
    text-align: center;
    border: 1px solid transparent;
}
html[data-theme="day"] .pg-stat { background: rgba(255, 255, 255, .88); border-color: rgba(15, 23, 42, .08); }
html[data-theme="night"] .pg-stat { background: rgba(15, 23, 42, .66); border-color: rgba(255, 255, 255, .12); }
.pg-stat b {
    display: block;
    font-family: "SF Mono", "JetBrains Mono", "Roboto Mono", ui-monospace, monospace;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: .5px;
    line-height: 1.2;
}
html[data-theme="day"] .pg-stat b { color: #1d4ed8; }
html[data-theme="night"] .pg-stat b { color: #7dd3fc; }
.pg-stat small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
}
html[data-theme="day"] .pg-stat small { color: #64748b; }
html[data-theme="night"] .pg-stat small { color: rgba(148, 163, 184, .9); }

/* ---------- 管道步骤条 ---------- */
.pg-flow {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
    counter-reset: step;
}
@media (min-width: 780px) { .pg-flow { grid-template-columns: repeat(4, 1fr); } }

.pg-step {
    position: relative;
    padding: 18px 16px 16px;
    border-radius: 14px;
    border: 1px solid transparent;
}
html[data-theme="day"] .pg-step { background: rgba(255, 255, 255, .90); border-color: rgba(15, 23, 42, .08); }
html[data-theme="night"] .pg-step { background: rgba(15, 23, 42, .68); border-color: rgba(255, 255, 255, .12); }
/* 步骤间连接箭头（仅宽屏） */
@media (min-width: 780px) {
    .pg-step:not(:last-child)::after {
        content: "";
        position: absolute;
        right: -10px;
        top: 50%;
        transform: translateY(-50%);
        width: 14px;
        height: 2px;
        background: rgba(56, 189, 248, .55);
    }
}
.pg-step i {
    display: block;
    font-style: normal;
    font-family: "SF Mono", "JetBrains Mono", "Roboto Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: .18em;
    margin-bottom: 8px;
}
html[data-theme="day"] .pg-step i { color: #2563eb; }
html[data-theme="night"] .pg-step i { color: #7dd3fc; }
.pg-step strong {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    margin-bottom: 5px;
}
html[data-theme="day"] .pg-step strong { color: #0f172a; }
html[data-theme="night"] .pg-step strong { color: #f1f5f9; }
.pg-step span {
    font-size: 12.5px;
    line-height: 1.7;
}
html[data-theme="day"] .pg-step span { color: #64748b; }
html[data-theme="night"] .pg-step span { color: rgba(148, 163, 184, .9); }

/* ---------- 列表卡 ---------- */
.pg-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pg-list li {
    position: relative;
    padding: 9px 0 9px 26px;
    font-size: 13.5px;
    line-height: 1.75;
}
.pg-list li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 18px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, .8);
}
html[data-theme="day"] .pg-list li { color: #475569; }
html[data-theme="night"] .pg-list li { color: rgba(226, 232, 240, .72); }

/* ---------- 提示条 ---------- */
.pg-note {
    margin-top: 22px;
    padding: 18px 20px;
    border-radius: 14px;
    border: 1px solid transparent;
    border-left-width: 4px;
    font-size: 13.5px;
    line-height: 1.8;
}
html[data-theme="day"] .pg-note {
    background: rgba(254, 249, 232, .92);
    border-color: rgba(180, 83, 9, .35);
    color: #78350f;
}
html[data-theme="night"] .pg-note {
    background: rgba(69, 26, 3, .42);
    border-color: rgba(251, 191, 36, .55);
    color: #fde68a;
}
.pg-note strong { font-weight: 700; }

/* ---------- CTA 条 ---------- */
.pg-cta {
    margin-top: 40px;
    padding: 30px 26px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid transparent;
}
html[data-theme="day"] .pg-cta {
    background: rgba(255, 255, 255, .93);
    border-color: rgba(15, 23, 42, .09);
    box-shadow: 0 20px 50px rgba(15, 23, 42, .14);
}
html[data-theme="night"] .pg-cta {
    background: rgba(15, 23, 42, .76);
    border-color: rgba(255, 255, 255, .14);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .48);
}
.pg-cta h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}
html[data-theme="day"] .pg-cta h2 { color: #0f172a; }
html[data-theme="night"] .pg-cta h2 { color: #f1f5f9; }
.pg-cta p {
    font-size: 13.5px;
    margin-bottom: 20px;
}
html[data-theme="day"] .pg-cta p { color: #475569; }
html[data-theme="night"] .pg-cta p { color: rgba(226, 232, 240, .72); }

.pg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 30px;
    border-radius: 12px;
    background: #2563eb;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.pg-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(37, 99, 235, .38);
}
.pg-btn:focus-visible { outline: 2px solid #38bdf8; outline-offset: 3px; }

.pg-btn--ghost {
    margin-left: 10px;
    background: transparent;
    border: 1px solid transparent;
}
html[data-theme="day"] .pg-btn--ghost { border-color: rgba(15, 23, 42, .18); color: #334155; }
html[data-theme="night"] .pg-btn--ghost { border-color: rgba(255, 255, 255, .22); color: #e2e8f0; }
html[data-theme="day"] .pg-btn--ghost:hover { background: rgba(15, 23, 42, .05); }
html[data-theme="night"] .pg-btn--ghost:hover { background: rgba(255, 255, 255, .08); }

/* ---------- FAQ 折叠 ---------- */
.pg-faq {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid transparent;
}
html[data-theme="day"] .pg-faq { background: rgba(255, 255, 255, .90); border-color: rgba(15, 23, 42, .08); }
html[data-theme="night"] .pg-faq { background: rgba(15, 23, 48, .68); border-color: rgba(255, 255, 255, .12); }
.pg-faq details { border-bottom: 1px solid transparent; }
html[data-theme="day"] .pg-faq details { border-bottom-color: rgba(15, 23, 42, .07); }
html[data-theme="night"] .pg-faq details { border-bottom-color: rgba(255, 255, 255, .08); }
.pg-faq details:last-child { border-bottom: 0; }
.pg-faq summary {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 18px;
    cursor: pointer;
    font-size: 14.5px;
    font-weight: 600;
    list-style: none;
}
.pg-faq summary::-webkit-details-marker { display: none; }
.pg-faq summary::after {
    content: "+";
    margin-left: auto;
    font-family: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
    font-size: 17px;
    opacity: .6;
}
.pg-faq details[open] summary::after { content: "-"; }
html[data-theme="day"] .pg-faq summary { color: #0f172a; }
html[data-theme="night"] .pg-faq summary { color: #f1f5f9; }
.pg-faq p {
    padding: 0 18px 16px;
    font-size: 13.5px;
    line-height: 1.8;
}
html[data-theme="day"] .pg-faq p { color: #475569; }
html[data-theme="night"] .pg-faq p { color: rgba(226, 232, 240, .72); }

/* ---------- 交叉链接卡 ---------- */
.pg-cross {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}
@media (min-width: 680px) { .pg-cross { grid-template-columns: repeat(3, 1fr); } }
.pg-cross a {
    display: block;
    padding: 16px 16px 14px;
    border-radius: 14px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform .2s ease, background .2s ease;
}
html[data-theme="day"] .pg-cross a { background: rgba(255, 255, 255, .90); border-color: rgba(15, 23, 42, .08); }
html[data-theme="night"] .pg-cross a { background: rgba(15, 23, 48, .68); border-color: rgba(255, 255, 255, .12); }
.pg-cross a:hover { transform: translateY(-3px); }
.pg-cross strong { display: block; font-size: 14.5px; margin-bottom: 5px; }
html[data-theme="day"] .pg-cross strong { color: #0f172a; }
html[data-theme="night"] .pg-cross strong { color: #f1f5f9; }
.pg-cross small { font-size: 12.5px; }
html[data-theme="day"] .pg-cross small { color: #64748b; }
html[data-theme="night"] .pg-cross small { color: rgba(148, 163, 184, .9); }

/* ---------- 页脚 ---------- */
.pg-foot {
    margin-top: 34px;
    padding-top: 20px;
    text-align: center;
    font-size: 12.5px;
    border-top: 1px solid transparent;
}
html[data-theme="day"] .pg-foot { color: rgba(15, 23, 42, .55); border-top-color: rgba(15, 23, 42, .08); }
html[data-theme="night"] .pg-foot { color: rgba(226, 232, 240, .55); border-top-color: rgba(255, 255, 255, .10); }
.pg-foot a { text-decoration: none; }
html[data-theme="day"] .pg-foot a { color: #1d4ed8; }
html[data-theme="night"] .pg-foot a { color: #7dd3fc; }
.pg-foot a:hover { text-decoration: underline; }
.pg-foot-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 10px;
}

/* ---------- 动效降级：尊重系统偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
    .pg-techband::after,
    .pg-eyebrow::before {
        animation: none;
    }
    .pg-techband::after { display: none; }
    .pg-card:hover,
    .pg-cross a:hover,
    .pg-btn:hover { transform: none; }
}

/* ---------- 移动端收敛 ---------- */
@media (max-width: 520px) {
    .pg-hero { padding: 36px 0 4px; }
    .pg-hero h1 { font-size: 26px; }
    .pg-techband { height: 68px; margin: 26px 0 22px; }
    .pg-shell { padding: 0 16px 44px; }
    .pg-nav-inner { padding: 8px 16px; gap: 10px; }
    .pg-nav-brand span.pg-nav-word { display: none; }
}
