/* ============ Public Editorial Shell ============ */

[x-cloak] {
  display: none !important;
}

body.pub {
  background: #f9f9ff;
  color: #191c22;
  position: relative;
}

body.pub::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(195, 198, 215, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(195, 198, 215, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.32), transparent 70%);
  opacity: 0.35;
}

body.pub .app-layout,
body.pub .sidebar {
  display: none;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 350, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

.editorial-shadow {
  box-shadow: 0 18px 40px rgba(25, 28, 34, 0.045);
}

.pub-site-header {
  backdrop-filter: blur(18px);
  background: rgba(242, 243, 252, 0.92);
}

.pub-shell-main {
  position: relative;
}

.pub-surface-card {
  background: #ffffff;
  border: 1px solid rgba(195, 198, 215, 0.2);
  box-shadow: 0 18px 40px rgba(25, 28, 34, 0.04);
}

.pub-tonal-card {
  background: #f2f3fc;
  border: 1px solid rgba(195, 198, 215, 0.18);
}

.pub-terminal-card {
  background: #2d3037;
  color: #eff0f9;
  box-shadow: 0 24px 48px rgba(25, 28, 34, 0.12);
}

.pub-terminal-card .is-up {
  color: #85f8c4;
}

.pub-terminal-card .is-down {
  color: #ffdad6;
}

.pub-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: #ecedf6;
  border: 1px solid rgba(195, 198, 215, 0.32);
}

.pub-status-pill-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #006243;
  box-shadow: 0 0 0 0 rgba(0, 98, 67, 0.28);
  animation: pub-pulse 1.8s infinite;
}

.pub-market-session {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(195, 198, 215, 0.32);
  background: rgba(236, 237, 246, 0.88);
}

.pub-market-session.is-open {
  background: rgba(0, 98, 67, 0.06);
  border-color: rgba(0, 98, 67, 0.16);
}

.pub-market-session.is-closed {
  background: rgba(242, 243, 252, 0.92);
  border-color: rgba(195, 198, 215, 0.3);
}

.pub-market-session-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: #737686;
  flex: none;
}

.pub-market-session.is-open .pub-market-session-dot {
  background: #006243;
  box-shadow: 0 0 0 0 rgba(0, 98, 67, 0.28);
  animation: pub-pulse 1.8s infinite;
}

.pub-market-session-copy {
  min-width: 0;
}

.pub-market-session-detail {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #5f6372;
}

@keyframes pub-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 98, 67, 0.28);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 98, 67, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 98, 67, 0);
  }
}

.pub-kicker {
  font-family: "Inter", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pub-visual-card {
  position: relative;
  overflow: hidden;
  background: var(--pub-accent-soft, #eef2ff);
  border: 1px solid rgba(195, 198, 215, 0.28);
}

.pub-visual-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), transparent 45%),
    repeating-linear-gradient(
      135deg,
      rgba(25, 28, 34, 0.035),
      rgba(25, 28, 34, 0.035) 10px,
      transparent 10px,
      transparent 22px
    );
}

.pub-visual-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -24px auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: var(--pub-accent, #dbe1ff);
  opacity: 0.9;
}

.pub-story-glyph {
  position: relative;
  z-index: 1;
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.08em;
  color: #191c22;
}

.pub-story-meta {
  position: relative;
  z-index: 1;
}

.pub-story-card {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.pub-story-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 74, 198, 0.16);
  box-shadow: 0 24px 42px rgba(25, 28, 34, 0.06);
}

.pub-story-card-compact,
.pub-story-card-rail {
  min-height: 13.5rem;
}

.pub-featured-story-card {
  min-height: 21rem;
}

.pub-featured-story-copy {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 18rem;
  background:
    radial-gradient(circle at top left, rgba(0, 74, 198, 0.08), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #ffffff 72%, #f4f6ff 100%);
}

.pub-featured-story-copy > * {
  position: relative;
  z-index: 1;
}

.pub-featured-story-media {
  position: relative;
  min-height: 18rem;
  height: 100%;
  overflow: hidden;
  background: #e6e8f0;
}

.pub-featured-story-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.pub-featured-story-scrim.is-right {
  background:
    linear-gradient(180deg, rgba(25, 28, 34, 0.14), rgba(25, 28, 34, 0.04) 34%, rgba(25, 28, 34, 0.14) 100%),
    linear-gradient(90deg, rgba(25, 28, 34, 0.08) 0%, rgba(25, 28, 34, 0.02) 46%, rgba(249, 249, 255, 0.96) 100%);
}

.pub-featured-story-scrim.is-left {
  background:
    linear-gradient(180deg, rgba(25, 28, 34, 0.14), rgba(25, 28, 34, 0.04) 34%, rgba(25, 28, 34, 0.14) 100%),
    linear-gradient(270deg, rgba(25, 28, 34, 0.08) 0%, rgba(25, 28, 34, 0.02) 46%, rgba(249, 249, 255, 0.96) 100%);
}

.pub-story-media-compact {
  min-height: 9rem;
  height: 100%;
}

.pub-story-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pub-story-body-main {
  min-height: 0;
}

.pub-story-title-tight {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.pub-story-summary {
  margin-top: auto;
  padding-top: 0.75rem;
}

.pub-story-summary-tight {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.pub-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: #e6e8f0;
  border: 1px solid rgba(195, 198, 215, 0.3);
  color: #434655;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.pub-filter-chip:hover,
.pub-filter-chip.is-active {
  background: #004ac6;
  color: #ffffff;
  transform: translateY(-1px);
}

.pub-input-shell,
.pub-input,
.pub-select {
  min-height: 3.5rem;
}

.pub-input,
.pub-select {
  width: 100%;
  background: #e1e2ea;
  border: 1px solid transparent;
  border-radius: 0.85rem;
  color: #191c22;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.pub-input:focus,
.pub-select:focus {
  background: #ffffff;
  border-color: rgba(0, 74, 198, 0.24);
  box-shadow: 0 0 0 3px rgba(0, 74, 198, 0.08);
}

.pub-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.5rem;
  padding: 0 1.35rem;
  border-radius: 0.85rem;
  background: #004ac6;
  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: opacity 160ms ease, transform 160ms ease;
}

.pub-button:hover {
  opacity: 0.92;
}

.pub-button:active {
  transform: scale(0.98);
}

.pub-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.5rem;
  padding: 0 1.15rem;
  border-radius: 0.85rem;
  background: #e6e8f0;
  color: #191c22;
  transition: background-color 160ms ease, transform 160ms ease;
}

.pub-secondary-button:hover {
  background: #dde0ea;
}

.pub-secondary-button:active {
  transform: scale(0.98);
}

.pub-button.compact,
.pub-secondary-button.compact {
  min-height: 0;
  padding: 0;
}

.pub-segmented {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: #e6e8f0;
}

.pub-segmented button {
  border-radius: 999px;
  padding: 0.65rem 1rem;
  color: #434655;
  transition: background-color 160ms ease, color 160ms ease;
}

.pub-segmented button.is-active {
  background: #004ac6;
  color: #ffffff;
}

.pub-line-clamp-2,
.pub-line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pub-line-clamp-2 {
  -webkit-line-clamp: 2;
}

.pub-line-clamp-3 {
  -webkit-line-clamp: 3;
}

.pub-search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid rgba(195, 198, 215, 0.4);
  border-radius: 1rem;
  box-shadow: 0 18px 40px rgba(25, 28, 34, 0.1);
  z-index: 60;
  max-height: 22rem;
  overflow-y: auto;
}

.pub-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #c3c6d7;
  border-top-color: #004ac6;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.ticker-animate {
  display: flex;
  width: fit-content;
  animation: scroll 40s linear infinite;
}

.ticker-animate:hover {
  animation-play-state: paused;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.pub-ticker-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding-right: 1.2rem;
  margin-right: 1.2rem;
  border-right: 1px solid rgba(239, 240, 249, 0.12);
}

.pub-ticker-chip:last-child {
  border-right: 0;
}

.sparkline {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pub-coverage-track {
  height: 0.3rem;
  border-radius: 999px;
  background: #e6e8f0;
  overflow: hidden;
}

.pub-coverage-fill {
  height: 100%;
  border-radius: 999px;
  background: #004ac6;
}

.pub-market-chart {
  position: relative;
}

.pub-market-chart .apexcharts-canvas,
.pub-market-chart .apexcharts-svg {
  overflow: visible !important;
}

.pub-market-chart .apexcharts-tooltip {
  border: 1px solid rgba(195, 198, 215, 0.38) !important;
  border-radius: 1rem !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 18px 36px rgba(25, 28, 34, 0.08) !important;
  backdrop-filter: blur(18px);
}

.pub-market-chart .apexcharts-tooltip-title {
  background: #ecedf6 !important;
  border-bottom: 1px solid rgba(195, 198, 215, 0.32) !important;
  color: #737686 !important;
  font-family: "Inter", sans-serif !important;
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pub-market-chart .apexcharts-tooltip-series-group {
  padding: 0.55rem 0.85rem !important;
}

.pub-market-chart .apexcharts-xaxistooltip,
.pub-market-chart .apexcharts-toolbar {
  display: none !important;
}

.sticky-header th {
  position: sticky;
  top: 108px;
  z-index: 10;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.is-up {
  color: #006243;
}

.is-down {
  color: #ba1a1a;
}

.is-flat {
  color: #737686;
}

.pub-empty-state {
  padding: 3rem 1rem;
  text-align: center;
  color: #737686;
}

.pub-empty-state strong {
  display: block;
  color: #191c22;
  font-family: "Newsreader", serif;
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

@media (max-width: 768px) {
  .sticky-header th {
    top: 0;
  }

  body.pub::before {
    opacity: 0.18;
  }
}

@media (min-width: 768px) {
  .pub-story-card-compact {
    height: 13.75rem;
  }

  .pub-story-card-rail {
    height: 14.5rem;
  }

  .pub-featured-story-card {
    min-height: 24rem;
  }

  .pub-featured-story-media,
  .pub-featured-story-copy {
    min-height: 100%;
  }

  .pub-story-media-compact {
    min-height: 100%;
  }
}
