/* 国际交通要情简报：白色、简洁，参考 Google / Meta 的产品页。颜色统一用下面的变量。 */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --muted-bg: #f6f8fc;
  --line: #e3e5e8;
  --text: #1f1f1f;
  --text-2: #444746;
  --muted: #6b7075;
  --brand: #0b3d91;        /* 深蓝：Logo、主按钮、选中态 */
  --brand-hover: #0a347c;
  --brand-soft: #e9effa;
  --us: #0b3d91;
  --us-soft: #e9effa;
  --cn: #b3261e;
  --cn-soft: #fceeee;
  --warn: #b06000;
  --warn-soft: #fef3e0;
  --ok: #146c2e;
  --ok-soft: #e6f4ea;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(60, 64, 67, .2), 0 2px 6px 2px rgba(60, 64, 67, .1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.6 "Google Sans", Roboto, -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; }
a { color: inherit; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* 顶栏和页签 */
.appbar { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); backdrop-filter: saturate(180%) blur(8px); }
.appbar-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.logo { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 19px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-name { font-size: 18px; font-weight: 600; color: var(--brand); white-space: nowrap; }
.brand-en { font-size: 12px; color: var(--muted); letter-spacing: .02em; white-space: nowrap; }
.updated { color: var(--muted); font-size: 13px; white-space: nowrap; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; border: 0; background: none; padding: 12px 16px 10px; cursor: pointer; color: var(--muted); font-weight: 500; border-bottom: 3px solid transparent; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }

main { padding-top: 24px; padding-bottom: 32px; min-height: 60vh; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 8px 0 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 22px; font-weight: 500; }
.section-head p { color: var(--muted); font-size: 13px; }
.block-title { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .04em; margin: 28px 0 12px; }

/* 筛选条 */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 5px 12px; cursor: pointer; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.chip:hover { background: var(--muted-bg); }
.chip.on { background: var(--brand-soft); border-color: var(--brand-soft); color: var(--brand); font-weight: 500; }
.chip .n { color: var(--muted); font-size: 12px; margin-left: 4px; }
.chip.on .n { color: var(--brand); }
.divider { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.search { flex: 1 1 220px; min-width: 0; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--muted-bg); outline: none; }
.search:focus { background: #fff; border-color: var(--brand); }

/* 标签 */
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--muted); }
.origin { color: var(--text); font-weight: 500; }
.origin b { color: var(--brand); font-weight: 600; }
.tag { display: inline-block; padding: 0 8px; line-height: 22px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--muted-bg); color: var(--text-2); }
.tag.us { background: var(--us-soft); color: var(--us); }
.tag.cn { background: var(--cn-soft); color: var(--cn); }
.tag.acc { background: var(--warn-soft); color: var(--warn); }
.tag.reg { background: var(--ok-soft); color: var(--ok); }
.imp { display: inline-flex; gap: 2px; align-items: center; }
.imp i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.imp i.on { background: var(--brand); }

/* 头条 */
.headlines { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.headlines .side { display: grid; gap: 16px; align-content: start; }
.lead { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; background: var(--surface); transition: box-shadow .15s; display: flex; flex-direction: column; }
.lead:hover { box-shadow: var(--shadow); }
.lead img { width: 100%; height: 240px; object-fit: cover; display: block; background: var(--muted-bg); }
.lead .body { padding: 18px 20px 20px; display: grid; gap: 10px; }
.lead h3 { font-size: 22px; line-height: 1.4; font-weight: 500; }
.side .lead img { height: 120px; }
.side .lead h3 { font-size: 17px; }
.side .lead .sum { display: none; }
.sum { color: var(--text-2); }

/* 列表卡片 */
.list { display: grid; gap: 12px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; cursor: pointer; outline: none; transition: box-shadow .15s; }
.card:hover, .card:focus-visible { box-shadow: var(--shadow); }
.card h3 { font-size: 17px; line-height: 1.45; font-weight: 500; margin: 6px 0 4px; }
.card .sum { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.thumb { width: 132px; height: 88px; border-radius: 8px; object-fit: cover; background: var(--muted-bg); display: block; }
.btn-src { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 16px; padding: 2px 12px; font-size: 13px; color: var(--brand); text-decoration: none; background: #fff; font-weight: 500; }
.btn-src:hover { background: var(--brand-soft); border-color: var(--brand-soft); }
.day { font-size: 15px; font-weight: 600; margin: 24px 0 10px; color: var(--text); }
.day:first-child { margin-top: 4px; }
.empty { color: var(--muted); text-align: center; padding: 48px 0; border: 1px dashed var(--line); border-radius: var(--radius); }

/* 智库目录 */
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 20px; min-width: 150px; }
.stat b { display: block; font-size: 26px; font-weight: 500; color: var(--brand); line-height: 1.2; }
.stat span { color: var(--muted); font-size: 13px; }
.continent { margin-top: 28px; }
.continent h3 { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.tt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.tt { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 6px; }
.tt-top { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.tt-name { font-weight: 500; line-height: 1.45; min-width: 0; }
.tt-top .tag { flex: none; white-space: nowrap; }
.tt-name small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.tt-latest { font-size: 13px; color: var(--text-2); cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tt-latest:hover { color: var(--brand); }
.tt-none { font-size: 13px; color: var(--muted); }

/* 详情面板 */
.sheet { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(32, 33, 36, .4); opacity: 0; transition: opacity .2s; }
.sheet-panel { position: absolute; top: 0; right: 0; height: 100%; width: min(640px, 100%); background: #fff; overflow-y: auto; transform: translateX(100%); transition: transform .25s ease; box-shadow: -2px 0 16px rgba(0, 0, 0, .12); }
.sheet.open { pointer-events: auto; }
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-panel { transform: none; }
.sheet-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #fff; color: var(--muted); cursor: pointer; font-size: 16px; z-index: 1; }
.sheet-close:hover { background: var(--muted-bg); color: var(--text); }
.s-body { padding: 28px 32px 48px; display: grid; gap: 18px; }
#s-title { font-size: 24px; line-height: 1.4; font-weight: 500; padding-right: 28px; }
.btn-primary { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: #fff; text-decoration: none; border-radius: 24px; padding: 12px 20px; font-weight: 500; font-size: 16px; }
.btn-primary:hover { background: var(--brand-hover); }
.src-url { color: var(--muted); font-size: 12px; text-align: center; word-break: break-all; margin-top: -10px; }
.s-label { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .04em; margin-bottom: 8px; }
.quotes { display: grid; gap: 10px; }
.quote { background: var(--muted-bg); border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; padding: 12px 16px; }
.quote .o { font-size: 15px; color: var(--text); }
.quote .z { font-size: 14px; color: var(--text-2); margin-top: 6px; }
.insight { background: var(--brand-soft); color: var(--brand); border-radius: 8px; padding: 12px 16px; }
.ents { display: flex; flex-wrap: wrap; gap: 6px; }
.s-img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 10px; display: block; background: var(--muted-bg); }
.s-small { color: var(--muted); font-size: 12px; }

.footer { color: var(--muted); font-size: 12px; padding-top: 16px; padding-bottom: 40px; border-top: 1px solid var(--line); }

@media (max-width: 768px) {
  .wrap { padding: 0 16px; }
  .brand-en, .updated { display: none; }
  .tabs button { padding: 10px 12px 8px; }
  main { padding-top: 16px; }
  .headlines { grid-template-columns: minmax(0, 1fr); }
  .lead img { height: 180px; }
  .lead h3 { font-size: 19px; }
  .card { padding: 14px 16px; gap: 12px; }
  .card h3 { font-size: 16px; }
  .thumb { width: 84px; height: 64px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .filters::-webkit-scrollbar { display: none; }
  .search { flex: 0 0 200px; }
  .s-body { padding: 24px 16px 40px; }
  #s-title { font-size: 20px; }
  .tt-grid { grid-template-columns: minmax(0, 1fr); }
}
