:root {
  color-scheme: dark;
  --bg: #090b0a;
  --bg2: #101412;
  --fg: #eef2e4;
  --muted: #8b927e;
  --line: #232820;
  --card: #121614;
  --accent: #d2f25c;
  --accent-ink: #14180c;
  --cve: #7edcff;
  --hot: #d2f25c;
  --radius: 16px;
  --font: "Segoe UI Variable", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", sans-serif;
  --mono: "Cascadia Mono", "Sarasa Mono SC", ui-monospace, monospace;
  --max: 1120px;
  --rail: 12rem;
  --pad: 20px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f0e4;
  --bg2: #fffdf6;
  --fg: #171910;
  --muted: #5c6352;
  --line: #d9d3c2;
  --card: #fffdf6;
  --accent: #4d6a00;
  --accent-ink: #f4f8e4;
  --cve: #0a5e86;
  --hot: #4d6a00;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: clip; }
body {
  background:
    radial-gradient(900px 380px at 8% -12%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 58%),
    var(--bg);
  color: var(--fg);
  font: 16px/1.55 var(--font);
  letter-spacing: 0.01em;
}
a { color: inherit; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 12px; z-index: 9; background: var(--accent); color: var(--accent-ink); padding: 6px 10px; }
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.top {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  z-index: 2;
}
.top-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand search nav";
  gap: 12px 16px;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px var(--pad);
}
.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-decoration: none;
  justify-self: start;
}
.mark {
  width: 11px;
  height: 11px;
  background: var(--accent);
  transform: rotate(45deg);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 55%, transparent);
}
.search {
  grid-area: search;
  display: flex;
  align-items: stretch;
  margin: 0;
  min-width: 0;
  height: 36px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.search input,
.search button {
  margin: 0;
  height: auto;
  font: inherit;
  line-height: 1;
  border: 0;
  border-radius: 0;
}
.search input {
  flex: 1;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--fg);
  padding: 0 14px;
}
.search input::-webkit-search-decoration,
.search input::-webkit-search-cancel-button {
  appearance: none;
  -webkit-appearance: none;
}
.search button {
  flex: 0 0 auto;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
}
.top-inner > nav { grid-area: nav; display: flex; gap: 16px; align-items: center; justify-self: end; }
.top-inner > nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.top-inner > nav a:hover { color: var(--fg); }
.theme {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.theme::before { content: "☾"; font-size: 14px; }
html[data-theme="light"] .theme::before { content: "☀"; }

main { max-width: var(--max); margin: 0 auto; padding: 20px var(--pad) 64px; }

.board {
  display: grid;
  gap: 18px;
}
.stream { min-width: 0; }
.rail { min-width: 0; }

.hero {
  margin: 0 0 14px;
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.35;
  letter-spacing: -0.03em;
  font-weight: 620;
  color: var(--muted);
}
.pagehead { margin: 0 0 14px; }
.pagehead h1 {
  font-size: clamp(22px, 4vw, 32px);
  letter-spacing: -0.03em;
  margin: 6px 0 0;
}
.kicker {
  margin: 0;
  color: var(--accent);
  font: 12px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.strip-wrap {
  min-width: 0;
  max-width: 100%;
  margin: 0;
}
.strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip a {
  flex: 0 0 auto;
  max-width: 14em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--card) 70%, transparent);
}
.strip a:hover { color: var(--fg); border-color: var(--fg); }
.strip a[aria-current="page"] {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.day { margin: 0 0 8px; }
.day-label {
  margin: 22px 0 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 12px/1 var(--mono);
  letter-spacing: 0.12em;
}
.day:first-child .day-label { margin-top: 0; }

.timeline { list-style: none; padding: 0; margin: 0; }
.item {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  column-gap: 12px;
  padding: 10px 0 12px 10px;
  border-bottom: 1px solid var(--line);
  border-left: 2px solid transparent;
}
.item.hot { border-left-color: var(--hot); }
.item time {
  font: 13px/1.4 var(--mono);
  color: var(--muted);
  padding-top: 1px;
  white-space: nowrap;
}
.item.hot time { color: var(--accent); }
.slot { min-width: 0; }
.item h3 {
  font-size: 15.5px;
  line-height: 1.38;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 640;
}
.item h3 a { text-decoration: none; overflow-wrap: anywhere; }
.item h3 a:hover { color: var(--accent); }
.meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 4px;
}
.src { color: var(--accent); text-decoration: none; }
.src:hover { text-decoration: underline; }
.sum {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 0; min-width: 0; }
.cve, .tag, .more-n {
  font: 11px/1 var(--mono);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  text-decoration: none;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cve {
  color: var(--cve);
  background: color-mix(in srgb, var(--cve) 12%, transparent);
  border-color: color-mix(in srgb, var(--cve) 42%, var(--line));
  font-weight: 650;
}
.tag { color: var(--muted); }
.more-n { color: var(--muted); }
.cve:hover, .tag:hover { border-color: currentColor; }

.empty, .lede { color: var(--muted); }
.lede { margin: 0 0 12px; }
.more { margin: 28px 0 0; }
.more a {
  display: block;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px;
  color: var(--muted);
}
.more a:hover { color: var(--fg); border-color: var(--fg); }

.detail h1 {
  font-size: clamp(24px, 4vw, 34px);
  letter-spacing: -0.035em;
  line-height: 1.22;
  margin: 0 0 10px;
}
.crumb { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.crumb a { color: var(--accent); text-decoration: none; }
.detail .meta { margin: 0 0 4px; }
.detail .chips { margin-top: 12px; }
.body { color: var(--muted); font-size: 16px; line-height: 1.7; margin: 18px 0 24px; }
.go {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
}
.go::after { content: " →"; }

.bucket { margin: 28px 0 0; }
.bucket h2 {
  margin: 0 0 10px;
  color: var(--muted);
  font: 12px/1 var(--mono);
  letter-spacing: 0.14em;
}
.sources {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.sources a, .sources span {
  display: block;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--card);
}
.sources a:hover { border-color: var(--accent); }
.sources .off { color: var(--muted); opacity: 0.65; }

footer {
  border-top: 1px solid var(--line);
  padding: 28px var(--pad) 40px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
footer a { color: var(--accent); text-decoration: none; }

@media (min-width: 880px) {
  .board {
    grid-template-columns: var(--rail) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
  }
  .rail {
    position: sticky;
    top: 60px;
    max-height: calc(100vh - 76px);
    overflow: auto;
  }
  .rail .strip {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow: visible;
    gap: 4px;
  }
  .rail .strip a {
    max-width: none;
    white-space: normal;
    line-height: 1.3;
    border-radius: 10px;
    padding: 7px 10px;
  }
}

@media (max-width: 720px) {
  :root { --pad: 16px; }
  .top-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand nav"
      "search search";
    padding: 12px var(--pad);
  }
  main { padding: 16px var(--pad) 56px; }
  .item {
    grid-template-columns: 3.4rem minmax(0, 1fr);
    column-gap: 8px;
    padding-left: 8px;
  }
  .item time { font-size: 12px; }
  .item h3 { font-size: 15px; }
  nav a { font-size: 13px; }
}
