:root {
  --ink: #151923;
  --muted: #626b78;
  --paper: #f7f6f0;
  --surface: rgba(255, 255, 250, 0.84);
  --surface-strong: rgba(255, 255, 250, 0.96);
  --line: rgba(21, 25, 35, 0.14);
  --green: #2f6f55;
  --blue: #294f82;
  --rust: #965a25;
  --red: #8d3137;
  --shadow: 0 22px 58px rgba(21, 25, 35, 0.08);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(47, 111, 85, 0.1), transparent 30%),
    linear-gradient(28deg, rgba(150, 90, 37, 0.09), transparent 38%),
    linear-gradient(180deg, #fffefa 0%, var(--paper) 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
  color: inherit;
}

.zx-shell {
  display: grid;
  gap: clamp(18px, 3vw, 30px);
  width: min(1440px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 50px) clamp(16px, 4vw, 46px) clamp(48px, 8vw, 86px);
}

.zx-header {
  padding-bottom: clamp(20px, 4vw, 34px);
  border-bottom: 1px solid var(--line);
}

.zx-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: clamp(22px, 4vw, 38px);
}

.zx-nav a,
.action-row a,
.action-row button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: rgba(255, 255, 250, 0.74);
  color: var(--blue);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 760;
  text-decoration: none;
}

.action-row button {
  background: var(--ink);
  color: #fffdfa;
  cursor: pointer;
}

.title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
}

.kicker,
.panel-kicker {
  margin: 0;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 780;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 14px;
  font-size: clamp(2.45rem, 5.8vw, 5.1rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-top: 6px;
  font-size: clamp(1.28rem, 2.3vw, 1.9rem);
  line-height: 1.08;
}

.sync-panel,
.capture-note,
.stat-grid article,
.toolbar,
.feed-column,
.detail-column {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.sync-panel {
  display: grid;
  gap: 6px;
  min-width: min(280px, 100%);
  padding: 14px;
}

.sync-panel span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 720;
}

.sync-panel strong {
  color: var(--green);
  font-size: 1.65rem;
}

.capture-note {
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  color: var(--muted);
  background: rgba(255, 255, 250, 0.9);
  line-height: 1.58;
}

.capture-note strong {
  color: var(--red);
}

.five-hour-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  border: 1px solid rgba(41, 79, 130, 0.18);
  border-radius: 8px;
  padding: clamp(16px, 3vw, 24px);
  background:
    linear-gradient(135deg, rgba(255, 255, 250, 0.94), rgba(247, 246, 240, 0.76)),
    repeating-linear-gradient(90deg, rgba(41, 79, 130, 0.045) 0 1px, transparent 1px 24px);
  box-shadow: var(--shadow);
}

.five-hour-copy {
  display: grid;
  gap: 10px;
}

.five-hour-copy p:last-child {
  max-width: 900px;
  color: var(--ink);
  line-height: 1.65;
}

.five-hour-side {
  display: grid;
  gap: 10px;
  align-content: start;
  justify-items: end;
}

.five-hour-side span {
  color: var(--green);
  font-size: 1.25rem;
  font-weight: 820;
}

.five-hour-side a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: var(--ink);
  color: #fffdfa;
  font-size: 0.82rem;
  font-weight: 780;
  text-decoration: none;
}

.five-hour-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.five-hour-grid article {
  display: grid;
  gap: 10px;
  min-height: 106px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 250, 0.72);
}

.five-hour-grid article > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 780;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pill-list span,
.pill-list em {
  border: 1px solid rgba(41, 79, 130, 0.14);
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255, 255, 250, 0.86);
  color: var(--blue);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 740;
}

.pill-list em {
  color: var(--muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stat-grid article {
  min-height: 92px;
  padding: 13px;
}

.stat-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.stat-grid strong {
  display: block;
  margin-top: 14px;
  color: var(--blue);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 220px) minmax(130px, 170px) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.search-box,
.select-box {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.search-box span,
.select-box span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 780;
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  font: inherit;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.feed-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 14px;
  align-items: start;
}

.feed-column,
.detail-column {
  min-width: 0;
  padding: 16px;
  background: var(--surface-strong);
}

.detail-column {
  position: sticky;
  top: 16px;
}

.section-head {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

#visible-count {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
}

.empty-state {
  margin-top: 14px;
  border: 1px dashed rgba(21, 25, 35, 0.22);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: rgba(247, 246, 240, 0.66);
  line-height: 1.6;
}

.feed-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.feed-item {
  display: grid;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: rgba(255, 255, 250, 0.72);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.feed-item:hover,
.feed-item.is-active {
  border-color: rgba(41, 79, 130, 0.34);
  background: rgba(255, 255, 250, 0.98);
}

.feed-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.feed-author {
  color: var(--blue);
}

.feed-text,
.detail-text {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.68;
  white-space: pre-wrap;
  word-break: break-word;
}

.feed-text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.image-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.image-strip span {
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(47, 111, 85, 0.1);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 760;
}

.detail-card {
  display: grid;
  gap: 13px;
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.64;
}

.detail-card a {
  color: var(--blue);
  font-weight: 760;
  overflow-wrap: anywhere;
}

@media (max-width: 920px) {
  .title-row,
  .five-hour-panel,
  .five-hour-grid,
  .toolbar,
  .feed-layout {
    grid-template-columns: 1fr;
  }

  .five-hour-side {
    justify-items: start;
  }

  .detail-column {
    position: static;
  }
}

@media (max-width: 680px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-row {
    justify-content: stretch;
  }

  .action-row > * {
    flex: 1;
  }
}
