:root {
  --bg: #0b0d12;
  --surface: #131720;
  --surface-2: #19202b;
  --line: #242c3a;
  --text: #e8ebf1;
  --text-2: #b4bccb;
  --muted: #7f8a9d;
  --accent: #7dd3fc;
  --focus: #7dd3fc;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --c-ai: #b79cff;
  --c-chip: #5cc8ff;
  --c-tech: #4fd6a4;
  --c-tesla: #ff8585;
  --c-finance: #f6c453;
  --c-world: #ff9f66;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="light"] {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f6;
  --line: #dfe3ea;
  --text: #151922;
  --text-2: #3d4656;
  --muted: #6b7587;
  --accent: #0369a1;
  --focus: #0369a1;
  --shadow: 0 8px 24px rgba(20, 30, 50, .08);
  --c-ai: #6d42d8;
  --c-chip: #0b78b6;
  --c-tech: #0a8a60;
  --c-tesla: #d03a3a;
  --c-finance: #a56a00;
  --c-world: #c2571a;
}
html[lang="zh-Hans-CN"] { --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif; }
html[lang="ja"] { --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif; }
html[lang="ko"] { --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); }
.brand-name { color: var(--text); font-size: 18px; font-weight: 500; letter-spacing: .2px; white-space: nowrap; }
.brand-name b { font-weight: 800; }
.top-tools { display: flex; align-items: center; gap: 8px; min-width: 0; }
.langs, .seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
}
.langs button, .seg button {
  border: 0; background: transparent; cursor: pointer;
  padding: 5px 11px; border-radius: 999px; font-size: 13px; line-height: 1.3; color: var(--text-2); white-space: nowrap;
}
.langs button:hover, .seg button:hover { color: var(--text); }
.langs button[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); font-weight: 600; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; color: var(--text-2);
}
.icon-btn:hover { color: var(--text); }
:root[data-theme="dark"] .i-moon, :root[data-theme="light"] .i-sun { display: none; }

.cats { display: flex; gap: 4px; overflow-x: auto; padding: 2px 0 0; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button {
  position: relative; flex: none; border: 0; background: transparent; cursor: pointer;
  padding: 9px 12px 11px; font-size: 14.5px; color: var(--text-2); white-space: nowrap;
}
.cats button .n { margin-left: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cats button:hover { color: var(--text); }
.cats button[aria-pressed="true"] { color: var(--text); font-weight: 650; }
.cats button[aria-pressed="true"]::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2.5px; border-radius: 2px;
  background: var(--cc, var(--accent));
}

/* toolbar */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 18px 0 6px; }
.search {
  display: flex; align-items: center; gap: 8px; flex: 1 1 240px; max-width: 380px;
  padding: 0 12px; height: 38px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--muted);
}
.search:focus-within { border-color: var(--focus); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14.5px; }
.search input::placeholder { color: var(--muted); }
.status { margin: 0 0 0 auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* cards */
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--muted); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: 12px; letter-spacing: .2px; color: var(--cc);
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cc); }
.dot::before { content: "·"; margin-right: 8px; }
.badge {
  padding: 0 6px; border: 1px solid var(--line); border-radius: 5px; font-size: 11px; line-height: 1.6; color: var(--muted);
}
.card {
  display: flex; flex-direction: column; gap: 9px;
  padding: 16px 16px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: color-mix(in srgb, var(--cc) 55%, var(--line)); }
.card h2, .card h3 { margin: 0; font-size: 17px; line-height: 1.42; font-weight: 650; letter-spacing: .1px; text-wrap: pretty; }
.card h2 a:hover, .card h3 a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.card p.sum { margin: 0; font-size: 14.5px; line-height: 1.68; color: var(--text-2); text-wrap: pretty; }
.card .orig {
  margin: 2px 0 0; padding: 10px 12px; background: var(--surface-2); border-radius: 10px;
  font-size: 13.5px; line-height: 1.6; color: var(--text-2);
}
.card .orig b { display: block; margin-bottom: 4px; color: var(--text); font-weight: 600; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 2px; }
.link-btn {
  border: 0; background: transparent; padding: 4px 0; cursor: pointer; font-size: 12.5px; color: var(--muted);
}
.link-btn:hover, .open:hover { color: var(--text); }
.open { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.open::after { content: " ↗"; }

.lead { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; margin: 12px 0 14px; }
.lead .card.hero { padding: 24px 24px 16px; gap: 12px; border-top: 3px solid var(--cc); }
.lead .card.hero h2 { font-size: clamp(22px, 2.5vw, 29px); line-height: 1.3; font-weight: 750; }
.lead .card.hero p.sum { font-size: 16px; }
.lead .side { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; }
.lead .side .row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.lead .side .row:last-child { border-bottom: 0; }
.lead .side .num { flex: none; width: 20px; font-size: 20px; font-weight: 750; line-height: 1.25; color: var(--muted); font-variant-numeric: tabular-nums; }
.lead .side h3 { margin: 0 0 5px; font-size: 15px; line-height: 1.42; font-weight: 620; }
.lead .side h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.side-title { margin: 12px 0 0; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; padding-bottom: 8px; }
.empty { padding: 60px 0; text-align: center; color: var(--muted); }
.skeleton { height: 170px; border-radius: 14px; background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 200% 100%; animation: sk 1.3s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

.foot { padding: 28px 0 48px; font-size: 13px; color: var(--text-2); border-top: 1px solid var(--line); margin-top: 28px; }
.foot p { margin: 0 0 6px; }

@media (max-width: 860px) {
  .lead { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 24px); }
  .top-row { padding-top: 10px; }
  .brand-name { font-size: 16px; }
  .langs button { padding: 5px 8px; font-size: 12.5px; }
  .grid { grid-template-columns: 1fr; gap: 10px; }
  .status { width: 100%; margin-left: 0; }
  .lead .card.hero { padding: 18px 16px 12px; }
  .search { max-width: none; }
}
@media (max-width: 400px) {
  .brand-name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
