:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-raised: #fbfcfe;
  --line: #dfe5ee;
  --line-strong: #c8d1df;
  --text: #1e293b;
  --muted: #526179;
  --faint: #8896aa;
  --accent: #2563eb;
  --accent-soft: #e9f0ff;
  --accent-ink: #1747a6;
  --accent-warm: #f97316;
  --good: #087f5b;
  --good-soft: #e4f7ef;
  --warn: #a16207;
  --warn-soft: #fff3d6;
  --danger: #b42318;
  --shadow: 0 14px 36px rgba(17, 24, 39, 0.08);
  --radius: 8px;
  --touch: 44px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
}

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  padding-bottom: 42px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(90deg, rgba(30, 41, 59, 0.026) 1px, transparent 1px),
    linear-gradient(rgba(30, 41, 59, 0.026) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

button[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 30;
  transform: translateY(-140%);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 10px 24px;
  border-bottom: 1px solid rgba(200, 209, 223, 0.76);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.brand-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--accent) 0 50%, transparent 50%),
    linear-gradient(315deg, #14b8a6 0 48%, #ffffff 48%);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.72);
}

.brand strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.brand span:not(.brand-mark) {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.76);
  backdrop-filter: blur(12px);
}

.tab {
  min-width: 74px;
  height: var(--touch);
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.08);
}

.layout {
  flex: 1 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  gap: 22px;
  max-width: 1380px;
  margin: 0 auto;
  padding: 22px;
}

.site-footer {
  position: fixed;
  right: 0;
  bottom: 8px;
  left: 0;
  z-index: 30;
  pointer-events: none;
  display: flex;
  justify-content: center;
  padding: 0 22px;
}

.filing-link {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(203, 213, 225, 0.52);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  color: var(--faint);
  font-size: 12px;
  line-height: 1.4;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

.filing-link:hover,
.filing-link:focus-visible {
  border-color: rgba(37, 99, 235, 0.24);
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-ink);
}

body[data-view="home"] .site-footer {
  padding: 0 22px;
}

body[data-view="home"] .filing-link {
  border-color: rgba(200, 209, 223, 0.7);
  background: rgba(255, 255, 255, 0.72);
  color: var(--faint);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  text-shadow: none;
}

body[data-view="home"] .filing-link:hover,
body[data-view="home"] .filing-link:focus-visible {
  border-color: rgba(37, 99, 235, 0.24);
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-ink);
}

.filters {
  position: sticky;
  top: 86px;
  align-self: start;
  display: grid;
  gap: 12px;
}

.control-panel,
.workspace-head,
.item-card,
.topic-card,
.archive-day,
.stat-card,
.chart-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
}

.control-panel {
  min-width: 0;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.04);
}

.sidebar-metrics {
  display: none;
  gap: 8px;
  padding: 10px;
}

.sidebar-metric {
  display: grid;
  gap: 3px;
  padding: 10px 12px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(247, 250, 252, 0.94);
}

.sidebar-metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sidebar-metric strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.search-icon-button {
  min-width: 56px;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.search-glyph {
  font-size: 24px;
  line-height: 1;
  transform: translateY(-1px);
}

.control-panel label,
.panel-heading h2,
.lane-title h2 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.panel-heading,
.lane-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-heading span,
.lane-title span {
  color: var(--faint);
  font-size: 12px;
}

input {
  width: 100%;
  height: var(--touch);
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: var(--surface-raised);
  color: var(--text);
}

input::placeholder {
  color: #9aa6b8;
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-button,
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.tag-button {
  min-height: 44px;
  padding: 0 12px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.tag-button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.tag-button.active {
  border-color: rgba(37, 99, 235, 0.4);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.source-list {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 9px;
}

.source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border-bottom: 1px solid rgba(223, 229, 238, 0.7);
  font-size: 13px;
}

.source-row:last-child {
  border-bottom: 0;
}

.source-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.source-row span:last-child {
  color: var(--muted);
}

.source-list-page {
  gap: 8px;
}

.source-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.source-filter-button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.source-filter-button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.source-filter-button.active {
  border-color: rgba(37, 99, 235, 0.4);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.source-row-large {
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  padding: 12px 14px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.source-row-large > div:first-child {
  display: grid;
  gap: 7px;
}

.source-row-large span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.source-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.source-title-line strong {
  min-width: 0;
}

.source-pills {
  flex: 0 0 auto;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.source-inline-count {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.source-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 12px;
  color: var(--muted);
  font-size: 12px;
}

.source-summary {
  margin: 1px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}

.source-summary-line {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.source-summary-focus {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
}

.source-summary-label {
  flex: 0 0 auto;
  color: var(--faint);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.source-focus-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.source-focus-pill {
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(37, 99, 235, 0.06);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 700;
}

.source-highlights {
  display: -webkit-box;
  overflow: hidden;
  color: var(--faint);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.source-state {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 5px;
}

.source-status,
.source-enabled {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.source-enabled {
  border-color: rgba(200, 209, 223, 0.72);
  color: var(--faint);
}

.source-status-success {
  border-color: rgba(20, 184, 166, 0.28);
  background: rgba(20, 184, 166, 0.08);
  color: #0f766e;
}

.source-status-pending {
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted);
}

.source-status-empty {
  border-color: rgba(59, 130, 246, 0.2);
  background: rgba(59, 130, 246, 0.06);
  color: #315d9f;
}

.source-status-running {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-ink);
}

.source-status-failed,
.source-status-blocked,
.source-status-degraded {
  border-color: rgba(244, 63, 94, 0.24);
  background: rgba(244, 63, 94, 0.06);
  color: #be123c;
}

.content {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.workspace-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: end;
  gap: 18px;
  min-width: 0;
  padding: 20px;
  box-shadow: var(--shadow);
}

.workspace-head > *,
.metric-strip,
.lane,
.feed,
.item-card {
  min-width: 0;
  max-width: 100%;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.workspace-head h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
}

.workspace-head p:not(.eyebrow) {
  margin: 8px 0 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

body[data-view="today"] .content {
  gap: 12px;
}

body[data-view="today"] .layout {
  grid-template-columns: 1fr;
}

body[data-view="today"] .filters {
  display: none;
}

body[data-view="trends"] .layout,
body[data-view="sources"] .layout,
body[data-view="archive"] .layout {
  grid-template-columns: 1fr;
}

body[data-view="trends"] .filters,
body[data-view="sources"] .filters,
body[data-view="archive"] .filters {
  display: none;
}

  body[data-view="today"] .workspace-head {
    display: none;
  }

body[data-view="trends"] .workspace-head,
body[data-view="sources"] .workspace-head,
body[data-view="archive"] .workspace-head {
  display: none;
}

body[data-view="trends"] .workspace-head .stats-strip,
body[data-view="sources"] .workspace-head .stats-strip,
body[data-view="archive"] .workspace-head .stats-strip {
  display: none;
}

body[data-view="trends"] .workspace-head p:not(.eyebrow),
body[data-view="sources"] .workspace-head p:not(.eyebrow),
body[data-view="archive"] .workspace-head p:not(.eyebrow) {
  margin-top: 4px;
  max-width: 36ch;
  font-size: 14px;
  line-height: 1.45;
}

body[data-view="trends"] .metric-strip,
body[data-view="sources"] .metric-strip,
body[data-view="archive"] .metric-strip {
  display: none;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
}

body[data-view="today"] .metric-strip {
  border-radius: 18px;
  background: rgba(247, 250, 252, 0.94);
}

.metric {
  min-width: 0;
  padding: 13px 14px;
  border-right: 1px solid var(--line);
}

body[data-view="today"] .metric {
  padding: 11px 14px 12px;
}

.metric:last-child {
  border-right: 0;
}

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

.metric strong {
  display: block;
  margin-top: 5px;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

body[data-view="today"] .metric strong {
  margin-top: 4px;
  font-size: 24px;
}

.view {
  display: none;
  gap: 16px;
}

.view.active {
  display: grid;
}

body[data-view="home"] .layout {
  grid-template-columns: 1fr;
  max-width: none;
  padding-top: 0;
}

body[data-view="home"] .filters,
body[data-view="home"] .workspace-head {
  display: none;
}

body[data-view="home"] .content {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

body[data-view="home"] .topbar {
  display: none;
}

body[data-view="home"] {
  background:
    linear-gradient(90deg, rgba(30, 41, 59, 0.026) 1px, transparent 1px),
    linear-gradient(rgba(30, 41, 59, 0.026) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
}

body[data-view="home"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: rgba(236, 242, 248, 0.16);
  backdrop-filter: blur(0);
  transition:
    opacity 220ms ease,
    backdrop-filter 220ms ease,
    background 220ms ease;
}

body[data-view="home"]:has(.home-search:focus-within)::before {
  opacity: 1;
  background: rgba(236, 242, 248, 0.24);
  backdrop-filter: blur(16px);
}

#homeView.active {
  display: block;
}

.home-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 0 40px;
}

.home-center {
  width: min(100%, 760px);
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.home-clock {
  margin: 0;
  font-size: clamp(54px, 12vw, 116px);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.home-date {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.home-search {
  width: min(100%, 760px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.home-search input {
  height: 56px;
  margin-top: 0;
  border-radius: 999px;
  padding-inline: 24px;
  border-color: rgba(200, 209, 223, 0.92);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 20px 40px rgba(17, 24, 39, 0.08);
  font-size: 17px;
}

.home-shortcuts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.home-shortcut {
  min-width: 92px;
  min-height: 52px;
  border: 1px solid rgba(200, 209, 223, 0.96);
  border-radius: 999px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  text-align: center;
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.08);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.home-shortcut:hover,
.home-shortcut:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.38);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 42px rgba(17, 24, 39, 0.12);
  outline: none;
}

.home-shortcut strong {
  font-size: 15px;
  line-height: 1;
}

.home-poster-stage {
  min-height: calc(100vh - 48px);
  align-items: start;
  justify-content: center;
  place-items: start center;
  padding: 28px 16px 72px;
  overflow: visible;
}

.home-poster-card {
  width: min(700px, 100%);
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.home-poster-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.home-poster-chip {
  border-radius: 999px;
  padding: 8px 14px;
  background: #edf5ff;
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
}

.home-poster-date,
.home-poster-note {
  color: #8492a6;
  font-size: 13px;
  font-weight: 800;
}

.home-poster-card h1 {
  margin: 0 0 8px;
  color: #111827;
  font-size: clamp(34px, 7vw, 52px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.home-poster-subtitle {
  margin: 0 0 8px;
  color: #334155;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.35;
}

.home-poster-note {
  margin: 0 0 26px;
}

.home-radar-board {
  display: grid;
  gap: 12px;
}

.home-radar-row {
  position: relative;
  display: grid;
  grid-template-columns: 38px 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 14px 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.035);
  backdrop-filter: blur(12px);
  animation: homeRankIn 360ms ease both;
  animation-delay: var(--rank-delay);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.home-radar-row::before {
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-warm));
  content: "";
}

.home-radar-row:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.09);
}

.home-radar-rank {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 7px;
  background: #0f172a;
  color: #ffffff;
  font-size: 16px;
  font-weight: 950;
}

.home-radar-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.86), transparent 38%),
    linear-gradient(135deg, #dbeafe, #f8d7e8 55%, #fdecc8);
  color: #172033;
  font-weight: 950;
}

.home-radar-main {
  min-width: 0;
}

.home-radar-main h2 {
  margin: 0 0 2px;
  overflow: hidden;
  color: #172033;
  font-size: 17px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-radar-main p {
  margin: 0;
  color: #26364d;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.home-radar-main small {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #8a98aa;
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-radar-score {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 74px;
}

.home-radar-score span {
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff3d6;
  color: #9a5a04;
  font-size: 11px;
  font-weight: 950;
}

.home-radar-score strong {
  max-width: 112px;
  overflow: hidden;
  color: var(--good);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-radar-empty {
  display: grid;
  gap: 4px;
  border: 1px dashed rgba(148, 163, 184, 0.7);
  border-radius: 20px;
  padding: 18px;
  background: #f8fbfd;
}

.home-radar-empty strong {
  color: #172033;
}

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

.home-poster-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
}

.home-poster-actions .home-shortcut {
  min-width: 0;
  min-height: 44px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

@keyframes homeRankIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


#trendsView.active {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.trend-toolbar,
.range-switch,
.stats-strip,
.chart-wide {
  grid-column: 1 / -1;
}

.trend-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(200, 209, 223, 0.72);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045);
}

.range-switch {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  padding: 6px 8px 6px 10px;
  background: rgba(255, 255, 255, 0.86);
}

.range-switch label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.range-switch select {
  min-width: 112px;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0 28px 0 10px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
}

.date-switch {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 0;
  }

  .date-switch[hidden] {
    display: none;
  }

  .date-switch-shell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
  }

  .date-nav-button {
    width: 32px;
    min-width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    transition:
      background 160ms ease,
      color 160ms ease,
      transform 160ms ease;
  }

  .date-nav-button:hover:not(:disabled) {
    background: var(--accent-soft);
    color: var(--accent-ink);
    transform: translateY(-1px);
  }

  .date-nav-button:disabled {
    opacity: 0.38;
    cursor: default;
  }

  .date-menu {
    position: relative;
    min-width: 128px;
    max-width: min(46vw, 168px);
  }

  .date-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 32px;
    padding: 0 12px 0 14px;
    border: 0;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--accent-ink);
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
    transition:
      background 160ms ease,
      box-shadow 160ms ease,
      transform 160ms ease;
  }

  .date-menu-button:hover,
  .date-menu-button:focus-visible,
  .date-menu.open .date-menu-button {
    background: rgba(37, 99, 235, 0.12);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.22);
  }

  .date-menu-label {
    min-width: 0;
    white-space: nowrap;
  }

  .date-menu-chevron {
    width: 8px;
    height: 8px;
    margin-top: -2px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 160ms ease;
  }

  .date-menu.open .date-menu-chevron {
    transform: translateY(2px) rotate(225deg);
  }

  .date-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: grid;
    gap: 8px;
    width: 228px;
    max-width: min(72vw, 260px);
    max-height: min(320px, 52vh);
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(18px);
    scrollbar-width: none;
  }

  .date-menu-panel[hidden] {
    display: none;
  }

  .date-menu-panel::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .date-menu-backdrop {
    display: none;
  }

  .date-sheet-handle {
    display: none;
  }

  .date-menu-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .date-year-tabs,
  .date-month-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .date-year-tabs {
    padding-bottom: 2px;
  }

  .date-month-tabs {
    padding-bottom: 2px;
  }

  .date-year-tabs::-webkit-scrollbar,
  .date-month-tabs::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .date-year-tab,
  .date-month-tab {
    min-height: 28px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--muted);
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
    transition:
      background 160ms ease,
      color 160ms ease;
  }

  .date-year-tab.active,
  .date-month-tab.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-ink);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
  }

  .date-menu-item {
    justify-self: stretch;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid rgba(203, 213, 225, 0.92);
    border-radius: 14px;
    appearance: none;
    -webkit-appearance: none;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.94));
    color: rgba(71, 85, 105, 0.92);
    font: inherit;
    font-size: 12px;
    font-weight: 850;
    text-align: center;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    transition:
      background 160ms ease,
      color 160ms ease,
      transform 160ms ease,
      border-color 160ms ease,
      box-shadow 160ms ease;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.035);
  }

  .date-menu-item:hover,
  .date-menu-item:focus-visible {
    background: rgba(37, 99, 235, 0.08);
    color: var(--accent-ink);
    outline: none;
    border-color: rgba(96, 165, 250, 0.55);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
  }

  .date-menu-item.active {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.14), rgba(37, 99, 235, 0.08));
    color: var(--accent-ink);
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow:
      inset 0 0 0 1px rgba(37, 99, 235, 0.1),
      0 10px 22px rgba(37, 99, 235, 0.08);
  }

  body.date-menu-active {
    overflow: hidden;
  }

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.035);
}

.chart-panel {
  min-width: 0;
  padding: 14px;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.045);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

body[data-view="trends"] .chart-panel {
  border-color: rgba(200, 209, 223, 0.78);
  background: rgba(255, 255, 255, 0.9);
}

body[data-view="trends"] .chart-panel:hover {
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

body[data-view="trends"] .chart-wide {
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.055), transparent 42%),
    rgba(255, 255, 255, 0.92);
}

body[data-view="trends"] .trend-detail-panel {
  grid-column: 1 / -1;
}

.stat-chip {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.86);
}

.stat-chip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.stat-chip strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.trend-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.trend-summary-strip .stat-chip {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 2px 8px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(200, 209, 223, 0.72);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
}

.trend-summary-strip .stat-chip span {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
  white-space: nowrap;
}

.trend-summary-strip .stat-chip strong {
  grid-column: 1;
  grid-row: 1 / span 2;
  color: var(--text);
  font-size: 25px;
  letter-spacing: -0.03em;
}

.trend-summary-strip .stat-chip small {
  grid-column: 2;
  color: var(--faint);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.chart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.chart-heading h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.chart-heading span {
  color: var(--muted);
  font-size: 12px;
}

.chart-note {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(37, 99, 235, 0.06);
  color: var(--accent-ink) !important;
  font-weight: 850;
  white-space: nowrap;
}

.chart-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
}

.chart-action {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}

.chart-action:hover,
.chart-action:focus-visible {
  border-color: rgba(37, 99, 235, 0.38);
  color: var(--accent-ink);
  outline: none;
}

.chart-action.active {
  border-color: rgba(37, 99, 235, 0.42);
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-ink);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.echart {
  width: 100%;
  min-height: 286px;
}

.chart-wide-canvas {
  min-height: 286px;
}

.chart-fallback {
  display: grid;
  gap: 10px;
}

.chart-fallback-row {
  display: grid;
  gap: 6px;
}

.chart-fallback-row div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.chart-fallback-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.chart-fallback-row strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.chart-fallback-row i {
  display: block;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--accent-soft);
}

.chart-fallback-row i::before {
  display: block;
  width: var(--bar-width);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  content: "";
}

.trend-local {
  display: block;
}

.trend-local-svg {
  width: 100%;
  height: 286px;
  overflow: visible;
}

.trend-local-grid {
  stroke: #e7edf5;
  stroke-width: 1;
}

.trend-local-bar {
  fill: rgba(37, 99, 235, 0.78);
}

.trend-local-area {
  fill: url(#trendLocalArea);
}

.trend-local-line {
  fill: none;
  stroke: #2563eb;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-local-dot {
  fill: #2563eb;
  stroke: #fff;
  stroke-width: 2;
}

.trend-local-label,
.trend-local-value {
  fill: #526179;
  font-size: 11px;
  font-weight: 700;
}

.trend-local-value {
  fill: #1f2a44;
  font-size: 13px;
  font-weight: 800;
}

.lane {
  display: grid;
  gap: 10px;
}

.lane-title {
  margin-bottom: 0;
  padding: 0 2px;
}

.lane-required .lane-title h2 {
  color: var(--accent-ink);
}

.feed {
  display: grid;
  gap: 10px;
}

@media (min-width: 1180px) {
  body[data-view="today"] .feed-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
  }

  body[data-view="today"] .feed-toolbar-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 42px;
  }

  body[data-view="today"] .feed-toolbar-copy-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
  }

  body[data-view="today"] .feed-toolbar-copy-main strong {
    font-size: 14px;
    line-height: 1;
  }

  body[data-view="today"] .feed-toolbar-copy-main span {
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }

  body[data-view="today"] .feed-metrics {
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 10px 14px;
  }

  body[data-view="today"] .feed-metric strong {
    font-size: 16px;
  }

  body[data-view="today"] .feed {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 12px;
  }

  body[data-view="today"] .feed.masonry-ready {
    grid-auto-rows: 1px;
  }

  body[data-view="today"] .feed .item-card {
    display: grid;
    width: 100%;
    margin: 0;
    align-self: start;
  }

  body[data-view="today"] .feed.masonry-ready .item-card {
    grid-row-end: span var(--masonry-span);
  }

  body[data-view="today"] .item-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
  }

  body[data-view="today"] .item-footer {
    width: 100%;
    margin-top: auto;
    padding-top: 10px;
  }

  body[data-view="sources"] .source-list-page {
    display: block;
    column-count: 2;
    column-gap: 12px;
  }

  body[data-view="sources"] .source-filter-bar,
  body[data-view="sources"] .source-list-page .empty {
    display: flex;
    column-span: all;
    break-inside: avoid;
    page-break-inside: avoid;
    width: 100%;
    margin: 0 0 12px;
  }

  body[data-view="sources"] .source-row-large {
    break-inside: avoid;
    page-break-inside: avoid;
    display: inline-grid;
    width: 100%;
    margin: 0 0 12px;
    vertical-align: top;
  }

  body[data-view="archive"] .archive-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 12px;
  }

  body[data-view="archive"] .archive-day-rich {
    min-height: 0;
  }

  body[data-view="archive"] .archive-day h3 {
    margin-bottom: 2px;
  }
}

.feed-auto-load-sentinel {
  height: 2px;
}

.feed-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px 14px;
  min-height: 0;
  padding: 0;
  background: transparent;
}

.feed-toolbar-copy {
  display: grid;
  align-items: start;
  gap: 6px;
  min-width: 0;
  flex: 1 1 360px;
}

.feed-toolbar-copy-main {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.feed-toolbar strong {
  font-size: 13px;
}

.feed-toolbar span {
  color: var(--muted);
  font-size: 12px;
}

.feed-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  justify-content: flex-start;
  margin-left: 0;
}

.feed-metric {
  flex: 0 0 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  position: relative;
}

.feed-metric::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 1px;
  height: 12px;
  background: rgba(148, 163, 184, 0.34);
  transform: translateY(-50%);
}

.feed-metric:last-child::after {
  display: none;
}

.feed-metric em {
  color: var(--faint);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.feed-metric strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.item-card {
  position: relative;
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  min-height: 154px;
  padding: 16px 16px 16px 18px;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.035);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.keyword-board {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

body[data-view="today"] .feed-toolbar-copy {
  display: none;
}

.keyword-choice-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
}

.keyword-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid rgba(200, 209, 223, 0.85);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.035);
}

.keyword-choice:hover,
.keyword-choice:focus-visible {
  border-color: rgba(37, 99, 235, 0.34);
  color: var(--accent-ink);
  outline: none;
}

.keyword-choice.active {
  border-color: rgba(37, 99, 235, 0.42);
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-ink);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.keyword-choice strong {
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.keyword-choice span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: currentColor;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.keyword-board-intro {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.04), rgba(255, 255, 255, 0.92));
}

.keyword-board-intro strong {
  color: var(--text);
  font-size: 15px;
}

.keyword-board-intro span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.keyword-group {
  display: grid;
  gap: 12px;
}

.keyword-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.keyword-group-head-active {
  padding: 0 2px;
}

.keyword-group-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.3;
}

.keyword-group-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.keyword-group-count {
  flex: 0 0 auto;
  min-height: 24px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(37, 99, 235, 0.06);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

.keyword-group-list {
  display: grid;
  gap: 12px;
}

.item-card::before {
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-warm));
  content: "";
}

.item-card[data-kind="tool"]::before {
  background: linear-gradient(180deg, #14b8a6, var(--accent-warm));
}

.item-card[data-kind="article"]::before,
.item-card[data-kind="tutorial"]::before {
  background: linear-gradient(180deg, var(--accent-warm), var(--accent));
}

.item-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.09);
}

.item-main,
.item-card > * {
  min-width: 0;
  max-width: 100%;
}

.item-main {
  display: grid;
  align-content: start;
}

.item-visual {
  --visual-a: rgba(37, 99, 235, 0.26);
  --visual-b: rgba(20, 184, 166, 0.2);
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  width: 124px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background:
    linear-gradient(135deg, var(--visual-a), var(--visual-b)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.38) 0 1px, transparent 1px 9px),
    var(--surface-raised);
  background-position: center;
  background-size: cover;
}

.item-visual::after {
  position: absolute;
  inset: auto 10px 10px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  content: "";
}

.item-visual[data-kind="repo"] {
  --visual-a: rgba(37, 99, 235, 0.3);
  --visual-b: rgba(20, 184, 166, 0.22);
}

.item-visual[data-kind="tool"] {
  --visual-a: rgba(20, 184, 166, 0.28);
  --visual-b: rgba(249, 115, 22, 0.18);
}

.item-visual[data-kind="article"],
.item-visual[data-kind="tutorial"] {
  --visual-a: rgba(249, 115, 22, 0.24);
  --visual-b: rgba(37, 99, 235, 0.16);
  background:
    linear-gradient(135deg, var(--visual-a), var(--visual-b)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.38) 0 1px, transparent 1px 9px),
    var(--surface-raised);
}

.item-visual.has-image span {
  display: none;
}

.item-visual.has-image small {
  position: absolute;
  right: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
}

.item-visual span {
  color: var(--accent-ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.item-visual small {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 18px);
  overflow: hidden;
  color: rgba(30, 41, 59, 0.72);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.score-badge {
  min-height: 22px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 999px;
  padding: 4px 7px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
}

.item-card h3 {
  margin: 4px 0 8px;
  font-size: 18px;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.one-line,
.usefulness,
.source-line {
  margin: 0;
  max-width: 100%;
  font-size: 14px;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.usefulness {
  display: inline-block;
  position: relative;
  margin-top: 7px;
  width: fit-content;
  max-width: min(100%, 38ch);
  justify-self: start;
  border-left: 2px solid rgba(20, 184, 166, 0.46);
  padding: 1px 0 1px 8px;
  background: transparent;
  color: rgba(63, 88, 82, 0.92);
  border-radius: 0;
  font-size: 12px;
  line-height: 1.45;
}

.insight-list {
  display: inline-grid;
  gap: 5px;
  margin-top: 9px;
  width: fit-content;
  max-width: min(100%, 46ch);
  justify-self: start;
  border-left: 2px solid rgba(20, 184, 166, 0.34);
  border-radius: 6px;
  padding: 6px 9px;
  background: rgba(20, 184, 166, 0.04);
  max-width: 100%;
  overflow: hidden;
}

.insight-line {
  margin: 0;
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.62;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.insight-line-fit,
.insight-line-watch {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  border-top: 1px dashed rgba(145, 164, 190, 0.34);
  padding-top: 7px;
}

.insight-line-lead {
  font-weight: 800;
}

.insight-tag {
  flex: 0 0 auto;
  margin-top: 1px;
  border-radius: 999px;
  padding: 1px 6px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
}

.insight-copy {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.insight-line-watch .insight-tag {
  background: rgba(249, 115, 22, 0.12);
}

.source-line {
  margin-bottom: 8px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
}

.fact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 9px;
}

.fact-strip span {
  min-height: 26px;
  border: 1px solid rgba(200, 209, 223, 0.84);
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(248, 250, 252, 0.86);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

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

.item-footer {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px 12px;
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
}

.item-footer .tags {
  flex: 0 1 auto;
}

.item-feedback-bar {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 5px 8px;
  background: var(--surface-raised);
  color: var(--faint);
}

.feedback-button {
  min-height: 28px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.feedback-button:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.24);
  color: var(--accent-ink);
}

.feedback-button.active {
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-ink);
}

.feedback-button[data-feedback-action="skip"].active {
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(226, 232, 240, 0.54);
  color: #526179;
}

.feedback-skipped {
  opacity: 0.72;
}

.feedback-favorite {
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.08);
}

.primary-action {
  margin-left: 0;
  min-width: 82px;
  min-height: 34px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 7px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-ink);
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.primary-action:hover {
  transform: translateY(-1px);
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.36);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.compact .item-card {
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.compact .item-card::before {
  background: var(--line-strong);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.topic-card {
  min-height: 96px;
  padding: 14px;
  text-align: left;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.topic-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.08);
}

.topic-cloud {
  position: relative;
  display: flex;
  align-content: center;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  overflow: hidden;
  min-height: 250px;
  padding: 20px 24px;
}

.topic-cloud::before {
  content: "";
  position: absolute;
  inset: 24px 40px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 28% 35%, rgba(37, 99, 235, 0.1), transparent 34%),
    radial-gradient(circle at 70% 42%, rgba(20, 184, 166, 0.12), transparent 34%);
  pointer-events: none;
}

.topic-cloud-word {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: transparent;
  color: var(--word-color);
  font-size: var(--word-size);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  transform: rotate(var(--word-tilt));
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.topic-cloud-word.major {
  text-shadow: 0 10px 24px rgba(37, 99, 235, 0.14);
}

.topic-cloud-word small {
  color: var(--faint);
  font-size: 11px;
  font-weight: 800;
}

.topic-cloud-word:hover {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
  transform: rotate(0deg) translateY(-1px);
}

.source-rank-chart {
  min-height: 250px;
}

.source-rank {
  display: grid;
  align-content: center;
  gap: 16px;
  min-height: 250px;
  padding: 12px 4px;
}

.source-rank-row {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.source-rank-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.source-rank-head strong {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.source-rank-head span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.source-rank-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.16), rgba(148, 163, 184, 0.08)),
    var(--surface-raised);
}

.source-rank-track span {
  display: block;
  width: var(--source-width);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--source-color), color-mix(in srgb, var(--source-color) 70%, white));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--source-color) 22%, transparent);
}

.heat-bands-chart {
  min-height: 280px;
}

.heat-skyline {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 8px;
  padding: 18px 14px 14px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.98)),
    var(--surface);
}

.heat-skyline-grid {
  position: absolute;
  inset: 18px 14px 74px;
  background:
    linear-gradient(to top, rgba(148, 163, 184, 0.12) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, rgba(148, 163, 184, 0.08), transparent 38%, rgba(148, 163, 184, 0.08));
  pointer-events: none;
}

.heat-skyline-bars {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  min-height: 248px;
}

.heat-tower {
  display: grid;
  grid-template-rows: auto minmax(130px, 1fr) auto auto;
  align-items: end;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.heat-tower-value {
  max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--heat-color) 26%, var(--line));
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--heat-color) 12%, transparent);
}

.heat-tower-bar {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: min(54px, 78%);
  height: 100%;
  min-height: 130px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.72);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
}

.heat-tower-bar i {
  display: block;
  width: 100%;
  height: var(--heat-height);
  min-height: 28px;
  border-radius: inherit;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--heat-color) 72%, white), var(--heat-color));
  box-shadow: 0 12px 24px color-mix(in srgb, var(--heat-color) 24%, transparent);
}

.heat-tower-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.heat-tower small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.trend-detail-table {
  display: grid;
  gap: 8px;
}

.trend-detail-head,
.trend-detail-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 88px 88px;
  align-items: center;
  gap: 10px;
}

.trend-detail-head {
  padding: 0 10px 2px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 850;
}

.trend-detail-head span:first-child {
  grid-column: 1 / 3;
}

.trend-detail-row {
  position: relative;
  overflow: hidden;
  min-height: 48px;
  border: 1px solid rgba(200, 209, 223, 0.7);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.78);
}

.trend-detail-row > * {
  position: relative;
  z-index: 1;
}

.trend-detail-row i {
  position: absolute;
  inset: auto 10px 7px 62px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

.trend-detail-row i b {
  display: block;
  width: var(--detail-width);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.78), rgba(20, 184, 166, 0.72));
}

.trend-detail-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.trend-detail-row strong {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.trend-detail-value,
.trend-detail-meta {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.trend-detail-meta {
  color: var(--muted);
}

.heat-tower:hover .heat-tower-bar i,
.heat-tower:focus-visible .heat-tower-bar i {
  filter: saturate(1.08);
  transform: translateY(-2px);
}

.heat-tower:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 4px;
}

.archive-day {
  padding: 13px 14px;
}

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

.archive-day-rich {
  display: grid;
  gap: 9px;
}

.archive-items {
  display: grid;
  gap: 6px;
}

.archive-items a,
.archive-items span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  border-top: 1px solid rgba(223, 229, 238, 0.74);
  padding-top: 7px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  text-decoration: none;
}

.archive-items a:hover {
  color: var(--accent);
}

.topic-card h3,
.archive-day h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.topic-card p,
.archive-day p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
}

.source-row-large small {
  color: var(--faint);
  font-size: 12px;
  line-height: 1.35;
}

.skeleton-card,
.skeleton-stat {
  pointer-events: none;
}

.skeleton-card::before {
  background: var(--line);
}

.skeleton-card i,
.skeleton-card b,
.skeleton-card span,
.skeleton-card em,
.skeleton-stat span,
.skeleton-stat strong {
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, #edf2f7, #f8fafc, #edf2f7);
  background-size: 220% 100%;
  animation: skeleton-pulse 1.2s ease-in-out infinite;
}

.skeleton-card i {
  width: 124px;
  aspect-ratio: 1;
  border-radius: 7px;
}

.skeleton-card div {
  display: grid;
  align-content: center;
  gap: 12px;
}

.skeleton-card b {
  width: 62%;
  height: 22px;
}

.skeleton-card span {
  width: 86%;
  height: 13px;
}

.skeleton-card span + span {
  width: 72%;
}

.skeleton-card em {
  width: 48%;
  height: 30px;
  border-radius: 7px;
}

.skeleton-stat span {
  width: 58px;
  height: 12px;
}

.skeleton-stat strong {
  width: 78px;
  height: 30px;
}

@keyframes skeleton-pulse {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: -120% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}

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

@media (max-width: 860px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  .topbar,
  .layout {
    width: 100%;
    max-width: 100%;
    padding-inline: 14px;
  }

  .layout {
    padding-right: 28px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .brand {
    min-width: 0;
  }

  nav {
    width: 100%;
    overflow-x: auto;
  }

  .tab {
    min-width: 82px;
  }

  .layout {
    display: flex;
    flex-direction: column;
  }

  .content {
    order: -1;
  }

  .filters {
    position: sticky;
    top: 76px;
    z-index: 6;
    order: -2;
  }

  .content,
  .filters {
    width: 100%;
    max-width: 100%;
  }

  .workspace-head,
  .control-panel,
  .item-card {
    width: 100%;
    max-width: 100%;
  }

  .sidebar-metrics {
    display: none !important;
  }

  body[data-view="today"] .filters {
    display: none;
  }

body[data-view="home"] .layout {
  display: block;
}

  .metric-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric {
    padding: 10px;
  }

  .metric strong {
    font-size: 24px;
  }

  #trendsView.active {
    grid-template-columns: 1fr;
  }

  .trend-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .range-switch {
    justify-self: start;
  }

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

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

  .stat-chip {
    padding: 10px 12px;
  }

  .stat-chip strong {
    font-size: 22px;
  }

  .chart-heading {
    align-items: flex-start;
    gap: 8px;
  }

  .chart-actions {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .chart-note {
    margin-left: auto;
  }

  .trend-detail-head,
  .trend-detail-row {
    grid-template-columns: 34px minmax(0, 1fr) 74px 72px;
    gap: 8px;
  }

  .trend-detail-row i {
    left: 52px;
  }

  .home-search {
    grid-template-columns: 1fr;
  }

  .item-card {
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: start;
    gap: 10px 12px;
    padding: 14px;
  }

  .echart,
  .chart-wide-canvas {
    min-height: 280px;
  }

  .trend-local-svg {
    height: 230px;
  }

  .item-visual {
    width: 96px;
    aspect-ratio: 1;
    justify-self: start;
    grid-column: 1;
    grid-row: 1;
  }

  .item-visual span {
    font-size: 15px;
  }

  .item-main {
    grid-column: 2;
    grid-row: 1;
  }

  .item-footer {
    align-items: start;
    gap: 8px;
  }

  .item-footer .tags {
    flex-basis: 100%;
  }

  .primary-action {
    width: auto;
    min-width: 78px;
    margin-top: -2px;
    margin-left: 0;
    padding: 7px 12px;
  }

  .one-line,
  .usefulness,
  .item-card h3 {
    overflow-wrap: anywhere;
  }

  .workspace-head p:not(.eyebrow) {
    overflow-wrap: anywhere;
  }

  .source-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .item-card h3 {
    margin: 4px 0 6px;
    font-size: 16px;
    line-height: 1.34;
  }

  .source-line {
    margin-bottom: 6px;
  }

  .fact-strip {
    gap: 5px;
    margin: 0 0 7px;
  }

  .fact-strip span,
  .chip {
    min-height: 24px;
    padding: 4px 7px;
    font-size: 11px;
  }

  .one-line,
  .usefulness,
  .insight-line {
    font-size: 13px;
    line-height: 1.55;
  }

  .usefulness {
    display: block;
    margin-top: 8px;
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
    padding: 7px 9px;
  }

  .insight-list {
    display: grid;
    margin-top: 8px;
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
    padding: 7px 9px;
  }

  .tags {
    gap: 5px;
    margin-top: 8px;
  }

  .source-row-large {
    gap: 8px;
    padding: 11px 12px 10px;
  }

  .heat-skyline-bars {
    gap: 8px;
  }

  .heat-tower {
    grid-template-rows: auto minmax(112px, 1fr) auto auto;
  }

  .heat-tower-bar {
    width: min(46px, 76%);
    min-height: 112px;
  }

  .feed-toolbar {
    min-height: 0;
    padding-block: 2px 0;
  }

  .date-switch {
    width: 100%;
  }

  .feed-toolbar-copy {
    width: 100%;
    align-items: start;
    gap: 8px 10px;
  }

  .feed-metrics {
    width: 100%;
    gap: 10px;
    align-items: center;
  }

  .feed-metric {
    flex: 0 0 auto;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    position: relative;
  }

  .feed-metric::after {
    content: "";
    position: absolute;
    right: -6px;
    top: 50%;
    width: 1px;
    height: 12px;
    background: rgba(148, 163, 184, 0.34);
    transform: translateY(-50%);
  }

  .feed-metric:last-child::after {
    display: none;
  }

  .feed-metric em {
    font-size: 11px;
    color: var(--faint);
  }

  .feed-metric strong {
    font-size: 15px;
  }

    body[data-view="today"] .metric-strip {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

  body[data-view="today"] .metric {
    padding: 10px 12px;
  }

  body[data-view="today"] .metric strong {
    font-size: 20px;
  }

  .quick-tags {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  }

  .tag-button {
    width: 100%;
  }
}

  @media (max-width: 520px) {
    .trend-toolbar {
      padding: 8px;
      border-radius: 12px;
    }

    .trend-summary-strip {
      grid-template-columns: 1fr;
      gap: 6px;
    }

    .trend-summary-strip .stat-chip {
      grid-template-columns: minmax(64px, auto) minmax(0, 1fr);
      padding: 9px 10px;
    }

    .trend-summary-strip .stat-chip strong {
      font-size: 22px;
    }

    .chart-panel,
    body[data-view="trends"] .chart-wide {
      padding: 12px;
    }

    .chart-note {
      order: 3;
      width: 100%;
      justify-content: center;
      margin-left: 0;
    }

    .chart-actions {
      width: 100%;
      justify-content: flex-start;
      margin-left: 0;
    }

    .trend-detail-head {
      display: none;
    }

    .trend-detail-row {
      grid-template-columns: 32px minmax(0, 1fr) auto;
      min-height: 56px;
      gap: 7px;
    }

    .trend-detail-value {
      grid-column: 3;
      grid-row: 1;
    }

    .trend-detail-meta {
      grid-column: 2 / 4;
      grid-row: 2;
      text-align: left;
    }

    .trend-detail-row i {
      inset: auto 10px 7px 49px;
    }

    .date-switch-shell {
      gap: 6px;
      padding: 4px;
    }

    .date-menu {
      position: static;
      min-width: 104px;
      max-width: none;
    }

    .date-menu-button {
      min-height: 36px;
      padding-inline: 14px 13px;
      font-size: 13px;
    }

    .date-menu-backdrop {
      position: fixed;
      inset: 0;
      z-index: 59;
      display: block;
      border: 0;
      background: rgba(237, 242, 247, 0.3);
      backdrop-filter: blur(10px);
    }

    .date-menu-backdrop[hidden] {
      display: none;
    }

    .date-menu-panel {
      position: fixed;
      left: 12px;
      right: 12px;
      top: auto;
      bottom: 12px;
      transform: none;
      z-index: 60;
      width: auto;
      max-width: none;
      max-height: min(62vh, 420px);
      padding: 10px 10px 14px;
      border-radius: 24px;
      box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
    }

    .date-sheet-handle {
      display: block;
      width: 42px;
      height: 4px;
      margin: 2px auto 2px;
      border-radius: 999px;
      background: rgba(148, 163, 184, 0.7);
    }

    .date-menu-list {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .date-month-tabs {
      gap: 8px;
      padding: 0 2px 4px;
    }

    .date-year-tabs {
      gap: 8px;
      padding: 0 2px 2px;
    }

    .date-year-tab,
    .date-month-tab {
      min-height: 30px;
      padding: 0 12px;
      font-size: 12px;
    }

    .date-menu-item {
      min-height: 42px;
      padding: 0 12px;
      border-radius: 14px;
      font-size: 14px;
    }
  }

@media (max-width: 480px) {
  .layout {
    gap: 14px;
    padding-block: 14px;
    justify-items: start;
  }

  .content,
  .filters {
    width: 100%;
    max-width: 100%;
  }

  .workspace-head {
    padding: 15px;
  }

  body[data-view="trends"] .workspace-head,
  body[data-view="sources"] .workspace-head,
  body[data-view="archive"] .workspace-head {
    display: none;
  }

  .home-clock {
    font-size: 56px;
  }

  .home-stage {
    padding-top: 18px;
  }

  .home-shortcut {
    min-height: 0;
  }

  .feed-toolbar {
    gap: 8px 10px;
  }

  .feed-toolbar-copy {
    gap: 5px;
  }

  .feed-toolbar-copy-main {
    gap: 2px;
  }

  .feed-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, max-content));
    gap: 4px 8px;
    align-items: end;
  }

  .feed-metric {
    gap: 3px;
  }

  .feed-metric::after {
    right: -4px;
    height: 10px;
  }

  .feed-metric em {
    font-size: 10px;
  }

  .feed-metric strong {
    font-size: 14px;
  }

  .lane-title span {
    display: none;
  }

  .workspace-head h1 {
    font-size: 29px;
  }

  body[data-view="trends"] .workspace-head h1,
  body[data-view="sources"] .workspace-head h1,
  body[data-view="archive"] .workspace-head h1 {
    font-size: 24px;
  }

  body[data-view="trends"] .workspace-head p:not(.eyebrow),
  body[data-view="sources"] .workspace-head p:not(.eyebrow),
  body[data-view="archive"] .workspace-head p:not(.eyebrow) {
    font-size: 13px;
  }

  .metric-strip {
    grid-template-columns: 1fr;
  }

  .metric {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric:last-child {
    border-bottom: 0;
  }

    body[data-view="today"] .metric-strip {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

  body[data-view="today"] .metric {
    padding: 9px 10px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  body[data-view="today"] .metric:last-child {
    border-right: 0;
  }

  body[data-view="today"] .metric strong {
    font-size: 18px;
  }

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

  .stat-chip {
    padding: 10px 12px;
  }

  .stat-chip strong {
    font-size: 18px;
  }

  .source-row-large {
    gap: 7px;
    padding: 10px 12px;
  }

  .source-title-line {
    align-items: flex-start;
    gap: 10px;
  }

  .source-pills {
    justify-content: flex-start;
  }

  .source-meta-line {
    gap: 4px 10px;
  }

  .heat-skyline {
    padding-inline: 10px;
  }

  .heat-skyline-bars {
    gap: 6px;
  }

  .heat-tower-value,
  .heat-tower-label,
  .heat-tower small {
    font-size: 11px;
  }
}
