/* 宁好：白色简洁风格。颜色统一用下面的变量。 */
:root {
  --bg: #f5f6f8;          /* 页面底色 */
  --surface: #ffffff;     /* 卡片、顶栏 */
  --hover: #f7f9fc;
  --line: #e5e6eb;
  --text: #1d2129;
  --text-2: #4e5969;
  --muted: #86909c;
  --brand: #0052d9;
  --brand-soft: #ecf2fe;
  --opp: #1f8a52;
  --opp-soft: #e8f7ee;
  --risk: #d54941;
  --risk-soft: #fdecea;
  --neutral-soft: #f2f3f5;
  --radius: 8px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", sans-serif;
  overflow-x: clip;
}
button, input { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* 顶栏 */
.header { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.logo { width: 30px; height: 30px; border-radius: 7px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 16px; flex: none; }
.brand-name { font-size: 18px; font-weight: 600; }
.brand-sub { color: var(--muted); font-size: 13px; padding-left: 12px; border-left: 1px solid var(--line); white-space: nowrap; }
.status { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--opp); }
.status.stale .dot { background: var(--muted); }

/* 主体：左筛选，右列表 */
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding-top: 24px; padding-bottom: 24px; align-items: start; }
.filters { position: sticky; top: 84px; background: var(--surface); border-radius: var(--radius); padding: 20px 16px; display: grid; gap: 20px; }
.f-title { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 8px 8px; }
.cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cats button { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 7px 8px; border: 0; border-radius: 6px; background: none; cursor: pointer; text-align: left; }
.cats button:hover { background: var(--hover); }
.cats button.on { background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.cats .n { color: var(--muted); font-size: 12px; font-weight: 400; }
.cats button.on .n { color: var(--brand); }
.seg { display: flex; border: 1px solid var(--line); border-radius: 6px; padding: 2px; }
.seg button { flex: 1; border: 0; background: none; padding: 4px 0; border-radius: 4px; cursor: pointer; color: var(--text-2); }
.seg button.on { background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.check { display: flex; align-items: center; gap: 8px; padding-left: 8px; color: var(--text-2); cursor: pointer; }
.check input { accent-color: var(--brand); margin: 0; }

.content { min-width: 0; }
.search { width: 100%; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); outline: none; }
.search:focus { border-color: var(--brand); }
.search::placeholder { color: var(--muted); }
.count { color: var(--muted); font-size: 13px; margin: 14px 2px 10px; }

/* 共用：标签和信息行 */
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--muted); font-size: 12px; }
.tag { display: inline-block; padding: 0 6px; line-height: 20px; border-radius: 4px; font-size: 12px; background: var(--neutral-soft); color: var(--text-2); }
.tag.cat { background: var(--brand-soft); color: var(--brand); }
.tag.机会 { background: var(--opp-soft); color: var(--opp); }
.tag.风险 { background: var(--risk-soft); color: var(--risk); }
.tag.new { background: var(--brand); color: #fff; }
.imp.hi { color: var(--brand); font-weight: 500; }
.tags { display: flex; gap: 6px; }

/* 头条 */
.featured { background: var(--surface); border-radius: var(--radius); padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; cursor: pointer; margin-bottom: 12px; border: 1px solid transparent; }
.featured:hover { border-color: var(--line); }
.featured.no-img { grid-template-columns: minmax(0, 1fr); }
.kicker { color: var(--brand); font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.featured h2 { font-size: 20px; line-height: 1.45; font-weight: 600; margin-bottom: 10px; }
.featured .why { color: var(--text-2); margin: 10px 0 12px; }
.action { background: var(--bg); border-radius: 6px; padding: 8px 12px; color: var(--text-2); font-size: 13px; }
.action b { color: var(--text); font-weight: 500; }
.featured .thumb { width: 240px; height: 150px; }

/* 列表 */
.list { background: var(--surface); border-radius: var(--radius); }
.list:empty { display: none; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; padding: 18px 24px; border-bottom: 1px solid var(--line); cursor: pointer; outline: none; }
.row:last-child { border-bottom: 0; }
.row:hover, .row:focus-visible { background: var(--hover); }
.row h3 { font-size: 16px; font-weight: 600; line-height: 1.5; margin-bottom: 4px; }
.row:hover h3 { color: var(--brand); }
.row .why { color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px; }
.orig { color: var(--muted); font-size: 12px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb { width: 128px; height: 80px; border-radius: 6px; object-fit: cover; background: var(--bg); display: block; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; background: var(--surface); border-radius: var(--radius); }

/* 详情抽屉 */
.drawer { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .35); opacity: 0; transition: opacity .2s; }
.drawer-panel { position: absolute; top: 0; right: 0; height: 100%; width: min(560px, 100%); background: var(--surface); overflow-y: auto; transform: translateX(100%); transition: transform .25s ease; box-shadow: -4px 0 24px rgba(0, 0, 0, .08); }
.drawer.open { pointer-events: auto; }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer.open .drawer-panel { transform: none; }
.drawer-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 0; border-radius: 6px; background: var(--surface); color: var(--muted); cursor: pointer; z-index: 1; }
.drawer-close:hover { background: var(--bg); color: var(--text); }
.d-body { padding: 28px 28px 40px; }
.d-img { display: block; width: calc(100% - 56px); height: 220px; margin: 56px 28px 0; border-radius: 8px; object-fit: cover; background: var(--bg); }
.d-img + .d-body { padding-top: 20px; }
#d-headline { font-size: 20px; line-height: 1.45; font-weight: 600; margin: 12px 0 4px; padding-right: 24px; }
.d-section { margin-top: 22px; }
.d-section h4 { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.d-section p, .d-section li { color: var(--text-2); }
.d-section ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.quote { display: block; margin-top: 4px; padding-left: 10px; border-left: 2px solid var(--line); color: var(--muted); font-size: 12px; quotes: none; }
.ent { display: flex; flex-wrap: wrap; gap: 6px; }
.d-action { background: var(--brand-soft); color: var(--brand); border-radius: 6px; padding: 10px 12px; }
.btn { display: inline-block; margin-top: 24px; padding: 8px 18px; border-radius: 6px; background: var(--brand); color: #fff; text-decoration: none; }
.btn:hover { opacity: .9; }
.d-small { color: var(--muted); font-size: 12px; margin-top: 16px; }

/* 新播报提示 */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40; max-width: min(560px, calc(100% - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0, 0, 0, .1); padding: 12px 16px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast b { color: var(--brand); font-weight: 500; margin-right: 8px; }

.footer { color: var(--muted); font-size: 12px; padding-top: 8px; padding-bottom: 40px; }

/* 手机 */
@media (max-width: 768px) {
  .wrap { padding: 0 16px; }
  .brand-sub { display: none; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 12px; }
  .filters { position: static; padding: 12px; gap: 10px; grid-template-columns: minmax(0, 1fr); }
  .f-title { display: none; }
  .cats { display: flex; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .cats::-webkit-scrollbar { display: none; }
  .cats li { flex: none; }
  .cats button { gap: 4px; padding: 5px 10px; }
  .f-group:nth-child(2) { display: flex; }
  .seg { flex: 1; }
  .featured { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 12px; }
  .featured .thumb { width: 100%; height: 170px; order: -1; }
  .featured h2 { font-size: 18px; }
  .row { padding: 14px 16px; gap: 12px; }
  .row h3 { font-size: 15px; }
  .thumb { width: 88px; height: 64px; }
  .d-body { padding: 20px 16px 32px; }
  .d-img { width: calc(100% - 32px); height: 180px; margin: 52px 16px 0; }
}
