.cb-page {
  --cb-alt: #10151c;
  --cb-nav-height: 56px;
  --cb-sticky-gap: 8px;
  --cb-head-fade-distance: 160px;
  --cb-odd-backdrop: rgba(13, 17, 23, 0.6);
  --cb-even-backdrop: rgba(16, 21, 28, 0.6);
  background: var(--surface-0);
}

:root.theme-light .cb-page {
  --cb-alt: var(--surface-2);
  --cb-odd-backdrop: rgba(238, 241, 245, 0.6);
  --cb-even-backdrop: rgba(245, 247, 250, 0.6);
}

body.cb-page-active .lt-tab-bar,
body.cb-page-active .lt-home {
  display: none !important;
}

body.cb-page-active.lt-has-tab-bar {
  padding-bottom: 0;
}

.cb-page .cb-chapter {
  min-height: 100vh;
  padding: 8vh 4vw;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--cb-nav-height) + var(--cb-sticky-gap));
}

.cb-page .cb-chapter:first-child {
  border-top: 0;
}

.cb-page .cb-chapter[data-chapter="today"] {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.cb-page .cb-chapter:nth-of-type(odd) {
  background: var(--surface-0);
  --cb-head-backdrop: var(--cb-odd-backdrop);
}

.cb-page .cb-chapter:nth-of-type(even) {
  background: var(--cb-alt);
  --cb-head-backdrop: var(--cb-even-backdrop);
}

.cb-page .cb-chapter-head {
  position: sticky;
  top: calc(var(--cb-nav-height) + var(--cb-sticky-gap));
  z-index: 5;
  background: var(--cb-head-backdrop);
  opacity: var(--cb-head-opacity, 1);
  transform: translateY(var(--cb-head-y, 0));
  will-change: opacity, transform;
  pointer-events: none;
}

.cb-page .cb-chapter-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 6vh;
}

.cb-page .cb-headline {
  flex: 1;
  min-width: 0;
  font-size: clamp(44px, 8vw, 96px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text);
  opacity: 1;
  margin: 0 0 6vh;
}

.cb-page .cb-chapter-head-row .cb-headline {
  margin-bottom: 0;
}

.cb-page .cb-chapter-summary {
  max-width: 760px;
  margin: 0 0 4vh;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.cb-page .cb-today-head .cb-chapter-summary {
  max-width: 680px;
  margin: 0 auto 18px;
}

.cb-page .cb-grad {
  background: linear-gradient(90deg, #3aafba, #2a9aa8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cb-page .cb-add-trigger,
.cb-page .cb-add-sheet {
  pointer-events: auto;
}

.cb-page .cb-add-trigger,
.cb-page .cb-add-sheet button {
  border: 1px solid var(--border-accent);
  border-radius: var(--r-chip);
  background: var(--surface-1);
  color: var(--teal-bright);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}

.cb-page .cb-add-trigger {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: var(--r-panel);
  background: transparent;
  white-space: normal;
}

.cb-page .cb-add-trigger:hover,
.cb-page .cb-add-sheet button:hover {
  background: var(--surface-3);
  border-color: var(--teal-bright);
}

.cb-page .cb-add-sheet {
  position: absolute;
  top: 50%;
  right: 12px;
  left: 12px;
  z-index: 10;
  width: auto;
  max-height: calc(100% - 24px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--border-accent);
  border-radius: var(--r-panel);
  background: var(--surface-2);
  box-shadow: var(--shadow-2);
  transform: translateY(-50%);
}

.cb-page .cb-add-sheet[hidden] {
  display: none;
}

.cb-page .cb-add-sheet-label,
.cb-page .cb-add-sheet-empty {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.cb-page .cb-add-sheet-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.cb-page .cb-add-sheet button {
  padding: 7px 10px;
  text-align: left;
}

.cb-page .cb-add-slot {
  position: relative;
  height: 480px;
}

.cb-page .cb-add-plus {
  font-size: 4rem;
  font-weight: 300;
  line-height: 0.8;
}

.cb-page .cb-add-label {
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.cb-page .cb-band {
  display: flex;
  flex-wrap: nowrap;
  align-items: start;
  gap: 24px;
  width: calc(100% + 8vw);
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior: contain;
  touch-action: pan-y;
  /*
   * Keep the widgets in their normal visual position while moving the band's
   * measured top 160px earlier. The JS fade therefore reaches zero exactly
   * when the first widget reaches the sticky headline's bottom edge.
   */
  margin-top: calc(-1 * var(--cb-head-fade-distance));
  margin-right: -4vw;
  margin-bottom: 0;
  margin-left: -4vw;
  padding-top: var(--cb-head-fade-distance);
  padding-right: 4vw;
  padding-bottom: 0;
  padding-left: 4vw;
}

.cb-page .cb-band::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.cb-page .cb-slot {
  flex: 0 0 320px;
  width: 320px;
  min-width: 0;
  min-height: 480px;
  translate: var(--cb-band-x, 0px) 0;
  will-change: translate;
}

.cb-page .cb-slot[hidden] {
  display: none;
}

.cb-page .cb-slot[data-cb-content-ready="false"],
.cb-page #dailySummary[hidden] {
  display: none !important;
}

.cb-page .ticker-widget {
  position: static;
  width: 320px !important;
  height: 480px !important;
}

.cb-page .ticker-widget .widget-header {
  cursor: default;
}

.cb-page .ticker-widget .widget-resize-handle {
  display: none;
}

.cb-page .scroll-panel {
  overflow: auto;
  scrollbar-width: none;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.cb-page .scroll-panel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.cb-page .ticker-list,
.cb-page .scroll-panel > ul {
  animation: none !important;
  transform: none !important;
  will-change: auto;
}

.cb-page .pc-list,
.cb-page .mkt-list {
  margin: 0;
  padding: 0 var(--sp-8);
  list-style: none;
}

.cb-page .cb-ticker-wall {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(3, 220px);
  justify-content: center;
  gap: 16px;
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0.22;
  overflow: hidden;
  pointer-events: none;
  transition: opacity var(--cb-wall-fade-in-ms, 300ms) ease;
}

.cb-page .cb-ticker-wall.cb-wall-fading {
  opacity: 0;
  transition-duration: 200ms;
}

.cb-page .cb-wall-column {
  position: relative;
  inset: auto;
  z-index: 0;
  width: 220px !important;
  min-width: 0;
  height: 100% !important;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  pointer-events: none;
}

.cb-page .cb-wall-column .scroll-panel {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.cb-page .cb-wall-column .ticker-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 220px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
}

.cb-page .cb-mini {
  display: block;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 220px;
  padding: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-item);
  background: var(--surface-1);
  box-shadow: var(--shadow-1);
  color: var(--text);
  list-style: none;
}

.cb-page .cb-mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--teal-bright);
  font-size: var(--fs-078);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cb-page .cb-mini-title,
.cb-page .cb-mini-row-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cb-page .cb-mini-tag {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: var(--fs-070);
  font-weight: 600;
  letter-spacing: 0;
}

.cb-page .cb-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
  color: var(--text-muted);
  font-size: var(--fs-075);
}

.cb-page .cb-mini-row-title {
  flex: 1 1 auto;
}

.cb-page .cb-mini-delta {
  flex: 0 0 auto;
  padding: 1px 5px;
  border-radius: var(--r-chip);
  background: var(--surface-3);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-070);
  font-weight: 600;
}

.cb-page .cb-mini-delta.cb-mini-positive {
  background: var(--chip-green-bg);
  color: var(--green);
}

.cb-page .cb-mini-delta.cb-mini-negative {
  background: var(--chip-red-bg);
  color: var(--red);
}

.cb-page .cb-wall-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
    ellipse at center,
    transparent 20%,
    var(--surface-0) 82%
  );
}

.cb-page .cb-hero-content {
  position: relative;
  z-index: 2;
}

.cb-page .cb-today-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  /* The hero is not a scrolling chapter: no sticky band, no backdrop, no
     fade — the logo and headline always render at full brightness. */
  position: static;
  background: none;
  opacity: 1;
  transform: none;
}

.cb-page .cb-hero-logo {
  width: auto;
  height: 64px;
  object-fit: contain;
}

.cb-page .cb-today-head .cb-headline {
  flex: 0 0 auto;
  margin: 16px 0 12px;
}

.cb-page .cb-featured {
  display: flex;
  width: 100%;
  max-width: 460px;
  box-sizing: border-box;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin: 0 auto 14px;
  padding: 18px 22px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-item);
  background: var(--surface-1);
  box-shadow: var(--shadow-1);
  text-align: center;
}

.cb-page .cb-featured[hidden] {
  display: none;
}

.cb-page .cb-featured-eyebrow {
  color: var(--text-muted);
  font-size: var(--fs-075);
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cb-page .cb-featured-primary {
  overflow: hidden;
  max-width: 100%;
  color: var(--text);
  font-size: 1.12rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cb-page .cb-featured-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.cb-page .cb-logoline {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  overflow: visible;
  background-image:
    repeating-linear-gradient(
      to right,
      rgba(255, 255, 255, 0.05) 0,
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px,
      transparent 40px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.05) 0,
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px,
      transparent 40px
    );
  animation: cb-logoline-grid-pan 60s linear infinite;
}

.cb-page .cb-logoline-path {
  stroke-dashoffset: 0;
}

.cb-page .cb-logoline-dot {
  opacity: 1;
  transform-box: fill-box;
  transform-origin: center;
  animation: cb-logoline-dot-pulse 2.4s ease-in-out infinite;
}

.cb-page .cb-logoline-drawing .cb-logoline-path {
  animation: cb-logoline-draw 2.2s ease-out forwards;
}

.cb-page .cb-logoline-drawing .cb-logoline-dot {
  animation:
    cb-logoline-dot-in 0.2s ease-out 2s forwards,
    cb-logoline-dot-pulse 2.4s ease-in-out 2.2s infinite;
}

@keyframes cb-logoline-grid-pan {
  to {
    background-position: 40px 0, 0 40px;
  }
}

@keyframes cb-logoline-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes cb-logoline-dot-in {
  to {
    opacity: 1;
  }
}

@keyframes cb-logoline-dot-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(1.35);
  }
}

.cb-page .cb-hero {
  min-height: 40vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 24px;
}

.cb-page .cb-tomorrow-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6vh;
  text-align: center;
}

.cb-page .cb-closing-subline {
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.cb-page .cb-tomorrow-stats {
  width: min(960px, 100%);
}

.cb-page .cb-tomorrow-stats h3 {
  margin: 0 0 20px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.cb-page .cb-stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.cb-page .cb-stat-chip {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  padding: 18px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-item);
  background: var(--surface-1);
}

.cb-page .cb-stat-chip strong {
  color: var(--text);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.cb-page .cb-stat-chip span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.cb-page .cb-tomorrow-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.cb-page .cb-tomorrow-invite {
  padding: 14px 22px;
  border: 1px solid var(--border-accent);
  border-radius: var(--r-chip);
  background: var(--surface-1);
  color: var(--text);
  box-shadow: var(--shadow-1);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast),
              transform var(--t-fast);
}

.cb-page .cb-tomorrow-invite:hover {
  border-color: var(--teal-bright);
  background: var(--surface-3);
  transform: translateY(-2px);
}

.cb-page .cb-quick-links,
.cb-page .cb-closing {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.cb-page .cb-quick-links a {
  padding: 8px 13px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-chip);
  background: var(--surface-1);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.cb-page .cb-quick-links a:hover {
  border-color: var(--teal-bright);
  color: var(--teal-bright);
}

.cb-page .summary-strip {
  width: min(760px, 100%);
  border: 1px solid var(--border);
}

.cb-page .cb-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.cb-page .cb-share-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.cb-page .cb-share-chip {
  padding: 7px 11px;
  border: 1px solid var(--border-accent);
  border-radius: var(--r-chip);
  background: var(--surface-1);
  color: var(--teal-bright);
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
}

.cb-page .cb-share-chip:hover {
  border-color: var(--teal-bright);
  background: var(--surface-3);
}

.cb-page .cb-share-chip[hidden] {
  display: none;
}

.cb-page .cb-mode-jump {
  /* The hero mode control IS the navigation switch (same .nmt-* markup and
     classes from toggle.js); it only sits larger in the hero. All colour and
     state styling comes from components.css so the two can never diverge. */
  padding: 10px 20px;
  font-size: var(--fs-095, 0.95rem);
  gap: 10px;
  position: relative;
  overflow: visible;
}

.cb-page .cb-mode-jump .nmt-track {
  transition: background 420ms ease;
}

.cb-page .cb-mode-jump .nmt-knob {
  transition: transform 420ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cb-page .cb-mode-jump .nmt-label {
  transition: color 220ms ease, transform 220ms ease;
}

.cb-page .cb-mode-jump:not(.good) .nmt-label-bad,
.cb-page .cb-mode-jump.good .nmt-label-good {
  transform: scale(1.06);
}

.cb-page .cb-mode-jump.cb-mode-pulse::after {
  content: "";
  position: absolute;
  border: 2px solid var(--cb-mode-pulse-color, var(--red));
  border-radius: inherit;
  pointer-events: none;
  animation: cb-mode-pulse-ring 520ms ease-out;
}

.cb-page .cb-hero-content.cb-mode-breathe {
  animation: cb-mode-breathe 320ms ease-out;
}

@keyframes cb-mode-pulse-ring {
  0% {
    inset: 0;
    opacity: 0.55;
  }
  100% {
    inset: -14px;
    opacity: 0;
  }
}

@keyframes cb-mode-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.012); }
}

@media (min-width: 769px) {
  .cb-page .cb-slot,
  .cb-page .cb-add-slot {
    height: clamp(420px, 62vh, 720px);
    min-height: clamp(420px, 62vh, 720px);
  }

  .cb-page .cb-slot > .ticker-widget {
    height: clamp(420px, 62vh, 720px) !important;
  }
}

@media (min-width: 1024px) {
  .cb-page .cb-mode-jump {
    gap: 14px;
    padding: 14px 28px;
    font-size: 1.05rem;
  }

  .cb-page .cb-mode-jump .nmt-track {
    width: 46px;
    height: 24px;
    border-radius: 12px;
  }

  .cb-page .cb-mode-jump .nmt-knob {
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
  }

  .cb-page .cb-mode-jump.good .nmt-knob {
    transform: translateX(22px);
  }
}

@media (min-width: 1440px) {
  .cb-page .cb-ticker-wall {
    grid-template-columns: repeat(3, 260px);
  }

  .cb-page .cb-wall-column {
    width: 260px !important;
  }

  .cb-page .cb-wall-column .ticker-list,
  .cb-page .cb-mini {
    width: 260px;
  }
}

.cb-page .cb-back-link {
  padding: 12px 20px;
  border: 1px solid var(--border-accent);
  border-radius: var(--r-chip);
  color: var(--teal-bright);
  background: var(--surface-1);
  font-weight: 600;
  transition: background var(--t-fast), border-color var(--t-fast);
}

.cb-page .cb-back-link:hover {
  background: var(--surface-3);
  border-color: var(--teal-bright);
}

.cb-page .cb-community-cta {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: flex-start;
  margin: 0 0 24px;
}

.cb-page .cb-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.45s cubic-bezier(0.4, 0, 0.6, 1),
              transform 0.45s cubic-bezier(0.4, 0, 0.6, 1);
}

.cb-page .cb-reveal.cb-in {
  opacity: 1;
  transform: none;
}

.cb-page .cb-slot.cb-reveal.cb-in {
  opacity: 1;
  transform: none;
}

.cb-page .cb-rail {
  position: fixed;
  right: 18px;
  top: calc(50vh + (var(--cb-nav-height) / 2));
  transform: translateY(-50%);
  z-index: 150;
  display: flex;
  max-height: calc(100vh - var(--cb-nav-height) - 48px);
  flex-direction: column;
  gap: 10px;
}

.cb-page .cb-rail button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.cb-page .cb-rail .active {
  background: var(--teal-bright);
  border-color: var(--teal-bright);
}

@media (prefers-reduced-motion: reduce) {
  .cb-page .cb-ticker-wall,
  .cb-page .cb-ticker-wall.cb-wall-fading,
  .cb-page .cb-mode-jump .nmt-track,
  .cb-page .cb-mode-jump .nmt-knob,
  .cb-page .cb-mode-jump .nmt-label {
    transition: none;
  }

  .cb-page .cb-mode-jump:not(.good) .nmt-label-bad,
  .cb-page .cb-mode-jump.good .nmt-label-good {
    transform: none;
  }

  .cb-page .cb-mode-jump.cb-mode-pulse::after,
  .cb-page .cb-hero-content.cb-mode-breathe {
    animation: none;
  }

  .cb-page .cb-reveal {
    transform: none;
    transition: opacity 0.3s ease;
  }

  .cb-page .cb-chapter-head {
    transform: none;
  }

  .cb-page .cb-mode-jump:hover {
    transform: none;
  }

  .cb-page .cb-tomorrow-invite:hover {
    transform: none;
  }

  .cb-page .cb-logoline {
    animation: none !important;
    background-position: 0 0;
  }

  .cb-page .cb-logoline-path {
    animation: none !important;
    stroke-dashoffset: 0 !important;
  }

  .cb-page .cb-logoline-dot {
    animation: none !important;
    opacity: 1 !important;
  }
}

@media (max-width: 768px) {
  .cb-page .cb-ticker-wall {
    grid-template-columns: repeat(2, 46vw);
  }

  .cb-page .cb-wall-column,
  .cb-page .cb-wall-column .ticker-list,
  .cb-page .cb-mini {
    width: 46vw !important;
  }

  .cb-page .cb-wall-column:nth-of-type(3) {
    display: none;
  }

  .cb-page .cb-chapter {
    min-height: auto;
    padding: 64px 20px;
  }

  .cb-page .cb-chapter-head-row {
    gap: 10px;
  }

  .cb-page .cb-headline {
    font-size: clamp(34px, 10vw, 56px);
  }

  .cb-page .cb-stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cb-page .cb-band {
    width: calc(100% + 40px);
    margin-right: -20px;
    margin-left: -20px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .cb-page .cb-rail {
    display: none;
  }
}
