:root {
  --primary: #007aff;
  --green: #34c759;
  --bg: #000000;
  --card: #101010;
  --elevated: #171717;
  --text: #ffffff;
  --secondary: #d6d6d6;
  --border: rgba(255, 255, 255, 0.16);
  --radius: 20px;
  --small-radius: 12px;
  --font-ui: Inter, "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: Inter, "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
  font-family: var(--font-ui);
  color: var(--text);
  background: #000000;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.95), transparent 24rem),
    linear-gradient(135deg, #dcdcdc, #efefef 45%, #d4d4d4);
  user-select: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

button:focus-visible,
article:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.phone-shell {
  position: relative;
  width: min(100%, 390px);
  height: min(844px, calc(100vh - 24px));
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 34px;
  background: var(--bg);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22), 0 2px 0 rgba(255, 255, 255, 0.7) inset;
}

.status-bar {
  height: 34px;
  padding: 12px 24px 0;
  display: flex;
  justify-content: space-between;
  color: #111114;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.route-stack {
  position: relative;
  height: calc(100% - 34px);
  overflow: hidden;
  animation: routeIn 230ms ease-in-out both;
}

.route-stack:has(.onboarding-overlay) {
  z-index: 30;
}

.route-stack > .screen {
  height: 100%;
}

.route-article,
.route-survey,
.route-settings {
  animation-name: sheetIn;
}

.screen {
  height: calc(100% - 34px);
  overflow-y: auto;
  padding: 14px 18px 98px;
  scrollbar-width: none;
}

.screen::-webkit-scrollbar,
.topic-rail::-webkit-scrollbar {
  display: none;
}

@keyframes routeIn {
  from {
    opacity: 0;
    transform: translateX(18px) scale(0.985);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

@keyframes sheetIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 5px;
  color: #0b0b0f;
  font-size: 12px;
  font-weight: 850;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.app-header h1,
.settings-screen h1,
.survey-screen h1 {
  font-size: 28px;
  line-height: 32px;
  letter-spacing: 0;
}

.subtitle {
  margin-top: 5px;
  color: var(--secondary);
  font-size: 13px;
  line-height: 18px;
}

.icon-button,
.mini-button,
.grab-handle,
.tooltip-close {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.icon {
  width: 19px;
  height: 19px;
}

.topic-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 14px;
  margin: 0 -18px 2px;
  padding-left: 18px;
  scrollbar-width: none;
}

.topic-chip {
  min-height: 34px;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
  color: #777985;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
  font-size: 12px;
  font-weight: 800;
}

.topic-chip.selected {
  background: var(--primary);
  color: white;
}

.teach-button,
.primary-button,
.secondary-button,
.survey-link,
.back-button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 850;
}

.teach-button {
  width: 100%;
  margin: 4px 0 16px;
  color: white;
  background: #111114;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
}

.teach-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(52, 199, 89, 0.18);
}

.feed-list {
  display: grid;
  gap: 12px;
}

.feed-list.is-adapted {
  animation: settle 260ms ease-in-out;
}

.news-card {
  position: relative;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  min-height: 128px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  transition: transform 210ms ease-in-out, box-shadow 210ms ease-in-out, border-color 210ms ease-in-out, opacity 210ms ease-in-out;
}

.news-card:first-child:not(.teach):not(.dragging):not(.grouped) {
  min-height: 238px;
  display: block;
  padding: 0;
  overflow: hidden;
  color: white;
  border: 0;
  background: #111;
}

.news-card:first-child:not(.teach):not(.dragging):not(.grouped) .thumb {
  min-height: 238px;
  border-radius: 18px;
}

.news-card:first-child:not(.teach):not(.dragging):not(.grouped) .card-content {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  gap: 7px;
}

.news-card:first-child:not(.teach):not(.dragging):not(.grouped) .news-card p {
  color: rgba(255, 255, 255, 0.78);
}

.news-card:first-child:not(.teach):not(.dragging):not(.grouped) p,
.news-card:first-child:not(.teach):not(.dragging):not(.grouped) .card-meta {
  color: rgba(255, 255, 255, 0.76);
}

.news-card.teach {
  border-color: rgba(0, 122, 255, 0.45);
  box-shadow: 0 16px 38px rgba(0, 122, 255, 0.12), 0 12px 30px rgba(0, 0, 0, 0.08);
  transform: scale(1.01);
  touch-action: none;
}

.news-card.dragging {
  z-index: 12;
  border-color: var(--topic);
  box-shadow: 0 24px 64px var(--glow), 0 20px 48px rgba(0, 0, 0, 0.24);
  transform: translate(var(--drag-x, 8px), var(--drag-y, -8px)) rotate(1.5deg) scale(1.04);
  cursor: grabbing;
  touch-action: none;
}

.news-card.grouped {
  border-color: var(--topic);
  background: color-mix(in srgb, var(--topic) 16%, #172033);
  color: #f8fafc;
}

.news-card.grouped p,
.news-card.grouped .card-meta {
  color: #a6adba;
}

.news-card.adapted {
  animation: settle 230ms ease-in-out both;
}

.news-card.why-open {
  z-index: 30;
  overflow: visible !important;
}

.news-card.dimmed {
  opacity: 0.34;
  transform: scale(0.985);
}

.thumb {
  position: relative;
  min-height: 108px;
  overflow: hidden;
  border-radius: 14px;
  background-image: linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.28)), var(--photo), var(--image), var(--visual);
  background-size: cover;
  background-position: center;
}

.thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 36%),
    linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.5));
}

.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
}

.thumb-grid {
  display: none;
}

.topic-monogram {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: rgba(15, 21, 32, .56);
  backdrop-filter: blur(10px);
}

.topic-monogram .icon {
  width: 21px;
  height: 21px;
}

.card-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-topline,
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.topic-tag,
.rec-label {
  min-width: 0;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 10.5px;
  line-height: 13px;
  font-weight: 850;
}

.topic-tag {
  color: white;
  background: var(--topic);
}

.rec-label {
  color: #6f7280;
  background: #f0f1f4;
}

.rec-label.is-saved {
  color: #fff;
  background: var(--primary);
}

.news-card h2 {
  font-size: 15.5px;
  line-height: 20px;
  letter-spacing: 0;
}

.headline-link {
  color: inherit;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-decoration: none;
}

.headline-link:hover {
  text-decoration: underline;
}

.news-card p {
  color: var(--secondary);
  font-size: 12.5px;
  line-height: 17px;
}

.card-meta {
  margin-top: auto;
  color: #898b94;
  font-size: 11.5px;
  line-height: 15px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.signal-controls {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: #f1f3f7;
}

.signal-button {
  min-height: 26px;
  border: 0;
  border-radius: 999px;
  padding: 0 8px;
  color: #636977;
  background: transparent;
  font-size: 11px;
  font-weight: 900;
}

.signal-button.active.more {
  color: white;
  background: var(--topic);
}

.signal-button.active.less {
  color: white;
  background: #111114;
}

.mini-button {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: #555965;
  background: #f6f6f8;
  box-shadow: none;
  text-decoration: none;
}

.mini-button.saved {
  color: white;
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(0, 122, 255, 0.26);
}

.article-open {
  color: var(--primary);
}

.mini-button .icon {
  width: 14px;
  height: 14px;
}

.why-button {
  min-height: 30px;
  border: 1px solid rgba(0, 122, 255, 0.26);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--primary);
  background: rgba(0, 122, 255, 0.08);
  font-size: 11.5px;
  font-weight: 850;
}

.grab-handle {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  color: white;
  background: rgba(0, 122, 255, 0.88);
  box-shadow: 0 12px 28px rgba(0, 122, 255, 0.3);
  backdrop-filter: blur(16px);
}

.instruction-card,
.success-banner,
.info-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--elevated);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.category-controls {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.category-control {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.category-visual {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--visual);
}

.category-visual .icon,
.region-icon .icon,
.slider-topic-icon .icon {
  width: 22px;
  height: 22px;
}

.category-copy h3 {
  margin: 0;
  font-size: 14px;
  line-height: 18px;
}

.category-copy p {
  margin-top: 3px;
  color: var(--secondary);
  font-size: 12px;
}

.preference-buttons {
  display: flex;
  gap: 6px;
}

.preference-buttons button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  background: #f0f1f4;
  color: #666a75;
  font-size: 12px;
  font-weight: 850;
}

.preference-buttons .active.more {
  color: white;
  background: var(--topic);
}

.preference-buttons .active.less {
  color: white;
  background: #111114;
}

.instruction-card h2,
.success-banner h2,
.settings-screen h2 {
  font-size: 18px;
  line-height: 24px;
}

.instruction-card p,
.success-banner p,
.info-card {
  color: var(--secondary);
  font-size: 13px;
  line-height: 18px;
}

.pulse-mark,
.success-icon,
.modal-check {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(0, 122, 255, 0.12);
  color: var(--primary);
}

.group-zones {
  position: sticky;
  top: 0;
  z-index: 7;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px 0 10px;
  margin-bottom: 14px;
  background: linear-gradient(180deg, var(--bg) 78%, rgba(245, 245, 247, 0));
}

.group-region {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1.5px dashed #c7c9d1;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  color: #777985;
  text-align: center;
  font-size: 12px;
  font-weight: 850;
  transition-property: border-color, background-color, color, box-shadow, transform;
  transition-duration: 200ms;
  transition-timing-function: ease-in-out;
}

.group-region small {
  color: inherit;
  font-size: 10.5px;
  font-weight: 800;
  opacity: .72;
}

.group-region.hoverTarget,
.group-region.confirmed {
  color: var(--topic);
  border-color: var(--topic);
  background: color-mix(in srgb, var(--topic) 11%, white);
  box-shadow: 0 14px 34px var(--glow), inset 0 0 0 1px color-mix(in srgb, var(--topic) 22%, transparent);
  transform: translateY(-2px);
}

.group-region.confirmed {
  border-style: solid;
}

.region-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--topic) 18%, white);
  color: var(--topic);
}

.region-icon .icon {
  width: 15px;
  height: 15px;
}

.teach-bar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 74px;
  z-index: 10;
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(22px);
}

.teach-bar button {
  min-height: 42px;
  border: 0;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #f0f1f4;
  font-size: 13px;
  font-weight: 850;
}

.teach-bar button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.teach-bar span {
  color: var(--secondary);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.teach-bar .primary-small {
  color: white;
  background: var(--primary);
}

.toast {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 140px;
  z-index: 11;
  padding: 13px 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  animation: rise 220ms ease-in-out both;
}

.toast strong,
.toast span {
  display: block;
}

.toast strong {
  font-size: 14px;
}

.toast span {
  margin-top: 2px;
  color: var(--secondary);
  font-size: 12px;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: end center;
  padding: 20px;
  background: rgba(38, 38, 42, 0.34);
  backdrop-filter: blur(8px);
  animation: fade 180ms ease-in-out both;
}

.modal-card {
  width: 100%;
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
  animation: sheet 230ms ease-in-out both;
}

.modal-card h2 {
  margin-top: 14px;
  font-size: 21px;
  line-height: 26px;
}

.modal-card p {
  margin-top: 8px;
  color: var(--secondary);
  font-size: 14px;
  line-height: 20px;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
  margin-top: 18px;
}

.primary-button {
  color: white;
  background: var(--primary);
}

.secondary-button {
  background: #eff0f3;
}

.based-region {
  margin: 4px 0 12px;
  padding: 12px;
  border: 1px solid rgba(0, 122, 255, 0.18);
  border-radius: 18px;
  background: rgba(0, 122, 255, 0.07);
}

.based-region p {
  margin-top: 8px;
  color: var(--secondary);
  font-size: 12px;
  line-height: 17px;
}

.region-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #111114;
  font-size: 13px;
  font-weight: 850;
}

.region-heading small {
  color: var(--primary);
  font-size: 11px;
}

.survey-link {
  width: 100%;
  margin: 2px 0 10px;
  border: 1px solid var(--border);
  background: #fff;
}

.why-tooltip {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 94px;
  z-index: 5;
  width: min(320px, calc(100vw - 38px));
  padding: 14px 44px 14px 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
  transform: translateX(-50%);
  animation: popover 180ms ease-in-out both;
}

.why-tooltip::after {
  content: "";
  position: absolute;
  right: 74px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  transform: rotate(45deg);
  background: rgba(255, 255, 255, 0.97);
}

.why-tooltip h3 {
  font-size: 14px;
  line-height: 18px;
}

.why-tooltip p,
.why-tooltip small {
  display: block;
  margin-top: 6px;
  color: var(--secondary);
  font-size: 12px;
  line-height: 16px;
}

.tooltip-close {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  box-shadow: none;
  background: #f2f3f5;
}

.settings-screen,
.survey-screen {
  padding-bottom: 28px;
}

.back-button {
  min-height: 44px;
  padding: 0 14px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  background: #fff;
}

.settings-screen section {
  margin-top: 20px;
}

.settings-toggle {
  min-height: 78px;
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 54px;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.settings-toggle strong,
.settings-toggle small {
  display: block;
}

.settings-toggle strong {
  font-size: 14px;
}

.settings-toggle small {
  margin-top: 4px;
  color: var(--secondary);
  font-size: 12px;
  line-height: 16px;
}

.settings-toggle input {
  position: absolute;
  opacity: 0;
}

.settings-toggle i {
  width: 52px;
  height: 32px;
  border-radius: 999px;
  background: #d7d9df;
  position: relative;
  transition-property: background-color;
  transition-duration: 180ms;
  transition-timing-function: ease-in-out;
}

.settings-toggle i::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  transition-property: transform, box-shadow;
  transition-duration: 180ms;
  transition-timing-function: ease-in-out;
}

.settings-toggle input:checked + i {
  background: var(--green);
}

.settings-toggle input:checked + i::after {
  transform: translateX(20px);
}

.info-card {
  margin-top: 20px;
}

.survey-list {
  display: grid;
  gap: 18px;
  margin: 28px 0 22px;
}

.survey-slider {
  position: relative;
  display: block;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.survey-slider > span {
  display: block;
  padding-right: 34px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 750;
}

.survey-slider b {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 24px;
  margin-top: 14px;
  transform: translateX(-50%);
  border-radius: 999px;
  color: white;
  background: var(--primary);
  font-size: 12px;
}

.survey-slider input {
  width: 100%;
  margin: 10px 0 2px;
  accent-color: var(--primary);
}

.survey-slider small {
  display: flex;
  justify-content: space-between;
  color: var(--secondary);
}

.primary-button.full {
  width: 100%;
}

.secondary-button.full {
  width: 100%;
}

.utility-screen {
  padding-bottom: 98px;
}

.utility-header {
  margin-bottom: 18px;
}

.empty-state,
.profile-card,
.profile-stats {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.empty-state {
  padding: 24px;
  text-align: center;
}

.empty-state h2,
.profile-card h2 {
  font-size: 18px;
  line-height: 24px;
}

.empty-state p,
.profile-card p {
  margin-top: 6px;
  color: var(--secondary);
  font-size: 13px;
  line-height: 18px;
}

.compact-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped) {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  min-height: 128px;
  padding: 10px;
  overflow: visible;
  color: var(--text);
  border: 1px solid var(--border);
  background: #fff;
}

.compact-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped) .thumb {
  min-height: 108px;
  border-radius: 14px;
}

.compact-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped) .card-content {
  position: static;
  gap: 6px;
}

.compact-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped) p,
.compact-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped) .card-meta {
  color: var(--secondary);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 14px;
}

.avatar {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--primary), #7c5cff);
  font-weight: 950;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 14px;
}

.profile-stats div {
  min-height: 86px;
  display: grid;
  place-content: center;
  gap: 4px;
  text-align: center;
  background: #fff;
}

.profile-stats strong {
  font-size: 24px;
  line-height: 28px;
}

.profile-stats span {
  color: var(--secondary);
  font-size: 11px;
  font-weight: 800;
}

.profile-actions {
  display: grid;
  gap: 10px;
}

.article-screen {
  padding-bottom: 28px;
}

.article-reader {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.12);
}

.article-hero {
  min-height: 280px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  background-image: linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.42)), var(--photo), var(--image), var(--visual);
  background-size: cover;
  background-position: center;
}

.article-body {
  padding: 18px;
}

.article-source {
  color: var(--topic);
  font-size: 12px;
  font-weight: 850;
  line-height: 16px;
}

.article-body h1 {
  margin-top: 8px;
  font-size: 27px;
  line-height: 32px;
  letter-spacing: 0;
}

.article-body p:not(.article-source) {
  margin-top: 12px;
  color: #555965;
  font-size: 15px;
  line-height: 22px;
}

.article-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.saved-action {
  color: white;
  background: var(--primary);
}

.thank-you {
  min-height: 620px;
  display: grid;
  place-content: center;
  text-align: center;
}

.thank-you .modal-check {
  margin: 0 auto 18px;
}

.thank-you p {
  margin-top: 8px;
  color: var(--secondary);
  line-height: 20px;
}

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  height: 68px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  padding: 7px 18px 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  min-height: 48px;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  gap: 4px;
  color: #a0a3ad;
  font-size: 10.5px;
  font-weight: 800;
  transition: color 180ms ease-in-out, transform 180ms ease-in-out;
}

.bottom-nav .nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
}

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

.bottom-nav .active {
  color: var(--primary);
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes popover {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes sheet {
  from { opacity: 0; transform: translateY(28px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes settle {
  from { opacity: .76; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 430px) {
  .stage {
    padding: 0;
    background: var(--bg);
  }

  .phone-shell {
    width: 100vw;
    height: 100vh;
    border: 0;
    border-radius: 0;
  }
}

/* Dark reference-style redesign */
:root {
  --primary: #6d83ff;
  --green: #34c759;
  --bg: #111722;
  --card: #1a2231;
  --elevated: #232b39;
  --text: #f7f8fb;
  --secondary: #a6adba;
  --border: rgba(255, 255, 255, 0.08);
  color-scheme: dark;
  color: var(--text);
  background: #0b1019;
}

body {
  background: #0b1019;
}

.stage {
  background: radial-gradient(circle at 50% 0, rgba(109, 131, 255, 0.12), transparent 420px), #0b1019;
}

.phone-shell {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--bg);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
}

.status-bar {
  color: #fff;
}

.screen {
  padding: 12px 14px 88px;
  background: var(--bg);
}

.app-header {
  display: block;
  margin-bottom: 14px;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #f7f8fb;
  font-size: 16px;
  font-weight: 900;
}

.brand-mark {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: linear-gradient(135deg, #91e6ff, #ffffff);
  font-size: 14px;
}

.profile-dot {
  position: relative;
  width: 38px;
  height: 38px;
  color: #dce2ec;
  background: #3a414e;
  border: 0;
  box-shadow: none;
}

.profile-dot i {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6d83ff;
  box-shadow: 0 0 0 2px #3a414e;
}

.eyebrow {
  margin-bottom: 4px;
  color: #c2c8d4;
  font-size: 14px;
  font-weight: 650;
}

.app-header h1,
.settings-screen h1,
.survey-screen h1,
.utility-header h1 {
  color: #f8fafc;
  font-size: 20px;
  line-height: 25px;
  font-weight: 900;
}

.subtitle {
  color: #8d95a3;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 8px;
  margin-top: 14px;
}

.search-box {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 10px;
  background: #444956;
  color: #a9b0bd;
}

.search-box span {
  font-size: 19px;
  transform: translateY(-1px);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f8fafc;
  font-size: 14px;
}

.search-box input::placeholder {
  color: #b4bac6;
}

.filter-button {
  min-height: 44px;
  border: 0;
  border-radius: 11px;
  background: #444956;
  color: white;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
}

.onboarding-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: end center;
  padding: 16px;
  background: rgba(4, 8, 14, 0.76);
  backdrop-filter: blur(12px);
  animation: fade 180ms ease-in-out both;
}

.onboarding-card {
  width: 100%;
  max-height: calc(100% - 18px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 28px;
  background: #151c2a;
  box-shadow: 0 24px 80px rgba(0,0,0,.42);
  scrollbar-width: none;
  animation: sheet 220ms ease-in-out both;
}

.onboarding-card::-webkit-scrollbar {
  display: none;
}

.onboarding-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: #dce2ff;
  background: rgba(109, 131, 255, .16);
  font-size: 12px;
  font-weight: 900;
}

.onboarding-card h1 {
  margin-top: 14px;
  color: #fff;
  font-size: 26px;
  line-height: 31px;
}

.onboarding-card > p {
  margin-top: 8px;
  color: #a6adba;
  font-size: 14px;
  line-height: 20px;
}

.recommendation-hint {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.055);
}

.recommendation-hint strong {
  display: block;
  color: #f8fafc;
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
}

.recommendation-hint ol {
  display: grid;
  gap: 7px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: hint;
}

.recommendation-hint li {
  position: relative;
  min-height: 24px;
  display: flex;
  align-items: center;
  padding-left: 33px;
  color: #a6adba;
  font-size: 12px;
  line-height: 16px;
}

.recommendation-hint li::before {
  counter-increment: hint;
  content: counter(hint);
  position: absolute;
  left: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(75, 99, 255, .72);
  font-size: 11px;
  font-weight: 900;
}

.hint-microcopy {
  margin: 10px 0 0;
  padding-top: 9px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: #dfe6ff;
  font-size: 12px;
  line-height: 16px;
}

.onboarding-sliders {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.slider-scale-labels {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #858e9e;
  font-size: 11px;
  line-height: 15px;
}

.onboarding-slider-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: #1a2231;
}

.slider-topic-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  background: var(--visual);
}

.slider-copy {
  min-width: 0;
}

.slider-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.slider-title-row h3 {
  color: #f8fafc;
  font-size: 14px;
  line-height: 18px;
}

.slider-title-row strong {
  flex: 0 0 auto;
  color: var(--topic);
  font-size: 11px;
  line-height: 15px;
}

.reco-slider {
  width: 100%;
  height: 28px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.reco-slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.15), rgba(255,255,255,.15)),
    linear-gradient(90deg, #ff5f7c 0 20%, rgba(255,255,255,.18) 20% 80%, var(--topic) 80% 100%);
}

.reco-slider::-webkit-slider-thumb {
  appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -10px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--topic);
  box-shadow: 0 8px 20px rgba(0,0,0,.32);
}

.reco-slider::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
}

.reco-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--topic);
}

.onboarding-card > small {
  display: block;
  margin-top: 10px;
  color: #858e9e;
  font-size: 11.5px;
  line-height: 16px;
  text-align: center;
}

.onboarding-card > .primary-button.full {
  margin-top: 12px;
  box-shadow: 0 14px 28px rgba(75, 99, 255, .28);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 10px;
}

.section-title.compact {
  margin-top: 20px;
}

.section-title h2 {
  color: #f8fafc;
  font-size: 15px;
  line-height: 20px;
  font-weight: 900;
}

.section-title button {
  min-height: 32px;
  border: 0;
  background: transparent;
  color: #a6adba;
  font-size: 14px;
}

.breaking-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(188px, 64%);
  gap: 14px;
  overflow-x: auto;
  margin: 0 -14px;
  padding: 0 14px 4px;
  scrollbar-width: none;
}

.breaking-strip::-webkit-scrollbar {
  display: none;
}

.breaking-strip .news-card {
  display: block;
  min-height: 208px;
  padding: 10px;
  border: 0;
  border-radius: 15px;
  background: #1a2231;
  box-shadow: none;
  color: #f8fafc;
}

.breaking-strip .thumb {
  min-height: 104px;
  border-radius: 10px;
}

.breaking-strip .card-content {
  position: static;
  margin-top: 9px;
  gap: 7px;
}

.breaking-strip .card-topline {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  z-index: 2;
  pointer-events: none;
}

.breaking-strip .rec-label {
  display: none;
}

.breaking-strip .news-card h2 {
  font-size: 14px;
  line-height: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.breaking-strip .news-card p {
  display: none;
}

.breaking-strip .card-meta {
  display: block;
  margin: 0;
}

.breaking-strip .card-meta > span {
  display: none;
}

.breaking-strip .card-actions {
  display: none;
}

.topic-rail {
  margin: 0 -14px 12px;
  padding-left: 14px;
  padding-bottom: 0;
}

.topic-chip {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #111722;
  color: #d9dee8;
  box-shadow: none;
  font-size: 12px;
}

.topic-chip.selected {
  background: #202838;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
}

.teach-button {
  min-height: 46px;
  margin: 12px 0 4px;
  background: #202838;
  color: #fff;
  box-shadow: none;
}

.feed-list {
  gap: 11px;
}

.feed-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped),
.compact-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped),
.news-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  min-height: 116px;
  padding: 9px;
  border: 0;
  border-radius: 14px;
  overflow: visible;
  background: #1a2231;
  color: #f8fafc;
  box-shadow: none;
}

.feed-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped) .thumb,
.compact-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped) .thumb,
.news-card .thumb {
  min-height: 98px;
  border-radius: 8px;
}

.feed-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped) .card-content,
.compact-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped) .card-content {
  position: static;
  gap: 6px;
}

.news-card h2 {
  color: #f8fafc;
  font-size: 13px;
  line-height: 17px;
  font-weight: 900;
}

.feed-list .news-card p,
.compact-list .news-card p,
.news-card p {
  color: #a6adba;
  font-size: 12px;
  line-height: 16px;
}

.feed-list .news-card p {
  display: none;
}

.card-topline {
  align-items: flex-start;
}

.topic-tag {
  color: #f8fafc;
  background: #121825;
  padding: 5px 9px;
  font-size: 10px;
}

.rec-label {
  color: #8d95a3;
  background: #121825;
}

.rec-label.is-saved {
  color: #fff;
  background: #4b63ff;
}

.card-meta {
  color: #8d95a3;
  font-size: 11px;
}

.mini-button,
.icon-button,
.tooltip-close {
  background: #111722;
  color: #dce2ec;
  border: 0;
  box-shadow: none;
}

.mini-button.saved {
  background: #4b63ff;
}

.why-button {
  min-height: 28px;
  color: #cfd8ff;
  border-color: rgba(109, 131, 255, 0.4);
  background: rgba(109, 131, 255, 0.14);
}

.bottom-nav {
  height: 66px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  background: #0d121c;
  backdrop-filter: none;
}

.bottom-nav button {
  color: #747c89;
}

.bottom-nav .active {
  color: #fff;
  transform: translateY(-1px);
}

.bottom-nav .nav-icon .icon {
  width: 22px;
  height: 22px;
  transition: transform 180ms ease-in-out;
}

.bottom-nav .active .nav-icon .icon {
  transform: scale(1.08);
}

.instruction-card,
.success-banner,
.info-card,
.category-control,
.empty-state,
.profile-card,
.profile-stats,
.settings-toggle,
.survey-slider {
  border: 0;
  background: #1a2231;
  color: #f8fafc;
  box-shadow: none;
}

.instruction-card p,
.success-banner p,
.info-card,
.category-copy p,
.empty-state p,
.profile-card p,
.settings-toggle small,
.survey-slider small,
.survey-screen .subtitle {
  color: #a6adba;
}

.category-visual,
.pulse-mark,
.success-icon,
.modal-check {
  background: #111722;
  color: #dce2ec;
}

.preference-buttons button,
.signal-controls,
.teach-bar button,
.secondary-button,
.back-button,
.survey-link {
  background: #202838;
  color: #f8fafc;
}

.signal-button {
  color: #a6adba;
}

.signal-button.active.less {
  color: #fff;
  background: #0f1520;
}

.primary-button,
.teach-bar .primary-small {
  background: #4b63ff;
  color: white;
}

.teach-bar {
  bottom: 74px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(26, 34, 49, 0.92);
  box-shadow: 0 18px 48px rgba(0,0,0,.32);
}

.group-zones {
  background: linear-gradient(180deg, var(--bg) 78%, rgba(17, 23, 34, 0));
}

.group-region {
  border-color: rgba(255,255,255,.12);
  background: #151c2a;
  color: #a6adba;
}

.group-region.hoverTarget,
.group-region.confirmed {
  color: #fff;
  background: color-mix(in srgb, var(--topic) 18%, #151c2a);
}

.region-icon {
  background: #0f1520;
  color: #fff;
}

.based-region {
  border: 0;
  background: #1a2231;
}

.region-heading {
  color: #f8fafc;
}

.based-region p {
  color: #a6adba;
}

.why-tooltip,
.modal-card {
  border: 0;
  background: #202838;
  color: #f8fafc;
}

.why-tooltip::after {
  background: #202838;
}

.why-tooltip p,
.why-tooltip small,
.modal-card p {
  color: #a6adba;
}

.settings-screen,
.survey-screen,
.utility-screen,
.article-screen {
  background: #111722;
}

.back-button {
  border: 0;
  margin-bottom: 16px;
}

.settings-toggle i {
  background: #3a4354;
}

.profile-stats div {
  background: #1a2231;
}

.avatar {
  background: #4b63ff;
}

.article-reader {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.article-hero {
  min-height: 300px;
  margin: -12px -14px 0;
  border-radius: 0;
}

.article-body {
  padding: 16px 0 28px;
}

.article-source {
  color: #a6adba;
}

.article-body h1 {
  color: #f8fafc;
  font-size: 20px;
  line-height: 25px;
}

.article-body p:not(.article-source) {
  color: #a6adba;
  font-size: 13px;
  line-height: 20px;
}

.article-actions .secondary-button {
  background: #202838;
}

@media (max-width: 430px) {
  .stage {
    background: #111722;
  }
}

/* News-first editorial polish */
.screen {
  padding: 12px 14px 92px;
}

.app-header {
  margin-bottom: 12px;
}

.brand-row {
  margin-bottom: 14px;
}

.app-header h1 {
  font-size: 22px;
  line-height: 27px;
}

.search-row {
  margin-top: 12px;
}

.section-title {
  margin: 16px 0 10px;
}

.breaking-strip {
  grid-auto-columns: minmax(228px, 78%);
  gap: 12px;
  padding-bottom: 6px;
}

.breaking-strip .news-card {
  min-height: 238px;
  padding: 10px;
  border-radius: 18px;
  background: #182131;
}

.breaking-strip .thumb {
  min-height: 132px;
  border-radius: 13px;
  background-position: center;
}

.breaking-strip .news-card h2 {
  font-size: 15px;
  line-height: 19px;
}

.breaking-strip .card-content {
  margin-top: 10px;
  gap: 8px;
}

.topic-rail {
  margin-bottom: 14px;
}

.feed-list {
  gap: 10px;
}

.feed-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped),
.compact-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped),
.news-card {
  grid-template-columns: 96px minmax(0, 1fr);
  min-height: 124px;
  padding: 10px;
  border-radius: 16px;
  background: #182131;
  cursor: pointer;
}

.feed-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped) .thumb,
.compact-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped) .thumb,
.news-card .thumb {
  min-height: 104px;
  border-radius: 11px;
  background-position: center;
}

.thumb::before {
  background:
    linear-gradient(135deg, rgba(255,255,255,.10), transparent 32%),
    linear-gradient(180deg, transparent 48%, rgba(0,0,0,.42));
}

.topic-monogram {
  right: 8px;
  bottom: 8px;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: rgba(12, 17, 26, .62);
}

.topic-monogram .icon {
  width: 18px;
  height: 18px;
}

.news-card h2 {
  font-size: 13.5px;
  line-height: 18px;
}

.card-content {
  gap: 7px;
}

.card-meta {
  gap: 8px;
}

.card-meta > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-actions {
  flex: 0 0 auto;
}

.feed-list .signal-controls,
.feed-list .why-button {
  margin-top: 2px;
}

.article-screen {
  padding: 0 14px 30px;
}

.article-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 8px;
  background: linear-gradient(180deg, #111722 76%, rgba(17, 23, 34, 0));
}

.article-topbar .back-button {
  min-height: 40px;
  margin: 0;
  padding: 0 13px;
  background: rgba(32, 40, 56, .88);
}

.article-topbar .mini-button {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(32, 40, 56, .88);
}

.article-topbar .mini-button.saved {
  background: #4b63ff;
}

.article-reader {
  margin-top: 0;
}

.article-hero {
  min-height: 332px;
  margin: 0 -14px;
  padding: 16px 14px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  background-position: center;
}

.article-photo-label {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: rgba(255,255,255,.78);
  background: rgba(12, 17, 26, .44);
  backdrop-filter: blur(12px);
  font-size: 11px;
  font-weight: 800;
}

.article-body {
  padding: 18px 0 34px;
}

.article-source {
  color: var(--topic);
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
}

.article-body h1 {
  margin-top: 8px;
  color: #f8fafc;
  font-size: 24px;
  line-height: 30px;
  font-weight: 950;
}

.article-body .article-lede {
  margin-top: 12px;
  color: #eef2f8;
  font-size: 16px;
  line-height: 23px;
  font-weight: 760;
}

.article-body p:not(.article-source):not(.article-lede) {
  margin-top: 14px;
  color: #aeb6c4;
  font-size: 14.5px;
  line-height: 22px;
}

.article-actions {
  margin-top: 24px;
}

.section-title .carousel-controls button {
  min-height: 30px;
  opacity: 1;
}

/* Story carousel safety override: controls stay on the image, not on text. */
.breaking-strip .card-content {
  position: static;
}

.breaking-strip .news-card:first-child:not(.teach):not(.dragging):not(.grouped) .card-content,
.breaking-strip .news-card .card-content {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
}

.breaking-strip .card-meta {
  top: -130px;
  right: 0;
}

.breaking-strip .card-meta {
  top: 18px;
  right: 18px;
  bottom: auto;
  z-index: 4;
}

.breaking-strip .card-actions {
  gap: 6px;
}

.breaking-strip .card-actions .mini-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(5, 7, 12, .72);
}

.breaking-strip .topic-monogram {
  display: none;
}

/* Final slider color scale: applies after all Tune-specific rules. */
.reco-slider::-webkit-slider-runnable-track,
.tune-slider::-webkit-slider-runnable-track {
  height: 9px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.06)),
    linear-gradient(90deg, #ff453a 0 22%, #6f7785 22% 78%, #34c759 78% 100%);
}

.reco-slider::-moz-range-track,
.tune-slider::-moz-range-track {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff453a 0 22%, #6f7785 22% 78%, #34c759 78% 100%);
}

/* Teacher feedback pass: make news the primary experience. */
.status-bar {
  display: none;
}

.route-stack,
.route-stack > .screen,
.screen {
  height: 100%;
}

.screen {
  padding-top: 16px;
}

.app-header {
  margin-bottom: 16px;
}

.app-header h1 {
  font-size: 22px;
  line-height: 27px;
}

.subtitle {
  max-width: 28ch;
}

.search-row {
  margin-top: 10px;
  opacity: .72;
}

.search-row:focus-within {
  opacity: 1;
}

.section-title {
  margin: 14px 0 10px;
}

.section-title.compact {
  margin-top: 18px;
}

.breaking-strip {
  padding-bottom: 8px;
}

.breaking-strip .news-card {
  position: relative;
  min-height: 252px;
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
  background: #05070c;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(255,255,255,.08);
}

.breaking-strip .thumb {
  position: absolute;
  inset: 0;
  min-height: 100%;
  border-radius: 20px;
  outline: 1px solid rgba(255,255,255,.1);
  outline-offset: -1px;
}

.breaking-strip .thumb::before {
  background:
    linear-gradient(180deg, rgba(0,0,0,.04) 0%, rgba(0,0,0,.16) 38%, rgba(0,0,0,.82) 100%),
    linear-gradient(135deg, rgba(255,255,255,.08), transparent 34%);
}

.breaking-strip .card-content,
.breaking-strip .news-card:first-child:not(.teach):not(.dragging):not(.grouped) .card-content,
.breaking-strip .news-card .card-content {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  margin: 0;
  gap: 8px;
}

.breaking-strip .card-topline {
  margin: 0;
}

.breaking-strip .rec-label,
.breaking-strip .card-meta,
.breaking-strip .card-actions {
  display: none;
}

.breaking-strip .topic-tag {
  max-width: 128px;
  background: color-mix(in srgb, var(--topic) 62%, rgba(8, 10, 16, .82));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}

.breaking-strip .news-card h2 {
  font-size: 16px;
  line-height: 21px;
  letter-spacing: 0;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
}

.breaking-strip .news-card p {
  display: -webkit-box;
  color: rgba(255,255,255,.78);
  font-size: 12.5px;
  line-height: 17px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-list .news-card {
  box-shadow: 0 14px 34px rgba(0,0,0,.2), inset 0 0 0 1px rgba(255,255,255,.055);
}

.feed-list .news-card p {
  color: #b8c0cd;
}

.card-actions {
  opacity: .82;
}

.news-card:focus-within .card-actions,
.news-card:hover .card-actions {
  opacity: 1;
}

.tune-reminder {
  margin: 20px 0 10px;
  background: #121a27;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.tune-reminder-copy p {
  max-width: 23ch;
}

.tune-screen .instruction-card,
.tune-preview {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.tune-screen .instruction-card p,
.tune-preview p {
  max-width: 30ch;
}

.article-screen {
  padding: 0 16px 34px;
  background: #090b0f;
}

.article-topbar {
  padding: 12px 0 8px;
}

.article-reader {
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.article-body {
  padding: 4px 0 34px;
}

.article-body h1 {
  max-width: 22ch;
  margin-top: 10px;
  font-size: 23px;
  line-height: 29px;
  letter-spacing: 0;
}

.article-body .article-lede {
  margin-top: 12px;
  color: #d5dbe5;
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
}

.article-byline {
  margin-top: 14px;
}

.article-source {
  margin-top: 5px;
}

.article-hero {
  min-height: 232px;
  margin: 18px 0 0;
  padding: 0;
  border-radius: 20px;
  outline: 1px solid rgba(255,255,255,.1);
  outline-offset: -1px;
  background-image: linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.2)), var(--photo), var(--image), var(--visual);
  background-size: cover;
  background-position: center;
}

.article-why-block {
  margin-top: 18px;
}

.article-body p:not(.article-source):not(.article-lede):not(.article-byline) {
  margin-top: 16px;
  color: #c1c8d4;
  font-size: 14.5px;
  line-height: 23px;
}

.article-share-row {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  opacity: .78;
}

.article-actions .primary-button {
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.08);
  color: #f7f8fb;
  box-shadow: none;
  text-decoration: none;
}

.recommendation-status-card {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
}

.recommendation-status-card .success-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.recommendation-status-copy h2 {
  font-size: 14px;
  line-height: 18px;
}

.recommendation-status-copy p {
  max-width: 100%;
  overflow: hidden;
  color: #f7f8fb;
  font-size: 12px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommendation-status-copy small {
  display: none;
}

.recommendation-status-card .primary-small {
  grid-column: 3;
  align-self: center;
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

/* Interface polish pass: small details that make the prototype feel more native. */
:root {
  --shadow-border: 0 0 0 1px rgba(255, 255, 255, 0.08);
  --shadow-border-hover: 0 0 0 1px rgba(255, 255, 255, 0.13);
  --ease-out-polish: cubic-bezier(0.2, 0, 0, 1);
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

.status-bar,
.profile-stats strong,
.recommendation-status-copy p,
.slider-title-row strong,
.toast strong {
  font-variant-numeric: tabular-nums;
}

.app-header h1,
.section-title h2,
.news-card h2,
.headline-link,
.article-body h1,
.onboarding-card h1,
.tune-preview h2,
.tune-help-card h2,
.sheet-header h2,
.utility-header h1,
.settings-screen h1,
.survey-screen h1 {
  text-wrap: balance;
}

.subtitle,
.news-card p,
.article-body .article-lede,
.article-body p,
.toast span,
.sheet-action span,
.tune-reminder-copy p,
.recommendation-status-copy small,
.onboarding-card > p,
.recommendation-hint p,
.tune-preview p,
.tune-help-card p {
  text-wrap: pretty;
}

button,
.topic-chip,
.headline-link,
.news-card,
.sheet-action,
.sheet-cancel,
.toast,
.story-action-sheet,
.why-tooltip,
.tune-reminder,
.recommendation-status,
.category-control.slider-control {
  transition-property: transform, scale, opacity, filter, background-color, color, box-shadow, border-color;
  transition-duration: 180ms;
  transition-timing-function: var(--ease-out-polish);
}

button:not(:disabled):active,
.topic-chip:active,
.sheet-action:active,
.sheet-cancel:active {
  scale: 0.96;
}

.headline-link:active {
  scale: 0.985;
}

.mini-button,
.icon-button,
.filter-button,
.carousel-controls button,
.article-share-row button,
.article-share-row a,
.bottom-nav button {
  min-width: 44px;
  min-height: 44px;
}

.mini-button,
.icon-button,
.filter-button,
.carousel-controls button,
.back-button,
.secondary-button,
.survey-link {
  border-color: transparent;
  box-shadow: var(--shadow-border);
}

.mini-button:hover,
.icon-button:hover,
.filter-button:hover,
.carousel-controls button:hover,
.back-button:hover,
.secondary-button:hover,
.survey-link:hover {
  box-shadow: var(--shadow-border-hover);
}

.news-card,
.tune-preview,
.tune-help-card,
.tune-reminder,
.recommendation-status,
.instruction-card,
.success-banner,
.info-card,
.category-control,
.empty-state,
.profile-card,
.profile-stats,
.settings-toggle,
.survey-slider,
.based-region {
  border-color: transparent;
  box-shadow: var(--shadow-border), 0 14px 34px rgba(0, 0, 0, 0.24);
}

.news-card {
  border-radius: 20px;
}

.news-card .thumb {
  border-radius: 14px;
}

.breaking-strip .news-card {
  border-radius: 20px;
}

.breaking-strip .thumb {
  border-radius: 14px;
}

.thumb,
.article-hero {
  outline: 1px solid rgba(255, 255, 255, 0.1);
  outline-offset: -1px;
}

.thumb::before {
  opacity: 0.78;
}

.news-card:hover,
.category-control.slider-control:hover,
.tune-reminder:hover {
  box-shadow: var(--shadow-border-hover), 0 18px 44px rgba(0, 0, 0, 0.3);
}

.news-card:active {
  scale: 0.985;
}

.primary-button,
.primary-small,
.toast button {
  box-shadow: 0 14px 34px rgba(0, 122, 255, 0.26);
}

.primary-button:not(:disabled):active,
.primary-small:not(:disabled):active,
.toast button:not(:disabled):active {
  scale: 0.96;
}

.icon-swap {
  position: relative;
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
}

.icon-swap > span {
  grid-area: 1 / 1;
  display: inline-grid;
  place-items: center;
  transition-property: opacity, filter, transform;
  transition-duration: 300ms;
  transition-timing-function: var(--ease-out-polish);
}

.icon-swap-on {
  opacity: 0;
  filter: blur(4px);
  transform: scale(0.25);
}

.icon-swap-off {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}

.icon-swap.is-active .icon-swap-on {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}

.icon-swap.is-active .icon-swap-off {
  opacity: 0;
  filter: blur(4px);
  transform: scale(0.25);
}

.sheet-scrim {
  backdrop-filter: blur(10px);
}

.story-action-sheet {
  border-color: transparent;
  box-shadow: var(--shadow-border), 0 -22px 80px rgba(0, 0, 0, 0.58);
}

.sheet-action {
  border-color: transparent;
  box-shadow: var(--shadow-border);
}

.sheet-action:hover {
  box-shadow: var(--shadow-border-hover);
}

.toast {
  border-color: transparent;
  box-shadow: var(--shadow-border), 0 20px 60px rgba(0, 0, 0, 0.46);
}

.bottom-nav .nav-icon .icon {
  transition-property: transform, opacity, filter;
  transition-duration: 180ms;
  transition-timing-function: var(--ease-out-polish);
}

.bottom-nav button:active .nav-icon .icon {
  transform: scale(0.96);
}

.reco-slider,
.tune-slider {
  cursor: pointer;
}

.reco-slider::-webkit-slider-thumb,
.tune-slider::-webkit-slider-thumb {
  transition-property: transform, box-shadow;
  transition-duration: 180ms;
  transition-timing-function: var(--ease-out-polish);
}

.reco-slider:active::-webkit-slider-thumb,
.tune-slider:active::-webkit-slider-thumb {
  transform: scale(0.96);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

/* Recommendation sliders: red = less, green = more, gray = neutral. */
.reco-slider::-webkit-slider-runnable-track,
.tune-slider::-webkit-slider-runnable-track {
  height: 9px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.06)),
    linear-gradient(90deg, #ff453a 0 22%, #6f7785 22% 78%, #34c759 78% 100%);
}

.reco-slider::-moz-range-track,
.tune-slider::-moz-range-track {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff453a 0 22%, #6f7785 22% 78%, #34c759 78% 100%);
}

.slider-control .slider-title-row strong,
.onboarding-slider-card .slider-title-row strong {
  color: #f4f7fb;
}

.slider-control.is-less .slider-title-row strong {
  color: #ff6b63;
}

.slider-control.is-more .slider-title-row strong {
  color: #42d76f;
}

/* Breaking cards use one consistent image-corner action cluster. */
.news-card.is-breaking .thumb {
  position: relative;
}

.news-card.is-breaking .breaking-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  display: flex;
  gap: 6px;
}

.news-card.is-breaking .breaking-actions .mini-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(5, 7, 12, .72);
  backdrop-filter: blur(12px);
}

.news-card.is-breaking .card-meta {
  display: none !important;
}

/* Keep story carousel controls away from the headline. */
.breaking-strip .card-meta {
  top: 18px;
  right: 18px;
  bottom: auto;
  z-index: 4;
}

.breaking-strip .card-content {
  position: static;
}

.breaking-strip .card-actions {
  gap: 6px;
}

.breaking-strip .card-actions .mini-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(5, 7, 12, .72);
}

.breaking-strip .topic-monogram {
  display: none;
}

.card-meta > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-list .why-button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 11px;
  color: #dce6ff;
  border-color: rgba(0,122,255,.34);
  background: rgba(0,122,255,.16);
}

.breaking-strip .card-meta {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
}

.breaking-strip .card-actions {
  display: flex;
}

.breaking-strip .card-actions .mini-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(11, 15, 24, .78);
  backdrop-filter: blur(12px);
}

.breaking-strip .card-actions .why-button {
  display: none;
}

.article-why-block p {
  margin-top: 5px !important;
  color: #cbd3df !important;
  font-size: 12.5px !important;
  line-height: 17px !important;
}

.onboarding-card {
  padding: 16px;
}

.onboarding-card h1 {
  margin-top: 10px;
  font-size: 23px;
  line-height: 28px;
}

.onboarding-card > p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 18px;
}

.recommendation-hint {
  margin-top: 10px;
  padding: 10px;
}

.recommendation-hint ol {
  gap: 5px;
  margin-top: 7px;
}

.recommendation-hint li {
  min-height: 21px;
  padding-left: 29px;
  font-size: 11.5px;
  line-height: 15px;
}

.recommendation-hint li::before {
  width: 21px;
  height: 21px;
}

.hint-microcopy {
  margin-top: 7px;
  padding-top: 7px;
  font-size: 11.5px;
  line-height: 15px;
}

.onboarding-sliders {
  gap: 8px;
  margin: 12px 0 10px;
}

.onboarding-slider-card {
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 10px;
  border-radius: 15px;
}

.slider-topic-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.onboarding-card > .primary-button.full {
  min-height: 44px;
  margin-top: 8px;
}

/* High-contrast thesis polish */
:root {
  --bg: #05070c;
  --card: #101722;
  --elevated: #151e2d;
  --text: #ffffff;
  --secondary: #c2cad7;
  --border: rgba(255, 255, 255, 0.14);
  color-scheme: dark;
}

body {
  background:
    radial-gradient(circle at 50% 0%, rgba(45, 68, 130, 0.28), transparent 26rem),
    linear-gradient(145deg, #111318, #05070c 56%, #000);
}

.stage {
  background: transparent;
}

.phone-shell {
  border-color: rgba(255,255,255,.16);
  background: #05070c;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .58), 0 0 0 1px rgba(255,255,255,.03) inset;
}

.screen,
.settings-screen,
.survey-screen,
.utility-screen {
  background: #05070c;
  color: #fff;
}

.status-bar,
.eyebrow,
.app-header h1,
.settings-screen h1,
.survey-screen h1,
.utility-header h1,
.section-title h2,
.news-card h2,
.headline-link {
  color: #ffffff;
}

.subtitle,
.news-card p,
.card-meta,
.instruction-card p,
.success-banner p,
.based-region p,
.info-card,
.settings-toggle small,
.survey-screen .subtitle,
.empty-state p,
.profile-card p,
.article-body p:not(.article-source):not(.article-lede):not(.article-byline) {
  color: #c2cad7;
}

.brand-lockup {
  color: #ffffff;
}

.brand-mark {
  color: #05070c;
  background: linear-gradient(135deg, #9ee8ff, #ffffff);
}

.search-row {
  opacity: .95;
}

.search-box,
.filter-button,
.mini-button,
.icon-button,
.tooltip-close,
.back-button,
.secondary-button,
.survey-link {
  border: 1px solid rgba(255,255,255,.12);
  background: #101722;
  color: #e8eef8;
}

.search-box input {
  color: #ffffff;
}

.search-box input::placeholder {
  color: #9aa6b8;
}

.topic-chip {
  border-color: rgba(255,255,255,.14);
  background: #101722;
  color: #dce5f2;
}

.topic-chip.selected {
  border-color: rgba(255,255,255,.28);
  background: #233253;
  color: #ffffff;
}

.news-card,
.breaking-strip .news-card,
.feed-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped),
.compact-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped) {
  border: 1px solid rgba(255,255,255,.09);
  background: #101722;
  color: #ffffff;
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
}

.news-card:active {
  transform: scale(.99);
}

.topic-tag {
  border: 1px solid color-mix(in srgb, var(--topic) 40%, rgba(255,255,255,.14));
  background: color-mix(in srgb, var(--topic) 24%, #0b1020);
  color: #ffffff;
}

.rec-label {
  color: #d3dbea;
  background: #1b2536;
}

.instruction-card,
.success-banner,
.info-card,
.category-control,
.empty-state,
.profile-card,
.profile-stats,
.settings-toggle,
.survey-slider,
.based-region {
  border: 1px solid rgba(255,255,255,.1);
  background: #101722;
  color: #ffffff;
}

.category-copy h3,
.settings-toggle strong,
.profile-card h2,
.empty-state h2,
.region-heading {
  color: #ffffff;
}

.category-visual,
.pulse-mark,
.success-icon,
.modal-check,
.region-icon {
  background: #1a2438;
  color: #ffffff;
}

.group-zones {
  background: linear-gradient(180deg, #05070c 78%, rgba(5, 7, 12, 0));
}

.group-region {
  border-color: rgba(255,255,255,.24);
  background: rgba(16, 23, 34, .84);
  color: #d2dbea;
}

.group-region.hoverTarget,
.group-region.confirmed {
  background: color-mix(in srgb, var(--topic) 22%, #101722);
  box-shadow: 0 14px 34px var(--glow), inset 0 0 0 1px color-mix(in srgb, var(--topic) 40%, transparent);
}

.teach-bar,
.toast,
.why-tooltip,
.modal-card {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(16, 23, 34, .96);
  color: #ffffff;
  box-shadow: 0 20px 60px rgba(0,0,0,.44);
}

.why-tooltip::after {
  background: #101722;
}

.toast span,
.why-tooltip p,
.why-tooltip small,
.modal-card p,
.teach-bar span {
  color: #c2cad7;
}

.bottom-nav {
  border-top-color: rgba(255,255,255,.12);
  background: #05070c;
}

.bottom-nav button {
  color: #98a3b4;
}

.bottom-nav .active {
  color: #ffffff;
}

.article-screen,
.article-reader {
  background: #05070c;
}

.article-topbar {
  background: linear-gradient(180deg, rgba(5, 7, 12, .98) 72%, rgba(5, 7, 12, 0));
}

.article-body h1,
.article-body .article-lede,
.article-inline-link {
  color: #ffffff;
}

.article-byline {
  color: #dbe3f1;
}

.article-source {
  color: #aeb9cc;
}

.onboarding-card,
.recommendation-hint,
.onboarding-slider-card {
  border-color: rgba(255,255,255,.14);
}

.onboarding-card > p,
.hint-microcopy,
.recommendation-hint li,
.slider-scale-labels,
.onboarding-card > small,
.slider-title-row strong {
  color: #c2cad7;
}

.tune-reminder {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(0,122,255,.16), rgba(16,23,34,.96) 42%, rgba(52,199,89,.08));
  box-shadow: 0 14px 34px rgba(0,0,0,.22);
}

.tune-reminder.is-adapted {
  background: linear-gradient(135deg, rgba(52,199,89,.14), rgba(16,23,34,.96) 46%, rgba(0,122,255,.14));
}

.tune-reminder-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #1d2a45;
  color: #ffffff;
}

.tune-reminder-copy h2 {
  font-size: 14px;
  line-height: 18px;
  font-weight: 950;
}

.tune-reminder-copy p {
  margin-top: 4px;
  color: #c2cad7;
  font-size: 12px;
  line-height: 16px;
}

.tune-reminder-actions {
  display: grid;
  gap: 7px;
}

.tune-reminder-actions button {
  min-width: 58px;
  min-height: 32px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  padding: 0 11px;
  background: #172033;
  color: #e8eef8;
  font-size: 11.5px;
  font-weight: 900;
}

.tune-reminder-actions .primary-small {
  border-color: transparent;
  background: #007aff;
  color: #ffffff;
}

.recommendation-status-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid rgba(52,199,89,.22);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(52,199,89,.14), rgba(16,23,34,.98) 42%, rgba(0,122,255,.12));
  color: #ffffff;
  box-shadow: 0 16px 38px rgba(0,0,0,.24);
}

.recommendation-status-card .primary-small {
  grid-column: 2;
  justify-self: start;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 13px;
  background: #007aff;
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
}

.recommendation-status-copy h2 {
  font-size: 16px;
  line-height: 21px;
  font-weight: 950;
}

.recommendation-status-copy p {
  margin-top: 4px;
  color: #ffffff;
  font-size: 12.5px;
  line-height: 17px;
  font-weight: 850;
}

.recommendation-status-copy small {
  display: block;
  margin-top: 4px;
  color: #c2cad7;
  font-size: 11.5px;
  line-height: 15px;
}

.tune-screen {
  padding-bottom: 170px;
}

.tune-screen .app-header {
  margin-bottom: 14px;
}

.tune-preview,
.tune-help-card {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 18px;
  background: #101722;
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(0,0,0,.18);
}

.tune-preview {
  display: grid;
  gap: 12px;
}

.tune-preview h2,
.tune-help-card h2 {
  font-size: 15px;
  line-height: 20px;
  font-weight: 950;
}

.tune-preview p,
.tune-help-card p {
  margin-top: 4px;
  color: #c2cad7;
  font-size: 12.5px;
  line-height: 17px;
}

.tune-preview-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tune-preview-signals span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--topic) 40%, rgba(255,255,255,.14));
  border-radius: 999px;
  padding: 0 10px;
  background: color-mix(in srgb, var(--topic) 18%, #101722);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 900;
}

.tune-preview-signals .neutral {
  border-color: rgba(255,255,255,.12);
  background: #172033;
  color: #c2cad7;
}

.slider-controls {
  gap: 9px;
}

.tune-scale-labels {
  padding: 0 3px;
  margin: 0 0 2px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.tune-scale-labels span:nth-child(2) {
  text-align: center;
}

.tune-scale-labels span:last-child {
  text-align: right;
}

.category-control.slider-control {
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  padding: 12px;
  transition: border-color 180ms ease-in-out, background 180ms ease-in-out, transform 180ms ease-in-out;
}

.category-control.slider-control.is-more {
  border-color: color-mix(in srgb, var(--topic) 40%, rgba(255,255,255,.12));
  background: color-mix(in srgb, var(--topic) 10%, #101722);
}

.category-control.slider-control.is-less {
  border-color: rgba(255,255,255,.2);
  background: linear-gradient(135deg, rgba(255, 95, 124, .12), #101722 46%);
}

.category-control.slider-control:active {
  transform: scale(.995);
}

.slider-control .slider-title-row {
  margin-bottom: 7px;
}

.slider-control .slider-title-row strong {
  min-width: 72px;
  text-align: right;
}

.tune-slider {
  height: 32px;
}

.tune-slider::-webkit-slider-runnable-track {
  height: 9px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.18), rgba(255,255,255,.18)),
    linear-gradient(90deg, #ff5f7c 0 28%, rgba(255,255,255,.22) 28% 72%, var(--topic) 72% 100%);
}

.tune-slider::-webkit-slider-thumb {
  width: 30px;
  height: 30px;
  margin-top: -10.5px;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--topic) 16%, transparent), 0 10px 24px rgba(0,0,0,.38);
}

.tune-slider::-moz-range-track {
  height: 9px;
}

.preference-buttons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(255,255,255,.1);
}

.preference-buttons button .icon {
  width: 13px;
  height: 13px;
}

.preference-buttons .active.more {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--topic) 42%, transparent), 0 10px 24px color-mix(in srgb, var(--topic) 22%, transparent);
}

.preference-buttons .active.less {
  border-color: rgba(255,255,255,.2);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 10px 22px rgba(0,0,0,.28);
}

.teach-bar {
  grid-template-columns: 1fr minmax(86px, auto) 1.25fr;
}

.teach-bar span {
  white-space: normal;
  text-align: center;
  line-height: 15px;
}

.region-heading {
  gap: 10px;
  align-items: flex-start;
}

.region-heading small {
  max-width: 58%;
  text-align: right;
  line-height: 15px;
}

.card-context-menu {
  position: fixed;
  z-index: 90;
  left: min(var(--menu-x), calc(100vw - 190px));
  top: min(var(--menu-y), calc(100vh - 104px));
  width: 178px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  background: rgba(16, 23, 34, .98);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  backdrop-filter: blur(18px);
  animation: popoverMenu 160ms ease-in-out both;
}

.card-context-menu button {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 11px;
  padding: 0 10px;
  background: transparent;
  color: #dce5f2;
  text-align: left;
  font-size: 13px;
  font-weight: 850;
}

.card-context-menu button:first-child {
  background: #202b42;
  color: #ffffff;
}

.card-context-menu button + button {
  margin-top: 4px;
}

/* Native-feeling story controls */
.sheet-scrim {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 14px 82px;
  background: rgba(0, 0, 0, .44);
  backdrop-filter: blur(10px);
  animation: fade 160ms ease-in-out both;
}

.story-action-sheet {
  width: 100%;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 24px 24px 20px 20px;
  background: #101722;
  color: #ffffff;
  box-shadow: 0 -18px 70px rgba(0,0,0,.52);
  animation: sheetUp 190ms ease-in-out both;
}

.sheet-handle {
  width: 42px;
  height: 5px;
  margin: 10px auto 2px;
  border-radius: 999px;
  background: rgba(255,255,255,.24);
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 10px;
}

.sheet-header p {
  margin: 0 0 3px;
  color: #9fb0c8;
  font-size: 11px;
  line-height: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.sheet-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 23px;
  font-weight: 950;
}

.sheet-actions {
  display: grid;
  gap: 8px;
  padding: 0 10px 12px;
}

.sheet-action,
.sheet-cancel {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 11px 12px;
  background: #172033;
  color: #ffffff;
  text-align: left;
}

.sheet-action strong,
.sheet-action span {
  display: block;
}

.sheet-action strong {
  font-size: 14px;
  line-height: 18px;
  font-weight: 950;
}

.sheet-action span {
  margin-top: 3px;
  color: #c2cad7;
  font-size: 12px;
  line-height: 16px;
}

.sheet-action:active,
.sheet-cancel:active {
  transform: scale(.99);
}

.sheet-cancel {
  min-height: 48px;
  background: transparent;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
}

.more-action {
  color: #e8eef8;
}

.article-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast {
  left: 16px;
  right: 16px;
  bottom: 82px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(16, 23, 34, .96);
  color: #ffffff;
  backdrop-filter: blur(18px);
}

.toast > div {
  min-width: 0;
}

.toast button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  background: #007aff;
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
}

@keyframes sheetUp {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes popoverMenu {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Breaking carousel controls */
.carousel-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.carousel-controls button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  padding: 0;
  color: #f8fafc;
  background: #202838;
  opacity: 1;
}

.carousel-controls .icon {
  width: 16px;
  height: 16px;
}

.carousel-controls .next .icon {
  transform: rotate(180deg);
}

.breaking-strip {
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
}

.breaking-strip .news-card {
  scroll-snap-align: start;
}

.breaking-strip::after {
  content: "";
  width: 2px;
}

/* Main feed density: news first, controls second */
.brand-row {
  margin-bottom: 10px;
}

.brand-lockup {
  font-size: 14px;
}

.brand-mark {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  font-size: 12px;
}

.profile-dot {
  width: 34px;
  height: 34px;
}

.app-header h1 {
  font-size: 20px;
  line-height: 24px;
}

.eyebrow {
  margin-bottom: 3px;
  font-size: 12px;
}

.search-row {
  grid-template-columns: 1fr 36px;
  gap: 7px;
  margin-top: 9px;
  opacity: .82;
}

.search-box {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.055);
  color: #7f8796;
}

.search-box span {
  font-size: 15px;
}

.search-box .icon {
  width: 15px;
  height: 15px;
}

.search-box input {
  font-size: 12.5px;
}

.search-box input::placeholder {
  color: #7f8796;
}

.filter-button {
  min-height: 36px;
  border-radius: 12px;
  background: rgba(255,255,255,.055);
  color: #a9b0bd;
}

.filter-button .icon {
  width: 17px;
  height: 17px;
}

.section-title {
  margin: 12px 0 9px;
}

.section-title.compact {
  margin-top: 16px;
}

.section-title h2 {
  font-size: 16px;
  line-height: 21px;
}

.section-title button {
  min-height: 28px;
  font-size: 12px;
  opacity: .72;
}

.breaking-strip {
  grid-auto-columns: minmax(248px, 84%);
}

.breaking-strip .news-card {
  min-height: 254px;
}

.breaking-strip .thumb {
  min-height: 146px;
}

.breaking-strip .news-card h2 {
  font-size: 15.5px;
  line-height: 20px;
}

.feed-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped),
.compact-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped),
.news-card {
  grid-template-columns: 104px minmax(0, 1fr);
  min-height: 132px;
}

.feed-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped) .thumb,
.compact-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped) .thumb,
.news-card .thumb {
  min-height: 112px;
}

.card-topline {
  min-height: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  overflow: hidden;
}

.topic-tag,
.rec-label {
  flex: 0 0 auto;
  height: 23px;
  max-width: 116px;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rec-label {
  max-width: 88px;
}

.news-card.default .rec-label {
  display: none;
}

.news-card.adapted .card-topline,
.news-card.grouped .card-topline,
.compact-list .news-card .card-topline {
  justify-content: space-between;
}

.news-card h2 {
  font-size: 14px;
  line-height: 18.5px;
}

.feed-list .news-card p {
  display: block;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-actions {
  flex-wrap: nowrap;
}

/* Stable breaking-card labels */
.breaking-strip .news-card {
  overflow: hidden;
}

.breaking-strip .card-content {
  position: relative;
  margin-top: 10px;
}

.breaking-strip .card-topline {
  position: static;
  min-height: 23px;
  margin: 0 0 7px;
  pointer-events: auto;
}

.breaking-strip .topic-tag {
  max-width: 100%;
}

.breaking-strip .news-card h2 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Article post layout */
.article-screen {
  padding: 0 14px 30px;
  background: #090b0f;
}

.article-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  padding: 8px 0;
  background: linear-gradient(180deg, rgba(9, 11, 15, .96) 70%, rgba(9, 11, 15, 0));
}

.article-topbar .back-button {
  min-height: 38px;
  border-radius: 999px;
  background: rgba(20, 24, 32, .82);
  backdrop-filter: blur(14px);
}

.article-topbar .mini-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(20, 24, 32, .82);
  backdrop-filter: blur(14px);
}

.article-reader {
  margin: 0 -14px;
  background: #090b0f;
}

.article-hero {
  min-height: 210px;
  margin: -54px 0 0;
  padding: 0;
  border-radius: 0;
  background-image: linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.24)), var(--photo), var(--image), var(--visual);
  background-size: cover;
  background-position: center;
}

.article-body {
  padding: 15px 16px 34px;
}

.article-category {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: color-mix(in srgb, var(--topic) 82%, white);
  font-size: 11px;
  line-height: 14px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.article-topic-icon {
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: color-mix(in srgb, var(--topic) 82%, white);
  background: rgba(255,255,255,.06);
}

.article-topic-icon .icon {
  width: 11px;
  height: 11px;
}

.article-body h1 {
  margin-top: 9px;
  color: #f7f8fb;
  font-size: 19px;
  line-height: 24px;
  font-weight: 950;
}

.article-byline {
  margin-top: 8px;
  color: #c6ccd7;
  font-size: 12px;
  line-height: 17px;
  font-weight: 700;
}

.article-source {
  margin-top: 6px;
  color: #7f8796;
  font-size: 11.5px;
  line-height: 16px;
  font-weight: 700;
}

.article-why-block {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--topic) 28%, rgba(255,255,255,.12));
  border-radius: 16px;
  background: color-mix(in srgb, var(--topic) 12%, #121722);
}

.article-why-block h2 {
  margin: 0;
  color: #ffffff;
  font-size: 13px;
  line-height: 17px;
  font-weight: 950;
}

.article-why-block p {
  margin-top: 5px;
  color: #cbd3df;
  font-size: 12.5px;
  line-height: 17px;
}

.article-share-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 13px;
}

.article-share-row button,
.article-share-row a {
  min-width: 24px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: #d8dde7;
  background: transparent;
  font-size: 16px;
  line-height: 1;
  font-weight: 900;
  text-decoration: none;
}

.article-share-row .icon {
  width: 16px;
  height: 16px;
}

.article-body .article-lede {
  margin-top: 18px;
  color: #b8bfcc;
  font-size: 14px;
  line-height: 21px;
  font-weight: 500;
}

.article-body p:not(.article-source):not(.article-lede):not(.article-byline) {
  margin-top: 13px;
  color: #b8bfcc;
  font-size: 13.5px;
  line-height: 21px;
}

.article-inline-link {
  color: #dfe4ee;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-actions {
  margin-top: 24px;
}

.section-title .carousel-controls button {
  min-height: 30px;
  opacity: 1;
}

/* Story carousel safety override: controls stay on the image, not on text. */
.breaking-strip .card-content {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
}

.breaking-strip .news-card:first-child:not(.teach):not(.dragging):not(.grouped) .card-content,
.breaking-strip .news-card .card-content {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
}

.breaking-strip .card-meta {
  top: -130px;
  right: 0;
  bottom: auto;
  z-index: 4;
}

.breaking-strip .card-actions {
  gap: 6px;
}

.breaking-strip .card-actions .mini-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(5, 7, 12, .72);
}

.breaking-strip .topic-monogram {
  display: none;
}

/* Final slider color scale: applies after all Tune-specific rules. */
.reco-slider::-webkit-slider-runnable-track,
.tune-slider::-webkit-slider-runnable-track {
  height: 9px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.06)),
    linear-gradient(90deg, #ff453a 0 22%, #6f7785 22% 78%, #34c759 78% 100%);
}

.reco-slider::-moz-range-track,
.tune-slider::-moz-range-track {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff453a 0 22%, #6f7785 22% 78%, #34c759 78% 100%);
}
/* Final hierarchy override: tuning feedback stays visible without stealing the news feed. */
.recommendation-status-card {
  grid-template-columns: 36px minmax(0, 1fr) auto 32px !important;
  gap: 8px !important;
  padding: 12px !important;
  border-radius: 18px !important;
}

.recommendation-status-card .success-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 12px !important;
}

.recommendation-status-copy {
  min-width: 0;
}

.recommendation-status-copy h2 {
  font-size: 14px !important;
  line-height: 18px !important;
}

.recommendation-status-copy p {
  max-width: 100%;
  overflow: hidden;
  font-size: 12px !important;
  line-height: 16px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommendation-status-copy small {
  display: none !important;
}

.recommendation-status-card .primary-small {
  grid-column: 3 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  align-self: center !important;
  min-height: 36px !important;
  padding: 0 12px !important;
  white-space: nowrap;
}

.recommendation-status-card .status-dismiss {
  grid-column: 4 !important;
  grid-row: 1 !important;
  align-self: center !important;
  justify-self: end !important;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  transition-property: transform, background-color, color, box-shadow;
  transition-duration: 160ms;
  transition-timing-function: ease-in-out;
}

.recommendation-status-card .status-dismiss .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}

.recommendation-status-card .status-dismiss:active {
  transform: scale(.96);
}

.recommendation-status-card .status-dismiss:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .72);
  outline-offset: 2px;
}

/* Unified news-flow pass: no duplicate section labels, bigger tappable stories. */
.onboarding-skip {
  margin-top: 8px !important;
  border-color: rgba(255,255,255,.12) !important;
  background: rgba(255,255,255,.055) !important;
  color: #f7f8fb !important;
  box-shadow: none !important;
}

.onboarding-card > small {
  max-width: 28ch;
  margin-inline: auto;
}

.breaking-strip {
  grid-auto-columns: minmax(308px, 92%) !important;
  gap: 16px !important;
  margin-top: 18px !important;
  padding-bottom: 12px !important;
}

.breaking-strip .news-card {
  min-height: 300px !important;
  border-radius: 24px !important;
  cursor: pointer;
  box-shadow: 0 22px 50px rgba(0,0,0,.32), inset 0 0 0 1px rgba(255,255,255,.1) !important;
}

.breaking-strip .thumb {
  border-radius: 24px !important;
}

.breaking-strip .card-content,
.breaking-strip .news-card:first-child:not(.teach):not(.dragging):not(.grouped) .card-content,
.breaking-strip .news-card .card-content {
  left: 18px !important;
  right: 18px !important;
  bottom: 18px !important;
  gap: 9px !important;
}

.breaking-strip .topic-tag {
  height: 26px !important;
  max-width: 150px !important;
  padding-inline: 11px !important;
  font-size: 12px !important;
}

.breaking-strip .news-card h2 {
  font-size: 18px !important;
  line-height: 23px !important;
  -webkit-line-clamp: 3 !important;
}

.breaking-strip .news-card p {
  display: -webkit-box !important;
  color: rgba(255,255,255,.82) !important;
  font-size: 13.5px !important;
  line-height: 19px !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.topic-rail {
  margin-top: 12px !important;
  margin-bottom: 16px !important;
}

.feed-list {
  gap: 16px !important;
}

.feed-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped),
.compact-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped),
.feed-list .news-card {
  grid-template-columns: 118px minmax(0, 1fr) !important;
  gap: 14px !important;
  min-height: 158px !important;
  padding: 12px !important;
  border-radius: 22px !important;
  background: #111a28 !important;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(0,0,0,.24), inset 0 0 0 1px rgba(255,255,255,.075) !important;
}

.feed-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped) .thumb,
.compact-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped) .thumb,
.feed-list .news-card .thumb {
  min-height: 134px !important;
  border-radius: 16px !important;
}

.feed-list .news-card .card-content {
  gap: 8px !important;
}

.feed-list .news-card h2 {
  font-size: 16px !important;
  line-height: 21px !important;
}

.feed-list .news-card p {
  color: #c5ccd8 !important;
  font-size: 13.5px !important;
  line-height: 19px !important;
}

.feed-list .card-meta {
  margin-top: 8px !important;
  font-size: 12px !important;
  line-height: 16px !important;
}

.feed-list .news-card:active,
.breaking-strip .news-card:active {
  transform: scale(.985);
}

/* Reading-first article and quieter recommendation onboarding. */
.app-header:not(:has(h1)) {
  margin-bottom: 12px !important;
}

.app-header:not(:has(h1)) .brand-row {
  margin-bottom: 12px !important;
}

.compact-hint {
  padding: 0 !important;
  overflow: hidden;
  background: rgba(255,255,255,.04) !important;
}

.compact-hint summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  color: #eef2f8;
  cursor: pointer;
  font-size: 13px;
  line-height: 18px;
  font-weight: 900;
  list-style: none;
}

.compact-hint summary::-webkit-details-marker {
  display: none;
}

.compact-hint summary::after {
  content: "+";
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #c8d0df;
  font-size: 18px;
  line-height: 1;
  transition: transform 180ms ease-in-out, background-color 180ms ease-in-out;
}

.compact-hint[open] summary::after {
  transform: rotate(45deg);
  background: rgba(0,122,255,.22);
}

.compact-hint ol,
.compact-hint .hint-microcopy {
  margin-inline: 14px !important;
}

.compact-hint .hint-microcopy {
  margin-bottom: 14px;
}

.article-topbar {
  padding-top: 10px !important;
}

.article-topbar .back-button,
.article-topbar .mini-button {
  background: rgba(12, 16, 24, .72) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08) !important;
}

.article-body h1 {
  max-width: 24ch !important;
  font-size: 25px !important;
  line-height: 31px !important;
}

.article-body .article-lede {
  color: #e3e8f1 !important;
  font-size: 15.5px !important;
  line-height: 23px !important;
}

.article-hero {
  min-height: 252px !important;
  border-radius: 22px !important;
}

.article-body p:not(.article-source):not(.article-lede):not(.article-byline) {
  color: #cad1dc !important;
  font-size: 15px !important;
  line-height: 24px !important;
}

.article-related {
  margin-top: 30px;
}

.article-related-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.article-related-header h2 {
  color: #ffffff;
  font-size: 18px;
  line-height: 23px;
  font-weight: 950;
}

.article-related-header span {
  color: #8f98a8;
  font-size: 11.5px;
  line-height: 15px;
  font-weight: 750;
}

.article-related-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(248px, 78%);
  gap: 14px;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 0 16px 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.article-related-strip::-webkit-scrollbar {
  display: none;
}

.related-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: #111a28;
  cursor: pointer;
  scroll-snap-align: start;
  box-shadow: 0 18px 38px rgba(0,0,0,.24), inset 0 0 0 1px rgba(255,255,255,.08);
  transition: transform 180ms ease-in-out, box-shadow 180ms ease-in-out;
}

.related-card:active {
  transform: scale(.985);
}

.related-thumb {
  min-height: 124px;
  background-image: linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.22)), var(--photo), var(--image), var(--visual);
  background-size: cover;
  background-position: center;
  outline: 1px solid rgba(255,255,255,.1);
  outline-offset: -1px;
}

.related-copy {
  display: grid;
  gap: 8px;
  padding: 13px;
}

.related-copy h3 {
  color: #ffffff;
  font-size: 15px;
  line-height: 20px;
  font-weight: 950;
}

.related-copy p,
.related-copy small {
  color: #aeb7c6;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}

/* UX repair: search, filters, settings, and status states */
.network-banner {
  position: absolute;
  z-index: 95;
  top: 12px;
  left: 16px;
  right: 16px;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255, 149, 0, .96);
  color: #111827;
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .28);
}

.search-box {
  position: relative;
  padding-right: 8px !important;
}

.search-box input {
  min-width: 0;
}

.search-clear {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
  transition-property: transform, background-color, color;
  transition-duration: 160ms;
  transition-timing-function: ease-in-out;
}

.search-clear:active {
  transform: scale(.96);
}

.search-clear .icon {
  width: 15px;
  height: 15px;
}

.filter-button {
  position: relative;
  display: grid;
  place-items: center;
  transition-property: transform, background-color, color, box-shadow;
  transition-duration: 170ms;
  transition-timing-function: ease-in-out;
}

.filter-button.is-active {
  background: rgba(0, 122, 255, .24) !important;
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(0, 122, 255, .55) inset, 0 12px 30px rgba(0, 122, 255, .16);
}

.filter-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #05070c;
  border-radius: 999px;
  background: #007aff;
  color: #ffffff;
  font-size: 10px;
  line-height: 1;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.active-filters-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  margin: 12px 0 14px;
  padding: 10px 10px 10px 12px;
  border-radius: 16px;
  background: #111a28;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 12px 28px rgba(0,0,0,.2);
}

.active-filter-copy {
  min-width: 0;
}

.active-filter-copy strong,
.active-filter-copy span {
  display: block;
}

.active-filter-copy strong {
  color: #ffffff;
  font-size: 12px;
  line-height: 16px;
  font-weight: 950;
}

.active-filter-copy span {
  overflow: hidden;
  margin-top: 1px;
  color: #aeb7c6;
  font-size: 11px;
  line-height: 15px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-text-button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 122, 255, .2);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  transition-property: transform, background-color, color;
  transition-duration: 160ms;
  transition-timing-function: ease-in-out;
}

.mini-text-button.quiet {
  background: rgba(255,255,255,.08);
  color: #c8d0dc;
}

.mini-text-button:active {
  transform: scale(.96);
}

.filter-sheet {
  max-height: min(730px, calc(100% - 22px));
  overflow-y: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.filter-sheet::-webkit-scrollbar {
  display: none;
}

.filter-sheet-note {
  margin: 4px 10px 14px;
  color: #aeb7c6;
  font-size: 12px;
  line-height: 17px;
  font-weight: 700;
}

.filter-option-group {
  margin: 0 10px 14px;
}

.filter-option-group h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 13px;
  line-height: 17px;
  font-weight: 950;
}

.filter-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.filter-option-grid button {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  border: 0;
  border-radius: 13px;
  background: rgba(255,255,255,.07);
  color: #dce5f2;
  font-size: 12px;
  line-height: 15px;
  font-weight: 850;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  transition-property: transform, background-color, color, box-shadow;
  transition-duration: 170ms;
  transition-timing-function: ease-in-out;
}

.filter-option-grid button.selected {
  background: rgba(0, 122, 255, .22);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(0, 122, 255, .56), 0 12px 30px rgba(0, 122, 255, .12);
}

.filter-option-grid button:active {
  transform: scale(.97);
}

.filter-option-grid .icon {
  width: 15px;
  height: 15px;
}

.filter-sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
  margin: 4px 10px 10px;
}

.filter-sheet-actions .primary-button,
.filter-sheet-actions .secondary-button {
  min-height: 48px;
}

.settings-action-card {
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  padding: 14px;
  border-radius: 18px;
  background: #111a28;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 12px 28px rgba(0,0,0,.18);
}

.settings-action-card strong,
.settings-action-card small {
  display: block;
}

.settings-action-card strong {
  color: #ffffff;
  font-size: 14px;
  line-height: 18px;
  font-weight: 950;
}

.settings-action-card small {
  margin-top: 4px;
  color: #aeb7c6;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}

.settings-action-card .secondary-button {
  min-height: 40px;
  padding: 0 14px;
}

.phone-shell.theme-contrast {
  --bg: #02040a;
  --card: #101522;
  --elevated: #182030;
  --secondary: #d7deea;
  --border: rgba(255,255,255,.18);
  background: #02040a;
}

.phone-shell.theme-contrast .screen,
.phone-shell.theme-contrast .settings-screen,
.phone-shell.theme-contrast .utility-screen,
.phone-shell.theme-contrast .article-screen {
  background: #02040a !important;
}

.phone-shell.theme-contrast .news-card,
.phone-shell.theme-contrast .settings-action-card,
.phone-shell.theme-contrast .active-filters-bar,
.phone-shell.theme-contrast .story-action-sheet {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 18px 38px rgba(0,0,0,.34);
}

.phone-shell.motion-reduced *,
.phone-shell.motion-reduced *::before,
.phone-shell.motion-reduced *::after {
  animation-duration: 1ms !important;
  transition-duration: 1ms !important;
  scroll-behavior: auto !important;
}

/* Reliable horizontal story carousels */
.story-carousel {
  margin-top: 18px;
}

.story-carousel-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.story-carousel-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  line-height: 23px;
  font-weight: 950;
  letter-spacing: 0;
  text-wrap: balance;
}

.story-carousel-header span {
  display: block;
  margin-top: 2px;
  color: #8f98a8;
  font-size: 11.5px;
  line-height: 15px;
  font-weight: 750;
  text-wrap: pretty;
}

.horizontal-carousel-track {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  touch-action: pan-x pan-y;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}

.horizontal-carousel-track::-webkit-scrollbar {
  display: none;
}

.horizontal-carousel-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.horizontal-carousel-track > * {
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  flex: 0 0 auto;
}

.story-carousel .carousel-controls {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.story-carousel .carousel-controls button {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.09), 0 10px 24px rgba(0,0,0,.22);
  transition-property: transform, opacity, background-color, color, box-shadow;
  transition-duration: 170ms;
  transition-timing-function: ease-in-out;
}

.story-carousel .carousel-controls button:not(:disabled):hover {
  background: rgba(255,255,255,.14);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 12px 28px rgba(0,0,0,.28);
}

.story-carousel .carousel-controls button:not(:disabled):active {
  transform: scale(.96);
}

.story-carousel .carousel-controls button:disabled {
  opacity: .35;
  cursor: default;
}

.story-carousel .carousel-controls .icon {
  width: 18px;
  height: 18px;
}

.story-carousel .carousel-controls .next .icon {
  transform: rotate(180deg);
}

.home-carousel .breaking-strip {
  grid-auto-columns: minmax(268px, 84%) !important;
  gap: 14px !important;
  margin: 0 -16px !important;
  margin-top: 0 !important;
  padding: 0 16px 10px !important;
}

.home-carousel {
  margin-top: 12px !important;
}

.screen > .topic-rail {
  margin-top: 10px !important;
  margin-bottom: 12px !important;
  padding-bottom: 0 !important;
}

.home-carousel .breaking-strip::after {
  content: "";
  width: 1px;
}

.home-carousel .breaking-strip .news-card {
  min-height: 292px !important;
}

.home-carousel .breaking-strip .news-card p {
  -webkit-line-clamp: 2 !important;
}

.article-related.story-carousel {
  margin-top: 30px;
}

.article-related .article-related-strip {
  grid-auto-columns: minmax(236px, 78%) !important;
  gap: 14px !important;
  margin: 0 -16px !important;
  padding: 0 16px 10px !important;
}

.article-related .related-card {
  min-height: 252px;
}

@media (max-width: 340px) {
  .home-carousel .breaking-strip {
    grid-auto-columns: minmax(246px, 84%) !important;
  }

  .story-carousel-header {
    align-items: start;
  }

  .story-carousel .carousel-controls button {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
  }

  .article-related .article-related-strip {
    grid-auto-columns: minmax(220px, 78%) !important;
  }
}

/* Minimal black / white product polish */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background:
    radial-gradient(circle at 50% 16%, rgba(255,255,255,.08), transparent 24rem),
    #020202;
}

.phone-shell.theme-black,
.phone-shell.theme-contrast {
  --bg: #000000;
  --card: #101010;
  --elevated: #171717;
  --text: #ffffff;
  --secondary: #d6d6d6;
  --border: rgba(255,255,255,.16);
  color-scheme: dark;
  background: #000000;
  color: #ffffff;
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 30px 90px rgba(0,0,0,.72), inset 0 0 0 1px rgba(255,255,255,.06);
}

.phone-shell.theme-black .screen,
.phone-shell.theme-black .settings-screen,
.phone-shell.theme-black .utility-screen,
.phone-shell.theme-black .article-screen,
.phone-shell.theme-black .article-reader,
.phone-shell.theme-contrast .screen,
.phone-shell.theme-contrast .settings-screen,
.phone-shell.theme-contrast .utility-screen,
.phone-shell.theme-contrast .article-screen,
.phone-shell.theme-contrast .article-reader {
  background: #000000 !important;
  color: #ffffff;
}

.phone-shell.theme-black .news-card,
.phone-shell.theme-black .settings-toggle,
.phone-shell.theme-black .settings-action-card,
.phone-shell.theme-black .category-control.slider-control,
.phone-shell.theme-black .story-action-sheet,
.phone-shell.theme-black .search-box,
.phone-shell.theme-black .filter-button,
.phone-shell.theme-black .topic-chip,
.phone-shell.theme-black .bottom-nav,
.phone-shell.theme-contrast .news-card,
.phone-shell.theme-contrast .settings-toggle,
.phone-shell.theme-contrast .settings-action-card,
.phone-shell.theme-contrast .category-control.slider-control,
.phone-shell.theme-contrast .story-action-sheet,
.phone-shell.theme-contrast .search-box,
.phone-shell.theme-contrast .filter-button,
.phone-shell.theme-contrast .topic-chip,
.phone-shell.theme-contrast .bottom-nav {
  background-color: #101010;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.13), 0 14px 34px rgba(0,0,0,.36);
}

.phone-shell.theme-black .brand-mark,
.phone-shell.theme-contrast .brand-mark {
  background: #ffffff;
  color: #000000;
}

.settings-screen {
  padding-top: 14px;
}

.settings-screen .utility-header {
  margin-bottom: 14px;
}

.settings-screen .utility-header h1 {
  margin-top: 4px;
  font-size: 26px;
  line-height: 31px;
  text-wrap: balance;
}

.settings-screen section {
  margin-top: 20px;
}

.settings-screen h2 {
  margin: 0 0 9px;
  font-size: 17px;
  line-height: 22px;
  font-weight: 950;
}

.settings-toggle,
.settings-action-card {
  min-height: 62px;
  padding: 12px 14px;
  border-radius: 18px;
}

.settings-toggle {
  grid-template-columns: minmax(0, 1fr) auto;
}

.settings-action-card strong,
.settings-toggle strong {
  font-size: 14px;
  line-height: 18px;
}

.settings-action-card small,
.settings-toggle small {
  display: none;
}

.tune-title {
  margin: 14px 0 0;
  color: #ffffff;
  font-size: 27px;
  line-height: 32px;
  font-weight: 950;
  text-wrap: balance;
}

.tune-screen {
  padding-bottom: 156px;
}

.tune-screen .app-header {
  margin-bottom: 18px;
}

.tune-screen .category-controls {
  margin-top: 2px;
}

.article-share-row {
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.article-share-row button,
.article-share-row a {
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: #f7f7f7;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.09);
  transition-property: transform, background-color, color, box-shadow;
  transition-duration: 160ms;
  transition-timing-function: ease-in-out;
}

.article-share-row button:active,
.article-share-row a:active {
  transform: scale(.96);
}

.article-share-row .article-source-link {
  margin-left: auto;
  width: auto;
  min-width: 0;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
}

.article-share-row .article-source-link .icon {
  width: 14px;
  height: 14px;
}

.article-actions {
  display: none;
}

.article-body h1 {
  text-wrap: balance;
}

.article-body .article-lede,
.article-body p:not(.article-source):not(.article-lede):not(.article-byline) {
  text-wrap: pretty;
}

/* Full-photo story cards with stable topic tags */
.topic-tag {
  height: 26px !important;
  min-height: 26px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
  font-size: 11.5px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  text-wrap: nowrap !important;
}

.card-topline {
  min-height: 26px !important;
  align-items: center !important;
}

.home-carousel .breaking-strip {
  grid-auto-columns: minmax(282px, 86%) !important;
  gap: 14px !important;
}

.home-carousel .breaking-strip .news-card.is-breaking {
  position: relative !important;
  display: block !important;
  min-height: 334px !important;
  height: 334px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 24px !important;
  background: #050505 !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.11),
    0 24px 56px rgba(0,0,0,.42) !important;
}

.home-carousel .breaking-strip .news-card.is-breaking .thumb {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  min-height: 100% !important;
  height: 100% !important;
  border-radius: inherit !important;
  background-image: var(--photo), var(--image), var(--visual) !important;
  background-size: cover !important;
  background-position: center !important;
  outline: 1px solid rgba(255,255,255,.1) !important;
  outline-offset: -1px !important;
  transform: scale(1.015);
}

.home-carousel .breaking-strip .news-card.is-breaking .thumb::before {
  background:
    linear-gradient(180deg, rgba(0,0,0,.06) 0%, rgba(0,0,0,.18) 42%, rgba(0,0,0,.62) 72%, rgba(0,0,0,.9) 100%),
    linear-gradient(90deg, rgba(0,0,0,.46) 0%, rgba(0,0,0,.18) 48%, rgba(0,0,0,.36) 100%) !important;
}

.home-carousel .breaking-strip .news-card.is-breaking .thumb::after {
  opacity: 1 !important;
  background:
    radial-gradient(circle at 22% 76%, rgba(0,0,0,.72), transparent 46%),
    linear-gradient(180deg, transparent 18%, rgba(0,0,0,.24) 50%, rgba(0,0,0,.92) 100%) !important;
}

.home-carousel .breaking-strip .news-card.is-breaking .topic-monogram {
  display: none !important;
}

.home-carousel .breaking-strip .news-card.is-breaking .card-content,
.home-carousel .breaking-strip .news-card.is-breaking:first-child:not(.teach):not(.dragging):not(.grouped) .card-content {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 16px !important;
  pointer-events: none;
}

.home-carousel .breaking-strip .news-card.is-breaking .card-content h2,
.home-carousel .breaking-strip .news-card.is-breaking .card-content p,
.home-carousel .breaking-strip .news-card.is-breaking .headline-link {
  pointer-events: auto;
}

.home-carousel .breaking-strip .news-card.is-breaking .card-topline {
  position: absolute !important;
  top: 16px !important;
  left: 16px !important;
  right: 16px !important;
  z-index: 3 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  pointer-events: none;
}

.home-carousel .breaking-strip .news-card.is-breaking .topic-tag {
  max-width: calc(100% - 32px) !important;
  background: color-mix(in srgb, var(--topic) 68%, rgba(0,0,0,.68)) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.22),
    0 8px 22px rgba(0,0,0,.34) !important;
  backdrop-filter: blur(12px);
}

.home-carousel .breaking-strip .news-card.is-breaking .rec-label,
.home-carousel .breaking-strip .news-card.is-breaking .card-meta,
.home-carousel .breaking-strip .news-card.is-breaking .card-actions {
  display: none !important;
}

.home-carousel .breaking-strip .news-card.is-breaking h2 {
  margin-top: auto !important;
  max-width: 96% !important;
  color: #ffffff !important;
  font-size: 19px !important;
  line-height: 24px !important;
  font-weight: 950 !important;
  text-shadow: 0 2px 18px rgba(0,0,0,.76) !important;
  text-wrap: balance;
}

.home-carousel .breaking-strip .news-card.is-breaking .headline-link {
  color: #ffffff !important;
}

.home-carousel .breaking-strip .news-card.is-breaking p {
  display: -webkit-box !important;
  max-width: 96% !important;
  color: rgba(255,255,255,.86) !important;
  font-size: 13.5px !important;
  line-height: 19px !important;
  text-shadow: 0 2px 14px rgba(0,0,0,.82) !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-wrap: pretty;
}

@media (max-width: 340px) {
  .home-carousel .breaking-strip .news-card.is-breaking {
    min-height: 312px !important;
    height: 312px !important;
  }

  .home-carousel .breaking-strip .news-card.is-breaking h2 {
    font-size: 17px !important;
    line-height: 22px !important;
  }
}

/* Dark editorial article reader */
.phone-shell .article-screen,
.phone-shell.theme-black .article-screen,
.phone-shell.theme-contrast .article-screen {
  padding: 0 0 44px !important;
  background: #000000 !important;
  color: #ffffff !important;
}

.phone-shell .article-reader,
.phone-shell.theme-black .article-reader,
.phone-shell.theme-contrast .article-reader {
  margin: 0 !important;
  background: #000000 !important;
  color: #ffffff !important;
}

.article-topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  min-height: 58px !important;
  padding: 8px 14px !important;
  background: linear-gradient(180deg, rgba(0,0,0,.94) 72%, rgba(0,0,0,0)) !important;
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
}

.article-topbar .back-button,
.article-topbar .mini-button {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.09) !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 10px 28px rgba(0,0,0,.28) !important;
  transition-property: transform, background-color, box-shadow !important;
  transition-duration: 160ms !important;
  transition-timing-function: ease-in-out !important;
}

.article-topbar .back-button {
  font-size: 0 !important;
}

.article-topbar .back-button .icon,
.article-topbar .mini-button .icon {
  width: 20px !important;
  height: 20px !important;
}

.article-topbar .back-button:active,
.article-topbar .mini-button:active {
  transform: scale(.96);
}

.article-body {
  display: flex !important;
  flex-direction: column !important;
  padding: 0 18px 40px !important;
  background: #000000 !important;
  color: #ffffff !important;
}

.article-hero {
  order: 1;
  position: relative !important;
  min-height: 304px !important;
  margin: 0 -18px 22px !important;
  overflow: hidden !important;
  border-radius: 0 0 24px 24px !important;
  background-image: var(--photo), var(--image), var(--visual) !important;
  background-size: cover !important;
  background-position: center !important;
  outline: 1px solid rgba(255,255,255,.1) !important;
  outline-offset: -1px !important;
  box-shadow: 0 18px 42px rgba(0,0,0,.45);
}

.article-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.03), rgba(0,0,0,.32));
}

.article-category {
  order: 2;
  min-height: 20px !important;
  margin-top: 2px !important;
  color: var(--topic) !important;
  font-family: var(--font-display) !important;
  font-size: 11px !important;
  line-height: 14px !important;
  font-weight: 900 !important;
  letter-spacing: .02em !important;
  text-transform: none !important;
}

.article-topic-icon {
  display: none !important;
}

.article-body h1 {
  order: 3;
  margin-top: 8px !important;
  color: #ffffff !important;
  font-family: var(--font-display) !important;
  font-size: 34px !important;
  line-height: 36px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  text-wrap: balance;
}

.article-body .article-lede {
  order: 4;
  margin-top: 14px !important;
  color: #d6d6dc !important;
  font-family: var(--font-ui) !important;
  font-size: 17px !important;
  line-height: 25px !important;
  font-weight: 550 !important;
  text-wrap: pretty;
}

.article-byline {
  order: 5;
  margin-top: 18px !important;
  color: #b7b7bf !important;
  font-family: var(--font-ui) !important;
  font-size: 12px !important;
  line-height: 17px !important;
  font-weight: 750 !important;
}

.article-source {
  order: 6;
  margin-top: 4px !important;
  color: #8e8e98 !important;
  font-family: var(--font-ui) !important;
  font-size: 11.5px !important;
  line-height: 16px !important;
  font-weight: 650 !important;
}

.article-why-block {
  order: 7;
}

.article-body > p:not(.article-source):not(.article-lede):not(.article-byline) {
  order: 8;
  margin-top: 20px !important;
  color: #f0f0f3 !important;
  font-family: var(--font-ui) !important;
  font-size: 18px !important;
  line-height: 29px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-wrap: pretty;
}

.article-inline-link {
  color: #ffffff !important;
  text-decoration-color: rgba(255,255,255,.34) !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 4px !important;
}

.article-share-row {
  order: 9;
  margin-top: 28px !important;
  padding-top: 18px !important;
  border-top: 1px solid rgba(255,255,255,.1) !important;
}

.article-share-row button,
.article-share-row a {
  min-width: 40px !important;
  height: 40px !important;
  background: rgba(255,255,255,.08) !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12) !important;
}

.article-share-row .article-source-link {
  padding: 0 14px !important;
  font-family: var(--font-ui) !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

.article-related.story-carousel {
  order: 10;
  margin-top: 34px !important;
}

.article-related .story-carousel-header h2 {
  color: #ffffff !important;
  font-family: var(--font-display) !important;
  font-size: 22px !important;
  line-height: 27px !important;
}

.article-related .story-carousel-header span {
  color: #a1a1aa !important;
}

.article-related .carousel-controls button {
  background: rgba(255,255,255,.08) !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12) !important;
}

.article-related .related-card {
  background: #11131a !important;
  color: #ffffff !important;
  border-radius: 18px !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 12px 30px rgba(0,0,0,.35) !important;
}

.article-related .related-card h3 {
  color: #ffffff !important;
  font-family: var(--font-display) !important;
  font-size: 20px !important;
  line-height: 24px !important;
  letter-spacing: 0 !important;
}

.article-related .related-card p {
  color: #b8b8c0 !important;
}

.article-related .related-copy p,
.article-related .related-copy small {
  color: #b8b8c0 !important;
  opacity: 1 !important;
  font-family: var(--font-ui) !important;
  font-size: 13px !important;
  line-height: 18px !important;
  font-weight: 750 !important;
}

@media (max-width: 340px) {
  .article-body h1 {
    font-size: 29px !important;
    line-height: 32px !important;
  }

  .article-hero {
    min-height: 250px !important;
  }
}

/* Unified typography system */
html,
body,
.phone-shell,
button,
input,
.app-header,
.bottom-nav,
.settings-screen,
.tune-screen,
.utility-screen,
.story-action-sheet,
.survey-screen,
.onboarding-overlay,
.news-card,
.topic-chip,
.filter-sheet,
.toast {
  font-family: var(--font-ui) !important;
}

.brand-lockup strong,
.app-header h1,
.utility-header h1,
.settings-screen h1,
.settings-screen h2,
.section-title h2,
.story-carousel-header h2,
.news-card h2,
.headline-link,
.profile-card h2,
.tune-title,
.story-action-sheet h2,
.empty-state h2 {
  font-family: var(--font-display) !important;
  letter-spacing: 0 !important;
}

.news-card h2,
.headline-link {
  font-weight: 850 !important;
}

.news-card p,
.card-meta,
.topic-tag,
.rec-label,
.bottom-nav small,
.settings-toggle,
.settings-action-card,
.sheet-actions,
.filter-option-grid button {
  font-family: var(--font-ui) !important;
  letter-spacing: 0 !important;
}

.article-category,
.article-body .article-lede,
.article-byline,
.article-source,
.article-share-row,
.article-related .story-carousel-header h2,
.article-related .story-carousel-header span,
.article-related .related-copy p,
.article-related .related-copy small {
  font-family: var(--font-ui) !important;
  letter-spacing: 0 !important;
}

.article-body h1,
.article-related .related-card h3 {
  font-family: var(--font-display) !important;
  letter-spacing: 0 !important;
}

.article-body > p:not(.article-source):not(.article-lede):not(.article-byline) {
  font-family: var(--font-ui) !important;
  letter-spacing: 0 !important;
}

.article-body h1 {
  font-weight: 800 !important;
}

.article-body > p:not(.article-source):not(.article-lede):not(.article-byline) {
  font-weight: 400 !important;
}

.article-related .related-card h3 {
  font-weight: 800 !important;
}

.status-bar,
.filter-count {
  font-variant-numeric: tabular-nums;
}

/* Navigation simplification: profile owns settings and saved stories. */
.app-header {
  display: block !important;
  margin-bottom: 12px !important;
}

.brand-row {
  width: 100% !important;
  min-height: 30px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  margin-bottom: 10px !important;
}

.brand-lockup {
  min-height: 30px;
}

.search-row {
  grid-template-columns: minmax(0, 1fr) 44px !important;
  gap: 8px !important;
  margin-top: 0 !important;
  opacity: 1 !important;
}

.search-action-button {
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: #101010;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.13), 0 14px 34px rgba(0,0,0,.28);
  transition-property: transform, background-color, color, box-shadow;
  transition-duration: 170ms;
  transition-timing-function: ease-in-out;
}

.search-action-button:hover {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 14px 34px rgba(0,0,0,.34);
}

.search-action-button .icon {
  width: 18px;
  height: 18px;
}

.app-header .topic-rail {
  margin: 10px -18px 0 !important;
  padding: 0 18px 4px !important;
}

.app-header .topic-chip {
  min-height: 36px;
  padding: 0 14px !important;
}

.bottom-nav {
  grid-template-columns: repeat(2, 1fr) !important;
}

.profile-actions {
  margin-top: 14px;
}

.profile-tune-button {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .18),
    0 16px 34px rgba(0, 122, 255, .24);
}

.profile-tune-button:active {
  transform: scale(.96);
}

.profile-saved-section {
  margin-top: 20px;
}

.profile-section-header {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.profile-section-header h2 {
  color: #ffffff;
  font-size: 18px;
  line-height: 23px;
  font-weight: 900;
  text-wrap: balance;
}

.profile-section-header span {
  min-width: 30px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255,255,255,.09);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.profile-empty-state {
  margin-top: 0 !important;
  min-height: 118px !important;
}

.profile-saved-list {
  gap: 12px !important;
}

.profile-saved-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped),
.profile-saved-list .news-card {
  min-height: 156px !important;
}

.profile-saved-list .news-card:first-child:not(.teach):not(.dragging):not(.grouped) .thumb,
.profile-saved-list .news-card .thumb {
  min-height: 132px !important;
}

/* Consistent news typography and icon-first search. */
.brand-row {
  justify-content: space-between !important;
}

.search-action-button {
  flex: 0 0 44px;
}

.search-action-button.is-active {
  background: rgba(0, 122, 255, .2);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(0,122,255,.5), 0 14px 34px rgba(0,122,255,.16);
}

.article-body h1 {
  font-family: var(--font-display) !important;
  font-size: 33px !important;
  line-height: 37px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

.article-body > p:not(.article-source):not(.article-lede):not(.article-byline) {
  font-family: var(--font-ui) !important;
  font-size: 16.5px !important;
  line-height: 27px !important;
  font-weight: 520 !important;
  letter-spacing: 0 !important;
}

.article-related .related-card h3 {
  font-family: var(--font-display) !important;
  font-size: 18px !important;
  line-height: 23px !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
}

/* Search popup and unified dark news grid. */
.search-popup-backdrop {
  position: absolute;
  inset: 0;
  z-index: 42;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(18px);
  animation: fade 160ms ease-out both;
}

.search-popup {
  width: 100%;
  max-height: calc(100% - 18px);
  overflow-y: auto;
  padding: 16px;
  border-radius: 26px;
  background: #0c0d10;
  color: #ffffff;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.12),
    0 28px 70px rgba(0,0,0,.58);
  animation: sheetIn 190ms ease-out both;
}

.search-popup-header {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.search-popup-header h2 {
  color: #ffffff;
  font-size: 22px;
  line-height: 27px;
  font-weight: 950;
  letter-spacing: 0;
  text-wrap: balance;
}

.search-popup-close {
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  transition-property: transform, background-color, color, box-shadow;
  transition-duration: 170ms;
  transition-timing-function: ease-in-out;
}

.search-popup-close .icon {
  width: 18px;
  height: 18px;
}

.search-popup-input {
  min-height: 52px !important;
  padding: 0 14px !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,.07) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12) !important;
}

.search-popup-input input {
  font-size: 15px !important;
}

.search-popup .topic-rail {
  margin: 14px -16px 0 !important;
  padding: 0 16px 4px !important;
}

.search-popup-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.filter-chip-button,
.filter-reset-button {
  min-height: 44px;
  border: 0;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  background: rgba(255,255,255,.08);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  font-size: 13px;
  font-weight: 900;
  transition-property: transform, background-color, color, box-shadow;
  transition-duration: 170ms;
  transition-timing-function: ease-in-out;
}

.filter-chip-button {
  flex: 1 1 auto;
}

.filter-chip-button.is-active {
  background: rgba(0,122,255,.22);
  box-shadow: inset 0 0 0 1px rgba(0,122,255,.54), 0 14px 34px rgba(0,122,255,.16);
}

.filter-chip-button .icon {
  width: 17px;
  height: 17px;
}

.filter-chip-button b {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #007aff;
  color: #ffffff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.filter-reset-button {
  flex: 0 0 auto;
  padding: 0 12px;
  color: #d9dfeb;
}

.news-grid.feed-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.news-grid .compact-empty {
  grid-column: 1 / -1;
}

.news-grid .news-card.is-featured,
.news-grid .news-card.is-grid {
  position: relative !important;
  display: block !important;
  min-height: 244px !important;
  height: 244px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 22px !important;
  background: #050505 !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.1),
    0 18px 42px rgba(0,0,0,.36) !important;
}

.news-grid .news-card.is-featured {
  grid-column: 1 / -1;
  min-height: 356px !important;
  height: 356px !important;
  border-radius: 26px !important;
}

.news-grid .news-card.is-featured .thumb,
.news-grid .news-card.is-grid .thumb {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  min-height: 100% !important;
  height: 100% !important;
  border-radius: inherit !important;
  background-image: var(--photo), var(--image), var(--visual) !important;
  background-size: cover !important;
  background-position: center !important;
  outline: 1px solid rgba(255,255,255,.1) !important;
  outline-offset: -1px !important;
  transform: scale(1.018);
}

.news-grid .news-card.is-featured .thumb::before,
.news-grid .news-card.is-grid .thumb::before {
  background:
    linear-gradient(180deg, rgba(0,0,0,.08) 0%, rgba(0,0,0,.24) 38%, rgba(0,0,0,.7) 78%, rgba(0,0,0,.94) 100%),
    linear-gradient(90deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,.12) 50%, rgba(0,0,0,.44) 100%) !important;
}

.news-grid .news-card.is-featured .thumb::after,
.news-grid .news-card.is-grid .thumb::after {
  opacity: 1 !important;
  background:
    radial-gradient(circle at 24% 76%, rgba(0,0,0,.7), transparent 48%),
    linear-gradient(180deg, transparent 18%, rgba(0,0,0,.3) 52%, rgba(0,0,0,.92) 100%) !important;
}

.news-grid .news-card.is-featured .topic-monogram,
.news-grid .news-card.is-grid .topic-monogram {
  display: none !important;
}

.news-grid .news-card.is-featured .card-content,
.news-grid .news-card.is-grid .card-content,
.news-grid .news-card.is-featured:first-child:not(.teach):not(.dragging):not(.grouped) .card-content,
.news-grid .news-card.is-grid:first-child:not(.teach):not(.dragging):not(.grouped) .card-content {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  gap: 7px !important;
  margin: 0 !important;
  padding: 14px !important;
  pointer-events: none;
}

.news-grid .news-card.is-featured .card-content {
  gap: 9px !important;
  padding: 18px !important;
}

.news-grid .news-card.is-featured .card-topline,
.news-grid .news-card.is-grid .card-topline {
  position: absolute !important;
  top: 14px !important;
  left: 14px !important;
  right: 14px !important;
  z-index: 4 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  pointer-events: none;
}

.news-grid .news-card.is-featured .topic-tag,
.news-grid .news-card.is-grid .topic-tag {
  background: color-mix(in srgb, var(--topic) 68%, rgba(0,0,0,.72)) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.22),
    0 8px 22px rgba(0,0,0,.34) !important;
  backdrop-filter: blur(12px);
}

.news-grid .news-card.is-featured .rec-label,
.news-grid .news-card.is-grid .rec-label,
.news-grid .news-card.is-featured .card-meta > span,
.news-grid .news-card.is-grid .card-meta > span {
  display: none !important;
}

.news-grid .news-card.is-featured h2,
.news-grid .news-card.is-grid h2,
.news-grid .news-card.is-featured .headline-link,
.news-grid .news-card.is-grid .headline-link,
.news-grid .news-card.is-featured p,
.news-grid .news-card.is-grid p {
  color: #ffffff !important;
  pointer-events: auto;
  text-shadow: 0 2px 16px rgba(0,0,0,.72) !important;
}

.news-grid .news-card.is-featured h2 {
  max-width: 94% !important;
  font-size: 23px !important;
  line-height: 28px !important;
  font-weight: 950 !important;
  text-wrap: balance;
}

.news-grid .news-card.is-grid h2 {
  display: -webkit-box !important;
  font-size: 15.5px !important;
  line-height: 19.5px !important;
  font-weight: 920 !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-wrap: balance;
}

.news-grid .news-card.is-featured p,
.news-grid .news-card.is-grid p {
  display: -webkit-box !important;
  color: rgba(255,255,255,.84) !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
}

.news-grid .news-card.is-featured p {
  max-width: 94% !important;
  font-size: 14px !important;
  line-height: 20px !important;
  -webkit-line-clamp: 2 !important;
}

.news-grid .news-card.is-grid p {
  font-size: 12.5px !important;
  line-height: 17px !important;
  -webkit-line-clamp: 2 !important;
}

.news-grid .news-card.is-featured .card-meta,
.news-grid .news-card.is-grid .card-meta {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 5 !important;
  margin: 0 !important;
}

.news-grid .news-card.is-featured .card-actions,
.news-grid .news-card.is-grid .card-actions {
  display: flex !important;
  gap: 6px !important;
  pointer-events: auto;
}

.news-grid .news-card.is-featured .card-actions .mini-button,
.news-grid .news-card.is-grid .card-actions .mini-button {
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 14px !important;
  background: rgba(0,0,0,.42) !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 10px 24px rgba(0,0,0,.28) !important;
  backdrop-filter: blur(14px);
}

.news-grid .news-card.is-featured .card-actions .why-button,
.news-grid .news-card.is-grid .card-actions .why-button {
  display: none !important;
}

@media (max-width: 360px) {
  .news-grid.feed-list {
    grid-template-columns: 1fr !important;
  }

  .news-grid .news-card.is-grid {
    min-height: 248px !important;
    height: 248px !important;
  }
}

/* Varied feed rhythm: large stories and equal two-card rows. */
.feed-layout,
.news-grid.feed-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}

.feed-row {
  width: 100%;
  display: grid;
  gap: 12px;
}

.feed-row.layout-large {
  grid-template-columns: 1fr;
}

.feed-row.layout-pair {
  grid-template-columns: repeat(2, minmax(168px, 1fr));
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.feed-row.layout-pair::-webkit-scrollbar {
  display: none;
}

.feed-row .news-card.is-featured {
  grid-column: auto !important;
}

.feed-row.layout-large .news-card.layout-large {
  grid-column: 1 / -1 !important;
  min-height: 356px !important;
  height: 356px !important;
}

.feed-row.layout-pair .news-card.layout-pair {
  min-height: 248px !important;
  height: 248px !important;
}

@media (max-width: 360px) {
  .feed-row.layout-pair {
    grid-template-columns: repeat(2, minmax(166px, 1fr));
  }
}

/* Onboarding focus: sliders first, neutral path quieter. */
.onboarding-card .onboarding-sliders {
  position: relative;
  margin-top: 16px !important;
  margin-bottom: 14px !important;
  padding: 2px;
}

.onboarding-card .slider-scale-labels {
  color: rgba(255,255,255,.74) !important;
  font-weight: 850;
}

.onboarding-card .onboarding-slider-card {
  border-color: rgba(255,255,255,.16) !important;
  background: linear-gradient(145deg, rgba(22, 29, 42, .98), rgba(11, 13, 19, .98)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.045),
    0 14px 34px rgba(0,0,0,.24);
  transition-property: border-color, box-shadow, transform, background;
  transition-duration: 180ms;
  transition-timing-function: ease-in-out;
}

.onboarding-card .onboarding-slider-card.is-active {
  border-color: color-mix(in srgb, var(--topic) 58%, rgba(255,255,255,.22)) !important;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--topic) 34%, transparent),
    0 16px 40px color-mix(in srgb, var(--topic) 20%, rgba(0,0,0,.36));
}

.onboarding-card .onboarding-slider-card:focus-within {
  transform: translateY(-1px);
  border-color: var(--topic) !important;
}

.onboarding-card .onboarding-apply {
  margin-top: 10px !important;
  transition-property: opacity, filter, box-shadow, transform, background;
  transition-duration: 180ms;
  transition-timing-function: ease-in-out;
}

.onboarding-card .onboarding-apply.is-waiting,
.onboarding-card .onboarding-apply:disabled {
  cursor: default;
  opacity: .46;
  filter: saturate(.65);
  background: #273041 !important;
  color: rgba(255,255,255,.72) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08) !important;
}

.onboarding-card .onboarding-apply.is-ready {
  background: linear-gradient(135deg, #007aff, #5065ff) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.18),
    0 18px 38px rgba(0,122,255,.3) !important;
}

.onboarding-card .onboarding-apply.is-ready:active {
  transform: scale(.96);
}

.onboarding-card .onboarding-skip {
  min-height: 44px !important;
  color: rgba(255,255,255,.62) !important;
  background: rgba(255,255,255,.035) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.075) !important;
}

/* Combined Settings hub: profile actions folded into one settings destination. */
.settings-hub-screen {
  padding-bottom: 112px !important;
}

.settings-hub-screen .utility-header {
  margin-bottom: 8px;
}

.settings-hub-section {
  margin-top: 22px !important;
}

.settings-hub-section h2 {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 17px;
  line-height: 22px;
  font-weight: 950;
  text-wrap: balance;
}

.settings-nav-row {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 14px;
  border: 0;
  border-radius: 20px;
  background: #111a28;
  color: #ffffff;
  text-align: left;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.1),
    0 14px 30px rgba(0,0,0,.2);
  transition-property: transform, background-color, box-shadow;
  transition-duration: 160ms;
  transition-timing-function: ease-in-out;
}

.settings-nav-row:active {
  transform: scale(.96);
}

.settings-nav-row:focus-visible {
  outline: 2px solid #007aff;
  outline-offset: 3px;
}

.settings-nav-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0,122,255,.96), rgba(80,101,255,.92));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

.settings-nav-icon .icon {
  width: 21px;
  height: 21px;
}

.settings-nav-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.settings-nav-copy strong {
  color: #ffffff;
  font-size: 14.5px;
  line-height: 19px;
  font-weight: 950;
}

.settings-nav-copy small {
  color: #aeb7c6;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  text-wrap: pretty;
}

.settings-nav-trailing {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
}

.settings-nav-trailing b {
  min-width: 24px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #ffffff;
  font-size: 11px;
  line-height: 14px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.settings-nav-trailing i {
  color: rgba(255,255,255,.48);
  font-size: 22px;
  line-height: 1;
  font-style: normal;
}

.settings-control-section .settings-action-card {
  min-height: 72px;
}

/* Laconic article reading pass: same fonts, calmer hierarchy. */
.utility-screen > .back-button {
  min-height: 48px !important;
  height: 48px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  align-self: flex-start;
  margin: 0 0 20px !important;
  padding: 0 18px 0 14px !important;
  border-radius: 18px !important;
  line-height: 1 !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  text-align: center !important;
  transition-property: transform, background-color, box-shadow;
  transition-duration: 160ms;
  transition-timing-function: ease-in-out;
}

.utility-screen > .back-button .icon {
  width: 20px !important;
  height: 20px !important;
  flex: 0 0 20px;
  transform: translateX(1px);
}

.utility-screen > .back-button:active {
  transform: scale(.96);
}

.article-topbar {
  min-height: 62px !important;
  padding: 10px 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-bottom: 0 !important;
}

.article-topbar .article-top-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.article-topbar .back-button,
.article-topbar .mini-button {
  width: 46px !important;
  min-width: 46px !important;
  height: 46px !important;
  min-height: 46px !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.article-topbar .back-button .icon {
  transform: translateX(1px);
}

.article-body {
  padding: 0 20px 42px !important;
}

.article-hero {
  min-height: 276px !important;
  margin: 0 -20px 24px !important;
  border-radius: 0 0 22px 22px !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.42) !important;
}

.article-category {
  margin-top: 0 !important;
  font-size: 12px !important;
  line-height: 15px !important;
  font-weight: 850 !important;
}

.article-body h1 {
  max-width: 12.5em;
  margin-top: 9px !important;
  font-size: 28.5px !important;
  line-height: 32.5px !important;
  font-weight: 780 !important;
  text-wrap: balance;
}

.article-body .article-lede {
  margin-top: 13px !important;
  color: #d4d7df !important;
  font-size: 16px !important;
  line-height: 23.5px !important;
  font-weight: 470 !important;
}

.article-byline {
  margin-top: 17px !important;
  font-size: 12px !important;
  line-height: 16px !important;
  font-weight: 720 !important;
}

.article-source {
  margin-top: 5px !important;
  font-size: 11.5px !important;
  line-height: 15px !important;
  font-weight: 620 !important;
}

.article-body > p:not(.article-source):not(.article-lede):not(.article-byline) {
  margin-top: 17px !important;
  color: #eceef3 !important;
  font-size: 15.5px !important;
  line-height: 24.5px !important;
  font-weight: 430 !important;
  text-wrap: pretty;
}

.article-inline-link {
  text-decoration-color: rgba(255,255,255,.2) !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 3px !important;
}

.article-share-row {
  margin-top: 24px !important;
  padding-top: 16px !important;
}

.article-related.story-carousel {
  margin-top: 30px !important;
}

.article-related .story-carousel-header {
  margin-bottom: 13px !important;
}

.article-related .story-carousel-header h2 {
  font-size: 20px !important;
  line-height: 24px !important;
  font-weight: 820 !important;
}

.article-related .story-carousel-header span {
  display: none !important;
}

.article-related .article-related-strip {
  gap: 14px !important;
}

.article-related .related-card {
  min-height: 286px !important;
  display: block !important;
  appearance: none;
  border: 0 !important;
  padding: 0 !important;
  cursor: pointer;
  color: inherit !important;
  text-align: left !important;
  font: inherit;
  transition-property: transform, box-shadow, background-color;
  transition-duration: 160ms;
  transition-timing-function: ease-in-out;
}

.article-related .related-card:active {
  transform: scale(.96);
}

.article-related .related-card h3 {
  font-size: 17px !important;
  line-height: 21.5px !important;
  font-weight: 820 !important;
  text-wrap: balance;
}

.article-related .related-copy {
  padding: 13px !important;
}

.article-related .related-copy p,
.article-related .related-copy small {
  font-size: 12px !important;
  line-height: 16px !important;
  font-weight: 680 !important;
}

/* Optical centering for left-chevron controls. */
.article-topbar .back-button .icon,
.utility-screen > .back-button .icon {
  transform: translateX(1px) !important;
}

/* Simplified Settings: clearer hierarchy, fewer control blocks. */
.settings-hub-screen {
  padding: 18px 14px 104px !important;
}

.settings-hub-screen .utility-header {
  margin-bottom: 2px !important;
}

.settings-hub-screen .utility-header h1 {
  margin: 0 !important;
  font-size: 28px !important;
  line-height: 33px !important;
  font-weight: 950 !important;
}

.settings-hub-screen .subtitle {
  max-width: 310px;
  margin-top: 6px !important;
  color: #bec6d2 !important;
  font-size: 13px !important;
  line-height: 19px !important;
  font-weight: 650 !important;
  text-wrap: pretty;
}

.settings-hub-section {
  margin-top: 18px !important;
}

.settings-hub-section h2 {
  margin-bottom: 8px !important;
  color: #ffffff !important;
  font-size: 15px !important;
  line-height: 20px !important;
  font-weight: 950 !important;
}

.settings-nav-row {
  min-height: 72px !important;
  grid-template-columns: 44px minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 12px !important;
  margin-top: 9px !important;
  padding: 13px !important;
  border-radius: 22px !important;
  background: #101722 !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.1),
    0 14px 34px rgba(0,0,0,.22) !important;
}

.settings-nav-icon {
  width: 44px !important;
  height: 44px !important;
  margin-top: 2px !important;
  border-radius: 15px !important;
}

.settings-nav-copy {
  min-width: 0 !important;
  align-self: center !important;
  padding-right: 6px !important;
}

.settings-nav-copy strong {
  display: block !important;
  max-width: 158px !important;
  font-size: 15px !important;
  line-height: 19px !important;
  text-wrap: balance !important;
}

.settings-nav-copy small {
  display: block !important;
  color: #b7c0ce !important;
  font-size: 12px !important;
  line-height: 16px !important;
  font-weight: 700 !important;
}

.settings-nav-trailing b {
  min-width: 26px !important;
  min-height: 26px !important;
  padding: 0 8px !important;
  background: rgba(255,255,255,.09) !important;
}

.settings-nav-trailing {
  min-width: 76px !important;
  justify-self: end !important;
  justify-content: flex-end !important;
  padding-top: 6px !important;
}

.settings-toggle {
  min-height: 72px !important;
  margin-top: 9px !important;
  padding: 13px 14px !important;
  border-radius: 20px !important;
  background: #101722 !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.1),
    0 12px 30px rgba(0,0,0,.2) !important;
}

.settings-toggle strong {
  color: #ffffff !important;
  font-size: 14.5px !important;
  line-height: 18px !important;
  font-weight: 950 !important;
}

.settings-toggle small {
  display: block !important;
  max-width: 210px;
  margin-top: 4px !important;
  color: #aeb8c7 !important;
  font-size: 11.5px !important;
  line-height: 15px !important;
  font-weight: 700 !important;
  text-wrap: pretty;
}

.settings-toggle i {
  width: 52px !important;
  height: 32px !important;
  border-radius: 999px !important;
}

.settings-toggle i::after {
  width: 26px !important;
  height: 26px !important;
}

.settings-toggle input:checked + i::after {
  transform: translateX(20px) !important;
}

/* Larger device frame: iPhone Pro Max style preview. */
body {
  overflow: hidden;
}

.stage {
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  overflow: hidden;
  padding: 16px !important;
}

.phone-shell {
  width: min(440px, calc(100vw - 32px), calc(46.025vh - 14.75px)) !important;
  width: min(440px, calc(100vw - 32px), calc(46.025dvh - 14.75px)) !important;
  height: auto !important;
  aspect-ratio: 440 / 956;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  border-radius: 38px !important;
}

@media (max-width: 472px) {
  .stage {
    padding: 0 !important;
  }

  .phone-shell {
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
  }
}

/* Brand rename: keep TeachYourNews readable in the compact header. */
.brand-lockup {
  min-width: 0 !important;
  max-width: calc(100% - 56px) !important;
}

.brand-lockup strong {
  max-width: 190px !important;
  overflow: hidden !important;
  color: #ffffff !important;
  font-size: 15px !important;
  line-height: 19px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.brand-mark {
  flex: 0 0 auto !important;
}

/* Guided onboarding tour: spotlight without adding navigation complexity. */
.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.filter-action-button {
  position: relative;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: #101010;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.13), 0 14px 34px rgba(0,0,0,.28);
  transition-property: transform, background-color, color, box-shadow;
  transition-duration: 170ms;
  transition-timing-function: ease-in-out;
}

.filter-action-button:active {
  transform: scale(.96);
}

.filter-action-button.is-active {
  background: rgba(0,122,255,.2);
  box-shadow: inset 0 0 0 1px rgba(0,122,255,.5), 0 14px 34px rgba(0,122,255,.16);
}

.filter-action-button .icon {
  width: 18px;
  height: 18px;
}

.filter-action-button b {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #007aff;
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 8px 20px rgba(0,122,255,.32);
}

.guided-tour {
  position: absolute;
  inset: 0;
  z-index: 80;
  opacity: 0;
  pointer-events: auto;
  transition-property: opacity;
  transition-duration: 180ms;
  transition-timing-function: ease-in-out;
}

.guided-tour.is-ready {
  opacity: 1;
}

.tour-spotlight {
  position: absolute;
  left: var(--spot-x);
  top: var(--spot-y);
  width: var(--spot-w);
  height: var(--spot-h);
  border-radius: 24px;
  box-shadow:
    0 0 0 999px rgba(0,0,0,.66),
    0 0 0 2px rgba(255,255,255,.72),
    0 18px 60px rgba(0,122,255,.28);
  pointer-events: none;
  transition-property: left, top, width, height, box-shadow;
  transition-duration: 210ms;
  transition-timing-function: ease-in-out;
}

.tour-tooltip {
  position: absolute;
  left: var(--tip-x);
  top: var(--tip-y);
  width: var(--tip-w);
  padding: 14px;
  border-radius: 22px;
  background: rgba(18, 24, 34, .96);
  color: #ffffff;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.12),
    0 22px 70px rgba(0,0,0,.46);
  backdrop-filter: blur(18px);
  transition-property: left, top, opacity, transform;
  transition-duration: 190ms;
  transition-timing-function: ease-in-out;
}

.tour-tooltip.is-below::before,
.tour-tooltip.is-above::before {
  content: "";
  position: absolute;
  left: 28px;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: rgba(18, 24, 34, .96);
  transform: rotate(45deg);
}

.tour-tooltip.is-below::before {
  top: -6px;
}

.tour-tooltip.is-above::before {
  bottom: -6px;
}

.tour-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.09);
  transition-property: transform, background-color;
  transition-duration: 160ms;
  transition-timing-function: ease-in-out;
}

.tour-close:active,
.tour-actions button:active {
  transform: scale(.96);
}

.tour-close .icon {
  width: 16px;
  height: 16px;
}

.tour-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 38px;
  color: #aeb8c7;
  font-size: 12px;
  line-height: 16px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.tour-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tour-dots i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
}

.tour-dots i.active {
  width: 18px;
  background: #007aff;
}

.tour-tooltip h2 {
  margin: 10px 0 0;
  color: #ffffff;
  font-size: 18px;
  line-height: 23px;
  font-weight: 950;
  letter-spacing: 0;
  text-wrap: balance;
}

.tour-tooltip p {
  margin: 6px 0 0;
  color: #d8deea;
  font-size: 13px;
  line-height: 19px;
  font-weight: 700;
  text-wrap: pretty;
}

.tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.tour-actions > div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tour-actions button {
  min-height: 40px;
  border: 0;
  border-radius: 14px;
  padding: 0 12px;
  font-size: 12px;
  line-height: 1;
  font-weight: 950;
  transition-property: transform, background-color, color, opacity;
  transition-duration: 160ms;
  transition-timing-function: ease-in-out;
}

.tour-skip,
.tour-back {
  background: rgba(255,255,255,.08);
  color: #dce3f0;
}

.tour-back:disabled {
  opacity: .38;
  cursor: default;
}

.tour-next {
  background: #ffffff;
  color: #05070c;
}

/* Production polish pass: alignment, filter hierarchy, compact section labels. */
:root {
  --ui-radius-card: 22px;
  --ui-radius-control: 14px;
  --ui-shadow-surface: inset 0 0 0 1px rgba(255,255,255,.1), 0 14px 34px rgba(0,0,0,.22);
  --ui-shadow-surface-hover: inset 0 0 0 1px rgba(255,255,255,.15), 0 16px 38px rgba(0,0,0,.28);
  --ui-motion: 170ms ease-in-out;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.feed-row:first-of-type {
  margin-top: 0;
}

.article-topbar .back-button,
.story-carousel .carousel-controls button,
.article-related .carousel-controls button {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  min-height: 46px !important;
  max-width: 46px !important;
  max-height: 46px !important;
  aspect-ratio: 1 / 1 !important;
  display: grid !important;
  place-items: center !important;
  flex: 0 0 46px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  line-height: 1 !important;
  background: rgba(255,255,255,.09) !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 10px 28px rgba(0,0,0,.28) !important;
  transition-property: transform, background-color, box-shadow !important;
  transition-duration: 160ms !important;
  transition-timing-function: ease-in-out !important;
}

.article-topbar .back-button {
  overflow: hidden !important;
  font-size: 0 !important;
  text-indent: 0 !important;
}

.article-topbar .back-button .icon,
.story-carousel .carousel-controls button .icon,
.article-related .carousel-controls button .icon {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
  margin: 0 !important;
  transform-origin: center !important;
}

.article-topbar .back-button .icon {
  transform: translateX(1px) !important;
}

.story-carousel .carousel-controls .next .icon,
.article-related .carousel-controls .next .icon {
  transform: rotate(180deg) translateX(1px) !important;
}

.article-topbar .back-button:active,
.story-carousel .carousel-controls button:active,
.article-related .carousel-controls button:active {
  transform: scale(.96) !important;
}

.filter-sheet {
  padding: 0 0 14px !important;
}

.filter-sheet .sheet-header {
  padding: 0 10px 4px !important;
}

.filter-sheet-note {
  margin: 4px 10px 18px !important;
  color: #aeb7c6 !important;
}

.filter-option-group {
  margin: 0 10px 22px !important;
}

.filter-option-group + .filter-option-group {
  padding-top: 2px;
}

.filter-option-group h3 {
  min-height: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px !important;
  color: #ffffff !important;
  font-size: 14px !important;
  line-height: 18px !important;
  font-weight: 950 !important;
  text-wrap: balance;
}

.filter-option-group h3::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.42);
}

.filter-topics h3::before {
  background: #007aff;
}

.filter-date h3::before,
.filter-sort h3::before {
  background: rgba(255,255,255,.34);
}

.filter-option-grid {
  gap: 8px !important;
}

.filter-option-grid button {
  min-height: 44px !important;
  border-radius: var(--ui-radius-control) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.09) !important;
  transition-property: transform, background-color, color, box-shadow !important;
  transition-duration: 170ms !important;
  transition-timing-function: ease-in-out !important;
}

.filter-topics .filter-option-grid button {
  justify-content: center !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.075) !important;
  text-align: center;
}

.filter-topics .filter-option-grid button.selected {
  background: rgba(0,122,255,.24) !important;
  box-shadow: inset 0 0 0 1px rgba(0,122,255,.58), 0 12px 30px rgba(0,122,255,.13) !important;
}

.filter-date,
.filter-sort {
  margin-bottom: 18px !important;
}

.filter-date .filter-option-grid button,
.filter-sort .filter-option-grid button {
  background: rgba(255,255,255,.06) !important;
}

.filter-sheet-actions {
  margin: 2px 10px 10px !important;
}

.filter-sheet-actions .primary-button,
.filter-sheet-actions .secondary-button,
.filter-reset-button,
.filter-chip-button,
.filter-action-button,
.search-action-button,
.search-popup-close,
.mini-button,
.topic-chip,
.settings-nav-row,
.settings-toggle,
.news-card {
  transition-property: transform, background-color, color, box-shadow, opacity !important;
  transition-duration: 170ms !important;
  transition-timing-function: ease-in-out !important;
}

.filter-action-button,
.search-action-button {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  border-radius: var(--ui-radius-control) !important;
}

.filter-action-button .icon,
.search-action-button .icon,
.search-popup-close .icon,
.mini-button .icon {
  display: block;
  margin: 0;
}

.news-grid .news-card.is-featured,
.news-grid .news-card.is-grid,
.article-related .related-card,
.settings-nav-row,
.settings-toggle,
.story-action-sheet,
.search-popup {
  box-shadow: var(--ui-shadow-surface) !important;
}

.news-grid .news-card.is-featured:hover,
.news-grid .news-card.is-grid:hover,
.settings-nav-row:hover,
.settings-toggle:hover {
  box-shadow: var(--ui-shadow-surface-hover) !important;
}

.news-grid .news-card.is-featured,
.news-grid .news-card.is-grid,
.article-related .related-card {
  border-radius: var(--ui-radius-card) !important;
}

.news-grid .news-card.is-featured .thumb,
.news-grid .news-card.is-grid .thumb,
.article-related .related-thumb {
  border-radius: inherit !important;
  outline: 1px solid rgba(255,255,255,.1) !important;
  outline-offset: -1px !important;
}

/* Final card-control collision fix: keep topic tags clear of save/menu controls. */
.article-topbar .back-button {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  aspect-ratio: 1 / 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 48px !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-align: center !important;
}

.article-topbar .back-button .icon {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
  flex: 0 0 18px !important;
  margin: 0 !important;
  transform: translateX(-.5px) !important;
  transform-origin: 50% 50% !important;
}

.news-grid .news-card.is-featured .card-topline,
.news-grid .news-card.is-grid .card-topline {
  right: 104px !important;
  max-width: calc(100% - 118px) !important;
}

.news-grid .news-card.is-featured .topic-tag,
.news-grid .news-card.is-grid .topic-tag,
.home-carousel .breaking-strip .news-card.is-breaking .topic-tag {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

.news-grid .news-card.is-featured .card-meta,
.news-grid .news-card.is-grid .card-meta {
  top: 10px !important;
  right: 10px !important;
}

.news-grid .news-card.is-featured .card-actions,
.news-grid .news-card.is-grid .card-actions {
  gap: 5px !important;
}

.news-grid .news-card.is-featured .card-actions .mini-button,
.news-grid .news-card.is-grid .card-actions .mini-button {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  border-radius: 14px !important;
}

@media (max-width: 360px) {
  .news-grid .news-card.is-featured .card-topline,
  .news-grid .news-card.is-grid .card-topline {
    right: 96px !important;
    max-width: calc(100% - 108px) !important;
  }
}

@media (max-width: 360px) {
  .filter-option-grid {
    grid-template-columns: 1fr !important;
  }

}

/* Three-state recommendation controls: explicit Less / Balanced / More choices. */
.preference-helper-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0 4px;
  color: rgba(255,255,255,.72);
  font-size: 11px;
  line-height: 14px;
  font-weight: 850;
  text-align: center;
}

.preference-helper-row span {
  min-height: 30px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.055);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.preference-draft-card {
  margin: 0 0 14px;
  padding: 15px;
  border-radius: 22px;
  background: #101722;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.1),
    0 14px 34px rgba(0,0,0,.22);
}

.preference-draft-copy p {
  margin: 0 0 4px;
  color: #8fbaff;
  font-size: 11px;
  line-height: 14px;
  font-weight: 950;
}

.preference-draft-copy h2 {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  line-height: 23px;
  font-weight: 950;
  text-wrap: balance;
}

.preference-draft-copy span {
  display: block;
  margin-top: 5px;
  color: #c5cfdd;
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
  text-wrap: pretty;
}


.preference-draft-card {
  display: grid;
  gap: 12px;
}

.preference-draft-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.draft-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.065);
  color: #d7deea;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  font-size: 11.5px;
  line-height: 14px;
  font-weight: 850;
}

.draft-pill b {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
}

.draft-pill.is-more,
.draft-pill.is-less {
  background: color-mix(in srgb, var(--topic) 14%, #101722);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--topic) 42%, rgba(255,255,255,.1));
  color: #ffffff;
}

.draft-pill.is-more b,
.draft-pill.is-less b {
  background: var(--topic);
}

.category-controls.slider-controls,
.onboarding-sliders {
  gap: 12px !important;
}

.preference-card.category-control.slider-control,
.preference-card.onboarding-slider-card {
  position: relative;
  grid-template-columns: 52px minmax(0, 1fr) !important;
  align-items: flex-start !important;
  gap: 13px !important;
  padding: 14px !important;
  border-radius: 22px !important;
  border: 0 !important;
  background: #101722 !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.1),
    0 14px 34px rgba(0,0,0,.22) !important;
  transition-property: transform, background-color, box-shadow, opacity !important;
  transition-duration: 180ms !important;
  transition-timing-function: ease-in-out !important;
}

.preference-card.is-more,
.preference-card.is-less {
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--topic) 44%, rgba(255,255,255,.12)),
    0 16px 40px color-mix(in srgb, var(--topic) 18%, rgba(0,0,0,.28)) !important;
}

.preference-card:focus-within {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px var(--topic),
    0 16px 40px color-mix(in srgb, var(--topic) 20%, rgba(0,0,0,.34)) !important;
}

.preference-card .slider-topic-icon,
.preference-card .category-visual {
  width: 52px !important;
  height: 52px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 17px !important;
  background: var(--visual) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.18),
    0 12px 24px color-mix(in srgb, var(--topic) 22%, rgba(0,0,0,.28)) !important;
}

.preference-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.preference-title-row {
  align-items: flex-start !important;
  margin: 0 !important;
}

.preference-heading {
  min-width: 0;
}

.preference-heading h3 {
  margin: 0 !important;
  color: #ffffff !important;
  font-size: 15px !important;
  line-height: 19px !important;
  font-weight: 950 !important;
  text-wrap: balance;
}

.preference-heading p {
  margin: 3px 0 0;
  color: #aeb8c7;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  text-wrap: pretty;
}

.preference-state {
  flex: 0 0 auto;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--topic) 16%, rgba(255,255,255,.07));
  color: #ffffff !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--topic) 36%, rgba(255,255,255,.1));
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  text-align: center !important;
}

.preference-control {
  display: grid;
  gap: 8px;
}

.preference-slider-shell {
  position: relative;
  min-height: 44px;
  display: grid;
  align-items: center;
}

.preference-track {
  position: absolute;
  left: 15px;
  right: 15px;
  top: 17px;
  height: 10px;
  pointer-events: none;
}

.preference-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 4px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,.24);
}

.preference-track i {
  position: absolute;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #7b8493;
  box-shadow: 0 0 0 4px #101722, inset 0 0 0 1px rgba(255,255,255,.12);
  transform: translateX(-50%);
  transition-property: background-color, box-shadow, transform;
  transition-duration: 180ms;
  transition-timing-function: ease-in-out;
}

.preference-track i:nth-child(1) { left: 0; }
.preference-track i:nth-child(2) { left: 50%; }
.preference-track i:nth-child(3) { left: 100%; }

.preference-track i.is-active {
  background: var(--topic);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--topic) 20%, #101722), inset 0 0 0 1px rgba(255,255,255,.38);
  transform: translateX(-50%) scale(1.08);
}

.reco-slider.preference-range,
.tune-slider.preference-range {
  position: relative;
  z-index: 2;
  width: 100% !important;
  height: 44px !important;
  margin: 0 !important;
  appearance: none;
  background: transparent !important;
  cursor: pointer;
}

.reco-slider.preference-range::-webkit-slider-runnable-track,
.tune-slider.preference-range::-webkit-slider-runnable-track {
  height: 10px !important;
  border-radius: 999px !important;
  background: transparent !important;
}

.reco-slider.preference-range::-webkit-slider-thumb,
.tune-slider.preference-range::-webkit-slider-thumb {
  appearance: none !important;
  width: 30px !important;
  height: 30px !important;
  margin-top: -10px !important;
  border: 3px solid #ffffff !important;
  border-radius: 999px !important;
  background: var(--topic) !important;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--topic) 18%, transparent), 0 10px 24px rgba(0,0,0,.38) !important;
  transition-property: transform, box-shadow, background-color !important;
  transition-duration: 180ms !important;
  transition-timing-function: ease-in-out !important;
}

.reco-slider.preference-range::-moz-range-track,
.tune-slider.preference-range::-moz-range-track {
  height: 10px !important;
  border-radius: 999px !important;
  background: transparent !important;
}

.reco-slider.preference-range::-moz-range-thumb,
.tune-slider.preference-range::-moz-range-thumb {
  width: 24px !important;
  height: 24px !important;
  border: 3px solid #ffffff !important;
  border-radius: 999px !important;
  background: var(--topic) !important;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--topic) 18%, transparent), 0 10px 24px rgba(0,0,0,.38) !important;
}

.reco-slider.preference-range:focus-visible,
.tune-slider.preference-range:focus-visible {
  outline: 0;
}

.reco-slider.preference-range:focus-visible::-webkit-slider-thumb,
.tune-slider.preference-range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--topic) 28%, transparent), 0 0 0 10px rgba(255,255,255,.16), 0 10px 24px rgba(0,0,0,.38) !important;
}

.reco-slider.preference-range:active::-webkit-slider-thumb,
.tune-slider.preference-range:active::-webkit-slider-thumb {
  transform: scale(.96);
}

.preference-state-labels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.preference-state-labels button {
  min-height: 44px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  padding: 6px 5px;
  border: 0;
  border-radius: 14px;
  background: rgba(255,255,255,.055);
  color: #aeb8c7;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.075);
  font-size: 10.5px;
  line-height: 12px;
  font-weight: 850;
  text-align: center;
  transition-property: transform, background-color, color, box-shadow;
  transition-duration: 170ms;
  transition-timing-function: ease-in-out;
}

.preference-state-labels button:active {
  transform: scale(.96);
}

.preference-state-labels button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--topic) 70%, #ffffff);
  outline-offset: 2px;
}

.preference-state-labels button.is-active {
  background: color-mix(in srgb, var(--topic) 22%, rgba(255,255,255,.08));
  color: #ffffff;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--topic) 52%, rgba(255,255,255,.12)),
    0 10px 24px color-mix(in srgb, var(--topic) 16%, rgba(0,0,0,.18));
  font-weight: 950;
}

.preference-symbol {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #ffffff;
  font-size: 13px;
  line-height: 1;
  font-weight: 950;
}

.preference-state-labels button.is-active .preference-symbol {
  background: var(--topic);
}

.preference-consequence {
  min-height: 34px;
  margin: 0 !important;
  color: #d7deea !important;
  font-size: 12px !important;
  line-height: 16px !important;
  font-weight: 750 !important;
  text-wrap: pretty;
  transition-property: color, opacity;
  transition-duration: 170ms;
  transition-timing-function: ease-in-out;
}

.compact-status-card {
  margin: 0 0 14px !important;
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 12px !important;
}

.compact-status-card .primary-small {
  min-width: 92px;
}

@media (max-width: 390px) {
  .preference-card.category-control.slider-control,
  .preference-card.onboarding-slider-card {
    grid-template-columns: 48px minmax(0, 1fr) !important;
    gap: 11px !important;
    padding: 12px !important;
  }

  .preference-card .slider-topic-icon,
  .preference-card .category-visual {
    width: 48px !important;
    height: 48px !important;
  }

  .preference-title-row {
    display: grid !important;
    gap: 7px !important;
  }

  .preference-state {
    justify-self: flex-start;
  }

  .preference-state-labels button {
    font-size: 10px;
  }

  .compact-status-card {
    grid-template-columns: 38px minmax(0, 1fr) !important;
  }

  .compact-status-card .primary-small {
    grid-column: 2;
    justify-self: flex-start;
  }
}

.phone-shell.motion-reduced .preference-card,
.phone-shell.motion-reduced .preference-track i,
.phone-shell.motion-reduced .preference-state-labels button,
.phone-shell.motion-reduced .preference-consequence,
.phone-shell.motion-reduced .reco-slider.preference-range::-webkit-slider-thumb {
  transition-duration: 1ms !important;
}

/* Preference topic badges: text carries meaning, color is secondary. */
.preference-card.category-control.slider-control,
.preference-card.onboarding-slider-card {
  grid-template-columns: 66px minmax(0, 1fr) !important;
}

.preference-card .preference-topic-badge,
.preference-card .slider-topic-icon.preference-topic-badge,
.preference-card .category-visual.preference-topic-badge {
  width: 64px !important;
  height: 52px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 7px !important;
  border-radius: 17px !important;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--topic) 70%, #ffffff 6%), color-mix(in srgb, var(--topic) 60%, #0f1722 18%)) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.2),
    0 12px 24px color-mix(in srgb, var(--topic) 18%, rgba(0,0,0,.28)) !important;
  text-align: center;
}

.preference-topic-badge b {
  display: block;
  max-width: 54px;
  color: #ffffff;
  font-size: 10.5px;
  line-height: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-wrap: balance;
}

.preference-topic-badge .icon {
  display: none !important;
}

@media (max-width: 390px) {
  .preference-card.category-control.slider-control,
  .preference-card.onboarding-slider-card {
    grid-template-columns: 62px minmax(0, 1fr) !important;
  }

  .preference-card .preference-topic-badge,
  .preference-card .slider-topic-icon.preference-topic-badge,
  .preference-card .category-visual.preference-topic-badge {
    width: 60px !important;
  }

  .preference-topic-badge b {
    max-width: 50px;
    font-size: 10px;
  }
}

/* Restored slider onboarding view. */
.slider-onboarding {
  padding: 12px;
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 122, 255, .08), transparent 42%),
    rgba(0, 0, 0, .82);
}

.onboarding-overlay.slider-onboarding {
  top: -24px;
  height: calc(100% + 24px);
  place-items: start center;
  padding: 34px 10px 18px;
}

.slider-onboarding-card {
  width: min(100%, 430px);
  max-height: calc(100dvh - 24px);
  padding: 20px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(25, 30, 42, .98), rgba(14, 17, 24, .98));
  border: 1px solid rgba(255, 255, 255, .11);
  box-shadow:
    0 26px 76px rgba(0, 0, 0, .58),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  overflow-y: auto;
}

.slider-onboarding .onboarding-how {
  margin: 0 0 18px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 22px;
  background: rgba(255, 255, 255, .055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055);
}

.slider-onboarding .onboarding-how summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  min-height: 58px;
  padding: 7px 8px 7px 18px;
  list-style: none;
  cursor: default;
}

.slider-onboarding .onboarding-how summary::-webkit-details-marker {
  display: none;
}

.slider-onboarding .onboarding-how summary span {
  color: #fff;
  font-size: 17px;
  line-height: 22px;
  font-weight: 950;
  letter-spacing: 0;
}

.slider-onboarding .onboarding-how summary b {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  font-weight: 850;
}

.slider-onboarding .slider-scale-labels {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0 4px 10px;
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
  line-height: 18px;
  font-weight: 900;
}

.slider-onboarding .onboarding-sliders {
  display: grid;
  gap: 10px;
}

.slider-onboarding .preference-card.onboarding-slider-card {
  display: grid !important;
  grid-template-columns: 58px minmax(0, 1fr) !important;
  gap: 12px !important;
  min-height: 92px;
  padding: 12px !important;
  border-radius: 20px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .025)) !important;
  border: 1px solid rgba(255, 255, 255, .105) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .045),
    0 10px 26px rgba(0, 0, 0, .22) !important;
}

.slider-onboarding .preference-card .preference-topic-badge {
  width: 48px !important;
  height: 48px !important;
  border-radius: 17px !important;
}

.slider-onboarding .preference-topic-badge b {
  display: none;
}

.slider-onboarding .preference-topic-badge .slider-badge-icon {
  display: grid !important;
  width: 24px;
  height: 24px;
  place-items: center;
}

.slider-onboarding .preference-topic-badge .slider-badge-icon .icon {
  display: block !important;
  width: 24px;
  height: 24px;
  color: #fff;
  stroke-width: 2.4;
}

.slider-onboarding .preference-copy {
  gap: 8px;
}

.slider-onboarding .preference-title-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 10px !important;
}

.slider-onboarding .preference-heading h3 {
  margin: 0;
  color: #fff;
  font-size: 17px;
  line-height: 21px;
  font-weight: 950;
}

.slider-onboarding .preference-heading p,
.slider-onboarding .preference-state-labels,
.slider-onboarding .preference-consequence {
  display: none !important;
}

.slider-onboarding .preference-state {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .9);
  font-size: 14px;
  line-height: 18px;
  font-weight: 950;
  white-space: nowrap;
}

.slider-onboarding .preference-control {
  margin: 0;
}

.slider-onboarding .preference-slider-shell {
  height: 34px;
  padding: 0;
}

.slider-onboarding .preference-track {
  height: 8px;
  border-radius: 999px;
}

.slider-onboarding .reco-slider.preference-range,
.slider-onboarding .tune-slider.preference-range {
  height: 34px;
}

.slider-onboarding .reco-slider.preference-range::-webkit-slider-thumb,
.slider-onboarding .tune-slider.preference-range::-webkit-slider-thumb {
  width: 30px;
  height: 30px;
  margin-top: -11px;
  border: 4px solid #fff;
}

.slider-onboarding .reco-slider.preference-range::-moz-range-thumb,
.slider-onboarding .tune-slider.preference-range::-moz-range-thumb {
  width: 30px;
  height: 30px;
  border: 4px solid #fff;
}

.slider-onboarding .onboarding-apply {
  min-height: 48px;
  margin-top: 14px;
}

.slider-onboarding .onboarding-skip {
  margin: 6px auto 0;
}

@media (max-width: 390px) {
  .slider-onboarding-card {
    padding: 16px;
    border-radius: 26px;
  }

  .slider-onboarding .preference-card.onboarding-slider-card {
    grid-template-columns: 54px minmax(0, 1fr) !important;
    min-height: 88px;
    padding: 10px !important;
  }

  .slider-onboarding .preference-card .preference-topic-badge {
    width: 46px !important;
    height: 46px !important;
  }

  .slider-onboarding .preference-heading h3 {
    font-size: 16px;
    line-height: 20px;
  }
}

/* Recommendation slider screen: match the Change Recommendations reference. */
.recommendation-slider-screen {
  padding: 12px 12px 96px;
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 122, 255, .08), transparent 42%),
    #000000;
}

.recommendation-slider-screen.slider-onboarding {
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 122, 255, .08), transparent 42%),
    #000000;
}

.slider-onboarding .recommendation-slider-panel {
  width: min(100%, 372px);
  margin: 0 auto;
  padding: 14px 14px 16px;
  border-radius: 24px;
  background: #101010;
  border: 1px solid rgba(255, 255, 255, .13);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .04),
    0 20px 64px rgba(0, 0, 0, .58);
  font-family: var(--font-ui);
}

.onboarding-overlay.slider-onboarding .recommendation-slider-panel {
  max-height: calc(100% - 32px);
}

.slider-onboarding .recommendation-brand-pill {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  width: max-content;
  margin: 0 0 12px 2px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(0, 122, 255, .16);
  box-shadow: inset 0 0 0 1px rgba(0, 122, 255, .24);
  color: #fff;
  font-size: 11.5px;
  line-height: 16px;
  font-weight: 850;
}

.slider-onboarding .recommendation-slider-panel h1 {
  margin: 0 4px 6px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 28px;
  font-weight: 850;
  letter-spacing: 0;
  text-wrap: balance;
}

.slider-onboarding .recommendation-lede {
  margin: 0 4px 12px;
  max-width: none;
  color: rgba(255, 255, 255, .88);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  text-wrap: pretty;
}

.slider-onboarding .recommendation-slider-panel .onboarding-how {
  margin: 0 0 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  overflow: hidden;
  transition-property: background-color, border-color, box-shadow;
  transition-duration: 180ms;
  transition-timing-function: ease-in-out;
}

.slider-onboarding .recommendation-slider-panel .onboarding-how summary {
  min-height: 42px !important;
  padding: 4px 8px 4px 14px !important;
  grid-template-columns: minmax(0, 1fr) 32px;
}

.slider-onboarding .recommendation-slider-panel .onboarding-how summary span {
  font-size: 14px;
  line-height: 18px;
  font-weight: 850;
}

.slider-onboarding .recommendation-slider-panel .onboarding-how summary b {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 0;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
  transition-property: background-color, transform;
  transition-duration: 180ms;
  transition-timing-function: ease-in-out;
}

.slider-onboarding .recommendation-slider-panel .onboarding-how summary b::before,
.slider-onboarding .recommendation-slider-panel .onboarding-how summary b::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition-property: opacity, transform;
  transition-duration: 180ms;
  transition-timing-function: ease-in-out;
}

.slider-onboarding .recommendation-slider-panel .onboarding-how summary b::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.slider-onboarding .recommendation-slider-panel .onboarding-how[open] summary b::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.slider-onboarding .recommendation-slider-panel .onboarding-how[open] summary b::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.slider-onboarding .recommendation-slider-panel .onboarding-how ol {
  display: grid;
  gap: 8px;
  margin: 6px 14px 10px;
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  list-style: none !important;
  counter-reset: recommendation-step;
}

.slider-onboarding .recommendation-slider-panel .onboarding-how li {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 22px;
  padding-left: 0 !important;
  counter-increment: recommendation-step;
  color: rgba(255, 255, 255, .88);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  text-wrap: pretty;
}

.slider-onboarding .recommendation-slider-panel .onboarding-how li span {
  display: block;
  width: auto;
  min-width: 0;
  max-width: none !important;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  text-align: left;
}

.slider-onboarding .recommendation-slider-panel .onboarding-how li::before {
  content: counter(recommendation-step);
  position: static !important;
  left: auto !important;
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin: 0 !important;
  padding: 0 !important;
  place-items: center;
  border-radius: 50%;
  background: #4f6cff;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.slider-onboarding .recommendation-slider-panel .onboarding-how > p {
  margin: 0 14px 14px;
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  text-wrap: pretty;
}

.slider-onboarding .recommendation-slider-panel .slider-scale-labels {
  margin: 0 2px 7px;
  color: rgba(255, 255, 255, .84);
  font-size: 11px;
  line-height: 14px;
  font-weight: 800;
}

.slider-onboarding .recommendation-slider-panel .onboarding-sliders {
  gap: 5px !important;
}

.slider-onboarding .recommendation-slider-panel .preference-card.onboarding-slider-card {
  min-height: 64px !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  gap: 9px !important;
  padding: 8px !important;
  border-radius: 15px !important;
  background: #101010 !important;
  border-color: rgba(255, 255, 255, .12) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .035),
    0 10px 24px rgba(0, 0, 0, .22) !important;
}

.slider-onboarding .recommendation-slider-panel .preference-card .preference-topic-badge {
  width: 40px !important;
  height: 40px !important;
  border-radius: 13px !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .16),
    0 8px 16px color-mix(in srgb, var(--topic) 20%, rgba(0, 0, 0, .22)) !important;
}

.slider-onboarding .recommendation-slider-panel .preference-topic-badge .slider-badge-icon,
.slider-onboarding .recommendation-slider-panel .preference-topic-badge .slider-badge-icon .icon {
  width: 19px;
  height: 19px;
}

.slider-onboarding .recommendation-slider-panel .preference-copy {
  align-self: center;
  gap: 5px;
}

.slider-onboarding .recommendation-slider-panel .preference-title-row {
  align-items: center !important;
}

.slider-onboarding .recommendation-slider-panel .preference-heading h3 {
  font-family: var(--font-display) !important;
  font-size: 15px !important;
  line-height: 19px !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
}

.slider-onboarding .recommendation-slider-panel .preference-state {
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #ffffff !important;
  font-size: 11px !important;
  line-height: 14px !important;
  font-weight: 800 !important;
}

.slider-onboarding .recommendation-slider-panel .preference-slider-shell {
  min-height: 24px !important;
  height: 24px !important;
}

.slider-onboarding .recommendation-slider-panel .preference-track {
  height: 8px;
  background:
    linear-gradient(90deg,
      #ff4f4f 0 22%,
      #8d96a3 22% 78%,
      #34c759 78% 100%);
}

.slider-onboarding .recommendation-slider-panel .preference-track::before,
.slider-onboarding .recommendation-slider-panel .preference-track i {
  display: none;
}

.slider-onboarding .recommendation-slider-panel .reco-slider.preference-range,
.slider-onboarding .recommendation-slider-panel .tune-slider.preference-range {
  height: 24px !important;
}

.slider-onboarding .recommendation-slider-panel .reco-slider.preference-range::-webkit-slider-thumb,
.slider-onboarding .recommendation-slider-panel .tune-slider.preference-range::-webkit-slider-thumb {
  width: 24px !important;
  height: 24px !important;
  margin-top: -8px;
  border: 3px solid #fff !important;
}

.slider-onboarding .recommendation-slider-panel .reco-slider.preference-range::-moz-range-thumb,
.slider-onboarding .recommendation-slider-panel .tune-slider.preference-range::-moz-range-thumb {
  width: 20px !important;
  height: 20px !important;
  border: 3px solid #fff !important;
}

.slider-onboarding .recommendation-slider-panel .onboarding-apply {
  min-height: 44px;
  margin: 12px 0 0;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-weight: 850;
  transition-property: opacity, filter, box-shadow, transform, background-color;
  transition-duration: 180ms;
  transition-timing-function: ease-in-out;
}

.slider-onboarding .recommendation-slider-panel .onboarding-apply.is-waiting,
.slider-onboarding .recommendation-slider-panel .onboarding-apply:disabled {
  background: rgba(255, 255, 255, .06) !important;
  color: rgba(255, 255, 255, .38) !important;
  box-shadow: none !important;
}

.slider-onboarding .recommendation-slider-panel .onboarding-skip {
  min-height: 42px;
  margin-top: 8px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .035) !important;
  border: 1px solid rgba(255, 255, 255, .075) !important;
  color: rgba(255, 255, 255, .66) !important;
  box-shadow: none !important;
  font-size: 13px;
  font-weight: 800;
  transition-property: transform, background-color, color, border-color;
  transition-duration: 160ms;
  transition-timing-function: ease-in-out;
}

.slider-onboarding .recommendation-actions {
  display: grid;
  gap: 7px;
}

.slider-onboarding .recommendation-skip-note {
  max-width: 28ch;
  margin: 0 auto;
  color: rgba(255, 255, 255, .76);
  font-size: 11px;
  line-height: 15px;
  font-weight: 600;
  text-align: center;
  text-wrap: pretty;
}

.slider-onboarding .recommendation-slider-panel .onboarding-skip:active {
  transform: scale(.96);
}

.slider-onboarding .recommendation-slider-panel .onboarding-skip:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .72);
  outline-offset: 2px;
}

@media (max-width: 390px) {
  .recommendation-slider-screen {
    padding-inline: 10px;
  }

  .slider-onboarding .recommendation-slider-panel {
    padding: 12px 10px 14px;
    border-radius: 23px;
  }

  .slider-onboarding .recommendation-slider-panel h1 {
    font-size: 21px;
    line-height: 26px;
  }

  .slider-onboarding .recommendation-slider-panel .preference-card.onboarding-slider-card {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    min-height: 64px !important;
  }
}

/* Development-only capture mode, enabled by ?screenshotMode=true on localhost. */
.phone-shell.screenshot-mode,
.phone-shell.screenshot-mode *,
.phone-shell.screenshot-mode *::before,
.phone-shell.screenshot-mode *::after {
  animation-duration: 1ms !important;
  animation-delay: 0ms !important;
  transition-duration: 1ms !important;
  transition-delay: 0ms !important;
  scroll-behavior: auto !important;
  caret-color: transparent !important;
}

body:has(.phone-shell.screenshot-mode) {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: #000;
}

.stage:has(.phone-shell.screenshot-mode) {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  padding: 0;
  display: block;
  overflow: hidden;
}

.phone-shell.screenshot-mode {
  width: 100vw;
  max-width: none;
  height: 100vh;
  min-height: 100vh;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
