:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --rail: #fbfcfe;
  --ink: #101418;
  --body: #26323f;
  --muted: #657287;
  --quiet: #8995a8;
  --line: #dce4ee;
  --line-strong: #cbd6e4;
  --soft: #edf3f8;
  --soft-blue: #e8f4ff;
  --accent: #1d9bf0;
  --save: #0f766e;
  --reddit: #ff4500;
  --youtube: #f30034;
  --shadow: 0 18px 44px rgba(16, 20, 24, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, #eef3f9 0, #f8fafc 22%, #ffffff 50%, #f8fafc 78%, #eef3f9 100%);
  color: var(--ink);
  overflow-x: hidden;
}

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

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(29, 155, 240, 0.28);
  outline-offset: 3px;
}

.app-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 638px) 286px;
  justify-content: center;
  min-height: 100vh;
}

.left-rail,
.right-rail,
.feed-column {
  background: var(--surface);
}

.left-rail {
  position: sticky;
  top: 0;
  align-self: start;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 42px;
  min-height: 100vh;
  padding: 18px 24px 24px;
  background: rgba(251, 252, 254, 0.96);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  overflow: visible;
}

.brand {
  display: inline-grid;
  justify-items: start;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: white;
  background: var(--ink);
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(16, 20, 24, 0.12);
  font-size: 0.92rem;
  font-weight: 880;
  letter-spacing: 0;
}

.rail-nav {
  display: grid;
  align-content: start;
  gap: 12px;
}

.rail-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--body);
  font-size: 1.04rem;
  font-weight: 760;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.rail-nav a:hover {
  background: var(--soft);
  transform: translateX(2px);
}

.nav-icon {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: currentColor;
}

.nav-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-nav a.is-active {
  color: var(--ink);
  background: #f0f4f8;
}

.rail-nav a.is-active .nav-icon {
  color: var(--ink);
}

.rail-nav small {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  margin-left: auto;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 0.72rem;
  font-weight: 820;
}

.theme-toggle {
  align-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: #fbfcfd;
  color: var(--body);
  font-size: 0.86rem;
  font-weight: 820;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  box-shadow: 0 10px 22px rgba(16, 20, 24, 0.08);
}

.theme-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 0 0 4px rgba(16, 20, 24, 0.08);
}

.mobile-settings-button,
.mobile-settings-panel {
  display: none;
}

.feed-column {
  min-height: 100vh;
  border-right: 1px solid var(--line);
}

.feed-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 82px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.feed-tab {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 830;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.feed-tab:hover {
  background: rgba(237, 243, 248, 0.66);
}

.feed-tab.is-active {
  color: var(--ink);
}

.feed-tab.is-active::after {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 78px;
  height: 4px;
  background: var(--ink);
  border-radius: 999px;
  content: "";
  transform: translateX(-50%);
}

.opportunity-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: white;
}

.opportunity-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.opportunity-heading p,
.opportunity-heading span {
  margin: 0;
}

.opportunity-heading p {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 890;
}

.opportunity-heading span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.opportunity-heading button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: white;
  color: var(--body);
  font-size: 0.76rem;
  font-weight: 820;
}

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

.opportunity-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
  color: var(--body);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.opportunity-card:hover,
.opportunity-card.is-active {
  border-color: rgba(29, 155, 240, 0.55);
  box-shadow: 0 12px 26px rgba(16, 20, 24, 0.08);
  transform: translateY(-1px);
}

.opportunity-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.opportunity-card-top span,
.opportunity-card-top strong {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.opportunity-card-top span {
  color: var(--accent);
}

.opportunity-card-top strong {
  color: var(--quiet);
}

.opportunity-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.22;
}

.opportunity-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.38;
}

.opportunity-next {
  color: var(--ink);
  font-weight: 820;
}

.opportunity-tags,
.opportunity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.opportunity-tags span {
  min-height: 23px;
  border-radius: 999px;
  padding: 0 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 760;
}

.opportunity-action {
  min-height: 29px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: white;
  color: var(--body);
  font-size: 0.74rem;
  font-weight: 840;
}

.opportunity-action.is-selected {
  color: white;
  background: var(--ink);
  border-color: var(--ink);
}

.opportunity-empty {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 720;
}

.feed-controls {
  display: grid;
  gap: 14px;
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 18px;
  background: var(--soft);
  border: 1px solid transparent;
  border-radius: 999px;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.search-wrap:focus-within {
  background: white;
  border-color: rgba(29, 155, 240, 0.45);
  box-shadow: 0 0 0 4px rgba(29, 155, 240, 0.11);
}

.search-wrap span {
  position: relative;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: 2px solid #607189;
  border-radius: 999px;
}

.search-wrap span::after {
  position: absolute;
  right: -7px;
  bottom: -5px;
  width: 9px;
  height: 2px;
  background: #607189;
  border-radius: 999px;
  content: "";
  transform: rotate(45deg);
}

.search-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 650;
}

.search-wrap input::placeholder {
  color: #6a7689;
}

.select-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-group {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.filter-platform {
  width: 136px;
}

.filter-sort {
  width: 132px;
}

.filter-group::after {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #607189;
  border-bottom: 2px solid #607189;
  content: "";
  pointer-events: none;
  transform: translateY(-65%) rotate(45deg);
}

.filter-trigger {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 42px 0 18px;
  background: #fbfcfd;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 860;
  letter-spacing: 0;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.filter-trigger:hover,
.filter-trigger:focus,
.filter-group.is-open .filter-trigger {
  border-color: var(--line-strong);
  background: white;
}

.filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  display: grid;
  width: 100%;
  min-width: 100%;
  padding: 8px;
  border: 1px solid rgba(16, 20, 24, 0.14);
  border-radius: 18px;
  background: rgba(41, 46, 52, 0.92);
  box-shadow:
    0 18px 44px rgba(16, 20, 24, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 130ms ease,
    transform 130ms ease;
  backdrop-filter: blur(14px);
}

.filter-group.is-open .filter-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.filter-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  padding: 0 10px;
  background: transparent;
  color: white;
  font-size: 0.82rem;
  font-weight: 860;
  text-align: left;
}

.filter-menu button::before {
  display: inline-grid;
  place-items: center;
  width: 12px;
  color: white;
  content: "";
}

.filter-menu button.is-selected {
  background: rgba(29, 155, 240, 0.92);
}

.filter-menu button.is-selected::before {
  content: "✓";
}

.filter-menu button:hover,
.filter-menu button:focus {
  background: rgba(255, 255, 255, 0.13);
  outline: 0;
}

.filter-menu button.is-selected:hover,
.filter-menu button.is-selected:focus {
  background: rgba(29, 155, 240, 0.96);
}

.feed-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 680;
}

.feed-status p {
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 12px;
  background: #f2f6fa;
  color: var(--body);
}

.status-freshness {
  color: var(--quiet);
  text-align: right;
}

.feed-list {
  background: var(--surface);
}

.scroll-halo,
.post-visual {
  display: none;
}

.post-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  transition:
    background 150ms ease,
    box-shadow 150ms ease;
}

.post-row:hover {
  background: #fbfdff;
  box-shadow: inset 3px 0 0 rgba(29, 155, 240, 0.22);
}

.source-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 0.88rem;
  font-weight: 900;
}

.source-reddit {
  background: var(--reddit);
}

.source-youtube {
  background: var(--youtube);
  font-size: 0.76rem;
}

.post-content {
  min-width: 0;
}

.post-meta,
.post-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.post-meta {
  gap: 10px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.post-meta strong {
  color: var(--ink);
  font-weight: 860;
}

.post-title {
  display: block;
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 850;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.post-title:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.post-content p {
  margin: 8px 0 14px;
  color: #576274;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.signal-block {
  display: grid;
  gap: 10px;
  margin: 12px 0 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbfe;
}

.signal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.signal-header span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.signal-header strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 880;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-block p {
  margin: 0;
  color: var(--body);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.42;
}

.signal-tags,
.signal-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.signal-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: white;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
}

.signal-chip {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  background: white;
  color: var(--body);
  font-size: 0.78rem;
  font-weight: 840;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.signal-chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  transform: translateY(-1px);
}

.signal-chip.is-selected {
  color: white;
  background: var(--ink);
  border-color: var(--ink);
}

.post-actions {
  gap: 18px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 740;
}

.post-actions span {
  color: #637086;
}

.post-actions button {
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  padding: 0 2px;
  background: transparent;
  color: var(--muted);
  font-weight: 820;
  transition:
    color 150ms ease,
    transform 150ms ease;
}

.post-actions button:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.post-actions button.is-saved {
  color: var(--save);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-height: 68px;
  padding: 14px 22px 30px;
  color: var(--ink);
  font-weight: 850;
}

.pagination button {
  min-width: 82px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfd;
  color: var(--body);
  font-weight: 820;
}

.pagination button:last-child:not(:disabled) {
  color: white;
  background: var(--ink);
  border-color: var(--ink);
}

.pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.right-rail {
  position: sticky;
  top: 0;
  align-self: start;
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 100vh;
  padding: 26px 22px;
  background: rgba(251, 252, 254, 0.96);
  border-right: 1px solid var(--line);
}

.right-rail .opportunity-panel {
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100vh - 218px);
  min-height: 0;
  overflow: hidden;
}

.right-rail .opportunity-list {
  min-height: 0;
  max-height: calc(100vh - 336px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.right-rail .opportunity-list::-webkit-scrollbar {
  width: 6px;
}

.right-rail .opportunity-list::-webkit-scrollbar-track {
  background: transparent;
}

.right-rail .opportunity-list::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
}

.premium-panel,
.rail-note,
.run-status,
.source-health {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 18px;
}

.premium-panel {
  box-shadow: var(--shadow);
}

.premium-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.premium-panel h2,
.rail-note h3,
.run-status h3,
.source-health h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.18;
}

.premium-panel h2 {
  font-size: 1.15rem;
}

.rail-note h3,
.run-status h3,
.source-health h3 {
  font-size: 1rem;
}

.premium-panel p,
.rail-note p,
.run-status p,
.source-health p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.45;
}

.premium-action {
  display: inline-grid;
  place-items: center;
  width: max-content;
  min-height: 38px;
  border-radius: 999px;
  padding: 0 18px;
  color: white;
  background: var(--ink);
  font-size: 0.88rem;
  font-weight: 850;
}

.premium-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 2px;
}

.premium-stats div {
  display: grid;
  gap: 2px;
  border-radius: 8px;
  background: #f4f7fa;
  padding: 10px;
}

.premium-stats strong {
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1;
}

.premium-stats span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 760;
  line-height: 1.25;
}

.run-status strong {
  color: var(--ink);
  font-size: 1.2rem;
}

.run-status span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.source-health-row {
  display: grid;
  grid-template-columns: 9px minmax(56px, auto) 1fr;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  color: var(--body);
  font-size: 0.82rem;
  font-weight: 780;
}

.source-health-row span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.source-health-row span.is-ok {
  background: #16a34a;
}

.source-health-row span.is-fail {
  background: #e11d48;
}

.source-health-row small {
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  display: grid;
  gap: 8px;
  padding: 52px 28px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.feed-loading {
  background:
    linear-gradient(90deg, rgba(29, 155, 240, 0.06), rgba(15, 118, 110, 0.06)),
    var(--surface);
}

.feed-error {
  background: #fff7ed;
  color: #7c2d12;
}

.empty-state strong {
  color: var(--ink);
  font-size: 1.08rem;
}

.empty-state p {
  max-width: 430px;
  margin: 0;
  line-height: 1.48;
}

mark {
  color: inherit;
  background: #fff1a8;
  border-radius: 4px;
  padding: 0 2px;
}

html[data-theme="night"] {
  color-scheme: dark;
  --bg: #03070d;
  --surface: #06101a;
  --rail: rgba(3, 8, 14, 0.84);
  --ink: #f6fbff;
  --body: #c8d7e7;
  --muted: #8fa4bb;
  --quiet: #607890;
  --line: rgba(83, 169, 255, 0.18);
  --line-strong: rgba(88, 201, 255, 0.42);
  --soft: rgba(18, 41, 60, 0.88);
  --accent: #31b7ff;
  --save: #79f2cd;
  --reddit: #35ff8a;
  --youtube: #ff3f5f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

html[data-theme="night"] body {
  background:
    radial-gradient(circle at 20% 0%, rgba(38, 157, 255, 0.2), transparent 31%),
    radial-gradient(circle at 86% 18%, rgba(49, 255, 151, 0.12), transparent 32%),
    radial-gradient(circle at 70% 78%, rgba(255, 42, 80, 0.12), transparent 28%),
    linear-gradient(120deg, #02050a 0%, #06111c 46%, #020409 100%);
  color: var(--ink);
}

html[data-theme="night"] body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
  background:
    linear-gradient(rgba(55, 174, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55, 174, 255, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 12% 50%, rgba(0, 168, 255, 0.16), transparent 36%);
  background-size: 48px 48px, 48px 48px, cover;
  content: "";
  mask-image: linear-gradient(90deg, black, rgba(0, 0, 0, 0.45) 22%, rgba(0, 0, 0, 0.78) 80%, black);
  pointer-events: none;
}

html[data-theme="night"] .left-rail,
html[data-theme="night"] .right-rail,
html[data-theme="night"] .feed-column {
  background: var(--rail);
  backdrop-filter: blur(22px);
}

html[data-theme="night"] .left-rail,
html[data-theme="night"] .right-rail {
  border-color: rgba(82, 176, 255, 0.14);
}

html[data-theme="night"] .brand-mark {
  color: #e8f7ff;
  background: #07131f;
  border: 1px solid rgba(98, 197, 255, 0.42);
  box-shadow:
    0 0 22px rgba(49, 183, 255, 0.35),
    inset 0 0 20px rgba(49, 183, 255, 0.1);
}

html[data-theme="night"] .rail-nav a {
  color: #b9c8da;
}

html[data-theme="night"] .rail-nav a:hover,
html[data-theme="night"] .rail-nav a.is-active {
  color: white;
  background: rgba(28, 82, 124, 0.34);
  box-shadow: inset 0 0 0 1px rgba(92, 194, 255, 0.12);
}

html[data-theme="night"] .rail-nav a.is-active .nav-icon {
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(49, 183, 255, 0.72));
}

html[data-theme="night"] .rail-nav small {
  color: #03101a;
  background: #e8f7ff;
  box-shadow: 0 0 16px rgba(232, 247, 255, 0.32);
}

html[data-theme="night"] .theme-toggle {
  color: #d9f1ff;
  background: rgba(7, 21, 34, 0.92);
  border-color: rgba(90, 191, 255, 0.32);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 26px rgba(43, 172, 255, 0.16);
}

html[data-theme="night"] .theme-dot {
  background: #35ff8a;
  box-shadow:
    0 0 16px rgba(53, 255, 138, 0.95),
    0 0 0 5px rgba(53, 255, 138, 0.12);
}

html[data-theme="night"] .mobile-settings-button,
html[data-theme="night"] .mobile-settings-panel {
  background: rgba(7, 21, 34, 0.94);
  border-color: rgba(90, 191, 255, 0.26);
  color: #d9f1ff;
}

html[data-theme="night"] .mobile-theme-toggle {
  color: #d9f1ff;
  background: rgba(11, 32, 50, 0.94);
  border-color: rgba(90, 191, 255, 0.32);
}

html[data-theme="night"] .feed-column {
  position: relative;
  border-right: 1px solid rgba(72, 164, 255, 0.18);
  overflow: clip;
}

html[data-theme="night"] .feed-tabs {
  background: rgba(5, 12, 21, 0.88);
  border-bottom-color: rgba(84, 179, 255, 0.18);
}

html[data-theme="night"] .feed-tab {
  color: #7f95ab;
}

html[data-theme="night"] .feed-tab:hover {
  background: rgba(21, 68, 102, 0.38);
}

html[data-theme="night"] .feed-tab.is-active {
  color: white;
}

html[data-theme="night"] .feed-tab.is-active::after {
  background: #31b7ff;
  box-shadow: 0 0 18px rgba(49, 183, 255, 0.9);
}

html[data-theme="night"] .opportunity-panel {
  border-bottom-color: rgba(84, 179, 255, 0.16);
  background: rgba(4, 10, 18, 0.74);
}

html[data-theme="night"] .opportunity-heading p,
html[data-theme="night"] .opportunity-card h3,
html[data-theme="night"] .opportunity-next {
  color: white;
}

html[data-theme="night"] .opportunity-heading span,
html[data-theme="night"] .opportunity-card p,
html[data-theme="night"] .opportunity-card-top strong,
html[data-theme="night"] .opportunity-empty {
  color: #aebbd0;
}

html[data-theme="night"] .opportunity-heading button,
html[data-theme="night"] .opportunity-card,
html[data-theme="night"] .opportunity-action {
  background: rgba(7, 17, 28, 0.9);
  border-color: rgba(84, 179, 255, 0.18);
}

html[data-theme="night"] .opportunity-card:hover,
html[data-theme="night"] .opportunity-card.is-active {
  border-color: rgba(53, 255, 138, 0.46);
  box-shadow: 0 0 24px rgba(53, 255, 138, 0.1);
}

html[data-theme="night"] .opportunity-card-top span {
  color: #35ff8a;
}

html[data-theme="night"] .opportunity-tags span {
  color: #b8d9ff;
  background: rgba(17, 42, 61, 0.78);
}

html[data-theme="night"] .opportunity-action {
  color: #d9f1ff;
}

html[data-theme="night"] .opportunity-action.is-selected {
  color: #03101a;
  background: #31b7ff;
  border-color: #31b7ff;
}

html[data-theme="night"] .feed-controls,
html[data-theme="night"] .feed-status {
  border-bottom-color: rgba(84, 179, 255, 0.16);
  background: rgba(4, 10, 18, 0.74);
}

html[data-theme="night"] .search-wrap {
  background: rgba(10, 31, 48, 0.92);
  border-color: rgba(84, 179, 255, 0.18);
}

html[data-theme="night"] .search-wrap:focus-within {
  background: rgba(7, 22, 36, 0.98);
  border-color: rgba(53, 255, 138, 0.44);
  box-shadow: 0 0 0 4px rgba(53, 255, 138, 0.09);
}

html[data-theme="night"] .search-wrap input,
html[data-theme="night"] .filter-trigger {
  color: var(--ink);
}

html[data-theme="night"] .filter-trigger,
html[data-theme="night"] .status-pill,
html[data-theme="night"] .pagination button {
  background: rgba(8, 25, 39, 0.92);
  border-color: rgba(84, 179, 255, 0.18);
  color: #d9f1ff;
}

html[data-theme="night"] .filter-group.is-open .filter-trigger,
html[data-theme="night"] .filter-trigger:hover,
html[data-theme="night"] .filter-trigger:focus {
  background: rgba(7, 22, 36, 0.98);
}

html[data-theme="night"] .filter-menu {
  border-color: rgba(84, 179, 255, 0.26);
  background: rgba(6, 16, 27, 0.94);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.38),
    0 0 26px rgba(49, 183, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="night"] .filter-menu button.is-selected {
  background: rgba(49, 183, 255, 0.72);
}

html[data-theme="night"] .status-freshness {
  color: #79afd8;
}

html[data-theme="night"] .scroll-halo {
  position: sticky;
  z-index: 18;
  display: block;
  height: 0;
  pointer-events: none;
}

html[data-theme="night"] .scroll-halo::before {
  position: absolute;
  left: 0;
  right: 0;
  height: 86px;
  background:
    radial-gradient(ellipse at center, rgba(49, 183, 255, 0.3), transparent 68%),
    linear-gradient(90deg, transparent, rgba(49, 183, 255, 0.32), rgba(53, 255, 138, 0.18), transparent);
  content: "";
  filter: blur(6px);
  opacity: 0.72;
  animation: scrollPulse 2.8s ease-in-out infinite;
}

html[data-theme="night"] .scroll-halo-top {
  top: 82px;
}

html[data-theme="night"] .scroll-halo-top::before {
  top: 0;
  mask-image: linear-gradient(to bottom, black, transparent);
}

html[data-theme="night"] .scroll-halo-bottom {
  bottom: 0;
}

html[data-theme="night"] .scroll-halo-bottom::before {
  bottom: 0;
  mask-image: linear-gradient(to top, black, transparent);
}

html[data-theme="night"] .feed-list {
  background: transparent;
}

html[data-theme="night"] .post-row {
  --post-accent: #31b7ff;
  --post-rgb: 49, 183, 255;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(var(--post-rgb), 0.44);
  border-radius: 8px;
  background:
    linear-gradient(110deg, rgba(4, 10, 18, 0.96) 0%, rgba(6, 17, 28, 0.9) 52%, rgba(var(--post-rgb), 0.12) 100%),
    #040a12;
  box-shadow:
    0 0 0 1px rgba(var(--post-rgb), 0.08),
    0 0 26px rgba(var(--post-rgb), 0.2),
    inset 0 0 42px rgba(var(--post-rgb), 0.08);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

html[data-theme="night"] .post-row::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 16px;
  width: 4px;
  border-radius: 999px;
  background: var(--post-accent);
  box-shadow: 0 0 18px rgba(var(--post-rgb), 0.95);
  content: "";
}

html[data-theme="night"] .post-row::after {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 52px;
  height: 28px;
  border-top: 3px solid var(--post-accent);
  border-left: 3px solid var(--post-accent);
  border-radius: 8px 0 0 0;
  content: "";
  filter: drop-shadow(0 0 9px rgba(var(--post-rgb), 0.9));
}

html[data-theme="night"] .post-row:hover {
  background:
    linear-gradient(110deg, rgba(5, 13, 22, 0.98) 0%, rgba(8, 22, 36, 0.94) 52%, rgba(var(--post-rgb), 0.18) 100%),
    #040a12;
  border-color: rgba(var(--post-rgb), 0.72);
  box-shadow:
    0 0 0 1px rgba(var(--post-rgb), 0.16),
    0 0 42px rgba(var(--post-rgb), 0.28),
    inset 0 0 54px rgba(var(--post-rgb), 0.1);
  transform: translateY(-2px);
}

html[data-theme="night"] .post-row.post-x {
  --post-accent: #31b7ff;
  --post-rgb: 49, 183, 255;
}

html[data-theme="night"] .post-row.post-reddit {
  --post-accent: #35ff8a;
  --post-rgb: 53, 255, 138;
}

html[data-theme="night"] .post-row.post-youtube {
  --post-accent: #ff3f5f;
  --post-rgb: 255, 63, 95;
}

html[data-theme="night"] .source-avatar {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: #07111d;
  color: white;
  box-shadow:
    0 0 28px rgba(var(--post-rgb), 0.38),
    inset 0 0 20px rgba(var(--post-rgb), 0.14);
}

html[data-theme="night"] .source-reddit {
  background: radial-gradient(circle at 30% 25%, #ff9a32, #ff4500 52%, #571100 100%);
}

html[data-theme="night"] .source-youtube {
  background: radial-gradient(circle at 30% 25%, #ff6380, #dc0030 55%, #43000f 100%);
}

html[data-theme="night"] .post-meta {
  color: #9fb3c8;
}

html[data-theme="night"] .post-meta strong,
html[data-theme="night"] .post-title {
  color: #fbfdff;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.16);
}

html[data-theme="night"] .post-meta span {
  color: var(--post-accent);
}

html[data-theme="night"] .post-title {
  position: relative;
  z-index: 1;
}

html[data-theme="night"] .post-content p {
  color: #a9b8c9;
  position: relative;
  z-index: 1;
}

html[data-theme="night"] .signal-block {
  position: relative;
  z-index: 1;
  border-color: rgba(var(--post-rgb), 0.28);
  border-left-color: var(--post-accent);
  background: rgba(8, 24, 38, 0.74);
  box-shadow: inset 0 0 22px rgba(var(--post-rgb), 0.08);
}

html[data-theme="night"] .signal-header span,
html[data-theme="night"] .signal-chip.is-selected {
  color: var(--post-accent);
}

html[data-theme="night"] .signal-header strong,
html[data-theme="night"] .signal-block p {
  color: #eaf6ff;
}

html[data-theme="night"] .signal-tags span,
html[data-theme="night"] .signal-chip {
  color: #b9c5d2;
  background: rgba(5, 15, 26, 0.72);
  border-color: rgba(var(--post-rgb), 0.24);
}

html[data-theme="night"] .signal-chip.is-selected {
  background: rgba(var(--post-rgb), 0.16);
  border-color: rgba(var(--post-rgb), 0.58);
}

html[data-theme="night"] .post-actions {
  color: #a9b8c9;
  position: relative;
  z-index: 1;
}

html[data-theme="night"] .post-actions span,
html[data-theme="night"] .post-actions button {
  color: #b9c5d2;
  text-shadow: 0 0 12px rgba(var(--post-rgb), 0.14);
}

html[data-theme="night"] .post-actions span:first-child,
html[data-theme="night"] .post-actions button:hover,
html[data-theme="night"] .post-actions button.is-saved {
  color: var(--post-accent);
}

html[data-theme="night"] .post-visual {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: block;
  width: min(34%, 190px);
  opacity: 0.36;
  pointer-events: none;
}

html[data-theme="night"] .visual-speedline {
  position: absolute;
  inset: 20px -16px 18px -24px;
  background:
    linear-gradient(100deg, transparent 0%, rgba(var(--post-rgb), 0.22) 52%, rgba(var(--post-rgb), 0.02) 100%),
    repeating-linear-gradient(168deg, transparent 0 14px, rgba(var(--post-rgb), 0.34) 15px 16px, transparent 17px 34px);
  filter: blur(0.2px);
  mask-image: linear-gradient(90deg, transparent, black 22%, black 78%, transparent);
}

html[data-theme="night"] .visual-core {
  position: absolute;
  top: 32px;
  right: 40px;
  display: grid;
  place-items: center;
  width: 116px;
  height: 72px;
  border: 1px solid rgba(var(--post-rgb), 0.72);
  border-radius: 18px;
  color: var(--post-accent);
  background: rgba(4, 14, 24, 0.72);
  box-shadow:
    0 0 24px rgba(var(--post-rgb), 0.42),
    inset 0 0 24px rgba(var(--post-rgb), 0.16);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0;
  transform: perspective(260px) rotateX(54deg) rotateZ(-8deg);
}

html[data-theme="night"] .visual-orbit {
  position: absolute;
  top: 42px;
  right: 16px;
  width: 130px;
  height: 86px;
  border: 1px solid rgba(var(--post-rgb), 0.28);
  border-radius: 22px;
  transform: perspective(260px) rotateX(54deg) rotateZ(-8deg) translateY(18px);
  filter: drop-shadow(0 0 16px rgba(var(--post-rgb), 0.35));
}

html[data-theme="night"] .premium-panel,
html[data-theme="night"] .rail-note,
html[data-theme="night"] .run-status,
html[data-theme="night"] .source-health {
  background: rgba(7, 17, 28, 0.9);
  border-color: rgba(84, 179, 255, 0.18);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
}

html[data-theme="night"] .premium-action {
  color: #03101a;
  background: #31b7ff;
  box-shadow: 0 0 24px rgba(49, 183, 255, 0.35);
}

html[data-theme="night"] .premium-stats div {
  background: rgba(17, 42, 61, 0.78);
}

html[data-theme="night"] .empty-state {
  border-bottom-color: rgba(84, 179, 255, 0.16);
}

html[data-theme="night"] mark {
  color: #06111c;
  background: #79f2cd;
}

@keyframes scrollPulse {
  0%,
  100% {
    opacity: 0.42;
    transform: translateX(-4%);
  }
  50% {
    opacity: 0.86;
    transform: translateX(4%);
  }
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .left-rail {
    z-index: 40;
    width: 82px;
    padding: 18px 16px 24px;
    overflow: hidden;
    transition:
      width 180ms ease,
      box-shadow 180ms ease,
      background 180ms ease;
  }

  .left-rail:is(:hover, :focus-within) {
    width: 236px;
    box-shadow: 18px 0 38px rgba(16, 20, 24, 0.12);
  }

  .left-rail:is(:hover, :focus-within) .rail-nav a {
    justify-content: flex-start;
    padding: 0 10px;
  }

  .left-rail:is(:hover, :focus-within) .nav-label {
    display: inline-block;
  }

  .left-rail:is(:hover, :focus-within) .rail-nav small {
    display: inline-grid;
  }

  .left-rail:is(:hover, :focus-within) .theme-toggle {
    justify-content: flex-start;
    padding: 0 14px;
  }

  .left-rail:is(:hover, :focus-within) .theme-label {
    display: inline-block;
  }

  .rail-nav a {
    justify-content: center;
    padding: 0;
  }

  .nav-label,
  .rail-nav small {
    display: none;
  }

  .right-rail {
    display: none;
  }

  .theme-toggle {
    justify-content: center;
    padding: 0;
  }

  .theme-label {
    display: none;
  }

}

@media (max-width: 720px) {
  .app-shell {
    display: block;
  }

  body {
    background: var(--surface);
  }

  .left-rail {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 30;
    display: block;
    width: auto;
    height: calc(62px + env(safe-area-inset-bottom));
    min-height: 0;
    gap: 0;
    grid-template-rows: none;
    padding: 0 0 env(safe-area-inset-bottom);
    border: 0;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
  }

  .left-rail:is(:hover, :focus-within) {
    width: auto;
    box-shadow: none;
  }

  .left-rail:is(:hover, :focus-within) .rail-nav a {
    justify-content: center;
    padding: 0;
  }

  .left-rail:is(:hover, :focus-within) .rail-nav small,
  .left-rail:is(:hover, :focus-within) .theme-label {
    display: none;
  }

  .brand {
    display: none;
  }

  .rail-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-content: stretch;
    gap: 0;
    height: 62px;
  }

  .rail-nav a:nth-child(6),
  .rail-nav a:nth-child(6) .nav-label {
    display: none;
  }

  .rail-nav a {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 62px;
    border-radius: 0;
    padding: 0;
    font-size: 0.68rem;
  }

  .rail-nav a:hover,
  .rail-nav a.is-active {
    background: transparent;
    transform: none;
  }

  .nav-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 780;
    line-height: 1;
    padding: 0 4px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rail-nav a.is-active .nav-label {
    color: var(--ink);
  }

  .nav-icon {
    width: 22px;
    height: 22px;
  }

  .nav-icon svg {
    width: 22px;
    height: 22px;
  }

  .rail-nav small {
    display: none;
  }

  .theme-toggle {
    display: none;
  }

  html[data-theme="night"] .theme-toggle {
    background: rgba(7, 21, 34, 0.94);
  }

  .feed-column {
    min-height: 100vh;
    padding-bottom: calc(62px + env(safe-area-inset-bottom));
    border-right: 0;
  }

  .feed-tabs {
    min-height: 70px;
    padding-right: 54px;
  }

  .opportunity-panel {
    gap: 10px;
    padding: 12px 18px;
  }

  .opportunity-heading {
    align-items: flex-start;
  }

  .opportunity-list {
    margin: 0 -18px;
    padding: 0 18px 2px;
  }

  .opportunity-card {
    flex: 0 0 min(314px, 86vw);
    scroll-snap-align: start;
  }

  .mobile-settings-button {
    position: absolute;
    top: 50%;
    right: 12px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    transform: translateY(-50%);
  }

  .mobile-settings-button:hover,
  .mobile-settings-button[aria-expanded="true"] {
    background: var(--soft);
    border-color: var(--line);
  }

  .mobile-settings-button svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
  }

  .mobile-settings-panel {
    position: sticky;
    top: 70px;
    z-index: 19;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    backdrop-filter: blur(18px);
  }

  .mobile-settings-panel[hidden] {
    display: none;
  }

  .mobile-settings-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .mobile-settings-copy strong {
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 880;
  }

  .mobile-settings-copy span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 760;
  }

  .mobile-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 12px;
    background: #fbfcfd;
    color: var(--body);
    font-size: 0.78rem;
    font-weight: 840;
  }

  .feed-tab {
    font-size: 1rem;
  }

  .feed-controls {
    gap: 12px;
    padding: 16px 18px;
  }

  .search-wrap {
    min-height: 46px;
    padding: 0 16px;
  }

  .search-wrap input {
    font-size: 0.94rem;
  }

  .select-row {
    gap: 10px;
  }

  .filter-platform {
    width: 118px;
  }

  .filter-sort {
    width: 112px;
  }

  .filter-trigger {
    height: 36px;
    padding-left: 14px;
    padding-right: 34px;
    font-size: 0.75rem;
  }

  .feed-status {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 12px 18px;
  }

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

  .post-row {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
    padding: 18px;
  }

  .source-avatar {
    width: 36px;
    height: 36px;
  }

  .post-title {
    font-size: 1rem;
    line-height: 1.32;
  }

  .post-content p {
    font-size: 0.92rem;
  }

  .signal-block {
    margin: 10px 0 13px;
    padding: 10px;
  }

  .signal-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .signal-header strong {
    white-space: normal;
  }

  .signal-actions {
    gap: 7px;
  }

  .signal-chip {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.76rem;
  }

  .post-actions {
    gap: 14px;
    font-size: 0.84rem;
  }

  .pagination {
    justify-content: center;
    padding-bottom: 22px;
  }

  html[data-theme="night"] .post-row::before {
    left: 8px;
  }

  html[data-theme="night"] .post-row::after {
    width: 36px;
    height: 22px;
  }

  html[data-theme="night"] .post-visual {
    display: none;
  }

  html[data-theme="night"] .scroll-halo-top {
    top: 70px;
  }
}

@media (max-width: 380px) {
  .post-actions {
    gap: 10px;
  }

  .nav-label {
    font-size: 0.62rem;
  }
}
