:root {
  --page-bg: #eef2eb;
  --text: #14231f;
  --muted: #51625d;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --border: rgba(20, 35, 31, 0.08);
  --shadow: 0 18px 40px rgba(20, 35, 31, 0.1);
  --accent: #0f6d64;
  --accent-strong: #0a4f48;
  --warm: #da6a2a;
  --hot: #bc3434;
  --cool: #4e7a67;
  --positive: #18794e;
  --negative: #b43838;
  --mixed: #946200;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Aptos", "Segoe UI Variable", "Trebuchet MS", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 12%, rgba(15, 109, 100, 0.18), transparent 24%),
    radial-gradient(circle at 82% 14%, rgba(218, 106, 42, 0.14), transparent 18%),
    linear-gradient(180deg, #f7fbf6 0%, var(--page-bg) 100%);
}

.app-shell {
  width: min(1320px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 3rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 1.25rem;
  align-items: stretch;
}

.hero-copy,
.hero-actions,
.metric-card,
.feed-panel,
.detail-panel,
.detail-card,
.lens-card {
  backdrop-filter: blur(16px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-actions {
  padding: 1.6rem;
}

.eyebrow,
.section-kicker,
.feed-authority {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--accent);
}

.hero h1 {
  margin: 0.4rem 0 0;
  max-width: 10ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: 0.92;
}

.lede {
  max-width: 44rem;
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.workspace-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(20, 35, 31, 0.08);
}

.workspace-identity h2 {
  margin: 0.25rem 0 0;
  font-size: 1.05rem;
}

.auth-identity {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(20, 35, 31, 0.08);
}

.auth-identity h2 {
  margin: 0.25rem 0 0;
  font-size: 1.05rem;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.auth-field input {
  width: 100%;
}

.auth-user-pill {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.95rem;
  background: rgba(15, 109, 100, 0.08);
  border: 1px solid rgba(15, 109, 100, 0.12);
}

.auth-user-label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.primary-button,
.ghost-button,
.text-button,
.feed-item {
  font: inherit;
}

.primary-button,
.ghost-button,
.text-button {
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.primary-button {
  border: none;
  padding: 0.95rem 1.1rem;
  border-radius: 999px;
  color: #f5fffb;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover,
.feed-item:hover {
  transform: translateY(-1px);
}

.secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.article-analysis {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(20, 35, 31, 0.08);
}

.article-analysis h2 {
  margin: 0.25rem 0 0;
  font-size: 1.05rem;
}

.article-analysis-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.article-analysis-form input {
  width: 100%;
  min-width: 0;
  padding: 0.8rem 0.95rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(20, 35, 31, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font: inherit;
}

.article-analysis-form input::placeholder {
  color: color-mix(in srgb, var(--muted) 82%, white);
}

.ghost-button,
.text-button {
  border: 1px solid rgba(15, 109, 100, 0.2);
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
  font-weight: 700;
}

.ghost-button {
  padding: 0.8rem 1rem;
  border-radius: 999px;
}

.text-button {
  padding: 0.55rem 0.8rem;
  border-radius: 0.8rem;
}

.status {
  min-height: 1.35rem;
  color: var(--muted);
}

.status[data-tone="good"] {
  color: var(--positive);
}

.status[data-tone="bad"] {
  color: var(--negative);
}

.metrics {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.metric-card {
  padding: 1rem 1.1rem;
}

.metric-label,
.metric-note {
  display: block;
}

.metric-label {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.metric-card strong {
  display: block;
  margin: 0.4rem 0;
  font-size: 2rem;
  line-height: 1;
}

.metric-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.workspace {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: minmax(350px, 430px) minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
}

.feed-panel,
.detail-panel {
  padding: 1.2rem;
  position: relative;
  overflow: hidden;
}

.feed-panel {
  display: grid;
  gap: 1rem;
  background:
    radial-gradient(circle at top left, rgba(15, 109, 100, 0.09), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 248, 0.9));
}

.detail-panel {
  background:
    radial-gradient(circle at top right, rgba(218, 106, 42, 0.08), transparent 24%),
    radial-gradient(circle at left 26%, rgba(15, 109, 100, 0.07), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(246, 250, 248, 0.92));
}

.feed-panel-top,
.feed-module-stack,
.detail-view,
.detail-primary-column,
.detail-support-column {
  display: grid;
  gap: 1rem;
}

.feed-panel-intro,
.feed-queue-panel {
  padding: 1rem 1.05rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(20, 35, 31, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(247, 249, 247, 0.78));
  box-shadow: 0 12px 24px rgba(20, 35, 31, 0.06);
}

.feed-panel-note,
.feed-queue-note {
  margin: 0.8rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.feed-controls--board {
  margin-top: 0;
}

.feed-queue-panel {
  gap: 0.85rem;
}

.feed-queue-panel .feed-list {
  margin-top: 0;
  max-height: 54vh;
  padding-right: 0.25rem;
}

.feed-module-stack > section {
  margin-top: 0;
  padding-top: 1rem;
  border-top: none;
  border-radius: 1.25rem;
  border: 1px solid rgba(20, 35, 31, 0.08);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 10px 24px rgba(20, 35, 31, 0.05);
}

.feed-module-stack > .publication-panel,
.feed-module-stack > .paper-fund-panel,
.feed-module-stack > .benchmark-panel {
  padding: 1.2rem;
}

.detail-view {
  gap: 1.15rem;
}

.detail-hero-card {
  padding: 1.2rem 1.25rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(20, 35, 31, 0.08);
  background:
    linear-gradient(135deg, rgba(15, 109, 100, 0.1), rgba(255, 255, 255, 0.96) 46%, rgba(218, 106, 42, 0.08));
  box-shadow: 0 18px 34px rgba(20, 35, 31, 0.08);
}

.detail-hero-meta {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(20, 35, 31, 0.08);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.92fr);
  gap: 1rem;
  align-items: start;
}

.detail-card-aside {
  padding: 1rem 1.05rem;
}

.detail-support-pair {
  margin-top: 0;
  grid-template-columns: 1fr;
}

.history-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(20, 35, 31, 0.08);
}

.watchlist-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(20, 35, 31, 0.08);
}

.story-clusters-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(20, 35, 31, 0.08);
}

.watch-digest-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(20, 35, 31, 0.08);
}

.benchmark-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(20, 35, 31, 0.08);
}

.paper-fund-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(20, 35, 31, 0.08);
}

.digest-settings {
  margin: 0.8rem 0 1rem;
  padding: 0.95rem;
  border: 1px solid rgba(20, 35, 31, 0.08);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.56);
}

.watch-alerts-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(20, 35, 31, 0.08);
}

.feed-controls {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(20, 35, 31, 0.08);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.64);
}

.control-grid,
.control-row {
  display: grid;
  gap: 0.75rem;
}

.focus-row {
  margin-top: 0.85rem;
}

.focus-label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.focus-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.focus-chip {
  border: 1px solid rgba(20, 35, 31, 0.12);
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.focus-chip:hover {
  transform: translateY(-1px);
}

.focus-chip.active {
  color: #f5fffb;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.control-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.8rem;
}

.control-row {
  grid-template-columns: repeat(4, minmax(0, max-content));
  align-items: center;
  margin-top: 0.85rem;
}

.saved-views {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(20, 35, 31, 0.08);
}

.saved-view-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.saved-view-form input {
  width: 100%;
  border: 1px solid rgba(20, 35, 31, 0.12);
  border-radius: 0.9rem;
  padding: 0.8rem 0.9rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
}

.saved-view-list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.saved-view-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: stretch;
}

.saved-view-button,
.saved-view-delete,
.compact-button {
  font: inherit;
}

.compact-button {
  padding: 0.65rem 0.85rem;
}

.compare-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.compare-controls select {
  min-width: 240px;
  border: 1px solid rgba(20, 35, 31, 0.12);
  border-radius: 0.9rem;
  padding: 0.7rem 0.85rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
}

.saved-view-button {
  border: 1px solid rgba(20, 35, 31, 0.08);
  border-radius: 1rem;
  padding: 0.8rem 0.9rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.74);
  color: inherit;
  cursor: pointer;
}

.saved-view-button.active {
  border-color: rgba(15, 109, 100, 0.32);
  box-shadow: 0 12px 26px rgba(15, 109, 100, 0.12);
}

.saved-view-copy {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.saved-view-copy strong {
  color: var(--text);
}

.saved-view-copy span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.saved-view-delete {
  border: 1px solid rgba(20, 35, 31, 0.08);
  border-radius: 1rem;
  width: 2.8rem;
  background: rgba(255, 255, 255, 0.74);
  color: var(--negative);
  font-size: 1.2rem;
  cursor: pointer;
}

.control-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.control-field span {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.control-field input,
.control-field select {
  width: 100%;
  border: 1px solid rgba(20, 35, 31, 0.12);
  border-radius: 0.9rem;
  padding: 0.8rem 0.9rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
}

.control-field-search input {
  min-height: 3rem;
}

.toggle-control {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-size: 0.92rem;
}

.toggle-control input {
  accent-color: var(--accent);
}

.subtle-button {
  justify-self: end;
}

.feed-results {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.panel-header-compact h3 {
  margin: 0.25rem 0 0;
}

.panel-header,
.detail-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 0.5rem;
}

.alert-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.panel-header h2,
.detail-header h2,
.detail-card h3 {
  margin: 0.25rem 0 0;
}

.panel-count {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.feed-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-height: 78vh;
  overflow: auto;
  padding-right: 0.1rem;
}

.story-cluster-list {
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.feed-item {
  position: relative;
  overflow: hidden;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(20, 35, 31, 0.08);
  background: var(--panel-strong);
  border-radius: 1.15rem;
  padding: 1rem;
  color: inherit;
  box-shadow: 0 10px 24px rgba(20, 35, 31, 0.06);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.feed-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(15, 109, 100, 0.72), rgba(218, 106, 42, 0.56));
  opacity: 0;
  transition: opacity 160ms ease;
}

.feed-item:hover,
.feed-item:focus-visible {
  transform: translateY(-1px);
}

.feed-item.active {
  border-color: rgba(15, 109, 100, 0.42);
  box-shadow: 0 14px 28px rgba(15, 109, 100, 0.14);
}

.feed-item.active::before,
.feed-item:hover::before,
.feed-item:focus-visible::before {
  opacity: 1;
}

.story-cluster-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(20, 35, 31, 0.08);
  border-radius: 1.15rem;
  padding: 1rem 1rem 1rem 1.15rem;
  background:
    linear-gradient(180deg, rgba(252, 248, 236, 0.94), rgba(255, 255, 255, 0.96));
  box-shadow: 0 12px 26px rgba(32, 59, 52, 0.06);
}

.story-cluster-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(218, 106, 42, 0.72), rgba(15, 109, 100, 0.58));
}

.story-cluster-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.story-cluster-topline strong {
  font-size: 0.98rem;
  line-height: 1.4;
}

.story-cluster-summary,
.story-cluster-thesis {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.story-cluster-thesis {
  color: var(--text);
}

.story-cluster-members {
  margin-top: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.story-cluster-member {
  width: 100%;
  border: 1px solid rgba(20, 35, 31, 0.08);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.story-cluster-member:hover,
.story-cluster-member:focus-visible,
.story-cluster-member.active {
  border-color: rgba(160, 88, 42, 0.34);
  box-shadow: 0 10px 22px rgba(32, 59, 52, 0.08);
  transform: translateY(-1px);
}

.story-cluster-member-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.story-cluster-member-title {
  color: var(--text);
  font-weight: 700;
  line-height: 1.4;
}

.story-cluster-member-summary {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.feed-item h3 {
  margin: 0.55rem 0;
  font-size: 1rem;
  line-height: 1.35;
}

.feed-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.feed-exposure-preview {
  margin-top: 0.55rem !important;
  color: var(--accent-strong) !important;
  font-size: 0.92rem;
}

.feed-topline,
.feed-tags,
.detail-meta,
.list-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.feed-topline {
  justify-content: space-between;
}

.feed-score-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.rank-chip {
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  background: rgba(15, 109, 100, 0.1);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.feed-score,
.feed-tags span,
.detail-meta span,
.pill {
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.feed-score {
  color: white;
}

.feed-score.hot {
  background: var(--hot);
}

.feed-score.warm {
  background: var(--warm);
}

.feed-score.cool {
  background: var(--cool);
}

.feed-tags,
.detail-meta {
  margin-top: 0.8rem;
}

.feed-lens-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.feed-mini-score {
  border-radius: 999px;
  padding: 0.24rem 0.52rem;
  background: rgba(20, 35, 31, 0.06);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.feed-tags span,
.detail-meta span {
  background: rgba(15, 109, 100, 0.08);
  color: var(--accent-strong);
}

.delta-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.delta-chip.positive {
  background: rgba(24, 121, 78, 0.12);
  color: var(--positive);
}

.delta-chip.negative {
  background: rgba(180, 56, 56, 0.12);
  color: var(--negative);
}

.delta-chip.mixed {
  background: rgba(148, 98, 0, 0.14);
  color: var(--mixed);
}

.trace-footnote {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.feed-tags .feed-tag-watch {
  background: rgba(20, 121, 78, 0.12);
  color: var(--positive);
}

.empty-state {
  border: 1px dashed rgba(20, 35, 31, 0.16);
  border-radius: 1.25rem;
  padding: 1.6rem;
  color: var(--muted);
  text-align: center;
}

.empty-state p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
}

.empty-state span {
  display: block;
  margin-top: 0.45rem;
}

.compact-empty {
  margin-top: 0.8rem;
  padding: 1rem;
}

.detail-view.hidden,
.hidden {
  display: none;
}

.detail-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.1;
  max-width: 14ch;
}

.detail-summary {
  margin: 0.8rem 0 0;
  color: var(--muted);
  line-height: 1.65;
  max-width: 70ch;
}

.feed-edge-note {
  margin: 0.65rem 0 0;
  color: var(--text);
  line-height: 1.55;
}

.detail-score {
  min-width: 140px;
  padding: 0.9rem 1rem;
  border-radius: 1.1rem;
  background: linear-gradient(145deg, rgba(15, 109, 100, 0.12), rgba(15, 109, 100, 0.04));
}

.detail-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 0.7rem;
}

.detail-score-edge {
  background: linear-gradient(145deg, rgba(136, 91, 17, 0.14), rgba(136, 91, 17, 0.05));
}

.detail-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.8rem;
}

.detail-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.watch-toggle {
  border: 1px solid rgba(15, 109, 100, 0.18);
  border-radius: 999px;
  padding: 0.7rem 0.95rem;
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent-strong);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}

.watch-toggle:hover {
  transform: translateY(-1px);
}

.watch-toggle.active {
  color: #f5fffb;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.compact-status {
  min-height: 1.1rem;
  margin: 0;
  font-size: 0.88rem;
  text-align: right;
}

.detail-score span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.detail-score strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 2.1rem;
}

.detail-score-subnote {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footprint-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
}

.detail-card-aside .footprint-grid,
.detail-card-aside .lens-grid {
  margin-top: 0.9rem;
}

.compare-card {
  margin-top: 1rem;
}

.compare-meta {
  margin: 0.9rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.compare-view.hidden {
  display: none;
}

.comparison-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.comparison-score-card {
  padding: 0.9rem;
  border: 1px solid rgba(20, 35, 31, 0.08);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.64);
}

.comparison-label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.comparison-score-card strong {
  display: block;
  margin-top: 0.45rem;
  color: var(--text);
  font-size: 1.1rem;
}

.comparison-delta {
  display: inline-flex;
  margin-top: 0.55rem;
  border-radius: 999px;
  padding: 0.24rem 0.52rem;
  font-size: 0.76rem;
  font-weight: 800;
}

.comparison-delta.positive {
  background: rgba(24, 121, 78, 0.12);
  color: var(--positive);
}

.comparison-delta.negative {
  background: rgba(180, 56, 56, 0.12);
  color: var(--negative);
}

.comparison-delta.mixed {
  background: rgba(148, 98, 0, 0.14);
  color: var(--mixed);
}

.footprint-card {
  padding: 0.95rem;
  border: 1px solid rgba(20, 35, 31, 0.08);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.64);
}

.footprint-label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.36rem 0.62rem;
  border-radius: 999px;
  background: rgba(15, 109, 100, 0.08);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
}

.tag-pill-muted {
  background: rgba(20, 35, 31, 0.06);
  color: var(--muted);
 }

.simulation-card {
  margin-top: 1rem;
}

.simulation-branch-controls {
  margin-top: 0.9rem;
}

.simulation-branch-description {
  margin: 0.8rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.branch-summary-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.branch-summary-card {
  border: 1px solid rgba(20, 35, 31, 0.08);
  border-radius: 1rem;
  padding: 0.9rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.68);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.branch-summary-card.active {
  border-color: rgba(15, 109, 100, 0.32);
  box-shadow: 0 12px 24px rgba(15, 109, 100, 0.12);
}

.branch-summary-card.complete {
  background: rgba(243, 250, 247, 0.92);
}

.branch-summary-label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.branch-summary-card strong {
  display: block;
  margin-top: 0.45rem;
  color: var(--text);
}

.branch-summary-card p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.branch-summary-footnote {
  display: block;
  margin-top: 0.55rem;
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
}

.detail-status {
  margin: 0.9rem 0 0;
}

.simulation-view {
  margin-top: 1rem;
}

.simulation-summary-card {
  margin-bottom: 1rem;
}

.simulation-delta-card {
  margin-bottom: 1rem;
}

.simulation-delta-view.hidden {
  display: none;
}

.nested-card {
  background: rgba(255, 255, 255, 0.66);
  box-shadow: none;
}

.compact-summary {
  margin-top: 0.6rem;
  font-size: 0.98rem;
}

.lens-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.detail-support-column .lens-grid {
  margin-top: 0;
}

.lens-card {
  padding: 1rem;
}

.lens-label {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.lens-card strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 1.9rem;
}

.lens-outlook {
  margin: 0.3rem 0 0;
  color: var(--accent-strong);
  font-weight: 700;
}

.lens-summary {
  margin: 0.55rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.detail-columns {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.detail-card {
  padding: 1rem;
}

.detail-list {
  margin: 0.9rem 0 0;
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.detail-list li {
  color: var(--muted);
  line-height: 1.55;
}

.detail-list a {
  color: var(--accent-strong);
  text-decoration: none;
  word-break: break-word;
}

.detail-list a:hover {
  text-decoration: underline;
}

.detail-list strong {
  color: var(--text);
}

.list-subnote {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.history-list {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-item {
  border: 1px solid rgba(20, 35, 31, 0.08);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.64);
  padding: 0.9rem;
}

.watchlist-item {
  padding: 0;
  overflow: hidden;
}

.watchlist-button {
  width: 100%;
  border: none;
  padding: 0.9rem;
  text-align: left;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.watchlist-button:hover {
  background: rgba(15, 109, 100, 0.05);
}

.history-item p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.compact-history-list {
  margin-top: 0.75rem;
}

.watch-digest-item {
  padding: 0;
}

.analog-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.analog-shared-tags {
  gap: 0.45rem;
}

.analog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.analog-action-note {
  color: var(--muted);
  font-size: 0.82rem;
}

.history-topline {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.report-block {
  margin: 0.9rem 0 0;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(20, 35, 31, 0.04);
  border: 1px solid rgba(20, 35, 31, 0.08);
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Cascadia Code", "Consolas", monospace;
  line-height: 1.55;
}

.pill {
  color: white;
}

.pill.positive {
  background: var(--positive);
}

.pill.negative {
  background: var(--negative);
}

.pill.mixed {
  background: var(--mixed);
}

.publication-panel,
.paper-fund-panel,
.benchmark-panel,
.publication-section {
  display: grid;
  gap: 0.85rem;
}

.publication-panel,
.paper-fund-panel {
  position: relative;
  padding: 1.2rem;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(15, 109, 100, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(251, 252, 251, 0.82));
}

.publication-panel::before,
.paper-fund-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, rgba(15, 109, 100, 0.85), rgba(218, 106, 42, 0.65));
  opacity: 0.9;
}

.publication-board,
.paper-fund-board {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.publication-board > .detail-meta,
.paper-fund-board > .detail-meta {
  grid-column: 1 / -1;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(20, 35, 31, 0.08);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 10px 24px rgba(20, 35, 31, 0.06);
}

.publication-board > .detail-summary,
.paper-fund-board > .detail-summary {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1.2rem 1.25rem;
  border-radius: 1.15rem;
  border: 1px solid rgba(20, 35, 31, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 249, 247, 0.94));
  box-shadow: 0 14px 30px rgba(20, 35, 31, 0.08);
}

.publication-board > .detail-summary {
  background:
    linear-gradient(135deg, rgba(15, 109, 100, 0.08), rgba(255, 255, 255, 0.94) 45%, rgba(218, 106, 42, 0.07));
}

.paper-fund-board > .detail-summary {
  background:
    linear-gradient(135deg, rgba(15, 109, 100, 0.1), rgba(255, 255, 255, 0.95) 48%, rgba(78, 122, 103, 0.08));
}

.publication-board > .detail-summary strong,
.paper-fund-board > .detail-summary strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.publication-board > .detail-summary p {
  margin: 0.45rem 0 0;
}

#publication-quick-hits {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

#publication-quick-hits li {
  list-style: none;
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 35, 31, 0.08);
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(20, 35, 31, 0.05);
}

.paper-fund-board > .benchmark-kpi-grid {
  grid-column: 1 / -1;
}

.publication-board .publication-section,
.paper-fund-board .publication-section {
  padding: 1rem 1.05rem;
  border-radius: 1.15rem;
  border: 1px solid rgba(20, 35, 31, 0.08);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 24px rgba(20, 35, 31, 0.06);
}

.publication-section--lead,
.paper-fund-section--curve,
.paper-fund-section--issue-detail,
.paper-fund-section--positions {
  background:
    linear-gradient(180deg, rgba(15, 109, 100, 0.08), rgba(255, 255, 255, 0.9)) !important;
  border-color: rgba(15, 109, 100, 0.14) !important;
}

.publication-section--opportunity,
.paper-fund-section--risk,
.paper-fund-section--scoreboard {
  background:
    linear-gradient(180deg, rgba(218, 106, 42, 0.09), rgba(255, 255, 255, 0.92)) !important;
  border-color: rgba(218, 106, 42, 0.14) !important;
}

.paper-fund-section--benchmarks,
.paper-fund-section--peers,
.paper-fund-section--receipts {
  background:
    linear-gradient(180deg, rgba(78, 122, 103, 0.08), rgba(255, 255, 255, 0.9)) !important;
  border-color: rgba(78, 122, 103, 0.12) !important;
}

.publication-section--lead {
  grid-column: span 7;
}

.publication-section--opportunity {
  grid-column: span 5;
}

.publication-section--distribution,
.publication-section--core,
.publication-section--quiet {
  grid-column: span 4;
}

.publication-section--market {
  grid-column: span 7;
}

.publication-section--change {
  grid-column: span 5;
}

.paper-fund-section--curve,
.paper-fund-section--issue-detail,
.paper-fund-section--positions {
  grid-column: span 8;
}

.paper-fund-section--benchmarks,
.paper-fund-section--peers,
.paper-fund-section--moves,
.paper-fund-section--receipts,
.paper-fund-section--scoreboard,
.paper-fund-section--archive,
.paper-fund-section--risk,
.paper-fund-section--detractors,
.paper-fund-board-columns {
  grid-column: span 4;
}

.paper-fund-board-columns {
  align-self: start;
}

.paper-fund-board-columns .nested-card,
.publication-section .nested-card {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.publication-section .panel-header,
.paper-fund-board .panel-header {
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(20, 35, 31, 0.08);
}

.paper-fund-curve {
  padding: 1rem 1.05rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(15, 109, 100, 0.06), rgba(255, 255, 255, 0.84));
  border: 1px solid rgba(15, 109, 100, 0.12);
  display: grid;
  gap: 0.7rem;
}

.paper-fund-curve-header,
.paper-fund-curve-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.65rem;
  align-items: baseline;
}

.paper-fund-curve-header strong {
  display: block;
  margin-top: 0.3rem;
  color: var(--text);
  font-size: 1.25rem;
}

.paper-fund-curve-meta,
.paper-fund-curve-footer {
  color: var(--muted);
  font-size: 0.85rem;
}

.paper-fund-curve-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.paper-fund-curve-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.paper-fund-chart-canvas {
  width: 100%;
  height: 250px;
}

.paper-fund-curve-area {
  stroke: none;
  fill: url(#paper-fund-curve-fill);
}

.paper-fund-curve-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.paper-fund-curve-line.dashed {
  stroke-dasharray: 7 5;
}

.paper-fund-curve-line.positive,
.paper-fund-curve-area.positive,
.paper-fund-curve-line.mixed,
.paper-fund-curve-area.mixed {
  stroke: var(--accent);
}

.paper-fund-curve-line.negative,
.paper-fund-curve-area.negative {
  stroke: var(--negative);
}

.paper-fund-curve-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.paper-fund-curve-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.paper-fund-curve-legend-item strong {
  color: var(--text);
  font-size: 0.82rem;
}

.paper-fund-chart-attribution {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.paper-fund-chart-attribution a {
  color: inherit;
}

.paper-fund-curve-swatch {
  width: 1rem;
  height: 0;
  border-top: 3px solid currentColor;
  border-radius: 999px;
  display: inline-block;
}

.paper-fund-curve-swatch.dashed {
  border-top-style: dashed;
}

.paper-fund-position .watchlist-button {
  display: grid;
  gap: 0.55rem;
}

.paper-fund-underwriting {
  display: grid;
  gap: 0.5rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(20, 35, 31, 0.08);
  border-radius: 0.9rem;
  background: rgba(246, 249, 247, 0.95);
}

.paper-fund-archive-card {
  display: grid;
  gap: 0.55rem;
}

.paper-fund-archive-card.active {
  border-color: rgba(15, 109, 100, 0.28);
  box-shadow: 0 12px 24px rgba(15, 109, 100, 0.12);
  background: rgba(243, 250, 247, 0.92);
}

.paper-fund-issue-detail-view.hidden {
  display: none;
}

#paper-fund-issue-note-markdown.report-block {
  max-height: 22rem;
  overflow: auto;
}

.paper-fund-pnl {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  font-size: 0.82rem;
  font-weight: 800;
}

.paper-fund-pnl.positive {
  background: rgba(24, 121, 78, 0.12);
  color: var(--positive);
}

.paper-fund-pnl.negative {
  background: rgba(180, 56, 56, 0.12);
  color: var(--negative);
}

.paper-fund-pnl.mixed {
  background: rgba(148, 98, 0, 0.14);
  color: var(--mixed);
}

.paper-fund-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.24rem 0.58rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.paper-fund-chip.positive {
  background: rgba(24, 121, 78, 0.12);
  color: var(--positive);
}

.paper-fund-chip.negative {
  background: rgba(180, 56, 56, 0.12);
  color: var(--negative);
}

.paper-fund-chip.mixed {
  background: rgba(148, 98, 0, 0.14);
  color: var(--mixed);
}

.paper-fund-risk-flag {
  display: grid;
  gap: 0.55rem;
}

.paper-fund-risk-flag .history-topline {
  align-items: center;
}

.benchmark-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.benchmark-kpi-card {
  padding: 0.95rem 1rem;
  border: 1px solid rgba(20, 35, 31, 0.08);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 249, 248, 0.86));
  box-shadow: 0 10px 22px rgba(20, 35, 31, 0.06);
}

.benchmark-kpi-card strong {
  display: block;
  margin: 0.35rem 0 0.4rem;
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.25;
}

.benchmark-suite-field {
  min-width: 120px;
}

.benchmark-suite-field span {
  font-size: 0.7rem;
}

.publication-actions {
  align-items: end;
}

.publication-item {
  padding: 0;
}

.publication-editorial-slot {
  display: grid;
  gap: 0.75rem;
}

.publication-editorial-card {
  width: 100%;
}

.publication-section--lead .publication-editorial-card,
.paper-fund-section--positions .watchlist-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 246, 0.96));
}

.publication-angle {
  color: var(--text);
  line-height: 1.5;
}

.publication-market-card {
  padding: 1rem 1.05rem;
  border-radius: 1rem;
  background: rgba(15, 109, 100, 0.05);
  border: 1px solid rgba(15, 109, 100, 0.12);
  display: grid;
  gap: 0.65rem;
}

.publication-market-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.compact-empty-item {
  list-style: none;
  color: var(--muted);
  padding: 0.85rem 0;
}

.publication-closing-note {
  margin-top: 0.35rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(20, 35, 31, 0.12);
}

@media (max-width: 1080px) {
  .hero,
  .workspace,
  .detail-layout,
  .metrics,
  .detail-columns,
  .lens-grid {
    grid-template-columns: 1fr;
  }

  .publication-board,
  .paper-fund-board {
    grid-template-columns: 1fr;
  }

  .publication-board > *,
  .paper-fund-board > * {
    grid-column: 1 / -1 !important;
  }

  .feed-list {
    max-height: none;
  }

  .feed-queue-panel .feed-list {
    max-height: none;
  }

  .detail-support-pair {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 1rem, 1320px);
    padding-top: 1rem;
  }

  .hero h1 {
    max-width: none;
  }

  .detail-header {
    flex-direction: column;
  }

  .feed-panel-intro,
  .feed-queue-panel,
  .detail-hero-card {
    padding: 1rem;
  }

  .control-grid,
  .control-row {
    grid-template-columns: 1fr;
  }

  .saved-view-form {
    grid-template-columns: 1fr;
  }

  .compare-controls {
    width: 100%;
  }

  .compare-controls select {
    min-width: 0;
    width: 100%;
  }

  .subtle-button {
    justify-self: start;
  }

  .detail-action-row,
  .detail-actions {
    align-items: stretch;
    width: 100%;
  }

  .detail-score-grid {
    grid-template-columns: 1fr;
  }

  .feed-module-stack > section {
    padding-top: 0.9rem;
  }

  .compact-status {
    text-align: left;
  }

  .article-analysis-form {
    grid-template-columns: 1fr;
  }
}
