:root {
  color-scheme: light;
  --canvas: oklch(0.965 0.012 82);
  --surface: oklch(0.992 0.004 80);
  --surface-muted: oklch(0.945 0.014 82);
  --surface-strong: oklch(0.91 0.022 79);
  --ink: oklch(0.24 0.018 70);
  --ink-soft: oklch(0.39 0.018 72);
  --muted: oklch(0.56 0.018 72);
  --muted-light: oklch(0.69 0.014 76);
  --line: oklch(0.88 0.016 78);
  --line-strong: oklch(0.8 0.025 75);
  --amber: oklch(0.61 0.14 70);
  --amber-dark: oklch(0.46 0.105 67);
  --amber-soft: oklch(0.91 0.064 78);
  --amber-faint: oklch(0.965 0.028 80);
  --green: oklch(0.55 0.115 145);
  --green-soft: oklch(0.93 0.045 145);
  --red: oklch(0.55 0.16 28);
  --red-soft: oklch(0.94 0.045 28);
  --violet: oklch(0.52 0.15 300);
  --shadow-soft: 0 1px 3px rgb(56 46 29 / 0.11), 0 12px 32px rgb(56 46 29 / 0.045);
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --radius-pill: 999px;
  --desktop-ui-scale: 1.12;
  --body-font: Aptos, "Segoe UI Variable", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display-font: "Bahnschrift SemiCondensed", "Arial Narrow", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 14px;
  line-height: 1.65;
  touch-action: manipulation;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid oklch(0.72 0.12 73 / 0.55);
  outline-offset: 2px;
}

.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  left: 12px;
  top: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-s);
  background: var(--ink);
  color: var(--surface);
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto minmax(230px, 1fr);
  align-items: center;
  min-height: 70px;
  padding: 0 28px;
  padding-left: max(28px, env(safe-area-inset-left));
  padding-right: max(28px, env(safe-area-inset-right));
  background: oklch(0.975 0.009 82 / 0.97);
  box-shadow: 0 1px 0 var(--line), 0 4px 18px rgb(56 46 29 / 0.035);
}

.brand-block,
.live-cluster,
.section-nav,
.feed-toolbar,
.surface-heading,
.mini-heading,
.project-title-line,
.event-primary,
.event-subject,
.event-meta {
  display: flex;
  align-items: center;
}

.brand-block { gap: 11px; }

.brand-mark {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 11px;
  background: var(--ink);
  color: var(--amber-soft);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
}

.brand-mark svg { width: 22px; height: 22px; }
.brand-block p { margin: 0; }

.brand-name {
  font-family: var(--display-font);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.012em;
}

.brand-sub {
  margin-top: 3px !important;
  color: var(--muted);
  font-family: var(--display-font);
  font-size: 9px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0.16em;
}

.section-nav {
  gap: 3px;
  padding: 4px;
  border-radius: var(--radius-m);
  background: var(--surface-muted);
  box-shadow: inset 0 0 0 1px var(--line);
}

.nav-link {
  min-width: 72px;
  min-height: 38px;
  padding: 7px 15px;
  border-radius: 7px;
  color: var(--muted);
  font-weight: 650;
  line-height: 24px;
  text-align: center;
  text-decoration: none;
  transition-property: background-color, color, transform;
  transition-duration: 160ms;
}

.nav-link.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgb(56 46 29 / 0.11);
}

.nav-link:active,
button:active,
.primary-button:active { transform: scale(0.96); }

.live-cluster {
  justify-content: flex-end;
  gap: 9px;
  font-variant-numeric: tabular-nums;
}

.author-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  transition-property: background-color, border-color, color, transform;
  transition-duration: 160ms;
}

.author-x-mark {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 5px;
  background: var(--ink);
  color: var(--surface);
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.author-link:hover {
  border-color: var(--ink-soft);
  background: var(--surface-muted);
  color: var(--ink);
}

.author-link:active { transform: scale(0.96); }

.live-cluster > div {
  display: grid;
  min-width: 106px;
  text-align: right;
}

.live-cluster strong { font-size: 12px; line-height: 1.25; }
.live-cluster span:not(.live-dot) { color: var(--muted); font-size: 10px; line-height: 1.4; }

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-light);
  box-shadow: 0 0 0 4px oklch(0.7 0.01 80 / 0.14);
}

.live-dot.is-healthy { background: var(--green); box-shadow: 0 0 0 4px oklch(0.58 0.12 145 / 0.13); }
.live-dot.is-warning { background: var(--amber); box-shadow: 0 0 0 4px oklch(0.61 0.14 70 / 0.13); }
.live-dot.is-danger { background: var(--red); box-shadow: 0 0 0 4px oklch(0.57 0.17 28 / 0.13); }

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  margin-left: 7px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition-property: background-color, color, transform;
  transition-duration: 160ms;
}

.icon-button.is-spinning svg { animation: spin 700ms linear infinite; }

.mobile-panel-switch { display: none; }

.page-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 22px 28px 56px;
}

@media (min-width: 1280px) {
  body { zoom: var(--desktop-ui-scale); }
}

.status-strip {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(5, minmax(108px, 0.62fr));
  min-height: 74px;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: var(--radius-l);
  background: var(--ink);
  color: oklch(0.95 0.01 80);
  box-shadow: var(--shadow-soft);
}

.status-lead,
.strip-metric {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 13px 20px;
}

.strip-metric { border-left: 1px solid rgb(255 255 255 / 0.1); }
.eyebrow,
.section-index {
  color: var(--amber);
  font-family: var(--display-font);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.3;
}

.status-lead strong { margin-top: 3px; font-size: 16px; }
.strip-metric span { color: oklch(0.75 0.012 78); font-size: 10px; line-height: 1.35; }
.strip-metric strong {
  margin-top: 2px;
  font-family: var(--display-font);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(320px, 0.8fr);
  align-items: start;
  gap: 18px;
}

.feed-surface,
.heat-surface,
.priority-health,
.radar-health {
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.feed-surface,
.heat-surface,
.priority-health,
.radar-health { border-radius: var(--radius-l); }
.feed-surface { min-height: 720px; overflow: hidden; }

.priority-module {
  scroll-margin-top: 78px;
  background: var(--amber-faint);
  box-shadow: inset 0 -1px var(--line);
}

.project-heading-anchor { scroll-margin-top: 78px; }

.priority-heading {
  align-items: flex-start;
  padding-bottom: 16px;
}

.priority-heading h1 { font-size: 24px; }

.priority-heading .health-badge {
  flex: 0 0 auto;
  margin-top: 2px;
}

.priority-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0 24px;
  overflow: hidden;
  border-radius: var(--radius-m);
  background: var(--line);
  box-shadow: inset 0 0 0 1px var(--line);
}

.priority-overview div {
  min-width: 0;
  padding: 11px 13px;
  background: var(--surface);
}

.priority-overview dt {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.priority-overview dd {
  margin: 3px 0 0;
  color: var(--ink);
  font: 700 17px/1.15 var(--display-font);
  font-variant-numeric: tabular-nums;
}

.priority-timeline { padding: 8px 24px 24px; }
.priority-row { min-height: 126px; }
.priority-row .timeline-marker { background: var(--ink); color: var(--amber-soft); }
.priority-row .event-content { padding-top: 1px; }

.tweet-copy {
  max-width: 86ch;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.68;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.tweet-kind,
.latency-chip {
  padding: 3px 7px;
  border-radius: var(--radius-pill);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.4;
  white-space: nowrap;
}

.tweet-kind { background: var(--surface-strong); color: var(--ink-soft); }
.latency-chip { background: var(--green-soft); color: var(--green); font-variant-numeric: tabular-nums; }
.latency-chip.is-slow { background: var(--amber-soft); color: var(--amber-dark); }
.tweet-external { display: inline-flex; color: var(--muted); }
.tweet-external svg { width: 13px; height: 13px; }

.tweet-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 7px;
  margin-top: 10px;
}

.tweet-media img {
  width: 100%;
  max-height: 150px;
  border-radius: var(--radius-m);
  object-fit: cover;
}

.priority-empty {
  min-height: 190px;
  padding-block: 28px;
}

.priority-empty .empty-signal { width: 52px; height: 52px; margin-bottom: 12px; }
.priority-empty .empty-signal::after { width: 72px; height: 72px; }

.priority-loading { display: grid; gap: 10px; padding: 16px 0 4px; }
.priority-loading i {
  display: block;
  height: 82px;
  border-radius: var(--radius-m);
  background: var(--surface);
  animation: loading-pulse 1.2s ease-in-out infinite alternate;
}

.surface-heading {
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px 18px;
}

.surface-heading h1,
.surface-heading h2,
.mini-heading h2 {
  margin: 3px 0 0;
  font-family: var(--display-font);
  font-weight: 680;
  letter-spacing: -0.012em;
  line-height: 1.1;
}

.surface-heading h1 { font-size: 24px; }
.surface-heading h2,
.mini-heading h2 { font-size: 20px; }

.surface-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  text-wrap: pretty;
}

.event-count,
.day-chip,
.health-badge {
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  font-family: var(--display-font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
}

.event-count {
  padding: 8px 10px;
  background: var(--surface-muted);
  color: var(--ink-soft);
}

.search-field input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-field input::placeholder { color: var(--muted-light); }

.primary-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--amber);
  box-shadow: 0 1px 2px oklch(0.3 0.08 65 / 0.24), inset 0 1px rgb(255 255 255 / 0.24);
  color: oklch(0.98 0.01 80);
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition-property: background-color, box-shadow, transform, opacity;
  transition-duration: 160ms;
}

.primary-button:disabled { cursor: wait; opacity: 0.62; }
.primary-button svg { width: 16px; height: 16px; }

.feed-toolbar {
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 8px 24px;
  background: var(--surface-muted);
  box-shadow: inset 0 1px var(--line), inset 0 -1px var(--line);
}

.project-days {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  padding: 8px 24px 9px;
  background: var(--surface);
  box-shadow: inset 0 -1px var(--line);
  scrollbar-width: thin;
}

.day-tab {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  transition: background-color 160ms, border-color 160ms, color 160ms;
}

.day-tab.is-active {
  border-color: var(--amber);
  background: var(--amber-soft);
  color: var(--amber-dark);
}

.day-empty { color: var(--muted-light); font-size: 12px; }

.filter-tabs { display: flex; align-items: center; gap: 3px; }
.filter-tabs button,
.mobile-panel-switch button {
  min-height: 40px;
  padding: 7px 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 650;
  transition-property: background-color, color, transform;
  transition-duration: 160ms;
}

.filter-tabs button.is-active,
.mobile-panel-switch button.is-active {
  background: var(--surface);
  box-shadow: 0 1px 3px rgb(56 46 29 / 0.1);
  color: var(--amber-dark);
}

.search-field {
  display: flex;
  width: min(240px, 36%);
  height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
}

.search-field svg { width: 15px; height: 15px; }

.timeline { padding: 2px 24px 28px; }

.timeline-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 24px 24px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.timeline-footer[hidden] { display: none; }

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.secondary-button svg { width: 15px; height: 15px; }
.secondary-button:disabled { cursor: default; opacity: 0.55; }

.kol-module {
  scroll-margin-top: 78px;
  background: var(--surface);
  box-shadow: inset 0 1px var(--line);
}

.kol-module .surface-heading { padding-top: 24px; }
.kol-module .timeline { padding-bottom: 32px; }

.timeline-row {
  position: relative;
  display: grid;
  grid-template-columns: 74px 38px minmax(0, 1fr);
  gap: 14px;
  min-height: 104px;
  padding: 18px 0;
}

.timeline-row:not(:last-child)::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 126px;
  height: 1px;
  background: var(--line);
  content: "";
}

.timeline-row::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 94px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-row:first-child::before { top: 30px; }
.timeline-row:last-child::before { bottom: calc(100% - 34px); }

.event-time {
  padding-top: 1px;
  color: var(--muted);
  font-family: var(--display-font);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  text-align: right;
}

.event-time span { display: block; margin-top: 4px; color: var(--muted-light); font: 10px/1.2 var(--body-font); }

.timeline-marker {
  position: relative;
  z-index: 1;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-muted);
  box-shadow: 0 0 0 5px var(--surface);
  color: var(--ink-soft);
  font-family: var(--display-font);
  font-size: 12px;
  font-weight: 700;
}

.timeline-marker.follow { background: var(--amber-soft); color: var(--amber-dark); }
.timeline-marker.warning { background: var(--red-soft); color: var(--red); }
.timeline-marker.recovery { background: var(--green-soft); color: var(--green); }
.timeline-marker svg { width: 17px; height: 17px; }

.event-content { min-width: 0; padding-right: 6px; }
.event-primary { flex-wrap: wrap; gap: 6px; line-height: 1.5; }
.event-primary strong { font-size: 15px; }
.event-primary .action { color: var(--muted); }

.event-primary a,
.event-subject a {
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition-property: color, text-decoration-color;
  transition-duration: 160ms;
}

.event-subject {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 7px;
}

.event-subject .project-avatar { width: 28px; height: 28px; font-size: 9px; }
.event-subject strong { font-size: 14px; }
.event-handle { color: var(--muted); font-size: 12px; }
.verified { color: var(--amber); font-size: 11px; }

.event-description {
  display: -webkit-box;
  max-width: 78ch;
  margin: 7px 0 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
  text-wrap: pretty;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.event-meta {
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.project-row { min-height: 146px; }
.score-marker { font-size: 10px; font-variant-numeric: tabular-nums; }
.project-primary { align-items: center; gap: 7px; }
.project-primary .project-avatar { width: 30px; height: 30px; font-size: 9px; }
.project-primary > a { display: inline-flex; align-items: center; }
.project-primary > a:first-of-type { text-decoration: none; }
.project-external,
.website-link { color: var(--muted); }
.project-external svg,
.website-link svg { width: 13px; height: 13px; }
.website-link { gap: 4px; font-size: 10px; }
.project-row .website-link { display: none; }
.category-badge,
.reason-chip {
  width: fit-content;
  border-radius: 999px;
  white-space: nowrap;
}
.category-badge { padding: 4px 8px; background: var(--amber-faint); color: var(--amber-dark); font-size: 10px; font-weight: 700; }
.reason-list { display: none; }
.urgent-track-button,
.blacklist-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--surface);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  touch-action: manipulation;
  transition-property: transform, color, background-color, border-color, box-shadow;
  transition-duration: 160ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.urgent-track-button { border-color: oklch(0.72 0.12 72 / 0.5); color: var(--amber-dark); }
.urgent-track-button.is-active {
  border-color: var(--amber);
  background: var(--amber);
  box-shadow: 0 2px 5px oklch(0.4 0.11 65 / 0.2);
  color: var(--surface);
}
.urgent-track-button:active,
.blacklist-button:active { transform: scale(0.96); }
.urgent-track-button:disabled,
.blacklist-button:disabled { cursor: wait; opacity: 0.58; }
.urgent-track-button:focus-visible,
.blacklist-button:focus-visible { outline: 2px solid var(--amber-dark); outline-offset: 2px; }
.blacklist-button { color: var(--red); }
.urgent-track-button svg,
.blacklist-button svg { width: 14px; height: 14px; }
.analysis-summary { margin: 9px 0 0; color: var(--ink); font-size: 12px; font-weight: 650; line-height: 1.6; text-wrap: pretty; }
.reason-chip { padding: 4px 8px; background: var(--surface-muted); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 9px; }

.health-event-title { margin: 0; font-size: 14px; }
.health-event-message { max-width: 76ch; margin: 6px 0 0; color: var(--ink-soft); font-size: 12px; text-wrap: pretty; }

.loading-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  padding: 22px 0;
}

.loading-row > span,
.loading-row i,
.heat-loading i {
  display: block;
  border-radius: var(--radius-s);
  background: var(--surface-muted);
  animation: loading-pulse 1.2s ease-in-out infinite alternate;
}

.loading-row > span { width: 74px; height: 13px; }
.loading-row div { display: grid; gap: 10px; }
.loading-row i:first-child { width: 42%; height: 15px; }
.loading-row i:last-child { width: 76%; height: 11px; }

.empty-state {
  display: grid;
  min-height: 280px;
  place-items: center;
  padding: 40px 24px;
  text-align: center;
}

.empty-state-inner { max-width: 360px; }
.empty-signal {
  position: relative;
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 50%;
  background: var(--amber-faint);
  box-shadow: inset 0 0 0 1px var(--amber-soft);
  color: var(--amber-dark);
}

.empty-signal::after {
  position: absolute;
  width: 86px;
  height: 86px;
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "";
}

.empty-state h3 { margin: 0; font-family: var(--display-font); font-size: 18px; }
.empty-state p { margin: 7px 0 0; color: var(--muted); font-size: 12px; text-wrap: pretty; }

.heat-column {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 18px;
}

.heat-surface { overflow: hidden; }
.heat-heading { padding-bottom: 17px; box-shadow: inset 0 -1px var(--line); }
.day-chip { padding: 7px 9px; background: var(--amber-faint); color: var(--amber-dark); }
.heat-list { min-height: 320px; }

.heat-feature {
  position: relative;
  padding: 22px 22px 20px;
  background: var(--ink);
  color: oklch(0.96 0.01 80);
}

.heat-feature-rank {
  position: absolute;
  top: 18px;
  right: 20px;
  color: rgb(255 255 255 / 0.18);
  font: 700 50px/1 var(--display-font);
  letter-spacing: -0.04em;
}

.heat-feature .project-avatar { background: var(--amber); color: oklch(0.98 0.01 80); }
.heat-feature .project-copy { flex: 1 1 auto; min-width: 0; padding-right: 58px; }
.heat-score {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 18px;
}

.heat-score strong { color: var(--amber-soft); font: 700 44px/0.9 var(--display-font); font-variant-numeric: tabular-nums; }
.heat-score span { color: rgb(255 255 255 / 0.54); font: 10px/1 var(--display-font); letter-spacing: 0.1em; }
.heat-feature .project-title-line { max-width: none; }
.heat-feature .project-name { color: oklch(0.98 0.01 80); }
.heat-feature .project-handle { color: rgb(255 255 255 / 0.48); }
.heat-feature .heat-detail { color: rgb(255 255 255 / 0.62); }

.heat-item {
  display: grid;
  grid-template-columns: 26px 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 10px 18px;
  box-shadow: inset 0 -1px var(--line);
}

.heat-item:last-child { box-shadow: none; }
.heat-rank { color: var(--muted-light); font: 700 12px/1 var(--display-font); font-variant-numeric: tabular-nums; }
.project-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--ink-soft);
  font-family: var(--display-font);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.02em;
  outline: 1px solid rgb(56 46 29 / 0.08);
  outline-offset: -1px;
  position: relative;
}

.project-avatar-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.avatar-1 { background: oklch(0.88 0.055 55); color: oklch(0.38 0.075 48); }
.avatar-2 { background: oklch(0.89 0.045 145); color: oklch(0.39 0.075 145); }
.avatar-3 { background: oklch(0.88 0.045 245); color: oklch(0.38 0.08 245); }
.avatar-4 { background: oklch(0.89 0.045 325); color: oklch(0.4 0.08 325); }
.avatar-5 { background: oklch(0.87 0.055 90); color: oklch(0.39 0.08 90); }
.avatar-6 { background: oklch(0.89 0.04 195); color: oklch(0.39 0.07 195); }
.avatar-7 { background: oklch(0.89 0.04 20); color: oklch(0.4 0.08 20); }

.project-copy { min-width: 0; }
.project-title-line { gap: 5px; min-width: 0; }
.project-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

.project-handle,
.heat-detail { color: var(--muted); font-size: 10px; line-height: 1.4; }
.project-handle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heat-detail { margin-top: 2px; }
.heat-value { color: var(--amber-dark); font: 700 17px/1 var(--display-font); font-variant-numeric: tabular-nums; text-align: right; }
.heat-value span { display: block; margin-top: 4px; color: var(--muted); font: 9px/1 var(--body-font); }

.heat-loading { display: grid; gap: 12px; padding: 22px; }
.heat-loading i { height: 52px; }
.heat-loading i:first-child { height: 116px; background: var(--surface-strong); }

.heat-empty { min-height: 320px; }
.method-note { margin: 0; padding: 12px 18px; background: var(--surface-muted); color: var(--muted); font-size: 10px; line-height: 1.55; }

.priority-health,
.radar-health { padding: 18px 20px 20px; }
.priority-health-note { margin: 13px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.mini-heading { justify-content: space-between; gap: 18px; }
.health-badge { padding: 7px 9px; background: var(--surface-muted); color: var(--muted); }
.health-badge.healthy { background: var(--green-soft); color: var(--green); }
.health-badge.warning { background: var(--amber-faint); color: var(--amber-dark); }
.health-badge.danger { background: var(--red-soft); color: var(--red); }

.health-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 16px 0 0;
  overflow: hidden;
  border-radius: var(--radius-m);
  background: var(--line);
  box-shadow: inset 0 0 0 1px var(--line);
}

.health-grid div { padding: 12px; background: var(--surface-muted); }
.health-grid dt { color: var(--muted); font-size: 10px; }
.health-grid dd { margin: 3px 0 0; font: 700 17px/1.2 var(--display-font); font-variant-numeric: tabular-nums; }

.toast-region {
  position: fixed;
  z-index: 80;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 40px));
}

.toast {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: start;
  gap: 9px;
  padding: 13px 14px;
  border-radius: var(--radius-m);
  background: var(--ink);
  box-shadow: 0 12px 36px rgb(35 28 18 / 0.26);
  color: oklch(0.96 0.01 80);
  animation: toast-in 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.toast > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: rgb(255 255 255 / 0.1); color: var(--amber-soft); }
.toast.error > span { color: oklch(0.78 0.11 28); }
.toast p { margin: 3px 0 0; font-size: 12px; line-height: 1.55; text-wrap: pretty; }

.not-found-page { display: grid; min-height: 100vh; place-items: center; padding: 28px; }
.not-found { width: min(560px, 100%); padding: 42px; border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow-soft); }
.not-found-code { color: var(--amber-dark); font: 700 11px/1 var(--display-font); letter-spacing: 0.12em; }
.not-found h1 { margin: 14px 0 0; font: 700 38px/1.1 var(--display-font); letter-spacing: -0.022em; }
.not-found p { margin: 12px 0 24px; color: var(--muted); }

.detail-back { color: var(--ink-soft); font-size: 12px; font-weight: 700; text-decoration: none; }
.project-detail-page .author-link { justify-self: end; width: fit-content; }
.detail-shell { width: min(1180px, 100%); margin: 0 auto; padding: 28px; }
.detail-loading, .detail-error { padding: 64px 24px; text-align: center; color: var(--muted); }
.detail-error h1 { margin: 0 0 12px; color: var(--ink); }
.detail-error a { color: var(--amber-dark); font-weight: 700; }
.detail-hero { padding: 30px; border-radius: var(--radius-l); background: var(--ink); color: var(--surface); box-shadow: var(--shadow-soft); }
.detail-hero-main { display: flex; align-items: center; gap: 16px; }
.detail-avatar { position: relative; display: grid; width: 72px; height: 72px; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 20px; background: var(--amber); color: var(--ink); font: 700 22px/1 var(--display-font); }
.detail-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail-hero h1 { margin: 3px 0 0; font: 700 34px/1.1 var(--display-font); }
.detail-handle { margin: 8px 0 0; color: rgb(255 255 255 / 0.62); }
.detail-summary { margin: 26px 0 0; font-size: 18px; font-weight: 700; }
.detail-description { max-width: 72ch; margin: 8px 0 0; color: rgb(255 255 255 / 0.72); }
.detail-x-link { display: inline-flex; margin-top: 18px; padding: 8px 12px; border: 1px solid rgb(255 255 255 / 0.24); border-radius: var(--radius-s); color: var(--surface); font-size: 12px; font-weight: 700; text-decoration: none; }
.detail-metrics { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 28px; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / 0.16); }
.detail-metrics span { display: grid; gap: 2px; }
.detail-metrics b { font: 700 20px/1.15 var(--display-font); }
.detail-metrics small { color: rgb(255 255 255 / 0.58); font-size: 10px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 18px; margin-top: 18px; }
.detail-panel { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow-soft); }
.detail-panel-heading h2 { margin: 5px 0 0; font: 700 24px/1.2 var(--display-font); }
.detail-panel-heading p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.discovery-list, .comment-list { display: grid; gap: 10px; margin-top: 20px; }
.discovery-item { display: grid; gap: 3px; padding: 12px 14px; border-left: 3px solid var(--amber); background: var(--surface-muted); font-size: 12px; }
.discovery-item time { color: var(--muted); font-size: 11px; }
.detail-empty { color: var(--muted); font-size: 12px; }
.comment-form { display: grid; gap: 12px; margin-top: 20px; }
.comment-form label { display: grid; gap: 5px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.comment-form input, .comment-form textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); resize: vertical; }
.comment-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-status { min-height: 18px; margin: 0; color: var(--muted); font-size: 11px; }
.comment-item { padding: 13px 14px; border-top: 1px solid var(--line); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.comment-meta strong { color: var(--ink); font-size: 12px; }
.comment-meta span { padding: 2px 6px; border-radius: 999px; background: var(--amber-faint); color: var(--amber-dark); }
.comment-item p { margin: 7px 0 0; white-space: pre-wrap; font-size: 13px; }

@media (max-width: 760px) {
  .detail-shell { padding: 16px 12px 36px; }
  .detail-hero { padding: 22px 18px; }
  .detail-hero h1 { font-size: 28px; }
  .detail-summary { font-size: 16px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-panel { padding: 20px 16px; }
  .comment-form-row { grid-template-columns: 1fr; }
  .detail-back span { display: none; }
}

@media (hover: hover) {
  .nav-link:hover { color: var(--ink); }
  .icon-button:hover { background: var(--surface-muted); color: var(--ink); }
  .primary-button:hover { background: var(--amber-dark); box-shadow: 0 2px 5px oklch(0.3 0.08 65 / 0.24); }
  .filter-tabs button:hover,
  .mobile-panel-switch button:hover { color: var(--ink); }
  .event-primary a:hover,
  .event-subject a:hover { color: var(--amber-dark); text-decoration-color: currentColor; }
  .heat-item:hover { background: var(--amber-faint); }
  .urgent-track-button:hover { border-color: var(--amber); background: var(--amber-faint); }
  .urgent-track-button.is-active:hover { background: var(--amber-dark); color: var(--surface); }
  .blacklist-button:hover { background: var(--red-soft); }
}

@media (max-width: 1060px) {
  .topbar { grid-template-columns: 1fr auto; }
  .section-nav { display: none; }
  .workspace-grid { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr); }
  .status-strip { grid-template-columns: minmax(180px, 1.2fr) repeat(5, minmax(82px, 0.62fr)); }
  .status-lead,
  .strip-metric { padding-inline: 14px; }
}

@media (max-width: 860px) {
  .topbar { min-height: 62px; padding-inline: 18px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-sub { display: none; }
  .live-cluster > div { display: none; }
  .author-link { min-height: 32px; padding-inline: 8px; }
  .mobile-panel-switch {
    position: sticky;
    z-index: 25;
    top: 62px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 7px 18px;
    background: var(--canvas);
    box-shadow: 0 1px var(--line);
  }
  .mobile-panel-switch button { background: var(--surface-muted); }
  .page-shell { padding: 14px 14px 42px; }
  .status-strip { grid-template-columns: 1.45fr repeat(4, 1fr); min-height: 68px; border-radius: 13px; }
  .strip-metric-wide { display: none; }
  .workspace-grid { display: block; }
  [data-panel="heat"] { display: none; }
  body[data-mobile-panel="heat"] [data-panel="feed"] { display: none; }
  body[data-mobile-panel="heat"] [data-panel="heat"] { display: grid; }
  .heat-column { position: static; }
  .feed-surface { min-height: 620px; }
}

@media (max-width: 620px) {
  .brand-name { font-size: 16px; }
  .live-cluster { gap: 3px; }
  .author-link-label { display: none; }
  .author-link { width: 32px; height: 32px; padding: 0; justify-content: center; }
  .icon-button { margin-left: 0; }
  .status-strip { grid-template-columns: 1.4fr repeat(2, 1fr); }
  .signal-strip-metric,
  .active-strip-metric,
  .strip-metric-wide { display: none; }
  .status-lead,
  .strip-metric { padding: 11px 12px; }
  .status-lead strong { font-size: 14px; }
  .strip-metric strong { font-size: 19px; }
  .surface-heading { padding: 18px 18px 15px; }
  .surface-heading p { max-width: 34ch; }
  .surface-heading h1 { font-size: 22px; }
  .priority-overview { grid-template-columns: 1fr 1fr; margin-inline: 16px; }
  .priority-timeline { padding-inline: 16px; }
  .tweet-media { grid-template-columns: 1fr; }
  .feed-toolbar { align-items: stretch; flex-direction: column; padding: 9px 18px; }
  .project-days { padding-inline: 18px; }
  .search-field { width: 100%; }
  .timeline { padding-inline: 16px; }
  .timeline-footer { margin-inline: 16px; }
  .timeline-row { grid-template-columns: 48px 32px minmax(0, 1fr); gap: 10px; min-height: 112px; }
  .timeline-row::before { left: 64px; }
  .timeline-row:not(:last-child)::after { left: 91px; }
  .timeline-marker { width: 32px; height: 32px; }
  .event-time { font-size: 11px; }
  .event-time span { font-size: 9px; }
  .event-primary strong { font-size: 14px; }
  .event-description { -webkit-line-clamp: 3; }
  .project-row { min-height: 164px; }
  .project-primary .project-avatar { width: 27px; height: 27px; }
  .toast-region { right: 12px; bottom: 12px; width: calc(100vw - 24px); }
}

@media (max-width: 380px) {
  .topbar { padding-inline: 12px; }
  .mobile-panel-switch { padding-inline: 12px; }
  .page-shell { padding-inline: 10px; }
  .brand-mark { width: 34px; height: 34px; }
  .live-dot { display: none; }
  .status-lead .eyebrow { display: none; }
  .filter-tabs { width: 100%; }
  .filter-tabs button { flex: 1; padding-inline: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

@keyframes loading-pulse {
  from { opacity: 0.46; }
  to { opacity: 1; }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
/* Local research is an inline addition to the existing project/KOL rows. */
.project-chain-filter { padding: 10px 24px 8px; background: var(--surface); }
.chain-filter-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 650; }
.project-chains { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.chain-tab { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 36px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--muted); font: 650 12px var(--body-font); cursor: pointer; }
.chain-tab > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.chain-tab.is-active { border-color: var(--amber-dark); background: var(--amber-faint); color: var(--amber-dark); }
.chain-count { flex-shrink: 0; font-size: 10px; font-variant-numeric: tabular-nums; }
.chain-filter-note, .chain-filter-loading { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.project-chain-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.chain-badge { display: inline-block; max-width: 100%; padding: 3px 7px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-muted); color: var(--ink-soft); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.chain-badge.is-pending { color: var(--muted); background: transparent; }
.research-chain-list { display: grid; gap: 10px; padding: 0; margin: 8px 0 0; list-style: none; }
.research-chain-list .chain-badge { color: var(--amber-dark); text-underline-offset: 3px; min-height: 36px; padding: 8px 10px; }
@media (hover: hover) { .chain-tab:hover { color: var(--amber-dark); background: var(--amber-faint); } }
@media (max-width: 620px) {
  .project-chain-filter { padding-inline: 18px; }
  .chain-tab, .research-chain-list .chain-badge { min-height: 40px; }
}
.research-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; margin-top: 9px; }
.research-state { color: var(--muted); font-size: 11px; }
.research-state.is-confirmed { color: var(--green); }
.research-button { min-height: 36px; padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); color: var(--amber-dark); font: 650 11px var(--body-font); cursor: pointer; }
.research-button:disabled { color: var(--muted); cursor: default; opacity: 0.7; }
.research-report-link { display: inline-flex; align-items: center; min-height: 36px; color: var(--amber-dark); font-size: 11px; text-underline-offset: 3px; }
.surface-heading .research-notice { font-size: 11px; }
.research-page .topbar { grid-template-columns: 1fr auto; }
.research-heading h1 { margin: 6px 0 0; font: 700 26px/1.2 var(--display-font); overflow-wrap: anywhere; }
.research-heading > p { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.research-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.research-report { display: grid; gap: 18px; margin-top: 18px; }
.research-report .detail-grid { margin-top: 0; }
.research-report h3 { margin: 18px 0 5px; font-size: 14px; }
.research-body, .research-steps p, .research-text-list { font-size: 13px; line-height: 1.75; overflow-wrap: anywhere; white-space: pre-wrap; }
.research-verdict { color: var(--amber-dark); font-size: 20px; font-weight: 700; }
.research-verdict span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 400; }
.research-citations { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.research-citations a, .research-sources a { color: var(--amber-dark); text-underline-offset: 3px; }
.research-steps, .research-text-list, .research-sources { padding-left: 21px; }
.research-steps li, .research-text-list li, .research-sources li { margin-top: 12px; overflow-wrap: anywhere; }
.research-sources small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.research-provenance, .research-stale, .research-empty p { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.research-stale { margin: 0; padding: 12px 18px; background: var(--amber-faint); border-radius: var(--radius-m); }
.research-page .form-status[data-error] { color: var(--red); }
@media (max-width: 620px) {
  .research-button, .research-report-link { min-height: 40px; }
  .research-page .detail-back { display: inline-flex; align-items: center; min-height: 40px; }
  .research-heading h1 { font-size: 23px; }
}

/* Public website edition: the project detail keeps one privacy-safe community column. */
.public-detail-grid {
  grid-template-columns: minmax(0, 1fr);
}

.public-research-summary {
  align-items: center;
}
