/**
 * ContextNews 2026 — shell + components mapped from design/design.json
 * Load LAST in _Layout (after site.css) so the shell wins over Bootstrap.
 */

/* —— Bootstrap / legacy resets for chrome (this file loads last) —— */
.cn-header.cn-chrome a {
  text-decoration: none !important;
}

.cn-header.cn-chrome .cn-chrome__link,
.cn-header.cn-chrome .cn-chrome__lang a,
.cn-header.cn-chrome .cn-chrome__brand {
  text-decoration: none !important;
}

.cn-header.cn-chrome,
.cn-header.cn-chrome button,
.cn-header.cn-chrome .cn-chrome__nav {
  font-family: var(--ds-font-sans, Inter, system-ui, sans-serif) !important;
}

/* —— Base app —— */
.cn-app.cn-ds {
  font-family: var(--ds-font-sans);
  background: var(--ds-canvas-muted);
  color: var(--ds-text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.cn-app.cn-ds .cn-main,
.cn-app.cn-ds .cn-home,
.cn-app.cn-ds .cn-dashboard,
.cn-app.cn-ds .cn-context-page {
  background: transparent;
}

/* —— App toast (guest / checkout messages; defined in _Layout) —— */
.cn-app-toast {
  position: fixed;
  bottom: var(--ds-space-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--ds-z-toast);
  max-width: min(90vw, 28rem);
  padding: var(--ds-space-3) var(--ds-space-4);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface-card);
  color: var(--ds-text-primary);
  box-shadow: var(--ds-shadow-lg);
  border: 1px solid var(--ds-border-subtle);
  font-size: var(--ds-text-sm);
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
}

.cn-app.cn-ds .cn-signalr-feed-banner[hidden] {
  display: none !important;
}

.cn-app.cn-ds .cn-signalr-feed-banner:not([hidden]) {
  display: block;
  border-radius: 0;
  border-inline: none;
  border-top: 1px solid var(--ds-border-subtle);
  background: var(--ds-canvas-muted);
  color: var(--ds-text-primary);
}

/* —— Merged chrome (top nav) —— */
.cn-app.cn-ds .cn-header.cn-chrome {
  flex-shrink: 0;
  background: var(--ds-chrome);
  color: var(--ds-text-on-dark);
  border-bottom: 1px solid var(--ds-border-on-dark);
  position: sticky;
  top: 0;
  z-index: var(--ds-z-sticky);
}

.cn-chrome__inner {
  /* Full-bleed chrome: brand at page start, languages at page end (same on every page using _TopBar). */
  max-width: none;
  width: 100%;
  margin-inline: 0;
  padding: 0 var(--ds-shell-inline-pad);
  min-height: var(--ds-top-nav-height);
  display: flex;
  align-items: center;
  gap: var(--ds-space-4);
  box-sizing: border-box;
}

.cn-chrome__brand {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  flex-shrink: 0;
  text-decoration: none;
  color: var(--ds-text-on-dark);
  font-weight: var(--ds-fw-bold);
  letter-spacing: -0.02em;
  transition: opacity var(--ds-duration-fast) var(--ds-ease-standard);
}

.cn-chrome__brand:hover {
  opacity: 0.88;
  color: var(--ds-text-on-dark);
}

.cn-chrome__brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--ds-radius-md);
  background: var(--ds-text-on-dark);
  color: var(--ds-chrome);
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-fw-bold);
}

.cn-chrome__brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  font-size: var(--ds-text-md);
}

.cn-chrome__brand-name {
  display: block;
  font-weight: var(--ds-fw-bold);
  letter-spacing: -0.02em;
  font-size: var(--ds-text-md);
  line-height: 1.15;
}

.cn-chrome__brand-tagline {
  display: block;
  margin-top: 0.1rem;
  font-size: var(--ds-text-xs);
  font-weight: var(--ds-fw-medium);
  opacity: 0.72;
  letter-spacing: 0.04em;
}

.cn-chrome__nav {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: var(--ds-space-2) 0;
}

.cn-chrome__nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-4);
  width: 100%;
  min-width: 0;
}

.cn-chrome__nav-start {
  display: flex;
  align-items: center;
  gap: var(--ds-space-1);
  min-width: 0;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-inline-end: var(--ds-space-2);
}

.cn-chrome__nav-start::-webkit-scrollbar {
  display: none;
}

.cn-chrome__lang--nav-end {
  flex-shrink: 0;
  margin-inline-start: auto;
}

.cn-chrome__nav-group {
  display: flex;
  align-items: center;
  gap: var(--ds-space-1);
  flex-shrink: 0;
}

.cn-chrome__nav-group--topics {
  opacity: 0.95;
}

.cn-chrome__nav-divider {
  width: 1px;
  height: 1.25rem;
  background: var(--ds-border-on-dark);
  flex-shrink: 0;
  margin: 0 var(--ds-space-2);
}

.cn-chrome__link {
  flex-shrink: 0;
  padding: var(--ds-space-2) var(--ds-space-3);
  border-radius: var(--ds-radius-sm);
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-fw-medium);
  color: var(--ds-text-on-dark-muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition:
    background var(--ds-duration-fast) var(--ds-ease-standard),
    color var(--ds-duration-fast) var(--ds-ease-standard),
    border-color var(--ds-duration-fast) var(--ds-ease-standard);
}

.cn-chrome__link:hover {
  color: var(--ds-text-on-dark);
  background: rgba(255, 255, 255, 0.06);
}

.cn-chrome__link--active {
  background: transparent;
  color: var(--ds-text-on-dark);
  font-weight: var(--ds-fw-semibold);
  border-bottom-color: var(--ds-text-on-dark);
}

.cn-chrome__link--topic {
  font-size: var(--ds-text-xs);
  letter-spacing: 0.02em;
}

.cn-chrome__link--topic.cn-chrome__link--active {
  color: var(--ds-accent-primary);
  border-bottom-color: var(--ds-accent-primary);
}

.cn-chrome__link--disabled {
  opacity: 0.45;
  pointer-events: none;
}

.cn-chrome__sep {
  color: var(--ds-border-on-dark);
  flex-shrink: 0;
  user-select: none;
}

.cn-chrome__actions {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  flex-shrink: 0;
}

.cn-chrome__icon-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--ds-radius-full);
  border: none;
  background: transparent;
  color: var(--ds-text-on-dark-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--ds-duration-fast) var(--ds-ease-standard), color var(--ds-duration-fast) var(--ds-ease-standard);
}

.cn-chrome__icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ds-text-on-dark);
}

.cn-chrome__icon-btn:focus-visible {
  outline: none;
  box-shadow: var(--ds-shadow-focus);
}

.cn-app.cn-ds .cn-chrome__icon-btn--guest-locked {
  cursor: not-allowed;
  opacity: 0.45;
  pointer-events: none;
}

.cn-chrome__lang {
  display: flex;
  align-items: center;
  gap: var(--ds-space-1);
  font-size: var(--ds-text-xs);
}

.cn-chrome__lang a {
  color: var(--ds-text-on-dark-muted);
  text-decoration: none;
  padding: var(--ds-space-1) var(--ds-space-2);
  border-radius: var(--ds-radius-pill);
  transition: background var(--ds-duration-fast) var(--ds-ease-standard), color var(--ds-duration-fast) var(--ds-ease-standard);
}

.cn-chrome__lang a:hover {
  color: var(--ds-text-on-dark);
  background: rgba(255, 255, 255, 0.08);
}

.cn-chrome__lang a.cn-chrome__lang--active {
  color: var(--ds-text-on-dark);
  font-weight: var(--ds-fw-semibold);
}

.cn-chrome__notifications {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--ds-radius-full);
  color: var(--ds-text-on-dark);
  text-decoration: none;
  border: 1px solid var(--ds-border-on-dark);
  background: rgba(255, 255, 255, 0.06);
  transition: transform var(--ds-duration-fast) var(--ds-ease-entrance), background var(--ds-duration-fast) var(--ds-ease-standard);
}

.cn-chrome__notifications:hover {
  transform: scale(1.04);
  background: rgba(255, 255, 255, 0.1);
}

.cn-app.cn-ds .cn-chrome__notifications--guest-locked {
  cursor: not-allowed;
  opacity: 0.45;
  pointer-events: none;
}

.cn-chrome__notifications-badge {
  position: absolute;
  top: -0.25rem;
  inset-inline-end: -0.25rem;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 var(--ds-space-2);
  border-radius: var(--ds-radius-full);
  background: var(--ds-black);
  color: var(--ds-text-on-dark);
  font-size: var(--ds-text-xs);
  font-weight: var(--ds-fw-semibold);
  line-height: 1.25rem;
  text-align: center;
  transition: transform var(--ds-duration-fast) var(--ds-ease-standard),
    box-shadow var(--ds-duration-fast) var(--ds-ease-standard);
}

.cn-chrome__notifications-bell {
  display: inline-flex;
  line-height: 1;
  transform-origin: 50% 0;
  transition: filter var(--ds-duration-fast) var(--ds-ease-standard);
}

/* Unread: coral urgency ring + bento gradient badge (design.json) */
.cn-chrome__notifications--active {
  border-color: rgba(255, 76, 0, 0.42);
  background: rgba(255, 255, 255, 0.09);
  box-shadow:
    0 0 0 1px rgba(255, 76, 0, 0.12),
    0 0 28px rgba(255, 76, 0, 0.22),
    0 0 48px rgba(236, 72, 153, 0.12);
}

.cn-chrome__notifications--active .cn-chrome__notifications-bell {
  animation: cn-notify-bell-swing 2.4s var(--ds-ease-standard) infinite;
  filter: drop-shadow(0 0 10px rgba(255, 76, 0, 0.35));
}

.cn-chrome__notifications--active .cn-chrome__notifications-badge {
  background: var(--ds-gradient-splash);
  background-size: 140% 140%;
  animation: cn-notify-badge-shimmer 3.2s var(--ds-ease-standard) infinite;
  box-shadow: 0 2px 12px rgba(255, 76, 0, 0.35);
}

/* One-shot “new activity” burst when unread goes from 0 → N */
.cn-chrome__notifications--ping {
  animation: cn-notify-activation-burst 0.85s var(--ds-ease-entrance) 1;
}

@keyframes cn-notify-bell-swing {
  0%,
  100% {
    transform: rotate(0deg);
  }
  8% {
    transform: rotate(14deg);
  }
  16% {
    transform: rotate(-12deg);
  }
  24% {
    transform: rotate(10deg);
  }
  32% {
    transform: rotate(-7deg);
  }
  40%,
  100% {
    transform: rotate(0deg);
  }
}

@keyframes cn-notify-badge-shimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes cn-notify-activation-burst {
  0% {
    transform: scale(1);
    box-shadow:
      0 0 0 0 rgba(255, 76, 0, 0.45),
      0 0 0 0 rgba(236, 72, 153, 0.25);
  }
  45% {
    transform: scale(1.06);
    box-shadow:
      0 0 0 6px rgba(255, 76, 0, 0.2),
      0 0 36px rgba(255, 76, 0, 0.35);
  }
  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 0 rgba(255, 76, 0, 0),
      0 0 28px rgba(255, 76, 0, 0.22);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cn-chrome__notifications--active .cn-chrome__notifications-bell {
    animation: none;
    filter: none;
  }

  .cn-chrome__notifications--active .cn-chrome__notifications-badge {
    animation: none;
    background: var(--ds-accent-primary);
  }

  .cn-chrome__notifications--ping {
    animation: cn-notify-activation-fade 0.2s ease 1;
  }

  .cn-sidenav__row--notify-active .cn-sidenav__link-icon {
    animation: none;
  }

  .cn-sidenav__row--notify-ping .cn-sidenav__link-icon {
    animation: none;
  }
}

@keyframes cn-notify-activation-fade {
  0% {
    opacity: 0.85;
  }
  100% {
    opacity: 1;
  }
}

/* Side nav: softer sway on the bell icon (quieter than top bar) */
.cn-sidenav__row--notify-active .cn-sidenav__link-icon {
  animation: cn-sidenav-bell-sway 3.5s ease-in-out infinite;
  transform-origin: 50% 0;
}

.cn-sidenav__row--notify-ping .cn-sidenav__link-icon {
  animation: cn-sidenav-icon-pop 0.75s var(--ds-ease-entrance) 1;
}

@keyframes cn-sidenav-bell-sway {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-7deg);
  }
}

@keyframes cn-sidenav-icon-pop {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.12) rotate(10deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

/* —— Context follow bell (design.json: coral accent, bento gradient, large radii) —— */
.cn-context-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  padding: 0;
  border-radius: var(--ds-radius-full);
  border: 2px solid var(--ds-border-default);
  background: var(--ds-white);
  color: var(--ds-text-secondary);
  cursor: pointer;
  overflow: visible;
  transition:
    border-color var(--ds-duration-fast) var(--ds-ease-standard),
    background var(--ds-duration-fast) var(--ds-ease-standard),
    color var(--ds-duration-fast) var(--ds-ease-standard),
    box-shadow var(--ds-duration-fast) var(--ds-ease-standard),
    transform var(--ds-duration-base) var(--ds-ease-entrance);
}

.cn-context-bell__icon {
  display: inline-flex;
  position: relative;
  z-index: 1;
  transform-origin: 50% 0;
  transition: filter var(--ds-duration-fast) var(--ds-ease-standard);
}

.cn-context-bell__ripple {
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at center, rgba(255, 76, 0, 0.2) 0%, transparent 70%);
  transform: scale(0.8);
  transition: opacity var(--ds-duration-fast), transform var(--ds-duration-slow) var(--ds-ease-entrance);
}

.cn-context-bell:hover {
  border-color: var(--ds-text-secondary);
  background: var(--ds-gray-50);
  color: var(--ds-text-primary);
  transform: scale(1.06) translateY(-2px);
  box-shadow: var(--ds-shadow-md);
}

.cn-context-bell:hover .cn-context-bell__ripple {
  opacity: 1;
  transform: scale(1.4);
}

.cn-context-bell:active .cn-context-bell__icon {
  animation: cn-context-bell-ding 0.5s var(--ds-ease-entrance) 1;
}

.cn-context-bell:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ds-focus-ring);
}

/* Unfollowed: muted, inviting */
.cn-context-bell--unfollowed {
  border-color: var(--ds-border-default);
  color: var(--ds-text-tertiary);
}

.cn-context-bell--unfollowed:hover {
  border-color: var(--ds-accent-primary);
  color: var(--ds-accent-primary);
  background: var(--ds-accent-primary-muted);
}

.cn-context-bell--unfollowed:hover .cn-context-bell__ripple {
  background: radial-gradient(circle at center, rgba(255, 76, 0, 0.15) 0%, transparent 70%);
}

/* Followed: coral accent, subtle breathe */
.cn-context-bell--followed {
  border-color: rgba(255, 76, 0, 0.4);
  background: var(--ds-accent-primary-muted);
  color: var(--ds-accent-primary);
  animation: cn-context-bell-breathe 4s ease-in-out infinite;
}

.cn-context-bell--followed:hover {
  border-color: var(--ds-accent-primary);
  background: rgba(255, 76, 0, 0.18);
  color: var(--ds-coral-hover);
  animation: none;
  box-shadow:
    0 0 0 1px rgba(255, 76, 0, 0.12),
    0 8px 24px rgba(255, 76, 0, 0.2);
}

/* Followed + unread: bento gradient glow, fun bell swing */
.cn-context-bell--active {
  border-color: rgba(255, 76, 0, 0.55);
  background: linear-gradient(135deg, rgba(255, 76, 0, 0.12) 0%, rgba(236, 72, 153, 0.08) 100%);
  color: var(--ds-accent-primary);
  box-shadow:
    0 0 0 1px rgba(255, 76, 0, 0.2),
    0 0 24px rgba(255, 76, 0, 0.25),
    0 0 48px rgba(236, 72, 153, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: cn-context-bell-active-pulse 2.5s ease-in-out infinite;
}

.cn-context-bell--active .cn-context-bell__icon {
  animation: cn-context-bell-swing-fun 2s var(--ds-ease-standard) infinite;
  filter: drop-shadow(0 0 10px rgba(255, 76, 0, 0.4));
}

.cn-context-bell--active:hover {
  transform: scale(1.08) translateY(-3px);
  box-shadow:
    0 0 0 1px rgba(255, 76, 0, 0.25),
    0 0 32px rgba(255, 76, 0, 0.35),
    0 0 56px rgba(236, 72, 153, 0.18),
    0 12px 32px rgba(0, 0, 0, 0.12);
}

/* One-shot: just enabled — celebratory bounce */
.cn-context-bell--just-enabled {
  animation: cn-context-bell-enable 1s var(--ds-ease-entrance) 1;
}

@keyframes cn-context-bell-breathe {
  0%, 100% {
    box-shadow: 0 2px 12px rgba(255, 76, 0, 0.08);
  }
  50% {
    box-shadow: 0 4px 20px rgba(255, 76, 0, 0.18);
  }
}

@keyframes cn-context-bell-active-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255, 76, 0, 0.2),
      0 0 24px rgba(255, 76, 0, 0.25),
      0 0 48px rgba(236, 72, 153, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 76, 0, 0.25),
      0 0 32px rgba(255, 76, 0, 0.35),
      0 0 56px rgba(236, 72, 153, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.35);
  }
}

@keyframes cn-context-bell-swing-fun {
  0%, 100% { transform: rotate(0deg); }
  6% { transform: rotate(18deg); }
  14% { transform: rotate(-16deg); }
  22% { transform: rotate(12deg); }
  30% { transform: rotate(-8deg); }
  38%, 100% { transform: rotate(0deg); }
}

@keyframes cn-context-bell-ding {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(-15deg); }
  75% { transform: rotate(12deg); }
  100% { transform: rotate(0deg); }
}

@keyframes cn-context-bell-enable {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 76, 0, 0.5);
  }
  30% {
    transform: scale(1.2);
    box-shadow:
      0 0 0 12px rgba(255, 76, 0, 0.1),
      0 0 40px rgba(255, 76, 0, 0.4),
      0 0 60px rgba(236, 72, 153, 0.2);
  }
  50% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 0 rgba(255, 76, 0, 0),
      0 0 24px rgba(255, 76, 0, 0.25);
  }
}

/* One-shot: just disabled */
.cn-context-bell--just-disabled {
  animation: cn-context-bell-disable 0.75s var(--ds-ease-exit) 1;
}

@keyframes cn-context-bell-disable {
  0% {
    transform: scale(1);
    opacity: 1;
    border-color: rgba(255, 76, 0, 0.4);
    background: var(--ds-accent-primary-muted);
  }
  40% {
    transform: scale(0.88) rotate(-5deg);
    opacity: 0.8;
    border-color: var(--ds-border-default);
    background: var(--ds-gray-100);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
    border-color: var(--ds-border-default);
    background: var(--ds-white);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cn-context-bell--followed {
    animation: none;
  }

  .cn-context-bell--active {
    animation: none;
  }

  .cn-context-bell--active .cn-context-bell__icon {
    animation: none;
    filter: none;
  }

  .cn-context-bell:hover {
    transform: none;
  }

  .cn-context-bell--active:hover {
    transform: none;
  }

  .cn-context-bell:active .cn-context-bell__icon {
    animation: none;
  }

  .cn-context-bell--just-enabled {
    animation: cn-notify-activation-fade 0.2s ease 1;
  }

  .cn-context-bell--just-disabled {
    animation: cn-notify-activation-fade 0.2s ease 1;
  }
}

.cn-chrome__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--ds-space-2) var(--ds-space-5);
  border-radius: var(--ds-radius-pill);
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-fw-semibold);
  background: var(--ds-accent-primary);
  color: var(--ds-white);
  text-decoration: none;
  box-shadow: var(--ds-shadow-sm);
  border: none;
  cursor: pointer;
  transition:
    background var(--ds-duration-fast) var(--ds-ease-standard),
    box-shadow var(--ds-duration-fast) var(--ds-ease-standard),
    transform var(--ds-duration-fast) var(--ds-ease-entrance);
}

.cn-chrome__cta:hover {
  background: var(--ds-coral-hover);
  box-shadow: var(--ds-shadow-md);
  transform: translateY(-1px);
  color: var(--ds-white);
}

.cn-chrome__cta:focus-visible {
  outline: none;
  box-shadow: var(--ds-shadow-focus), var(--ds-shadow-sm);
}

.cn-chrome__user {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-2);
  padding: var(--ds-space-1) var(--ds-space-3) var(--ds-space-1) var(--ds-space-1);
  border-radius: var(--ds-radius-pill);
  border: 1px solid var(--ds-border-on-dark);
  color: var(--ds-text-on-dark);
  text-decoration: none;
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-fw-medium);
  max-width: 11rem;
  transition: background var(--ds-duration-fast) var(--ds-ease-standard);
}

.cn-chrome__user:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ds-text-on-dark);
}

.cn-chrome__user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: var(--ds-radius-full);
  background: var(--ds-gradient-splash);
  opacity: 0.9;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--ds-text-xs);
  font-weight: var(--ds-fw-semibold);
  line-height: 1;
  color: var(--ds-white);
  text-align: center;
}

.cn-chrome__user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cn-chrome__logout {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--ds-radius-full);
  border: 1px solid var(--ds-border-on-dark);
  background: transparent;
  color: var(--ds-text-on-dark-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--ds-duration-fast) var(--ds-ease-standard), background var(--ds-duration-fast) var(--ds-ease-standard);
}

.cn-chrome__logout:hover {
  color: var(--ds-text-on-dark);
  background: rgba(255, 255, 255, 0.08);
}

.cn-chrome__menu-toggle {
  display: none;
}

/* —— Ticker —— */
.cn-ticker {
  flex-shrink: 0;
  height: var(--ds-ticker-height);
  background: var(--ds-surface-ticker);
  border-bottom: 1px solid var(--ds-border-subtle);
  display: flex;
  align-items: center;
  gap: var(--ds-space-4);
  padding: 0 var(--ds-shell-inline-pad);
  max-width: var(--ds-content-max);
  width: 100%;
  margin-inline: auto;
  overflow: hidden;
  box-sizing: border-box;
}

.cn-ticker__label {
  flex-shrink: 0;
  font-size: var(--ds-text-xs);
  font-weight: var(--ds-fw-bold);
  color: var(--ds-accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cn-ticker__label::after {
  content: " · ";
  color: var(--ds-text-tertiary);
  font-weight: var(--ds-fw-regular);
}

.cn-ticker__viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.cn-ticker__track {
  display: flex;
  gap: var(--ds-space-6);
  width: max-content;
  animation: cn-ticker-marquee 38s linear infinite;
  font-size: var(--ds-text-sm);
  color: var(--ds-text-secondary);
}

.cn-ticker__track:hover {
  animation-play-state: paused;
}

.cn-ticker__item {
  white-space: nowrap;
}

.cn-ticker__sep {
  opacity: 0.5;
  margin: 0 var(--ds-space-2);
}

@keyframes cn-ticker-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cn-ticker__track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    max-height: 2.5rem;
    overflow-y: auto;
  }

  .cn-chrome__cta:hover,
  .cn-chrome__notifications:hover {
    transform: none;
  }
}

/* —— Bento shell —— */
.cn-bento-shell {
  display: grid;
  grid-template-columns: minmax(0, var(--ds-rail-left)) minmax(0, 1fr);
  gap: var(--ds-grid-gap);
  max-width: var(--ds-content-max);
  width: 100%;
  margin-inline: auto;
  padding: var(--ds-page-pad-y) var(--ds-shell-inline-pad);
  align-items: start;
  box-sizing: border-box;
  flex: 1;
  min-height: 0;
}

.cn-bento-center {
  min-width: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.cn-app.cn-ds .cn-app-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.cn-app.cn-ds .cn-main-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.cn-app.cn-ds .cn-main {
  flex: 1 1 auto;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: var(--ds-space-4) var(--ds-space-4) var(--ds-space-10);
  background: transparent;
  box-sizing: border-box;
}

.cn-app.cn-ds .cn-context-page .cn-dashboard {
  max-width: none;
  width: 100%;
}

.cn-app.cn-ds .cn-footer__inner {
  max-width: var(--ds-content-max);
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--ds-shell-inline-pad);
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ds-space-3);
}

/* —— Left rail: light glass profile + nav —— */
.cn-app.cn-ds .cn-sidenav {
  width: 100%;
  max-width: var(--ds-rail-left);
  background: transparent;
  border: none;
  position: relative;
  display: flex;
  flex-direction: column;
}

.cn-sidenav__glass {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--ds-radius-bento);
  box-shadow: var(--ds-shadow-sm);
  padding: var(--ds-card-padding-lg);
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-6);
  animation: cn-ds-rise var(--ds-duration-slow) var(--ds-ease-entrance) both;
}

.cn-profile-card {
  text-align: center;
  position: relative;
  padding-top: var(--ds-space-4);
}

.cn-profile-card__splash {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 5.5rem;
  height: 5.5rem;
  background: var(--ds-gradient-splash);
  opacity: 0.35;
  filter: blur(24px);
  border-radius: var(--ds-radius-full);
  pointer-events: none;
}

.cn-profile-card__avatar {
  position: relative;
  width: 4rem;
  height: 4rem;
  margin: 0 auto var(--ds-space-3);
  border-radius: var(--ds-radius-full);
  background: var(--ds-surface-card-soft);
  border: 2px solid var(--ds-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--ds-text-xl);
  font-weight: var(--ds-fw-bold);
  color: var(--ds-text-primary);
  box-shadow: var(--ds-shadow-xs);
}

.cn-profile-card__name {
  font-size: var(--ds-text-lg);
  font-weight: var(--ds-fw-bold);
  margin: 0;
  color: var(--ds-text-primary);
}

.cn-profile-card__handle {
  font-size: var(--ds-text-sm);
  color: var(--ds-text-tertiary);
  margin: var(--ds-space-1) 0 0;
}

.cn-app.cn-ds .cn-sidenav__label {
  color: var(--ds-text-tertiary);
  font-size: var(--ds-text-xs);
  font-weight: var(--ds-fw-semibold);
  letter-spacing: 0.08em;
}

.cn-app.cn-ds .cn-sidenav__link {
  color: var(--ds-text-primary);
  border-radius: var(--ds-radius-pill);
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  padding-inline: var(--ds-space-3);
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-fw-medium);
}

.cn-app.cn-ds .cn-sidenav__link:hover {
  background: var(--ds-gray-100);
  color: var(--ds-text-primary);
}

.cn-app.cn-ds .cn-sidenav__link--active {
  background: var(--ds-black);
  color: var(--ds-white);
  font-weight: var(--ds-fw-semibold);
}

.cn-app.cn-ds .cn-sidenav__link--disabled {
  color: var(--ds-text-tertiary) !important;
  font-style: normal;
}

/* site.css targets `span.cn-sidenav__link--disabled` with legacy dark-rail white text + !important; beat that so guest-only items stay readable on the light glass rail. */
.cn-app.cn-ds .cn-sidenav__item span.cn-sidenav__link.cn-sidenav__link--disabled,
.cn-app.cn-ds .cn-sidenav__item .cn-sidenav__link--disabled {
  color: var(--ds-text-secondary) !important;
  opacity: 1 !important;
  font-style: normal !important;
}

.cn-app.cn-ds .cn-sidenav__link--guest-locked {
  cursor: not-allowed;
}

.cn-sidenav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-2);
}

.cn-sidenav__badge {
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 var(--ds-space-2);
  border-radius: var(--ds-radius-full);
  background: var(--ds-black);
  color: var(--ds-white);
  font-size: var(--ds-text-xs);
  font-weight: var(--ds-fw-semibold);
  line-height: 1.25rem;
  text-align: center;
}

.cn-app.cn-ds .cn-sidenav__premium-card,
.cn-app.cn-ds .cn-sidenav__guest-card {
  background: var(--ds-surface-card-soft);
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--ds-radius-xl);
}

.cn-app.cn-ds .cn-sidenav__premium-title,
.cn-app.cn-ds .cn-sidenav__guest-label {
  color: var(--ds-text-primary);
}

.cn-app.cn-ds .cn-sidenav__premium-desc,
.cn-app.cn-ds .cn-sidenav__guest-desc {
  color: var(--ds-text-secondary);
}

.cn-app.cn-ds .cn-sidenav__premium-cta,
.cn-app.cn-ds .cn-sidenav__guest-billing {
  color: var(--ds-accent-primary);
}

.cn-app.cn-ds .cn-sidenav__logout {
  color: var(--ds-text-secondary);
  border-color: var(--ds-border-default);
}

.cn-app.cn-ds .cn-sidenav__section--bottom {
  border-top-color: var(--ds-border-subtle);
}

.cn-app.cn-ds .cn-sidenav__scroll {
  padding: 0;
  overflow: visible;
}

/* —— Right rail —— */
.cn-right-rail {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-10);
  position: sticky;
  top: calc(var(--ds-top-nav-height) + var(--ds-ticker-height) + var(--ds-space-8));
  animation: cn-ds-rise var(--ds-duration-slow) var(--ds-ease-entrance) both;
  animation-delay: 60ms;
}

.cn-rail-section__title {
  font-size: var(--ds-text-lg);
  font-weight: var(--ds-fw-bold);
  margin: 0 0 var(--ds-space-4);
  letter-spacing: -0.02em;
}

.cn-stories-scroller {
  display: flex;
  gap: var(--ds-space-3);
  overflow-x: auto;
  padding-bottom: var(--ds-space-2);
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.cn-story-card {
  flex: 0 0 5.5rem;
  scroll-snap-align: start;
  aspect-ratio: 3 / 4;
  border-radius: var(--ds-radius-xl);
  overflow: hidden;
  position: relative;
  box-shadow: var(--ds-shadow-sm);
  border: 1px solid var(--ds-border-subtle);
  transition:
    transform var(--ds-duration-base) var(--ds-ease-entrance),
    box-shadow var(--ds-duration-base) var(--ds-ease-standard);
}

.cn-story-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--ds-shadow-md);
}

.cn-story-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cn-story-card__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, var(--ds-lavender-surface), var(--ds-gray-200));
}

.cn-story-card__caption {
  position: absolute;
  bottom: var(--ds-space-2);
  left: var(--ds-space-2);
  right: var(--ds-space-2);
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--ds-radius-pill);
  padding: var(--ds-space-2) var(--ds-space-3);
  font-size: var(--ds-text-xs);
  font-weight: var(--ds-fw-semibold);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cn-follow-row {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  padding: var(--ds-space-3) 0;
  border-bottom: 1px solid var(--ds-border-subtle);
}

.cn-follow-row:last-child {
  border-bottom: none;
}

.cn-follow-row__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--ds-radius-full);
  background: var(--ds-gradient-splash);
  opacity: 0.85;
  flex-shrink: 0;
}

.cn-follow-row__text {
  flex: 1;
  min-width: 0;
}

.cn-follow-row__primary {
  display: block;
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-fw-bold);
  color: var(--ds-text-primary);
}

.cn-follow-row__secondary {
  font-size: var(--ds-text-xs);
  color: var(--ds-text-tertiary);
}

.cn-follow-row__btn {
  flex-shrink: 0;
  min-width: 4.5rem;
  padding: var(--ds-space-2) var(--ds-space-4);
  border-radius: var(--ds-radius-pill);
  background: var(--ds-black);
  color: var(--ds-white);
  font-size: var(--ds-text-xs);
  font-weight: var(--ds-fw-semibold);
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition:
    background var(--ds-duration-fast) var(--ds-ease-standard),
    transform var(--ds-duration-fast) var(--ds-ease-entrance);
}

.cn-follow-row__btn:hover {
  background: var(--ds-gray-800);
  color: var(--ds-white);
  transform: translateY(-1px);
}

.cn-app.cn-ds .cn-follow-row__btn--guest-locked {
  background: var(--ds-gray-300);
  color: var(--ds-text-tertiary);
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

/* —— Feed tabs —— */
.cn-feed-tabs {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--ds-space-6);
  margin-bottom: var(--ds-space-6);
  flex-wrap: wrap;
}

.cn-feed-tabs__title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.cn-feed-tabs__group {
  display: flex;
  align-items: center;
  gap: var(--ds-space-6);
}

.cn-feed-tabs__tab {
  position: relative;
  padding: var(--ds-space-2) 0;
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-fw-medium);
  color: var(--ds-text-tertiary);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  transition: color var(--ds-duration-fast) var(--ds-ease-standard);
}

.cn-feed-tabs__tab:hover {
  color: var(--ds-text-secondary);
}

.cn-feed-tabs__tab--active {
  color: var(--ds-text-primary);
  font-weight: var(--ds-fw-semibold);
}

.cn-feed-tabs__tab--active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--ds-black);
  border-radius: var(--ds-radius-pill);
}

/* —— Cards + home —— */
.cn-app.cn-ds .cn-home {
  max-width: none;
  padding: 0;
  animation: cn-ds-rise var(--ds-duration-slow) var(--ds-ease-entrance) both;
}

.cn-app.cn-ds .cn-home-hero {
  border-bottom-color: var(--ds-border-subtle);
  margin-bottom: var(--ds-space-8);
}

.cn-app.cn-ds .cn-home-hero__title,
.cn-app.cn-ds .cn-politics-hero__title {
  font-family: var(--ds-font-display);
}

.cn-app.cn-ds .cn-home-hero__cta {
  border-radius: var(--ds-radius-pill);
  border: 1px solid var(--ds-border-default);
  background: var(--ds-surface-card);
  color: var(--ds-text-primary);
  font-weight: var(--ds-fw-semibold);
  transition:
    transform var(--ds-duration-fast) var(--ds-ease-entrance),
    box-shadow var(--ds-duration-fast) var(--ds-ease-standard);
}

.cn-app.cn-ds .cn-home-hero__cta:hover {
  border-color: var(--ds-border-strong);
  box-shadow: var(--ds-shadow-sm);
  transform: translateY(-2px);
  color: var(--ds-text-primary);
}

.cn-app.cn-ds .cn-editorial-featured,
.cn-app.cn-ds .cn-editorial-grid-card,
.cn-app.cn-ds .cn-editorial-more-card,
.cn-app.cn-ds .cn-story-card.cn-context-feed,
.cn-app.cn-ds .cn-pricing-card,
.cn-app.cn-ds .cn-auth-card {
  border-radius: var(--ds-radius-bento);
  border: 1px solid var(--ds-border-subtle);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: var(--ds-shadow-sm);
  transition:
    box-shadow var(--ds-duration-base) var(--ds-ease-standard),
    transform var(--ds-duration-base) var(--ds-ease-entrance);
}

.cn-app.cn-ds .cn-editorial-featured:hover,
.cn-app.cn-ds .cn-editorial-grid-card:hover,
.cn-app.cn-ds .cn-editorial-more-card:hover {
  box-shadow: var(--ds-shadow-md);
  transform: translateY(-2px);
}

.cn-app.cn-ds .cn-editorial-featured__headline,
.cn-app.cn-ds .cn-editorial-grid-card__headline,
.cn-app.cn-ds .cn-editorial-more-card__headline {
  font-family: var(--ds-font-display);
}

.cn-app.cn-ds .cn-editorial-featured__feed-context {
  color: var(--ds-text-secondary);
  font-size: var(--ds-text-xs);
}

.cn-app.cn-ds .cn-editorial-featured__rss-deck {
  border-inline-start-color: var(--ds-accent-primary);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--ds-accent-primary) 10%, var(--ds-white)) 0%,
    var(--ds-gray-50) 100%
  );
}

.cn-app.cn-ds .cn-editorial-featured__hot-badge {
  background: linear-gradient(135deg, var(--ds-coral) 0%, var(--ds-coral-hover) 100%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 8px 22px rgba(255, 76, 0, 0.35);
}

.cn-app.cn-ds .cn-category-label {
  background: var(--ds-accent-primary);
  color: var(--ds-white);
  border-radius: var(--ds-radius-pill);
  padding: var(--ds-space-1) var(--ds-space-3);
  font-size: var(--ds-text-xs);
  font-weight: var(--ds-fw-semibold);
}

.cn-app.cn-ds .cn-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding-inline: 0;
  padding-block: var(--ds-space-4);
  box-sizing: border-box;
  background: var(--ds-chrome);
  color: var(--ds-text-on-dark-muted);
  border-top: 1px solid var(--ds-border-on-dark);
}

.cn-app.cn-ds .cn-footer a {
  color: var(--ds-text-on-dark-muted);
}

.cn-app.cn-ds .cn-footer a:hover {
  color: var(--ds-text-on-dark);
}

/* —— Discussion + reactions (design.json toolbar) —— */
.cn-app.cn-ds .cn-discussion-modal__panel {
  border-radius: var(--ds-radius-2xl);
  border: 1px solid var(--ds-border-subtle);
  box-shadow: var(--ds-shadow-lg);
}

.cn-app.cn-ds .cn-reaction-bar {
  gap: var(--ds-space-2);
}

.cn-app.cn-ds .cn-reaction-chip {
  border-radius: var(--ds-radius-pill);
  border: 1px solid var(--ds-border-subtle);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  box-shadow: var(--ds-shadow-sm);
}

.cn-app.cn-ds .cn-discussion-btn:hover,
.cn-app.cn-ds .cn-article-share:hover,
.cn-app.cn-ds .cn-save-article-btn:not(.cn-save-article-btn--saved-active):not(.cn-save-article-btn--saved-readonly):hover {
  color: var(--ds-accent-primary) !important;
  background: var(--ds-accent-primary-muted) !important;
}

/* Save / bookmark — gold “saved” state (social-style) */
.cn-app.cn-ds .cn-save-article-btn--saved-active {
  color: #fff !important;
  background: linear-gradient(145deg, #d8b56a 0%, var(--ds-custom-gold) 45%, var(--ds-custom-gold-hover) 100%) !important;
  border-color: rgba(197, 160, 89, 0.55) !important;
  box-shadow: 0 2px 12px rgba(197, 160, 89, 0.35) !important;
}

.cn-app.cn-ds .cn-save-article-btn--saved-active:hover {
  color: #fff !important;
  background: linear-gradient(145deg, #e4c47a 0%, #d4a84b 50%, var(--ds-custom-gold) 100%) !important;
  box-shadow: 0 4px 16px rgba(197, 160, 89, 0.42) !important;
}

.cn-app.cn-ds .cn-save-article-btn--saved.cn-save-article-btn--saved-readonly {
  color: var(--ds-custom-gold) !important;
  background: var(--ds-custom-gold-muted) !important;
  border-color: rgba(197, 160, 89, 0.25) !important;
}

/* —— Trends strip → coral accent —— */
.cn-app.cn-ds .cn-trends-heat {
  border-color: rgba(255, 76, 0, 0.35);
  background: var(--ds-accent-primary-muted);
  color: var(--ds-coral-hover);
}

.cn-app.cn-ds .cn-trends-heat--pulse {
  animation: cn-ds-heat-pulse 2.4s ease-in-out infinite;
}

@keyframes cn-ds-heat-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 76, 0, 0.2);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 76, 0, 0);
  }
}

/* —— Notifications page —— */
.cn-app.cn-ds .cn-notification-row {
  border-radius: var(--ds-radius-xl);
  border-color: var(--ds-border-subtle);
  background: var(--ds-surface-card);
}

.cn-app.cn-ds .cn-notification-row__dot {
  background: var(--ds-accent-primary);
  box-shadow: 0 0 0 5px var(--ds-accent-primary-muted);
}

/* Mark All as Read: inverse pill (design.json components.button.inverse) */
.cn-app.cn-ds .cn-notifications-markall {
  padding: var(--ds-space-2) var(--ds-space-5);
  border-radius: var(--ds-radius-pill);
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-fw-semibold);
  background: var(--ds-chrome);
  color: var(--ds-text-on-dark);
  border: none;
  box-shadow: var(--ds-shadow-sm);
  transition:
    background var(--ds-duration-fast) var(--ds-ease-standard),
    transform var(--ds-duration-fast) var(--ds-ease-entrance),
    box-shadow var(--ds-duration-fast) var(--ds-ease-standard);
}

.cn-app.cn-ds .cn-notifications-markall:hover:not(:disabled) {
  background: var(--ds-gray-800);
  transform: translateY(-2px);
  box-shadow: var(--ds-shadow-md);
}

.cn-app.cn-ds .cn-notifications-markall:focus-visible {
  box-shadow: var(--ds-shadow-focus), var(--ds-shadow-sm);
}

.cn-app.cn-ds .cn-notifications-markall--success {
  background: var(--ds-state-success);
  color: var(--ds-white);
}

.cn-app.cn-ds .cn-notifications-markall--success .cn-notifications-markall__icon {
  color: var(--ds-white);
}

/* —— Focus —— */
.cn-app.cn-ds a:focus-visible,
.cn-app.cn-ds button:focus-visible {
  outline: none;
  box-shadow: var(--ds-shadow-focus);
}

.cn-app.cn-ds .cn-chrome a:focus-visible,
.cn-app.cn-ds .cn-chrome button:focus-visible {
  box-shadow: 0 0 0 2px var(--ds-white), var(--ds-shadow-focus);
}

@keyframes cn-ds-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cn-sidenav__glass,
  .cn-right-rail,
  .cn-home {
    animation: none;
  }

  @keyframes cn-ds-rise {
    from {
      opacity: 1;
      transform: none;
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  .cn-app.cn-ds .cn-trends-heat--pulse {
    animation: none;
  }

  .cn-story-card:hover,
  .cn-app.cn-ds .cn-editorial-featured:hover,
  .cn-app.cn-ds .cn-editorial-grid-card:hover,
  .cn-app.cn-ds .cn-editorial-more-card:hover {
    transform: none;
  }

  .cn-app.cn-ds .cn-notifications-markall:hover:not(:disabled) {
    transform: none;
  }

  .cn-notifications-markall--success .cn-notifications-markall__icon {
    animation: none;
  }
}

/* —— Responsive: stack rails —— */
@media (max-width: 1023px) {
  .cn-bento-shell {
    grid-template-columns: 1fr;
    padding-top: var(--ds-space-4);
  }

  .cn-right-rail {
    display: none;
  }

  .cn-app.cn-ds .cn-sidenav {
    max-width: none;
  }

  .cn-sidenav__glass {
    animation: none;
  }

  .cn-chrome__nav-inner {
    flex-wrap: wrap;
    row-gap: var(--ds-space-2);
  }

  .cn-chrome__lang--bar-end {
    width: 100%;
    justify-content: flex-end;
    margin-inline-start: 0;
    margin-inline-end: 0;
  }
}

/* —— Auth pages (design tokens on chrome) —— */
.cn-app.cn-ds.cn-auth-page {
  background:
    radial-gradient(1200px 520px at 12% -8%, rgba(255, 76, 0, 0.09) 0%, transparent 58%),
    radial-gradient(880px 480px at 92% 0%, rgba(99, 102, 241, 0.11) 0%, transparent 55%),
    radial-gradient(700px 400px at 50% 108%, rgba(236, 72, 153, 0.07) 0%, transparent 52%),
    var(--ds-canvas-muted);
}

@media (prefers-reduced-motion: reduce) {
  .cn-app.cn-ds.cn-auth-page {
    background: var(--ds-canvas-muted);
  }
}

.cn-app.cn-ds.cn-auth-page .cn-auth-header {
  background: var(--ds-chrome);
  border-bottom: 1px solid var(--ds-border-on-dark);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-header__inner {
  color: var(--ds-text-on-dark-muted);
  max-width: none;
  width: 100%;
  margin-inline: 0;
  padding: var(--ds-space-2) var(--ds-shell-inline-pad);
  display: flex;
  align-items: center;
  gap: var(--ds-space-4);
  min-height: var(--ds-top-nav-height);
  box-sizing: border-box;
}

.cn-app.cn-ds.cn-auth-page .cn-auth-header__spacer {
  flex: 1;
  min-width: 0;
}

.cn-app.cn-ds.cn-auth-page .cn-auth-header .cn-chrome__brand {
  flex-shrink: 0;
  color: var(--ds-text-on-dark);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-header .cn-chrome__brand:hover {
  color: var(--ds-text-on-dark);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-header .cn-chrome__brand-mark {
  background: var(--ds-text-on-dark);
  color: var(--ds-chrome);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-header__back,
.cn-app.cn-ds.cn-auth-page .cn-auth-header__logo,
.cn-app.cn-ds.cn-auth-page .cn-auth-header__lang-link,
.cn-app.cn-ds.cn-auth-page .cn-auth-header .cn-chrome__lang-link {
  color: var(--ds-text-on-dark-muted);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-header__logo:hover,
.cn-app.cn-ds.cn-auth-page .cn-auth-header__back:hover,
.cn-app.cn-ds.cn-auth-page .cn-auth-header__lang-link:hover,
.cn-app.cn-ds.cn-auth-page .cn-auth-header .cn-chrome__lang-link:hover {
  color: var(--ds-text-on-dark);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-header__lang-link--active {
  color: var(--ds-text-on-dark);
  font-weight: var(--ds-fw-semibold);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-main {
  max-width: var(--ds-content-max);
  width: 100%;
  margin-inline: auto;
  padding: var(--ds-space-8) var(--ds-shell-inline-pad);
  padding-bottom: max(var(--ds-space-10), env(safe-area-inset-bottom));
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .cn-app.cn-ds.cn-auth-page .cn-auth-main {
    padding: var(--ds-space-6) max(var(--ds-space-3), env(safe-area-inset-left))
      max(var(--ds-space-8), env(safe-area-inset-bottom)) max(var(--ds-space-3), env(safe-area-inset-right));
  }

  .cn-app.cn-ds.cn-auth-page .cn-auth-card__body {
    padding: var(--ds-space-5);
  }

  .cn-app.cn-ds.cn-auth-page .cn-auth-guest {
    padding: var(--ds-space-5);
  }

  .cn-app.cn-ds.cn-auth-page .cn-auth-social-title {
    font-size: clamp(1.35rem, 5vw, var(--ds-text-2xl));
  }
}

.cn-app.cn-ds.cn-auth-page .cn-auth-card {
  border-radius: var(--ds-radius-bento);
  border: 1px solid var(--ds-border-subtle);
  box-shadow: var(--ds-shadow-md);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-card--elevated {
  max-width: min(42rem, 100%);
  width: 100%;
  margin-inline: auto;
  background: var(--ds-surface-card);
  border: 1px solid var(--ds-border-subtle);
  box-shadow: var(--ds-shadow-lg);
  border-radius: var(--ds-radius-bento);
  overflow: hidden;
}

.cn-app.cn-ds.cn-auth-page .cn-auth-card__intro {
  margin-bottom: var(--ds-space-1);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-social-title {
  font-size: var(--ds-text-2xl);
  font-weight: var(--ds-fw-bold);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 var(--ds-space-2);
  color: var(--ds-text-primary);
  font-family: var(--ds-font-display);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-social-subtitle {
  margin: 0 0 var(--ds-space-6);
  font-size: var(--ds-text-base);
  line-height: 1.55;
  color: var(--ds-text-secondary);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-social-heading {
  margin: 0 0 var(--ds-space-3);
  font-size: var(--ds-text-xs);
  font-weight: var(--ds-fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ds-text-tertiary);
  text-align: center;
}

.cn-app.cn-ds.cn-auth-page .cn-auth-benefits-title {
  margin: var(--ds-space-4) 0 var(--ds-space-2);
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-fw-semibold);
  color: var(--ds-text-primary);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-benefits {
  margin: 0 0 var(--ds-space-5);
  padding-inline-start: 1.25rem;
  font-size: var(--ds-text-sm);
  color: var(--ds-text-secondary);
  line-height: 1.45;
}

.cn-app.cn-ds.cn-auth-page .cn-auth-benefits li {
  margin-bottom: var(--ds-space-2);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-social--stub-forms {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-3);
  width: 100%;
}

.cn-app.cn-ds.cn-auth-page .cn-auth-social--providers {
  width: 100%;
  max-width: none;
}

/* Social providers: components.button.secondary (design.json) + brand fills where expected */
.cn-app.cn-ds.cn-auth-page .cn-auth-social-btn {
  border-radius: var(--ds-radius-pill);
  border: 1px solid var(--ds-border-default);
  min-height: max(2.75rem, 44px);
  padding-inline: var(--ds-space-6);
  font-weight: var(--ds-fw-semibold);
  font-size: var(--ds-text-sm);
  box-shadow: var(--ds-shadow-xs);
  transition:
    background var(--ds-duration-fast) var(--ds-ease-standard),
    border-color var(--ds-duration-fast) var(--ds-ease-standard),
    box-shadow var(--ds-duration-fast) var(--ds-ease-standard),
    filter var(--ds-duration-fast) var(--ds-ease-standard);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-social-btn:focus-visible {
  outline: none;
  box-shadow: var(--ds-shadow-focus);
  border-color: rgba(0, 0, 0, 0.14);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-social-btn--google {
  background: var(--ds-surface-card);
  color: var(--ds-text-primary);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-social-btn--google:hover {
  background: var(--ds-canvas-muted);
  border-color: var(--ds-border-strong);
  box-shadow: var(--ds-shadow-sm);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-social-btn--facebook {
  background: var(--ds-oauth-facebook);
  color: var(--ds-white);
  border-color: rgba(0, 0, 0, 0.08);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-social-btn--facebook:hover {
  filter: brightness(1.05);
  box-shadow: var(--ds-shadow-md);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-social-btn--facebook:focus-visible {
  border-color: rgba(255, 255, 255, 0.35);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-social-btn--x {
  color: var(--ds-text-primary);
  background: var(--ds-surface-card);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-social-btn--x:hover {
  background: var(--ds-canvas-muted);
  border-color: var(--ds-border-strong);
  box-shadow: var(--ds-shadow-sm);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-social-btn--stub {
  width: 100%;
  justify-content: flex-start;
  cursor: pointer;
  border: none;
  font: inherit;
  text-align: start;
}

.cn-app.cn-ds.cn-auth-page .cn-auth-social-btn--stub:not(.cn-auth-social-btn--facebook) {
  border: 1px solid var(--ds-border-default);
  box-shadow: var(--ds-shadow-xs);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-legal {
  font-size: var(--ds-text-xs);
  line-height: 1.45;
  color: var(--ds-text-tertiary);
  margin-top: var(--ds-space-2);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-legal__link {
  color: var(--ds-text-link);
  font-weight: var(--ds-fw-medium);
  text-decoration: none;
}

.cn-app.cn-ds.cn-auth-page .cn-auth-legal__link:hover {
  color: var(--ds-text-link-hover);
  text-decoration: underline;
}

.cn-app.cn-ds.cn-auth-page .cn-auth-guest {
  position: relative;
  margin-top: 0;
  padding: var(--ds-space-6);
  border-radius: var(--ds-radius-bento);
  background: var(--ds-surface-card-soft);
  border: 1px solid var(--ds-border-subtle);
  box-shadow: var(--ds-shadow-xs);
  overflow: hidden;
}

.cn-app.cn-ds.cn-auth-page .cn-auth-guest__decor {
  position: absolute;
  inset-inline-end: -15%;
  inset-block-start: -40%;
  width: 14rem;
  height: 14rem;
  background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.38) 0%, rgba(236, 72, 153, 0.12) 45%, transparent 70%);
  filter: blur(28px);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .cn-app.cn-ds.cn-auth-page .cn-auth-guest__decor {
    filter: none;
    opacity: 0.35;
  }
}

.cn-app.cn-ds.cn-auth-page .cn-auth-guest__icons {
  position: relative;
  display: flex;
  gap: var(--ds-space-3);
  margin-bottom: var(--ds-space-3);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-guest__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--ds-radius-full);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ds-text-secondary);
  border: 1px solid var(--ds-border-subtle);
  box-shadow: var(--ds-shadow-xs);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-guest__overline {
  position: relative;
  margin: 0 0 var(--ds-space-1);
  font-size: var(--ds-text-xs);
  font-weight: var(--ds-fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ds-text-tertiary);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-guest__title {
  position: relative;
  margin: 0 0 var(--ds-space-2);
  font-size: var(--ds-text-lg);
  font-weight: var(--ds-fw-bold);
  color: var(--ds-text-primary);
  line-height: 1.3;
}

.cn-app.cn-ds.cn-auth-page .cn-auth-guest__body {
  position: relative;
  margin: 0 0 var(--ds-space-5);
  font-size: var(--ds-text-sm);
  color: var(--ds-text-secondary);
  line-height: 1.55;
}

.cn-app.cn-ds.cn-auth-page .cn-auth-guest__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: var(--ds-space-3) var(--ds-space-6);
  border-radius: var(--ds-radius-pill);
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-fw-semibold);
  color: var(--ds-text-primary);
  background: var(--ds-surface-card);
  border: 1px solid var(--ds-border-default);
  box-shadow: var(--ds-shadow-xs);
  text-decoration: none;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.cn-app.cn-ds.cn-auth-page .cn-auth-guest__cta:hover {
  background: var(--ds-canvas-muted);
  border-color: var(--ds-border-strong);
  box-shadow: var(--ds-shadow-sm);
  color: var(--ds-text-primary);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-guest__cta:focus-visible {
  outline: none;
  box-shadow: var(--ds-shadow-focus);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-guest__cta--primary {
  width: 100%;
  justify-content: center;
  background: var(--ds-accent-primary);
  color: var(--ds-text-on-dark);
  border-color: transparent;
  box-shadow: var(--ds-shadow-sm);
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.cn-app.cn-ds.cn-auth-page .cn-auth-guest__cta--primary:hover {
  background: var(--ds-coral-hover);
  color: var(--ds-text-on-dark);
  border-color: transparent;
  box-shadow: var(--ds-shadow-md);
}

.cn-app.cn-ds.cn-auth-page .cn-auth-guest__cta--primary:focus-visible {
  outline: none;
  box-shadow: var(--ds-shadow-focus);
}

@media (prefers-reduced-motion: reduce) {
  .cn-app.cn-ds.cn-auth-page .cn-auth-guest__cta--primary {
    transition: none;
  }
}

@media (max-width: 767px) {
  .cn-chrome__menu-toggle {
    display: inline-flex;
  }

  .cn-chrome__inner {
    flex-wrap: wrap;
    min-height: auto;
    padding-top: var(--ds-space-2);
    padding-bottom: var(--ds-space-2);
  }

  .cn-chrome__nav {
    order: 3;
    flex-basis: 100%;
    padding-bottom: var(--ds-space-2);
  }

  .cn-app.cn-ds .cn-sidenav {
    position: fixed;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    z-index: var(--ds-z-modal);
    width: min(20rem, 88vw);
    max-width: none;
    transform: translateX(-100%);
    transition: transform var(--ds-duration-base) var(--ds-ease-entrance);
  }

  html[dir="rtl"] .cn-app.cn-ds .cn-sidenav {
    transform: translateX(100%);
    inset-inline-start: auto;
    inset-inline-end: 0;
  }

  .cn-app.cn-ds .cn-app-body.cn-sidenav-open .cn-sidenav {
    transform: translateX(0);
  }

  html[dir="rtl"] .cn-app.cn-ds .cn-app-body.cn-sidenav-open .cn-sidenav {
    transform: translateX(0);
  }

  .cn-app.cn-ds .cn-sidenav__glass {
    height: 100%;
    border-radius: 0 var(--ds-radius-xl) var(--ds-radius-xl) 0;
    overflow-y: auto;
  }

  html[dir="rtl"] .cn-app.cn-ds .cn-sidenav__glass {
    border-radius: var(--ds-radius-xl) 0 0 var(--ds-radius-xl);
  }

  /* Editorial hero: one-column cards + compact meta (sources in meta hidden in site.css) */
  .cn-app.cn-ds .cn-editorial-grid {
    grid-template-columns: 1fr;
    gap: var(--ds-space-4);
  }

  .cn-app.cn-ds .cn-editorial-grid--stacked {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: auto;
  }

  .cn-app.cn-ds .cn-editorial-grid-card--stacked,
  .cn-app.cn-ds .cn-editorial-grid-card--stacked .cn-editorial-grid-card__link {
    display: block;
    min-height: 0;
    height: auto;
  }

  .cn-app.cn-ds .cn-editorial-grid-card__img-wrap {
    aspect-ratio: 4 / 3;
    border-radius: var(--ds-radius-lg);
  }
}

/* —— A11y / utilities —— */
.cn-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Sidenav: icon + label (reference dashboard) —— */
.cn-app.cn-ds .cn-sidenav__link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.375rem;
  margin-inline-end: var(--ds-space-3);
  opacity: 0.88;
}

.cn-app.cn-ds .cn-sidenav__link-text {
  flex: 1;
  min-width: 0;
}

/* —— Feed: single engagement row —— */
.cn-engagement-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
  margin-top: var(--ds-space-3);
  padding-top: var(--ds-space-3);
  border-top: 1px solid var(--ds-border-subtle);
}

/* —— Feed cards: surface + context accent stripe (home + all context feeds) —— */
.cn-app.cn-ds .cn-feed-card.cn-editorial-more-card,
.cn-app.cn-ds .cn-feed-card.cn-editorial-grid-card,
.cn-app.cn-ds .cn-feed-card.cn-editorial-featured {
  background: var(--ds-surface-card);
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--ds-radius-2xl);
  padding: var(--ds-space-5) var(--ds-space-5) var(--ds-space-4);
  box-shadow: var(--ds-shadow-sm);
  border-top: 3px solid var(--ds-border-default);
  transition:
    box-shadow var(--ds-duration-base) var(--ds-ease-standard),
    transform var(--ds-duration-base) var(--ds-ease-entrance),
    border-color var(--ds-duration-fast) var(--ds-ease-standard);
}

/* Hero lead card: do not stretch to match the height of the side column. */
.cn-app.cn-ds .cn-feed-card.cn-editorial-featured {
  align-self: start;
  height: auto;
}

.cn-app.cn-ds .cn-feed-card[data-cn-ctx="worldnews"] {
  border-top-color: #c92a2a;
}

.cn-app.cn-ds .cn-feed-card[data-cn-ctx="business"] {
  border-top-color: #0d9488;
}

.cn-app.cn-ds .cn-feed-card[data-cn-ctx="technology"] {
  border-top-color: var(--ds-state-info);
}

.cn-app.cn-ds .cn-feed-card[data-cn-ctx="sports"] {
  border-top-color: #16a34a;
}

.cn-app.cn-ds .cn-feed-card[data-cn-ctx="lifestyle"] {
  border-top-color: #a855f7;
}

.cn-app.cn-ds .cn-feed-card[data-cn-ctx="reddit"] {
  border-top-color: var(--ds-accent-primary);
}

.cn-app.cn-ds .cn-feed-card[data-cn-ctx="customcontext"] {
  border-top-color: var(--ds-custom-gold);
}

.cn-app.cn-ds .cn-feed-card[data-cn-ctx="customcontext"] .cn-category-label.cn-editorial-more-card__context {
  background: var(--ds-custom-gold);
  color: var(--ds-gray-900);
}

/* —— Top chrome: match active context accent (Subscribe CTA + bar) —— */
.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="worldnews"] {
  border-bottom-color: #c92a2a;
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="business"] {
  border-bottom-color: #0d9488;
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="technology"] {
  border-bottom-color: var(--ds-state-info);
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="sports"] {
  border-bottom-color: #16a34a;
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="lifestyle"] {
  border-bottom-color: #a855f7;
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="reddit"] {
  border-bottom-color: var(--ds-accent-primary);
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="customcontext"] {
  border-bottom-color: var(--ds-custom-gold);
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx]:not([data-cn-chrome-ctx=""]) {
  border-bottom-width: 2px;
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="worldnews"] .cn-chrome__cta,
.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="business"] .cn-chrome__cta,
.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="technology"] .cn-chrome__cta,
.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="sports"] .cn-chrome__cta,
.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="lifestyle"] .cn-chrome__cta,
.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="reddit"] .cn-chrome__cta,
.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="customcontext"] .cn-chrome__cta {
  background: var(--cn-chrome-cta-bg, var(--ds-accent-primary));
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="worldnews"] .cn-chrome__cta {
  --cn-chrome-cta-bg: #c92a2a;
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="business"] .cn-chrome__cta {
  --cn-chrome-cta-bg: #0d9488;
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="technology"] .cn-chrome__cta {
  --cn-chrome-cta-bg: var(--ds-state-info);
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="sports"] .cn-chrome__cta {
  --cn-chrome-cta-bg: #16a34a;
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="lifestyle"] .cn-chrome__cta {
  --cn-chrome-cta-bg: #a855f7;
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="reddit"] .cn-chrome__cta {
  --cn-chrome-cta-bg: var(--ds-accent-primary);
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="customcontext"] .cn-chrome__cta {
  --cn-chrome-cta-bg: var(--ds-custom-gold);
  color: var(--ds-gray-900);
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx]:not([data-cn-chrome-ctx=""]):not([data-cn-chrome-ctx="customcontext"]) .cn-chrome__cta:hover {
  filter: brightness(1.1);
  color: var(--ds-white);
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="customcontext"] .cn-chrome__cta:hover {
  filter: none;
  background: var(--ds-custom-gold-hover);
  color: var(--ds-gray-900);
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="worldnews"] .cn-chrome__link--topic.cn-chrome__link--active {
  border-bottom-color: #c92a2a;
  color: #ffb4b4;
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="business"] .cn-chrome__link--topic.cn-chrome__link--active {
  border-bottom-color: #5eead4;
  color: #ccfbf1;
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="technology"] .cn-chrome__link--topic.cn-chrome__link--active {
  border-bottom-color: #93c5fd;
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="sports"] .cn-chrome__link--topic.cn-chrome__link--active {
  border-bottom-color: #86efac;
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="lifestyle"] .cn-chrome__link--topic.cn-chrome__link--active {
  border-bottom-color: #d8b4fe;
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="reddit"] .cn-chrome__link--topic.cn-chrome__link--active {
  border-bottom-color: var(--ds-accent-primary);
}

.cn-app.cn-ds .cn-header.cn-chrome[data-cn-chrome-ctx="customcontext"] .cn-chrome__link--topic.cn-chrome__link--active {
  border-bottom-color: var(--ds-custom-gold);
  color: #fde68a;
}

/* —— Wider feed: fewer, larger cards —— */
.cn-app.cn-ds .cn-editorial-more__grid {
  gap: var(--ds-space-6);
}

@media (min-width: 768px) {
  .cn-app.cn-ds .cn-editorial-more__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1600px) {
  .cn-app.cn-ds .cn-editorial-more__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Context feed first page: nine “more” cards as 3×3 from tablet up */
.cn-app.cn-ds .cn-editorial-more__grid.cn-editorial-more__grid--context-3x3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 767px) {
  .cn-app.cn-ds .cn-editorial-more__grid.cn-editorial-more__grid--context-3x3 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .cn-app.cn-ds .cn-editorial-more__grid.cn-editorial-more__grid--context-3x3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cn-app.cn-ds .cn-editorial-more-card__img-wrap {
  aspect-ratio: 4 / 3;
  border-radius: var(--ds-radius-lg);
  margin-bottom: var(--ds-space-4);
}

.cn-app.cn-ds .cn-editorial-more-card__headline {
  font-size: clamp(1.0625rem, 1.1vw, 1.25rem);
  font-weight: var(--ds-fw-bold);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.cn-app.cn-ds .cn-editorial-more-card__meta {
  font-size: var(--ds-text-sm);
  gap: var(--ds-space-2);
}

.cn-app.cn-ds .cn-feed-card.cn-editorial-more-card:hover,
.cn-app.cn-ds .cn-feed-card.cn-editorial-grid-card:hover,
.cn-app.cn-ds .cn-feed-card.cn-editorial-featured:hover {
  box-shadow: var(--ds-shadow-md);
  transform: translateY(-3px);
  border-color: var(--ds-border-default);
}

.cn-app.cn-ds .cn-editorial__hero {
  align-items: stretch;
}

@media (min-width: 1024px) {
  .cn-app.cn-ds .cn-editorial__hero {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: clamp(var(--ds-space-5), 1.6vw, var(--ds-space-8));
  }

  .cn-app.cn-ds .cn-editorial-grid--stacked {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: clamp(var(--ds-space-4), 1.2vw, var(--ds-space-6));
    height: 100%;
  }

  .cn-app.cn-ds .cn-editorial-grid-card--stacked {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .cn-app.cn-ds .cn-editorial-grid-card--stacked .cn-editorial-grid-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .cn-app.cn-ds .cn-editorial-grid-card--stacked .cn-editorial-grid-card__img-wrap {
    aspect-ratio: 16 / 10;
    flex: 0 0 auto;
  }

  .cn-app.cn-ds .cn-editorial-grid-card--stacked .cn-editorial-grid-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-2);
    flex: 1 1 auto;
  }

  .cn-app.cn-ds .cn-editorial-grid-card--stacked .cn-editorial-grid-card__headline {
    line-height: 1.35;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .cn-app.cn-ds .cn-editorial-grid-card--stacked .cn-editorial-grid-card__meta {
    margin-top: auto;
  }

  .cn-app.cn-ds .cn-editorial-featured__img-wrap {
    aspect-ratio: 16 / 10;
  }

  .cn-app.cn-ds .cn-editorial-featured__headline {
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .cn-app.cn-ds .cn-editorial-featured__feed-context {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .cn-app.cn-ds .cn-editorial-featured__rss-deck {
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* —— Custom context builder: gold primary controls —— */
.cn-app.cn-ds .cn-dashboard.cn-dashboard--custom-context .btn-primary,
.cn-app.cn-ds .cn-dashboard.cn-dashboard--custom-context .form-control:focus {
  border-color: var(--ds-custom-gold);
  box-shadow: 0 0 0 0.2rem var(--ds-custom-gold-muted);
}

.cn-app.cn-ds .cn-dashboard.cn-dashboard--custom-context .btn-primary {
  background: var(--ds-custom-gold);
  border-color: var(--ds-custom-gold);
  color: var(--ds-gray-900);
  font-weight: var(--ds-fw-semibold);
}

.cn-app.cn-ds .cn-dashboard.cn-dashboard--custom-context .btn-primary:hover {
  background: var(--ds-custom-gold-hover);
  border-color: var(--ds-custom-gold-hover);
  color: var(--ds-gray-900);
}

.cn-app.cn-ds .cn-engagement-bar {
  margin-top: var(--ds-space-4);
  padding-top: var(--ds-space-4);
  gap: var(--ds-space-3);
}

.cn-app.cn-ds .cn-editorial-featured,
.cn-app.cn-ds .cn-editorial-grid-card,
.cn-app.cn-ds .cn-editorial-more-card {
  display: flex;
  flex-direction: column;
}

.cn-app.cn-ds .cn-editorial-grid-card__link,
.cn-app.cn-ds .cn-editorial-more-card__link {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

/* Featured lead: do not grow to fill the grid row — removes huge gap above the action bar. */
.cn-app.cn-ds .cn-editorial-featured__link {
  display: flex;
  flex-direction: column;
  flex: 0 1 auto;
}

.cn-app.cn-ds .cn-editorial-featured__actions,
.cn-app.cn-ds .cn-editorial-grid-card__actions {
  margin-top: auto;
  padding-top: 0;
}

.cn-app.cn-ds .cn-editorial-more-card .cn-engagement-bar,
.cn-app.cn-ds .cn-editorial-more-card .cn-feed-card-interactions--stacked,
.cn-app.cn-ds .cn-editorial-grid-card .cn-feed-card-interactions--stacked {
  margin-top: auto;
  padding-top: 0;
}

.cn-app.cn-ds .cn-editorial-featured .cn-feed-card-interactions--stacked {
  margin-top: var(--ds-space-4);
  padding-top: 0;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  align-items: stretch;
}

/* Full-width shell + tier row: same edge-to-edge proportion as small cards */
.cn-app.cn-ds .cn-editorial-featured__actions .cn-reaction-shell--stacked {
  width: 100%;
  min-width: 0;
}
.cn-app.cn-ds .cn-editorial-featured__actions .cn-reaction-summary-strip {
  width: 100%;
  box-sizing: border-box;
}
.cn-app.cn-ds .cn-editorial-featured__actions .cn-reaction-shell--stacked > .cn-engagement-bar--tier-actions {
  width: 100%;
  box-sizing: border-box;
  flex: 1 1 auto;
  min-width: 0;
}

/* Stacked feed cards: reaction counts above the action row; shell wraps summary strip + tier bar */
.cn-reaction-shell--stacked {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  gap: 0;
}

.cn-reaction-shell--stacked.cn-reaction-shell {
  display: flex;
}

.cn-reaction-summary-strip {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding-top: var(--ds-space-3);
  padding-bottom: var(--ds-space-4);
}

.cn-app.cn-ds .cn-reaction-summary-strip .cn-reaction-summary {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  align-items: center;
  margin-inline: 0;
}

/* Extra breathing room around the separator between reactions and comment/react/share/save */
.cn-app.cn-ds .cn-engagement-bar.cn-engagement-bar--tier-actions,
.cn-engagement-bar.cn-engagement-bar--tier-actions {
  margin-top: 0;
  padding-top: var(--ds-space-5);
  padding-bottom: var(--ds-space-3);
  border-top: 1px solid var(--ds-border-subtle);
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--ds-space-2);
  min-width: 0;
}

/* Dock floats above this row; popup opens below — anchor to tier, not full shell (summary strip above). */
.cn-app.cn-ds .cn-reaction-shell--stacked > .cn-engagement-bar--tier-actions {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--ds-space-2);
  min-width: 0;
}

.cn-app.cn-ds .cn-reaction-shell--stacked > .cn-engagement-bar--tier-actions > .cn-discussion-btn {
  flex: 0 0 auto;
}

.cn-app.cn-ds .cn-reaction-shell--stacked > .cn-engagement-bar--tier-actions > .cn-react-trigger {
  flex: 0 0 auto;
}

.cn-app.cn-ds .cn-reaction-shell--stacked > .cn-engagement-bar--tier-actions > .cn-article-share {
  flex: 0 0 auto;
  margin-inline-start: auto;
}

.cn-app.cn-ds .cn-reaction-shell--stacked > .cn-engagement-bar--tier-actions > .cn-save-article-form {
  flex: 0 0 auto;
}

.cn-app.cn-ds .cn-reaction-summary-strip .cn-reaction-summary,
.cn-app.cn-ds .cn-reaction-shell--stacked .cn-reaction-summary-strip .cn-reaction-summary {
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--ds-border-default) 70%, transparent) transparent;
  padding-block: 2px;
  gap: 0.25rem;
  touch-action: pan-x;
}

.cn-app.cn-ds .cn-reaction-summary-strip .cn-reaction-summary::-webkit-scrollbar {
  height: 3px;
}

.cn-app.cn-ds .cn-reaction-summary-strip .cn-reaction-summary::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--ds-border-default) 75%, transparent);
}

.cn-app.cn-ds .cn-reaction-summary-strip .cn-reaction-summary-chip {
  flex-shrink: 0;
  padding: 0.12rem 0.38rem;
  font-size: 0.7rem;
}

/* Featured hero: align with stacked feed cards; slightly stronger React pill */
.cn-app.cn-ds .cn-editorial-featured__actions .cn-reaction-shell--stacked > .cn-engagement-bar--tier-actions .cn-react-trigger {
  padding: var(--ds-space-2) var(--ds-space-3);
  box-shadow: var(--ds-shadow-xs);
}

.cn-app.cn-ds .cn-editorial-featured .cn-reaction-summary-strip .cn-reaction-summary-chip {
  border-radius: var(--ds-radius-pill);
  border-color: color-mix(in srgb, var(--ds-border-default) 70%, transparent);
}

/* —— Reactions: trigger + glass emoji dock —— */
.cn-reaction-i18n {
  display: none !important;
}

.cn-reaction-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-2);
  flex-wrap: wrap;
}

.cn-reaction-shell.cn-reaction-shell--guest-readonly .cn-react-trigger,
.cn-reaction-shell.cn-reaction-shell--guest-readonly .cn-reaction-chip {
  cursor: not-allowed;
  opacity: 0.55;
}

.cn-reaction-shell.cn-reaction-shell--guest-readonly .cn-react-trigger:hover {
  transform: none;
  background: color-mix(in srgb, var(--ds-accent-social) 18%, var(--ds-white));
}

.cn-react-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-2);
  padding: var(--ds-space-2) var(--ds-space-4);
  border-radius: var(--ds-radius-pill);
  border: 1px solid var(--ds-border-default);
  background: color-mix(in srgb, var(--ds-accent-social) 18%, var(--ds-white));
  color: var(--ds-text-primary);
  font-size: var(--ds-text-xs);
  font-weight: var(--ds-fw-semibold);
  cursor: pointer;
  transition:
    background var(--ds-duration-fast) var(--ds-ease-standard),
    transform var(--ds-duration-fast) var(--ds-ease-entrance);
}

.cn-react-trigger:hover {
  background: color-mix(in srgb, var(--ds-accent-social) 28%, var(--ds-white));
  transform: translateY(-1px);
}

.cn-react-trigger--has-choice {
  border-color: color-mix(in srgb, var(--ds-accent-social) 55%, var(--ds-border-default));
  background: color-mix(in srgb, var(--ds-accent-social) 32%, var(--ds-white));
}

.cn-react-trigger:focus-visible {
  outline: none;
  box-shadow: var(--ds-shadow-focus);
}

.cn-react-trigger__emoji {
  font-size: 1rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 1px 2px rgba(16, 24, 40, 0.12));
}

.cn-react-trigger:hover .cn-react-trigger__emoji {
  transform: rotate(-8deg) scale(1.12);
  animation: cn-emoji-wiggle 0.65s ease-in-out;
}

.cn-reaction-chip--mine {
  box-shadow: inset 0 0 0 2px var(--ds-accent-primary);
  background: color-mix(in srgb, var(--ds-accent-primary) 12%, var(--ds-white));
}

.cn-reaction-dock {
  position: absolute;
  z-index: var(--ds-z-reaction);
  bottom: calc(100% + 6px);
  inset-inline-start: 0;
  display: flex;
  align-items: center;
  gap: var(--ds-space-1);
  padding: var(--ds-space-2) var(--ds-space-3);
  border-radius: var(--ds-radius-pill);
  background: color-mix(in srgb, var(--ds-white) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--ds-border-subtle);
  box-shadow: var(--ds-shadow-md);
}

.cn-reaction-dock[hidden] {
  display: none !important;
}

.cn-reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: var(--ds-space-1) var(--ds-space-2);
  border: none;
  border-radius: var(--ds-radius-pill);
  background: transparent;
  font-size: var(--ds-text-sm);
  cursor: pointer;
  transition: background var(--ds-duration-fast) var(--ds-ease-standard);
}

.cn-reaction-chip:hover {
  background: var(--ds-gray-100);
}

.cn-reaction-chip--pop {
  animation: cn-ds-pop 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cn-reaction-chip .cn-reaction-chip__emoji {
  display: inline-block;
  transition: transform 0.2s var(--ds-ease-entrance);
}

.cn-reaction-chip:hover .cn-reaction-chip__emoji {
  transform: scale(1.15);
}

.cn-reaction-summary {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--ds-space-1);
}

.cn-reaction-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: var(--ds-space-1) var(--ds-space-2);
  border-radius: var(--ds-radius-pill);
  border: 1px solid var(--ds-border-subtle);
  background: rgba(255, 255, 255, 0.8);
  font-size: var(--ds-text-xs);
  cursor: pointer;
  transition:
    transform var(--ds-duration-fast) var(--ds-ease-entrance),
    background var(--ds-duration-fast) var(--ds-ease-standard),
    box-shadow var(--ds-duration-fast) var(--ds-ease-standard);
}

.cn-reaction-summary-chip:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--ds-shadow-xs);
}

.cn-reaction-summary-chip--mine {
  border-color: color-mix(in srgb, var(--ds-accent-primary) 65%, var(--ds-border-subtle));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--ds-accent-primary) 18%, var(--ds-white)),
    color-mix(in srgb, var(--ds-accent-social) 14%, var(--ds-white))
  );
}

.cn-reaction-summary-chip--visible .cn-reaction-summary-chip__emoji {
  display: inline-block;
  animation: cn-emoji-float 2.8s ease-in-out infinite;
}

.cn-reaction-summary-chip--visible:nth-child(1) .cn-reaction-summary-chip__emoji {
  animation-delay: 0s;
}
.cn-reaction-summary-chip--visible:nth-child(2) .cn-reaction-summary-chip__emoji {
  animation-delay: 0.15s;
}
.cn-reaction-summary-chip--visible:nth-child(3) .cn-reaction-summary-chip__emoji {
  animation-delay: 0.3s;
}
.cn-reaction-summary-chip--visible:nth-child(4) .cn-reaction-summary-chip__emoji {
  animation-delay: 0.45s;
}

.cn-reaction-summary-chip--visible.cn-reaction-summary-chip--mine {
  animation: cn-reaction-summary-glow 2.4s ease-in-out infinite;
}

@keyframes cn-emoji-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.cn-reaction-summary-chip__count {
  font-weight: var(--ds-fw-semibold);
}

.cn-reaction-popup {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-start: 0;
  z-index: calc(var(--ds-z-reaction) + 1);
  min-width: 13rem;
  max-width: 16rem;
  padding: var(--ds-space-3);
  border-radius: var(--ds-radius-lg);
  border: 1px solid var(--ds-border-subtle);
  background: color-mix(in srgb, var(--ds-white) 93%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: var(--ds-shadow-md);
}

.cn-reaction-popup[hidden] {
  display: none !important;
}

.cn-reaction-popup__title {
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-fw-semibold);
  margin-bottom: var(--ds-space-1);
}

.cn-reaction-popup__meta,
.cn-reaction-popup__mine {
  font-size: var(--ds-text-xs);
  color: var(--ds-text-secondary);
}

.cn-reaction-popup__mine {
  margin-top: var(--ds-space-1);
}

.cn-reaction-popup__close {
  margin-top: var(--ds-space-2);
  border: 1px solid var(--ds-border-default);
  background: transparent;
  border-radius: var(--ds-radius-pill);
  padding: 0.2rem 0.6rem;
  font-size: var(--ds-text-xs);
  cursor: pointer;
}

.cn-reaction-popup__close:hover {
  background: var(--ds-gray-100);
}

.cn-reaction-popup--show {
  animation: cn-reaction-popup-in 180ms var(--ds-ease-entrance);
}

.cn-reaction-popup--hide {
  animation: cn-reaction-popup-out 180ms var(--ds-ease-standard);
}

@keyframes cn-reaction-popup-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cn-reaction-popup-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-4px) scale(0.98); }
}

@keyframes cn-ds-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes cn-emoji-wiggle {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(-10deg) scale(1.08);
  }
  50% {
    transform: rotate(8deg) scale(1.12);
  }
  75% {
    transform: rotate(-4deg) scale(1.06);
  }
}

@keyframes cn-reaction-summary-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(93, 103, 255, 0);
  }
  50% {
    box-shadow: 0 0 12px 2px color-mix(in srgb, var(--ds-accent-primary) 35%, transparent);
  }
}

.cn-app.cn-ds .cn-discussion-modal__panel {
  border: 1px solid var(--ds-border-subtle);
  box-shadow: var(--ds-shadow-lg);
}

.cn-app.cn-ds .cn-discussion-comment {
  background: color-mix(in srgb, var(--ds-white) 92%, var(--ds-gray-50));
  border-color: var(--ds-border-subtle);
}

.cn-app.cn-ds .cn-discussion-modal__submit {
  border-radius: var(--ds-radius-pill);
}

/* —— Right rail: grouped glass panels —— */
.cn-right-rail__panel {
  background: color-mix(in srgb, var(--ds-surface-card) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--ds-radius-xl);
  padding: var(--ds-space-5);
  box-shadow: var(--ds-shadow-xs);
}

.cn-right-rail__panel .cn-rail-section__title {
  margin-top: 0;
}

/* —— Pricing page (2026 layout) —— */
.cn-app.cn-ds .cn-pricing--2026 {
  max-width: min(72rem, 100%);
  margin-inline: auto;
  padding-block: var(--ds-space-4) var(--ds-space-10);
  padding-inline: var(--ds-shell-inline-pad);
  box-sizing: border-box;
}

.cn-app.cn-ds .cn-pricing__hero {
  text-align: center;
  margin-bottom: var(--ds-space-8);
}

.cn-app.cn-ds .cn-pricing__lead {
  max-width: 42rem;
  margin-inline: auto;
  color: var(--ds-text-secondary);
  line-height: 1.55;
}

.cn-app.cn-ds .cn-pricing-card__tagline {
  font-size: var(--ds-text-sm);
  color: var(--ds-text-secondary);
  line-height: 1.45;
  margin: 0 0 var(--ds-space-5);
  min-height: 2.75rem;
}

.cn-app.cn-ds .cn-pricing-faq {
  margin-top: var(--ds-space-10);
  padding: var(--ds-space-5) var(--ds-space-6);
  border-radius: var(--ds-radius-xl);
  background: color-mix(in srgb, var(--ds-gray-50) 88%, var(--ds-white));
  border: 1px solid var(--ds-border-subtle);
  font-size: var(--ds-text-sm);
  color: var(--ds-text-secondary);
  line-height: 1.55;
  max-width: 48rem;
  margin-inline: auto;
}

/* —— Dev checkout (test payment) —— */
.cn-app.cn-ds .cn-dev-checkout__banner {
  display: inline-block;
  margin: 0 0 var(--ds-space-3);
  padding: var(--ds-space-1) var(--ds-space-3);
  border-radius: var(--ds-radius-pill);
  font-size: var(--ds-text-xs);
  font-weight: var(--ds-fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ds-text-primary);
  background: color-mix(in srgb, var(--ds-accent-primary) 14%, var(--ds-white));
  border: 1px solid color-mix(in srgb, var(--ds-accent-primary) 28%, transparent);
}

.cn-app.cn-ds .cn-dev-checkout__hint {
  margin: var(--ds-space-4) auto 0;
  max-width: 36rem;
  font-size: var(--ds-text-sm);
  color: var(--ds-text-tertiary);
  line-height: 1.5;
}

.cn-app.cn-ds .cn-dev-checkout__panel {
  max-width: 28rem;
  margin-inline: auto;
  padding: var(--ds-space-6);
  border-radius: var(--ds-radius-bento);
  border: 1px solid var(--ds-border-subtle);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--ds-shadow-md);
}

.cn-app.cn-ds .cn-dev-checkout__field {
  margin-bottom: var(--ds-space-4);
}

.cn-app.cn-ds .cn-dev-checkout__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ds-space-4);
}

.cn-app.cn-ds .cn-dev-checkout__label {
  display: block;
  margin-bottom: var(--ds-space-2);
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-fw-medium);
  color: var(--ds-text-primary);
}

.cn-app.cn-ds .cn-dev-checkout__input {
  width: 100%;
  min-height: 2.75rem;
  padding: var(--ds-space-2) var(--ds-space-4);
  border-radius: var(--ds-radius-lg);
  border: 1px solid var(--ds-border-default);
  background: var(--ds-surface-card);
  font-size: var(--ds-text-sm);
  color: var(--ds-text-primary);
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cn-app.cn-ds .cn-dev-checkout__input:focus {
  outline: none;
  border-color: var(--ds-accent-primary);
  box-shadow: var(--ds-shadow-focus);
}

.cn-app.cn-ds .cn-dev-checkout__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-3);
  align-items: center;
  margin-top: var(--ds-space-6);
}

.cn-app.cn-ds .cn-dev-checkout__submit {
  flex: 1 1 auto;
  min-height: 2.75rem;
  padding: var(--ds-space-3) var(--ds-space-6);
  border: none;
  border-radius: var(--ds-radius-pill);
  background: var(--ds-accent-primary);
  color: var(--ds-white);
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-fw-semibold);
  cursor: pointer;
  box-shadow: var(--ds-shadow-sm);
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.cn-app.cn-ds .cn-dev-checkout__submit:hover {
  background: var(--ds-coral-hover);
  box-shadow: var(--ds-shadow-md);
}

.cn-app.cn-ds .cn-dev-checkout__submit:focus-visible {
  outline: none;
  box-shadow: var(--ds-shadow-focus);
}

.cn-app.cn-ds .cn-dev-checkout__cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: var(--ds-space-3) var(--ds-space-5);
  border-radius: var(--ds-radius-pill);
  border: 1px solid var(--ds-border-default);
  background: var(--ds-surface-card);
  color: var(--ds-text-primary);
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-fw-semibold);
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.cn-app.cn-ds .cn-dev-checkout__cancel:hover {
  background: var(--ds-canvas-muted);
  border-color: var(--ds-border-strong);
  color: var(--ds-text-primary);
}

.cn-app.cn-ds .cn-dev-checkout__cancel:focus-visible {
  outline: none;
  box-shadow: var(--ds-shadow-focus);
}

@media (max-width: 520px) {
  .cn-app.cn-ds .cn-dev-checkout__row {
    grid-template-columns: 1fr;
  }
}

/* Stacked feed engagement: keep focus rings visible above sibling content in overflow contexts */
.cn-app.cn-ds .cn-feed-card-interactions button:focus-visible,
.cn-app.cn-ds .cn-feed-card-interactions a:focus-visible {
  position: relative;
  z-index: 1;
}

/* Reduce clipped keyboard focus rings inside overflow containers */
.cn-app.cn-ds .cn-main :focus-visible {
  outline-offset: 3px;
}
