/* ============================================================================
   话题广场 · 发现区 + 发布三选一（2026-11-15 · D113 B1~B3 / A2）
   ----------------------------------------------------------------------------
   - 独立文件，**不改 square.css**：那份还被 news/library 引用，改它等于动别的页；
   - 视觉对齐原型 f5-newscard / f5-main / f5-wait（红=资讯、蓝=讨论、浅蓝=待答），
     但类名统一 sq- 前缀并按「父容器 + 子元素」两层写，避免和既有卡片选择器互相命中；
   - 发现区只在「发现」分区可见，显隐由 discover.js 控制（默认不写死 display:none，
     否则关 JS 的 SSR 直出块也会被隐藏）。
   ========================================================================== */

/* ---------- 发布三选一（原型 .tb-ptabs） ---------- */
.sq-pub-choice {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.sq-pub-choice-btn {
    border: 1px solid #cfe0d5;
    background: #fff;
    color: #3c4a58;
    border-radius: 7px;
    padding: 5px 11px;
    font-size: 12px;
    line-height: 1.4;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

.sq-pub-choice-btn small {
    color: #9aa7b2;
    margin-left: 5px;
    font-size: 11px;
}

.sq-pub-choice-btn:hover {
    border-color: #188038;
    color: #188038;
}

.sq-pub-choice-btn.on {
    background: #188038;
    border-color: #188038;
    color: #fff;
}

.sq-pub-choice-btn.on small {
    color: #d8ecdf;
}

/* ---------- 发现区容器 ---------- */
.sq-disc-wrap {
    margin-bottom: 14px;
}

/* ---------- B1 今日资讯卡（红系，对齐原型 .f5-newscard） ---------- */
.sq-disc-news {
    border: 1px solid #f3d6d2;
    background: linear-gradient(180deg, #fffafa, #fff);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.sq-disc-news .sq-disc-nh {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #c0392b;
    font-weight: bold;
    margin-bottom: 9px;
}

.sq-disc-news .sq-disc-nh span {
    font-weight: normal;
    color: #9aa7b2;
    font-size: 11px;
}

.sq-disc-news .sq-disc-nt {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: #1f2d3d;
    line-height: 1.55;
    text-decoration: none;
}

.sq-disc-news .sq-disc-nt:hover {
    color: #c0392b;
}

.sq-disc-news .sq-disc-nex {
    font-size: 13px;
    color: #4a5866;
    line-height: 1.8;
    margin: 8px 0 10px;
    background: #fff;
    border: 1px solid #f0e2df;
    border-radius: 8px;
    padding: 10px 12px;
}

.sq-disc-news .sq-disc-nlink {
    font-size: 12.5px;
    color: #3c4a58;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.sq-disc-news .sq-disc-arr {
    color: #c0392b;
    font-weight: bold;
}

.sq-disc-news .sq-disc-op {
    color: #1a66ff;
    text-decoration: none;
    border-bottom: 1px dashed #9dbdf7;
}

.sq-disc-news .sq-disc-op:hover {
    color: #188038;
    border-bottom-color: #188038;
}

.sq-disc-news .sq-disc-opm {
    color: #9aa7b2;
    font-size: 11.5px;
}

.sq-disc-news .sq-disc-nask {
    font-size: 13px;
    color: #8a5a1e;
    background: #fff;
    border: 1px solid #f0dfc4;
    border-radius: 8px;
    padding: 9px 11px;
    line-height: 1.7;
}

/* ---------- =B2 站内讨论卡（蓝系，对齐原型 .f5-main） ---------- */
.sq-disc-thread {
    border: 1px solid #c6d9ff;
    background: #f6f9ff;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 14px;
}

.sq-disc-thread .sq-disc-mh {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #1a4fae;
    font-weight: bold;
    margin-bottom: 9px;
}

.sq-disc-thread .sq-disc-mh span {
    font-weight: normal;
    color: #9aa7b2;
    font-size: 11px;
}

.sq-disc-thread .sq-disc-qtitle {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 16px;
    font-weight: bold;
    color: #1f2d3d;
    line-height: 1.55;
}

.sq-disc-thread .sq-disc-qtitle a {
    color: inherit;
    text-decoration: none;
}

.sq-disc-thread .sq-disc-qtitle a:hover {
    color: #1a66ff;
}

.sq-disc-thread .sq-disc-qgo {
    font-size: 11.5px;
    color: #1a66ff;
    font-weight: normal;
    white-space: nowrap;
    flex: 0 0 auto;
}

.sq-disc-thread .sq-disc-qmeta {
    font-size: 12px;
    color: #8a9bb5;
    margin: 6px 0 10px;
}

.sq-disc-thread .sq-disc-qmeta b {
    color: #1a66ff;
    font-weight: normal;
}

.sq-disc-thread .sq-disc-qtext {
    font-size: 13px;
    color: #3c4a58;
    line-height: 1.8;
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.sq-disc-thread .sq-disc-subhead {
    font-size: 12.5px;
    color: #1a4fae;
    font-weight: bold;
    margin: 10px 0 6px;
}

/* .sq-disc-nask 并列 = 2026-11-16 D173：今日资讯卡「回应」成功后，把刚发布的那条
   就地追加在输入行下方，复用 B2「当年真实回复」这一行的全部声明（不新造视觉）。
   子元素样式必须带父容器前缀 —— 只写 .sq-disc-reply 在 .sq-disc-news 里不生效。 */
.sq-disc-thread .sq-disc-reply,
.sq-disc-nask .sq-disc-reply {
    font-size: 12.5px;
    color: #3c4a58;
    line-height: 1.75;
    padding: 7px 10px;
    background: #fff;
    border-left: 3px solid #1a66ff;
    border-radius: 0 6px 6px 0;
    margin-bottom: 6px;
}

.sq-disc-thread .sq-disc-un,
.sq-disc-nask .sq-disc-un {
    color: #1a4fae;
    font-weight: bold;
    margin-right: 6px;
}

.sq-disc-thread .sq-disc-rd,
.sq-disc-nask .sq-disc-rd {
    color: #9aa7b2;
    font-size: 11px;
    margin-left: 6px;
}

/* 刚发布的那条（D173）：与上方输入条留 8px，其余全部继承 .sq-disc-reply。
   B2 的 .sq-disc-reply 自带 margin-bottom:6px 但无 margin-top，直接贴住输入条会显拥挤。 */
.sq-disc-nask .sq-disc-own,
.sq-disc-ask .sq-disc-own {
    margin-top: 8px;
}

/* 回应落点说明（D174）：回应写的是**关联帖的回复**，不是资讯评论。
   不加这行，用户会跑去资讯详情页找自己刚写的那句（那边是另一套评论体系）→ 判定「评论丢了」。
   子元素样式带父容器前缀，与上面 .sq-disc-nask 的规则保持一致。 */
.sq-disc-nask .sq-disc-note {
    margin-top: 8px;
    font-size: 11.5px;
    color: #9aa7b2;
    line-height: 1.6;
}

.sq-disc-nask .sq-disc-note a {
    color: #1a66ff;
    text-decoration: none;
}

.sq-disc-nask .sq-disc-note a:hover {
    text-decoration: underline;
}

.sq-disc-thread .sq-disc-expand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #1a66ff;
    font-weight: bold;
    text-decoration: none;
    border: 1px dashed #c6d9ff;
    background: #f7faff;
    border-radius: 6px;
    padding: 7px 10px;
    margin: 6px 0 10px;
}

.sq-disc-thread .sq-disc-expand:hover {
    border-color: #1a66ff;
    background: #eef4ff;
}

.sq-disc-thread .sq-disc-expand span {
    font-weight: normal;
    color: #8a9bb5;
    font-size: 11px;
}

.sq-disc-thread .sq-disc-ask {
    font-size: 13px;
    color: #b0541c;
    background: #fdf4ea;
    border: 1px solid #f0d9b8;
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 10px;
    line-height: 1.7;
}

.sq-disc-thread .sq-disc-docs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.sq-disc-thread .sq-disc-doc {
    font-size: 12px;
    color: #2b6cb8;
    background: #fff;
    border: 1px solid #c6d9ff;
    border-radius: 6px;
    padding: 4px 10px;
    text-decoration: none;
}

.sq-disc-thread .sq-disc-doc:hover {
    border-color: #1a66ff;
    color: #1a66ff;
}

.sq-disc-thread .sq-disc-dn {
    color: #9aa7b2;
    font-size: 11px;
    margin-left: 6px;
}

/* ---------- 回应输入条（B1/B2 共用） ---------- */
.sq-disc-quick {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.sq-disc-quick input {
    flex: 1;
    min-width: 0;
    border: 1px solid #d3dbe3;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 12.5px;
    font-family: inherit;
    box-sizing: border-box;
}

.sq-disc-quick input:focus {
    outline: none;
    border-color: #1a66ff;
}

.sq-disc-quick button {
    flex: 0 0 auto;
    border: none;
    background: #1a66ff;
    color: #fff;
    border-radius: 6px;
    padding: 0 16px;
    font-size: 12.5px;
    cursor: pointer;
}

.sq-disc-quick button:disabled {
    background: #9dbdf7;
    cursor: default;
}

/* ---------- B3 等你补一句（对齐原型 .f5-wait） ---------- */
.sq-disc-wait {
    border: 1px solid #d9e6f7;
    background: #f7fbff;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.sq-disc-wait .sq-disc-wh {
    font-size: 12.5px;
    font-weight: bold;
    color: #1f2d3d;
    margin-bottom: 10px;
}

.sq-disc-wait .sq-disc-wh em {
    font-style: normal;
    font-weight: normal;
    color: #7d8b99;
    font-size: 11.5px;
    margin-left: 6px;
}

.sq-disc-wait .sq-disc-waitgrid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

/* 三张卡高度不一时，标题/状态/按钮各占一行才不会「有的卡两行、有的卡三行」
   （实测 390/1440 下第三张卡会挤成两行，补一句按钮掉到左下角） */
.sq-disc-wait .sq-disc-waititem {
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 8px;
    padding: 10px 11px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.sq-disc-wait .sq-disc-wt {
    flex: 1 1 auto;
    font-size: 13px;
    color: #1f2d3d;
    line-height: 1.55;
    text-decoration: none;
}

.sq-disc-wait .sq-disc-wt:hover {
    color: #1a66ff;
}

.sq-disc-wait .sq-disc-ws {
    font-size: 11.5px;
    color: #1a7f4b;
    background: #f2f9f4;
    border-radius: 10px;
    padding: 1px 8px;
}

.sq-disc-wait .sq-disc-wbtn {
    align-self: flex-end;
    font-size: 11.5px;
    color: #fff;
    background: #188038;
    border-radius: 12px;
    padding: 2px 10px;
    text-decoration: none;
}

.sq-disc-wait .sq-disc-wbtn:hover {
    background: #146c2e;
}

/* ---------- SSR 直出块（只服务禁 JS 用户与爬虫，JS 开时被覆盖） ---------- */
.sq-disc-ssr {
    font-size: 13px;
    line-height: 1.8;
    color: #1f2d3d;
}

.sq-disc-ssr .sq-disc-ssr-blk {
    border: 1px solid #e3e8ee;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
    background: #fff;
}

.sq-disc-ssr .sq-disc-ssr-h {
    font-size: 12px;
    font-weight: bold;
    color: #1a4fae;
    margin-bottom: 6px;
}

.sq-disc-ssr .sq-disc-ssr-h span {
    font-weight: normal;
    color: #9aa7b2;
    font-size: 11px;
}

.sq-disc-ssr .sq-disc-ssr-tt {
    display: block;
    font-size: 15px;
    font-weight: bold;
    color: #1f2d3d;
    text-decoration: none;
    line-height: 1.6;
}

.sq-disc-ssr .sq-disc-ssr-tx {
    margin: 6px 0;
    color: #4a5866;
}

.sq-disc-ssr .sq-disc-ssr-meta {
    color: #9aa7b2;
    font-size: 11.5px;
}

.sq-disc-ssr .sq-disc-ssr-link,
.sq-disc-ssr .sq-disc-ssr-ask,
.sq-disc-ssr .sq-disc-ssr-sh,
.sq-disc-ssr .sq-disc-ssr-more {
    margin: 6px 0;
}

.sq-disc-ssr .sq-disc-ssr-link span {
    color: #9aa7b2;
    font-size: 11.5px;
}

/* 回应落点说明（D174）：与 JS 视角同文案，SSR 也写 —— 静态说明 + 内链，
   不能只让开了 JS 的用户看到落点。 */
.sq-disc-ssr .sq-disc-ssr-note {
    margin: 6px 0 0;
    font-size: 11.5px;
    color: #9aa7b2;
}

.sq-disc-ssr .sq-disc-ssr-note a {
    color: #1a66ff;
    text-decoration: none;
}

.sq-disc-ssr .sq-disc-ssr-sh {
    color: #1a4fae;
    font-size: 12.5px;
    font-weight: bold;
}

.sq-disc-ssr .sq-disc-ssr-rps {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sq-disc-ssr .sq-disc-ssr-rps li {
    border-left: 3px solid #1a66ff;
    background: #f8faff;
    padding: 5px 9px;
    margin-bottom: 5px;
    font-size: 12.5px;
}

.sq-disc-ssr .sq-disc-ssr-rps b {
    color: #1a4fae;
    margin-right: 6px;
}

.sq-disc-ssr .sq-disc-ssr-rps span {
    color: #9aa7b2;
    font-size: 11px;
    margin-left: 6px;
}

.sq-disc-ssr .sq-disc-ssr-docs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sq-disc-ssr .sq-disc-ssr-docs a {
    font-size: 12px;
    color: #2b6cb8;
    border: 1px solid #c6d9ff;
    border-radius: 6px;
    padding: 3px 9px;
    text-decoration: none;
}

.sq-disc-ssr .sq-disc-ssr-docs a span {
    color: #9aa7b2;
    font-size: 11px;
    margin-left: 4px;
}

.sq-disc-ssr .sq-disc-ssr-waits {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sq-disc-ssr .sq-disc-ssr-waits li {
    padding: 6px 0;
    border-bottom: 1px dashed #e3e8ee;
}

.sq-disc-ssr .sq-disc-ssr-waits li:last-child {
    border-bottom: 0;
}

.sq-disc-ssr .sq-disc-ssr-waits a {
    color: #1f2d3d;
    text-decoration: none;
}

.sq-disc-ssr .sq-disc-ssr-waits span {
    color: #1a7f4b;
    font-size: 11.5px;
    margin-left: 8px;
}

/* ---------- 响应式：三列 → 两列 → 单列 ---------- */
@media (max-width: 1024px) {
    .sq-disc-wait .sq-disc-waitgrid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .sq-disc-news,
    .sq-disc-thread {
        padding: 12px 13px;
    }

    .sq-disc-news .sq-disc-nt,
    .sq-disc-thread .sq-disc-qtitle {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .sq-disc-wait .sq-disc-waitgrid {
        grid-template-columns: 1fr;
    }

    .sq-disc-quick {
        flex-wrap: wrap;
    }

    .sq-disc-quick button {
        padding: 7px 14px;
    }
}
