@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-SemiBold.woff2") format("woff2");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --red: #E1251B;
  --black: #171717;
  --text: #171717;
  --muted: #535353;
  --gray-soft: #ABA8B1;
  --line: #E4E4E4;
  --line-strong: #D0D0D0;
  --surface: #FFFFFF;
  --surface-2: #F7F7F7;
  --bg: #F5F5F5;
  --sidebar-w: 260px;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(23, 23, 23, 0.06), 0 12px 28px rgba(23, 23, 23, 0.04);
  --font-display: "Montserrat", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Montserrat", "Segoe UI", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
.bg { display: none; }

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(225, 37, 27, 0.4);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--red); text-decoration-color: var(--red); }

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  align-items: stretch;
}

/* —— Sidebar —— */
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow: auto;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 1.25rem 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.sidebar-brand {
  display: flex; gap: .75rem; align-items: center;
}
.mark {
  width: 40px; height: 40px; border-radius: 9px;
  background: var(--red); position: relative; flex-shrink: 0;
}
.mark::before {
  content: ""; position: absolute; inset: 11px 9px;
  border: 2.2px solid #FFFFFF; border-radius: 3px;
  border-top: 0; clip-path: polygon(0 0, 45% 55%, 100% 0, 100% 100%, 0 100%);
}
.eyebrow {
  margin: 0; text-transform: uppercase; letter-spacing: .12em;
  font-family: var(--font-display);
  font-size: .65rem; color: var(--red); font-weight: 700; line-height: 1.2;
}
.sidebar h1 {
  margin: .1rem 0 0;
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em;
  color: var(--black); line-height: 1.15;
}
.lang-toggle {
  display: inline-flex; gap: .2rem; padding: .18rem;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
  align-self: flex-start;
}
.lang-btn, .ghost, .watch-btn, .date-chip, .src-link, .date-nav-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: .4rem .85rem;
  font: inherit;
  cursor: pointer;
}
.lang-btn {
  border: 0; background: transparent; padding: .35rem .7rem;
  font-weight: 600; color: var(--muted);
}
.lang-btn.active {
  background: var(--black); color: #fff; border-radius: 999px;
}
.nav-label {
  margin: .4rem 0 0;
  font-size: .68rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
  font-family: var(--font-display);
}
.date-nav {
  display: flex; flex-direction: column; gap: .3rem;
  flex: 1; min-height: 0; overflow: auto;
  padding-right: .15rem;
}
.date-nav-btn {
  width: 100%;
  border-radius: 10px;
  text-align: left;
  padding: .65rem .75rem;
  display: flex; flex-direction: column; gap: .15rem;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}
.date-nav-btn:hover {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--black);
}
.date-nav-btn.active {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--black);
  box-shadow: inset 3px 0 0 var(--red);
}
.date-nav-btn .dn-date {
  font-family: var(--mono); font-size: .82rem; font-weight: 600;
}
.date-nav-btn .dn-meta {
  font-size: .72rem; opacity: .85;
}
.sidebar-banner {
  display: block; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); text-decoration: none;
  margin-top: .25rem;
}
.sidebar-banner img {
  display: block; width: 100%; height: auto;
}
.sidebar-how {
  margin: 0; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); padding: 0 .75rem .75rem;
}
.sidebar-how summary {
  cursor: pointer; padding: .7rem 0;
  font-weight: 700; font-family: var(--font-display);
  font-size: .85rem; color: var(--black);
}
.how-body { color: var(--muted); font-size: .82rem; line-height: 1.45; }
.how-body code {
  font-family: var(--mono); font-size: .85em;
  background: var(--surface); padding: .1rem .3rem; border-radius: 4px;
  border: 1px solid var(--line); color: var(--black);
}

/* —— Content —— */
.content {
  min-width: 0;
  padding: 1.25rem 1.5rem 2rem;
  width: min(980px, 100%);
  margin: 0 auto;
}

.page-banner {
  position: relative;
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 1rem;
  min-height: 160px;
  box-shadow: var(--shadow);
}
.page-banner-img {
  display: block;
  width: 100%;
  height: clamp(150px, 22vw, 220px);
  object-fit: cover;
  object-position: center right;
}
.page-banner-copy {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 1.25rem 1.5rem;
  max-width: min(520px, 70%);
  background: linear-gradient(90deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.72) 55%, rgba(255,255,255,0) 100%);
}
.page-banner-title {
  margin: .35rem 0 .25rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--black);
  line-height: 1.2;
}
.page-banner-sub {
  margin: 0; color: var(--muted); font-size: .92rem;
}

.content-header {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.15rem;
  margin-bottom: 1rem;
  position: relative;
  box-shadow: none;
}
.content-header::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--red); border-radius: 3px 0 0 3px;
}
.hero-date {
  margin: 0; font-family: var(--mono); font-size: .85rem; color: var(--muted);
}
.content-header h2 {
  margin: .3rem 0 .35rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  font-weight: 700; color: var(--black); line-height: 1.2;
}
.lede { margin: 0; color: var(--muted); max-width: 44rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .85rem; }
.pill {
  font-size: .76rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: .22rem .6rem; background: var(--surface-2);
}
.pill strong { color: var(--black); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }

.watch-btn {
  background: var(--black); border-color: var(--black); color: #fff;
  font-weight: 700; font-family: var(--font-display);
}
.watch-btn:hover { background: #2a2a2a; border-color: #2a2a2a; color: #fff; }
.watch-btn.secondary {
  background: var(--surface); border-color: var(--line-strong);
  color: var(--black); font-weight: 600;
}
.watch-btn.secondary:hover { background: var(--surface-2); color: var(--black); }
.ghost:hover { border-color: var(--line-strong); color: var(--black); }

.player-shell {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.player-shell[hidden] { display: none; }
.player-head { display: flex; justify-content: space-between; gap: 1rem; align-items: start; margin-bottom: .75rem; }
.player-head h2 {
  margin: .2rem 0 0; font-size: 1.05rem;
  font-family: var(--font-display); font-weight: 700; color: var(--black);
}
#player {
  width: 100%; max-height: min(70vh, 640px);
  background: #111; border-radius: 10px; display: block;
}
.player-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }

.toolbar {
  display: flex; flex-wrap: wrap; gap: .65rem; align-items: end;
  padding: 0 0 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem;
}
.field { display: grid; gap: .3rem; min-width: 130px; }
.field.grow { flex: 1; min-width: 160px; }
.field span {
  font-size: .68rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .1em;
  font-family: var(--font-display); font-weight: 600;
}
select, input[type="search"] {
  appearance: none;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  padding: .65rem .8rem; font: inherit; width: 100%;
}
select option { background: #fff; color: #171717; }
select:focus, input:focus {
  outline: 2px solid rgba(225, 37, 27, 0.25);
  border-color: rgba(225, 37, 27, 0.5);
}
.clear-filters { margin-bottom: .05rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
.clear-filters[hidden] { display: none; }
.count { margin: 0 0 .3rem auto; color: var(--muted); font-size: .9rem; }

.section-head { margin: 0 0 .9rem; }
.section-head h2 {
  margin: 0; font-size: 1.05rem;
  font-family: var(--font-display); font-weight: 700; color: var(--black);
}
.section-sub { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }

.story-list { display: grid; gap: .85rem; padding-bottom: 1.25rem; }
.story {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .9rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.story:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.story-media {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  aspect-ratio: 1;
  align-self: start;
}
.story-media img {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
}
.story-body { min-width: 0; }
.story-top {
  display: flex; flex-wrap: wrap; gap: .4rem .65rem;
  align-items: center; margin-bottom: .45rem;
}
.company-tag {
  font-size: .66rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--red);
  font-family: var(--font-display);
  background: rgba(225, 37, 27, 0.06);
  border: 1px solid rgba(225, 37, 27, 0.2);
  border-radius: 6px; padding: .18rem .45rem;
}
.meta-tags { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.meta-tag {
  font-size: .66rem; font-weight: 600; letter-spacing: .04em;
  color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 6px; padding: .12rem .4rem;
  font-family: var(--font-display);
}
.meta-tag.impact-high {
  color: #9A1C16;
  background: rgba(225, 37, 27, 0.06);
  border-color: rgba(225, 37, 27, 0.2);
}
.heat {
  display: inline-flex; flex-wrap: wrap; gap: .4rem;
  margin-left: auto; font-family: var(--mono); font-size: .72rem; color: var(--muted);
}
.heat .likes { color: var(--black); font-weight: 600; }
.story h3 {
  margin: 0 0 .45rem;
  font-family: var(--font-display);
  font-size: 1.02rem; font-weight: 700;
  letter-spacing: -.01em; line-height: 1.25; color: var(--black);
}
.bullets {
  margin: 0; padding-left: 1.05rem; color: var(--muted); font-size: .9rem;
}
.bullets li { margin: .25rem 0; }
.bullets li::marker { color: var(--red); }
.story-foot {
  display: flex; flex-wrap: wrap; gap: .45rem; align-items: center;
  margin-top: .75rem; padding-top: .65rem; border-top: 1px solid var(--line);
}
.sources { display: flex; flex-wrap: wrap; gap: .3rem; flex: 1; }
.src-link {
  font-size: .72rem; padding: .22rem .5rem; color: var(--muted);
  text-decoration: none; background: var(--surface-2);
}
.src-link:hover { color: var(--black); text-decoration: none; border-color: var(--line-strong); }
.story-foot .watch-btn { margin-left: auto; font-size: .82rem; padding: .35rem .7rem; }

.empty {
  text-align: center; color: var(--muted);
  padding: 1.75rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}
.foot { color: var(--muted); font-size: .82rem; padding: .5rem 0 1rem; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static; height: auto; max-height: none;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .date-nav {
    flex-direction: row; flex-wrap: nowrap;
    overflow-x: auto; overflow-y: hidden;
    gap: .4rem; padding-bottom: .25rem;
  }
  .date-nav-btn {
    width: auto; min-width: 6.5rem;
    box-shadow: none;
  }
  .date-nav-btn.active { box-shadow: inset 0 -3px 0 var(--red); }
  .sidebar-banner, .sidebar-how { display: none; }
  .content { padding: 1rem; width: 100%; }
  .page-banner-copy { max-width: 85%; }
}

@media (max-width: 640px) {
  .story { grid-template-columns: 88px minmax(0, 1fr); gap: .7rem; padding: .75rem; }
  .heat { margin-left: 0; width: 100%; }
  .story-foot .watch-btn { margin-left: 0; }
  .count { margin-left: 0; width: 100%; }
  .field { min-width: calc(50% - .35rem); flex: 1; }
  .field.grow { min-width: 100%; }
  .page-banner-img { height: 140px; }
}
