:root {
  color-scheme: light;
  --bg: #f6f7f3;
  --panel: #ffffff;
  --panel-soft: #f0f3ee;
  --line: #d9ded5;
  --line-strong: #b8c1b3;
  --text: #172018;
  --muted: #697366;
  --green: #1e8f5b;
  --green-soft: #e5f4ed;
  --yellow: #b7791f;
  --red: #c2413b;
  --shadow: 0 14px 34px rgba(31, 40, 29, 0.08);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0 64px;
}

.site-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  border-bottom: 1px solid var(--line);
}

.brand,
.nav-links,
.header-right,
.pulse,
.entry-meta,
.tag-row,
.summary-strip {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  border-radius: 8px;
  background: var(--text);
  font-size: 14px;
}

.nav-links {
  gap: 6px;
  justify-content: center;
}

.nav-links a {
  padding: 9px 14px;
  color: var(--muted);
  border-radius: 999px;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--text);
  background: var(--panel-soft);
}

.header-right {
  gap: 14px;
  justify-content: flex-end;
}

.clock {
  text-align: right;
}

.clock span,
.clock small {
  display: block;
}

.clock span {
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.clock small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.pulse {
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  color: var(--green);
  border: 1px solid #b9dfca;
  border-radius: 999px;
  background: var(--green-soft);
  font-size: 13px;
  font-weight: 700;
}

.pulse span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  animation: blink 1.4s infinite;
}

.pulse.error {
  color: var(--red);
  border-color: #efb2ae;
  background: #fff0ef;
}

.hero {
  padding: 44px 0 28px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 14px;
  font-weight: 900;
}

h1 {
  margin: 0;
  font-size: 54px;
  line-height: 1.05;
}

.hero-copy {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 340px) 44px;
  gap: 10px;
  padding: 12px 0;
  background: rgba(246, 247, 243, 0.92);
  backdrop-filter: blur(12px);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.segmented button,
.refresh-button {
  min-height: 44px;
  color: var(--muted);
  cursor: pointer;
  border: 0;
  background: transparent;
}

.segmented button {
  border-right: 1px solid var(--line);
  font-weight: 700;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.active,
.segmented button:hover,
.refresh-button:hover {
  color: var(--green);
  background: var(--green-soft);
}

.search {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.search span {
  color: var(--muted);
  font-size: 13px;
}

.search input {
  width: 100%;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
}

.refresh-button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  font-size: 24px;
}

.summary-strip {
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 24px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.summary-strip div {
  min-width: 96px;
}

.summary-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.summary-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.timeline {
  position: relative;
  padding-bottom: 32px;
}

.day-group {
  position: relative;
}

.day-label {
  position: sticky;
  top: 70px;
  z-index: 4;
  width: fit-content;
  margin: 28px 0 14px 112px;
  padding: 7px 12px;
  color: var(--green);
  border: 1px solid #bfdecf;
  border-radius: 999px;
  background: #f9fbf7;
  font-size: 14px;
  font-weight: 900;
}

.timeline-entry {
  position: relative;
  display: grid;
  grid-template-columns: 82px 28px minmax(0, 1fr);
  gap: 14px;
  min-height: 142px;
}

.timeline-entry::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 95px;
  width: 2px;
  content: "";
  background: var(--line);
}

.entry-time {
  padding-top: 22px;
  text-align: right;
}

.entry-time strong {
  display: block;
  font-size: 19px;
  line-height: 1;
}

.entry-time span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.entry-node {
  z-index: 1;
  width: 16px;
  height: 16px;
  margin: 24px auto 0;
  border: 3px solid var(--green);
  border-radius: 50%;
  background: var(--panel);
  box-shadow: 0 0 0 6px var(--green-soft);
}

.entry-card {
  position: relative;
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.entry-card:hover {
  border-color: var(--line-strong);
}

.entry-meta {
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.source-avatar {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.source-name {
  font-weight: 700;
}

.score {
  margin-left: auto;
  padding: 4px 8px;
  color: var(--yellow);
  border: 1px solid #edd59f;
  border-radius: 999px;
  background: #fff8e7;
  font-size: 12px;
  font-weight: 900;
}

.entry-card h2 {
  margin: 14px 0 10px;
  font-size: 25px;
  line-height: 1.35;
}

.entry-card h2 a:hover {
  color: var(--green);
}

.summary {
  margin: 0;
  color: #39443a;
  font-size: 15px;
  line-height: 1.75;
}

.tag-row {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag-row span {
  padding: 5px 9px;
  color: #4f5d50;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  font-size: 12px;
  font-weight: 700;
}

.focus {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  color: #3c4b3e;
  border-left: 3px solid var(--green);
  border-radius: 8px;
  background: #f5faf6;
  font-size: 14px;
  line-height: 1.65;
}

.focus b {
  color: var(--green);
}

.origin-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--green);
  font-weight: 800;
}

.empty {
  padding: 46px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--panel);
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@media (max-width: 900px) {
  .page {
    width: min(100% - 28px, 720px);
  }

  .site-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .header-right {
    justify-content: space-between;
  }

  h1 {
    font-size: 42px;
  }

  .toolbar {
    grid-template-columns: 1fr;
    position: static;
  }

  .summary-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .segmented {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .day-label {
    margin-left: 0;
    position: static;
  }

  .timeline-entry {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .timeline-entry::before,
  .entry-node {
    display: none;
  }

  .entry-time {
    padding: 8px 0;
    text-align: left;
  }

  .entry-card {
    padding: 18px;
  }

  .score {
    margin-left: 0;
  }

  .entry-card h2 {
    font-size: 21px;
  }

  .focus {
    grid-template-columns: 1fr;
  }
}
