:root {
  --bg: #f3f7fa;
  --panel: #fbfdff;
  --card: #ffffff;
  --ink: #142033;
  --muted: #617088;
  --line: #dbe6ee;
  --soft: #eef7fb;
  --active: #dff6ff;
  --active-border: #83d8ee;
  --accent: #10a7cc;
  --green: #e9fbf4;
  --green-text: #07805f;
  --orange: #ff9f2d;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(207, 245, 255, 0.45), transparent 32%),
    linear-gradient(180deg, #f7fbfd 0%, var(--bg) 100%);
  line-height: 1.5;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  min-height: 100vh;
  padding: 14px 16px 22px;
}

.sidebar {
  position: sticky;
  top: 14px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  height: calc(100vh - 28px);
}

.brand-card,
.main-nav,
.sidebar-footer,
.hero-panel,
.news-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 45px rgba(31, 72, 94, 0.08);
}

.brand-card {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 84px;
  padding: 10px;
  text-align: center;
  font-weight: 850;
  line-height: 1.05;
}

.brand-logo {
  display: block;
  width: 46px;
  height: 46px;
}

.main-nav {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
}

.main-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  color: #52637b;
  font-size: 14px;
}

.main-nav a:hover {
  background: var(--soft);
  color: var(--ink);
}

.main-nav a.active {
  color: #0784a4;
  border: 1px solid var(--active-border);
  background: var(--active);
  font-weight: 800;
}

.nav-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.theme-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #edf4f8;
}

.theme-toggle button,
.login-btn,
.search-btn,
.date-btn {
  border: 0;
  background: transparent;
}

.theme-toggle button {
  display: grid;
  place-items: center;
  min-height: 28px;
  border-radius: 999px;
  color: #62738a;
}

.theme-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 10px rgba(32, 55, 72, 0.12);
}

.login-btn {
  justify-self: start;
  color: #95a2b2;
  font-size: 13px;
}

.workspace {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.hero-panel {
  display: grid;
  gap: 10px;
  padding: 14px 18px;
}

.hero-copy {
  display: flex;
  align-items: center;
  min-height: 34px;
}

.hero-copy h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px 76px;
  gap: 10px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.segment-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 2px;
  border: 1px solid #bde4ef;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.tab-btn {
  min-width: 68px;
  min-height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #59687d;
  background: transparent;
  white-space: nowrap;
}

.tab-btn.active {
  color: #0b7897;
  background: var(--active);
  box-shadow: inset 0 0 0 1px var(--active-border);
  font-weight: 800;
}

.tab-btn em {
  display: none;
}

.search-box input {
  width: 100%;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #fff;
}

.search-box input:focus {
  border-color: var(--active-border);
}

.search-btn {
  height: 36px;
  border: 1px solid #86d5e9;
  border-radius: 999px;
  color: #097b9a;
  background: var(--active);
  font-weight: 800;
}

.timeline {
  min-width: 0;
}

.timeline-list {
  display: grid;
  gap: 10px;
}

.day-group {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px 16px;
}

.date-row {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 5px;
  height: 30px;
  padding: 0 8px 0 0;
  border: 0;
  color: #4d6177;
  background: transparent;
  font-weight: 800;
}

.date-row .chevron {
  color: #6f8298;
  transition: transform 160ms ease;
}

.day-group.collapsed .chevron {
  transform: rotate(-90deg);
}

.day-items {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.day-group.collapsed .day-items {
  display: none;
}

.timeline-entry {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
}

.time-cell {
  position: relative;
  display: flex;
  justify-content: flex-end;
  padding: 8px 18px 0 0;
  color: #142033;
  font-size: 20px;
  font-weight: 900;
}

.time-cell::before {
  content: "";
  position: absolute;
  top: -8px;
  right: -8px;
  bottom: -10px;
  width: 1px;
  background: #c9d8e3;
}

.time-cell::after {
  content: "";
  position: absolute;
  top: 17px;
  right: -12px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #68d6bc;
  box-shadow: 0 0 0 4px #e9fbf7;
}

.news-card {
  padding: 12px 16px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.source {
  color: #738197;
  font-size: 13px;
}

.card-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.featured {
  padding: 2px 7px;
  border: 1px solid #ffc173;
  border-radius: 999px;
  color: #a45b00;
  background: #fff5e5;
  font-size: 12px;
  font-weight: 800;
}

.score {
  min-width: 34px;
  padding: 2px 8px;
  border: 1px solid #9bdef0;
  border-radius: 999px;
  color: #0980a0;
  background: #e5faff;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.item-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.summary {
  margin: 6px 0 0;
  color: #46566d;
  font-size: 14px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.meta-row span {
  padding: 4px 8px;
  border-radius: 5px;
  color: #536176;
  background: #f2f4f6;
  font-size: 12px;
}

.why {
  margin: 12px 0 0;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--green-text);
  background: var(--green);
  font-size: 13px;
}

.empty {
  grid-column: 2;
  padding: 18px;
  border: 1px dashed #c9d8e3;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}

/* ---- 卡片图区（作品案例配图） ---- */
.card-media {
  margin: 10px 0 2px;
}

.hero-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #eef3f7;
}

.card-hero {
  display: block;
  width: 100%;
  max-height: 440px;
  object-fit: cover;
}

.cover-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(8, 25, 40, 0.74);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.thumb-strip {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-bottom: 2px;
  overflow-x: auto;
}

.thumb {
  position: relative;
  flex: 0 0 auto;
  width: 112px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #eef3f7;
  cursor: pointer;
}

.thumb img {
  display: block;
  width: 100%;
  height: 72px;
  object-fit: cover;
}

.thumb:hover {
  border-color: #b9dee9;
}

.thumb.is-cover {
  border-color: var(--accent);
}

.thumb-num {
  position: absolute;
  bottom: 3px;
  left: 5px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .main-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 620px) {
  .app-shell {
    padding: 10px;
  }

  .day-group,
  .timeline-entry {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 8px 10px;
  }

  .time-cell {
    padding-right: 12px;
    font-size: 16px;
  }

  .main-nav {
    grid-template-columns: 1fr;
  }
}
