:root {
  --bg: #020915;
  --bg-2: #081523;
  --ink: #eaf6ff;
  --muted: #93a9c4;
  --surface: rgba(6, 14, 27, 0.84);
  --surface-strong: rgba(7, 18, 32, 0.96);
  --line: rgba(76, 131, 215, 0.2);
  --line-strong: rgba(74, 181, 255, 0.34);
  --accent: #2898ff;
  --accent-deep: #9fd6ff;
  --signal: #56e1b7;
  --trend: #ff8a3d;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
  --glow-cyan: rgba(40, 152, 255, 0.28);
  --glow-blue: rgba(67, 112, 255, 0.22);
  --glow-violet: rgba(26, 141, 255, 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --font-ui: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --font-head: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --font-body: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --pointer-x: 50%;
  --pointer-y: 24%;
  --pointer-strength: 0.18;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --glow-x: 50%;
  --glow-y: 24%;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  color: var(--ink);
  font-family: var(--font-ui);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(circle at 12% -10%, rgba(40, 152, 255, 0.22), transparent 32%),
    radial-gradient(circle at 88% 10%, rgba(67, 112, 255, 0.2), transparent 30%),
    radial-gradient(circle at 54% 92%, rgba(86, 225, 183, 0.08), transparent 36%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -20vh -10vw;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    radial-gradient(circle at 18% 22%, rgba(40, 152, 255, 0.18), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(67, 112, 255, 0.16), transparent 30%),
    radial-gradient(circle at 70% 78%, rgba(86, 225, 183, 0.07), transparent 30%);
  animation: background-drift 18s ease-in-out infinite;
  opacity: 0.92;
}

body::after {
  background-image:
    linear-gradient(rgba(48, 111, 195, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(48, 111, 195, 0.07) 1px, transparent 1px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.12'/%3E%3C/svg%3E");
  background-size: 62px 62px, 62px 62px, 220px 220px;
  mix-blend-mode: screen;
  opacity: 0.18;
  animation: background-grain 14s steps(6) infinite;
}

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

@keyframes background-drift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(2.5vw, -1.5vh, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes background-grain {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-4%, 3%, 0);
  }
}

@keyframes backdrop-orbit {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(2vw, -1.2vh, 0) scale(1.04);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes backdrop-stream {
  0% {
    transform: translate3d(0, 0, 0);
    background-position: 0 0, 14px 16px, 0 0, 160px 20px;
  }
  100% {
    transform: translate3d(-3vw, 2vh, 0);
    background-position: 40px 56px, 60px 74px, -220px 120px, 320px 180px;
  }
}

@keyframes backdrop-ripple {
  0% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(0.18);
  }
  70% {
    opacity: 0.22;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.05);
  }
}

@keyframes neon-sweep {
  0% {
    transform: translateX(-120%);
    opacity: 0;
  }
  20% {
    opacity: 0.55;
  }
  60% {
    opacity: 0.3;
  }
  100% {
    transform: translateX(120%);
    opacity: 0;
  }
}

@keyframes halo-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(24, 214, 255, 0.08);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(24, 214, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(24, 214, 255, 0);
  }
}

@keyframes newsroom-float {
  0% { transform: translate3d(0, 18px, 0); opacity: 0; }
  100% { transform: translate3d(0, 0, 0); opacity: 1; }
}

@keyframes signal-scan {
  0% { transform: translate3d(-120%, 0, 0); opacity: 0; }
  18% { opacity: 0.22; }
  100% { transform: translate3d(140%, 0, 0); opacity: 0; }
}

@keyframes signal-marquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  [data-signal-shell] {
    opacity: 1 !important;
    transform: none !important;
  }

  body::before,
  body::after,
  .backdrop::before,
  .backdrop::after,
  .backdrop-ripple {
    animation: none !important;
  }
}

.bot-helper { position: fixed; right: 18px; bottom: 18px; z-index: 10010; display: grid; place-items: end; transition: opacity .2s ease, transform .2s ease; }
.bot-helper.is-dismissed { opacity: 0; transform: translateY(12px); pointer-events: none; }
.bot-helper-launch { width: 150px; height: 150px; padding: 0; border: 0; border-radius: 0; overflow: visible; background: transparent; filter: drop-shadow(0 8px 12px rgba(0,0,0,.28)); cursor: pointer; }
.bot-helper-launch img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; transform: none; }
.bot-helper-close { position: absolute; top: -8px; right: -8px; z-index: 2; width: 24px; height: 24px; border: 1px solid rgba(255,255,255,.8); border-radius: 50%; background: #101827; color: #fff; font-size: 17px; line-height: 20px; cursor: pointer; }
.bot-helper button:focus-visible { outline: 3px solid #68e0ff; outline-offset: 3px; }
@media (max-width: 520px) { .bot-helper { right: 8px; bottom: 8px; } .bot-helper-launch { width: 112px; height: 112px; } }

/* Homepage editorial cards stay stacked so media never squeezes headlines or leaves empty bands. */
body:has(.frontpage-masthead) .hot-featured-card {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

body:has(.frontpage-masthead) .hot-featured-card .lead-feature-media,
body:has(.frontpage-masthead) .hot-featured-card .lead-feature-media img {
  position: static;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

body:has(.frontpage-masthead) .hot-featured-card .lead-feature-overlay {
  display: none;
}

body:has(.frontpage-masthead) .hot-featured-body {
  position: static;
  display: flex;
  flex-direction: column;
  justify-content: initial;
  gap: 0.5rem;
  min-height: 0;
  padding: 1.25rem;
  background: #fff;
  color: #0f172a;
}

body:has(.frontpage-masthead) .stacked-article-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 0;
  gap: 1rem;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

body:has(.frontpage-masthead) .stacked-article-card .stack-row {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 0;
  gap: 1rem;
}

body:has(.frontpage-masthead) .stacked-article-card .guide-showcase-media,
body:has(.frontpage-masthead) .stacked-article-card .stack-media,
body:has(.frontpage-masthead) .stacked-article-card .guide-showcase-media img,
body:has(.frontpage-masthead) .stacked-article-card .stack-media img {
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
}

body:has(.frontpage-masthead) .stacked-article-card .stack-copy,
body:has(.frontpage-masthead) .stacked-article-card .guide-showcase-copy {
  width: 100%;
  min-width: 0;
}

body:has(.frontpage-masthead) .headline-title {
  display: -webkit-box;
  overflow: hidden;
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: normal;
  word-break: normal;
  white-space: normal;
}

body:has(.frontpage-masthead) .clean-rank-num {
  min-width: 2rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #2563eb;
  font-family: ui-monospace, monospace;
  font-size: 1.15rem;
  font-weight: 800;
}

body:has(.frontpage-masthead) .tag-pill {
  display: inline-block;
  width: fit-content;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}

body:has(.frontpage-masthead) .vertical-label,
body:has(.frontpage-masthead) [style*="writing-mode"] {
  display: inline-block;
  margin-bottom: 0.5rem;
  writing-mode: horizontal-tb !important;
}

.backdrop {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(53, 213, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 213, 255, 0.08) 1px, transparent 1px),
    linear-gradient(120deg, rgba(53, 213, 255, 0.06), rgba(78, 125, 255, 0.08), rgba(147, 255, 84, 0.04));
  background-size: 54px 54px, 54px 54px, 100% 100%;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.82) 60%, transparent 100%);
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.backdrop::before,
.backdrop::after {
  content: "";
  position: absolute;
  inset: -10%;
  pointer-events: none;
}

.backdrop::before {
  background:
    radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(60, 176, 255, calc(var(--pointer-strength) * 1.2)), transparent 0 18%),
    radial-gradient(circle at 18% 22%, rgba(24, 214, 255, 0.22), transparent 0 15%),
    radial-gradient(circle at 78% 28%, rgba(130, 102, 255, 0.18), transparent 0 17%),
    radial-gradient(circle at 62% 76%, rgba(23, 115, 255, 0.16), transparent 0 19%);
  filter: blur(14px);
  mix-blend-mode: screen;
  opacity: 1;
  animation: backdrop-orbit 22s ease-in-out infinite;
}

.backdrop::after {
  background-image:
    radial-gradient(circle, rgba(24, 214, 255, 0.26) 0 1.6px, transparent 2.2px),
    radial-gradient(circle, rgba(130, 102, 255, 0.22) 0 1.3px, transparent 2px),
    linear-gradient(115deg, transparent 28%, rgba(24, 214, 255, 0.08) 29%, rgba(24, 214, 255, 0.08) 30%, transparent 31%),
    linear-gradient(115deg, transparent 54%, rgba(130, 102, 255, 0.08) 55%, rgba(130, 102, 255, 0.08) 56%, transparent 57%);
  background-size: 34px 34px, 46px 46px, 460px 460px, 560px 560px;
  background-position: 0 0, 14px 16px, 0 0, 160px 20px;
  mix-blend-mode: screen;
  opacity: 0.6;
  animation: backdrop-stream 26s linear infinite;
}

.backdrop-ripple {
  position: absolute;
  left: 0;
  top: 0;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.18);
  border: 1px solid rgba(60, 176, 255, 0.36);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.52) 0%, rgba(60, 176, 255, 0.16) 34%, rgba(130, 102, 255, 0.12) 56%, transparent 72%);
  opacity: 0;
  animation: backdrop-ripple 900ms cubic-bezier(0.18, 0.8, 0.22, 1) forwards;
}

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

.site-shell {
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 18px 48px;
  z-index: 1;
}

.page-body > section:nth-of-type(n + 3),
.site-footer {
  content-visibility: auto;
  contain-intrinsic-size: 1px 760px;
}

.site-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 6% 14%, rgba(53, 213, 255, 0.18), transparent 28%),
    radial-gradient(circle at 94% 22%, rgba(78, 125, 255, 0.16), transparent 26%),
    radial-gradient(circle at 48% 78%, rgba(147, 255, 84, 0.08), transparent 30%);
  filter: blur(6px);
}

.topbar,
.frontpage-masthead,
.hero-panel,
.featured-story,
.hero-aside,
.rail-card,
.section-block,
.story-card,
.topic-column,
.article-shell,
.policy-card,
.author-card,
.site-footer,
.simple-hero,
.ad-shell {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(8, 15, 27, 0.96), rgba(9, 21, 38, 0.88));
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 100%;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  animation: rise-in 700ms ease both;
}

.topbar::before,
.frontpage-masthead::before,
.hero-panel::before,
.featured-story::before,
.hero-aside::before,
.rail-card::before,
.section-block::before,
.story-card::before,
.topic-column::before,
.article-shell::before,
.policy-card::before,
.author-card::before,
.site-footer::before,
.simple-hero::before,
.ad-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(118deg, transparent 18%, rgba(40, 152, 255, 0.14) 42%, rgba(67, 112, 255, 0.12) 54%, transparent 78%);
  transform: translateX(-120%);
  opacity: 0;
}

.topbar:hover::before,
.frontpage-masthead:hover::before,
.hero-panel:hover::before,
.featured-story:hover::before,
.hero-aside:hover::before,
.rail-card:hover::before,
.section-block:hover::before,
.story-card:hover::before,
.topic-column:hover::before,
.article-shell:hover::before,
.policy-card:hover::before,
.author-card:hover::before,
.site-footer:hover::before,
.simple-hero:hover::before,
.ad-shell:hover::before {
  animation: neon-sweep 1150ms ease;
}

.frontpage-masthead {
  --motion-delay: 0ms;
  animation-delay: var(--motion-delay);
}

.frontpage-hero {
  --motion-delay: 80ms;
  animation-delay: var(--motion-delay);
}

.headline-ribbon {
  --motion-delay: 140ms;
  animation-delay: var(--motion-delay);
}

.frontpage-grid {
  --motion-delay: 200ms;
  animation-delay: var(--motion-delay);
}

.guide-showcase,
.topic-band,
.site-footer {
  --motion-delay: 240ms;
  animation-delay: var(--motion-delay);
}

.story-card,
.lead-mini,
.rail-card,
.topic-column,
.guide-showcase-lead,
.frontpage-masthead,
.masthead-brief,
.headline-ribbon,
.lead-feature {
  transform: perspective(1400px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, opacity 420ms ease;
}

[data-signal-shell] {
  opacity: 0;
}

[data-signal-shell].is-visible {
  opacity: 1;
  animation: newsroom-float 720ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

[data-signal-shell]::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(105, 190, 255, 0.18), transparent 0 26%);
  opacity: 0;
  transition: opacity 220ms ease;
}

[data-signal-shell].is-armed::after {
  opacity: 1;
}

@media (hover: hover) {
  .story-card,
  .lead-mini,
  .rail-card,
  .topic-column,
  .guide-showcase-lead {
    will-change: transform, box-shadow;
  }
}

.story-card:hover,
.lead-mini:hover,
.rail-card:hover,
.topic-column:hover,
.guide-showcase-lead:hover {
  transform: translateY(-6px) scale(1.004);
  border-color: rgba(53, 213, 255, 0.34);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(53, 213, 255, 0.14),
    0 0 32px rgba(53, 213, 255, 0.18);
}

.topbar > *,
.frontpage-masthead > *,
.hero-panel > *,
.frontpage-hero > *,
.guide-showcase > *,
.guide-showcase-lead > *,
.frontpage-grid > *,
.featured-split > *,
.section-grid > *,
.article-layout > * {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
  border-color: rgba(67, 136, 231, 0.3);
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(118, 176, 255, 0.12),
    0 0 0 1px rgba(35, 87, 165, 0.12);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-decoration: none;
}

.brand-lockup strong,
h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.026em;
  text-wrap: balance;
}

.brand-kicker,
.eyebrow,
.rail-label,
.pill,
.ad-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
}

.brand-kicker,
.eyebrow,
.rail-label,
.ad-label {
  color: var(--accent-deep);
}

.brand-icon {
  display: block;
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  filter:
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.22))
    drop-shadow(0 0 18px rgba(40, 152, 255, 0.14));
}

.brand-mark {
  display: block;
  width: min(248px, 100%);
  max-width: 100%;
  height: auto;
  max-height: 76px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.22));
}

.brand-wordmark {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.brand-wordmark strong {
  display: block;
  font-size: clamp(1.55rem, 1.5vw + 0.9rem, 2rem);
  line-height: 0.92;
  letter-spacing: -0.052em;
  color: #f5f9ff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
}

.brand-company {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.nav-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.course-nav-link { align-self: center; }
.courses-hero { padding: clamp(28px, 6vw, 72px); background: linear-gradient(135deg, rgba(214,178,94,.14), rgba(11,22,38,.94)); border: 1px solid rgba(214,178,94,.24); }
.courses-hero h1 { max-width: 820px; margin: 10px 0 16px; font-size: clamp(2.2rem, 5vw, 4.6rem); line-height: 1.05; }
.course-stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.course-stat-row span, .course-card-art span { border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 6px 10px; font-size: .78rem; color: #d9bf7b; }
.courses-library-page { display: grid; gap: 24px; }
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.course-card-inline { overflow: hidden; border: 1px solid rgba(148,163,184,.18); background: rgba(9,15,27,.86); }
.course-card-art { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.course-card-art img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8); }
.course-card-art span { position: absolute; left: 12px; bottom: 12px; background: rgba(4,8,18,.82); }
.course-card-copy { display: grid; gap: 10px; padding: 18px; }
.course-card-copy h3 { margin: 0; font-size: 1.25rem; }
.course-card-copy p:not(.eyebrow) { margin: 0; color: #b7c2d6; }
.course-card-copy details { border-top: 1px solid rgba(148,163,184,.15); padding-top: 12px; }
.course-card-copy summary { cursor: pointer; color: #f2d88b; font-weight: 700; }
.course-card-copy ol { margin: 12px 0; color: #b7c2d6; }
.course-lesson { display: grid; gap: 10px; margin: 14px 0; padding: 14px; border-left: 3px solid #d6b25e; background: rgba(214,178,94,.07); }
.course-lesson h4, .course-lesson p { margin: 0; }
.course-lesson h4 { color: #f7ead0; font-size: 1rem; }
.course-lesson strong { color: #f2d88b; }
.course-audio { display: grid; gap: 8px; padding: 12px; border: 1px solid rgba(56,189,248,.2); }
.course-audio audio { width: 100%; height: 34px; }
.course-audio span { color: #b7c2d6; font-size: .88rem; line-height: 1.5; }
@media (max-width: 900px) { .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .course-grid { grid-template-columns: 1fr; } }

.nav-strip a,
.lang-pill,
.hero-badges span,
.pill {
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid rgba(72, 135, 226, 0.22);
  background:
    linear-gradient(160deg, rgba(9, 21, 38, 0.92), rgba(11, 28, 48, 0.8));
  box-shadow: inset 0 1px 0 rgba(123, 175, 255, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.nav-strip a,
.lang-pill {
  font-size: 0.96rem;
}

.nav-strip a:hover,
.lang-pill:hover,
.hero-badges span:hover,
.pill:hover {
  transform: translateY(-2px);
  border-color: rgba(40, 152, 255, 0.38);
  box-shadow:
    0 0 0 1px rgba(40, 152, 255, 0.16),
    0 14px 28px rgba(0, 0, 0, 0.24);
  color: var(--accent-deep);
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  min-width: 0;
  box-sizing: border-box;
}

.lang-pill {
  font-weight: 700;
}

.lang-pill.subtle {
  background: linear-gradient(140deg, rgba(20, 79, 158, 0.58), rgba(39, 148, 255, 0.2));
  border-color: rgba(64, 146, 255, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(168, 213, 255, 0.12),
    0 0 22px rgba(28, 125, 255, 0.12);
}

.page-body {
  display: grid;
  gap: 22px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.frontpage-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  gap: 18px 24px;
  align-items: start;
  border-radius: var(--radius-xl);
  padding: 22px 24px;
}

.frontpage-masthead::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 0%, rgba(139, 198, 255, 0.05) 47%, transparent 52%),
    linear-gradient(112deg, transparent 24%, rgba(100, 182, 255, 0.12) 48%, transparent 72%);
  mix-blend-mode: screen;
  opacity: 0.55;
}

.frontpage-masthead-copy {
  position: relative;
}

.frontpage-masthead-copy::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  top: 22%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122, 190, 255, 0.4), transparent);
  opacity: 0;
  animation: signal-scan 8.2s ease-in-out infinite;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.hero-badges span {
  position: relative;
  overflow: hidden;
}

.hero-badges span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 16%, rgba(255, 255, 255, 0.22) 50%, transparent 84%);
  transform: translateX(-140%);
  opacity: 0;
}

.hero-badges span:hover::after {
  animation: signal-scan 900ms ease;
}

.frontpage-masthead-copy {
  display: grid;
  gap: 14px;
}

.frontpage-masthead-copy h1 {
  margin: 0;
  font-size: clamp(1.88rem, 3.2vw, 2.88rem);
  line-height: 1.06;
  max-width: 14ch;
}

.frontpage-masthead-text {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.72;
  max-width: 56ch;
}

.masthead-brief {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-lg) - 2px);
  background:
    linear-gradient(145deg, rgba(9, 18, 32, 0.92), rgba(8, 23, 41, 0.86));
  box-shadow:
    inset 0 1px 0 rgba(123, 175, 255, 0.1),
    0 16px 42px rgba(0, 0, 0, 0.24);
}

.masthead-founder {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.masthead-founder picture,
.masthead-founder img {
  width: 68px;
  height: 68px;
}

.masthead-founder picture {
  display: block;
  overflow: hidden;
  border-radius: 16px;
}

.masthead-founder img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid rgba(53, 213, 255, 0.24);
}

.masthead-founder strong {
  display: block;
  font-size: 0.98rem;
  color: var(--ink);
}

.masthead-founder span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.masthead-brief h2 {
  margin: 0;
  font-size: 1.42rem;
  line-height: 1.12;
}

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

.masthead-brief-item {
  display: grid;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.masthead-brief-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.masthead-brief-item strong {
  font-family: var(--font-head);
  font-size: 1rem;
  line-height: 1.28;
}

.masthead-brief-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.frontpage-hero,
.guide-showcase,
.frontpage-grid {
  display: grid;
  gap: 22px;
}

.frontpage-hero {
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
  align-items: start;
}

.frontpage-rail,
.lead-mini-grid,
.headline-list,
.guide-showcase-side {
  display: grid;
  gap: 16px;
}

.frontpage-rail {
  align-content: start;
}

.lead-feature,
.lead-mini,
.headline-ribbon,
.guide-showcase-lead {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.lead-feature {
  position: relative;
  min-height: 480px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: grid;
}

.lead-feature-media,
.lead-feature-media img {
  width: 100%;
  height: 100%;
}

.lead-feature-media {
  margin: 0;
  min-height: 480px;
}

.lead-feature-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 21, 40, 0.06) 0%, rgba(8, 25, 50, 0.36) 42%, rgba(6, 15, 30, 0.9) 100%),
    radial-gradient(circle at 84% 8%, rgba(24, 214, 255, 0.18), transparent 34%);
}

.lead-feature-copy {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  display: grid;
  gap: 12px;
  padding: 24px;
  color: #fffaf3;
}

.lead-feature-topline,
.lead-feature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.lead-feature-topline {
  color: rgba(255, 250, 243, 0.82);
  font-size: 0.88rem;
}

.hot-pill {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 138, 61, 0.2);
  color: #fffaf3;
}

.lead-feature h2 {
  margin: 0;
  font-size: clamp(1.24rem, 1.54vw, 1.52rem);
  line-height: 1.18;
  max-width: 22ch;
}

.lead-feature h2 a,
.lead-feature .read-link.inverted,
.lead-feature .lead-feature-source {
  color: #fffaf3;
}

.lead-feature-hook {
  margin: 0;
  max-width: 58ch;
  font-size: 0.98rem;
  line-height: 1.62;
  color: rgba(255, 250, 243, 0.92);
}

.lead-flag {
  color: #fffaf3;
  background: rgba(255, 255, 255, 0.14);
}

.read-link.inverted {
  font-weight: 800;
}

.lead-feature-source {
  font-size: 0.86rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 250, 243, 0.72);
}

.lead-mini {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.lead-mini-media {
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.lead-mini-copy {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.lead-mini h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.24;
}

.lead-mini-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.56;
}

.compact-head {
  margin-bottom: 10px;
}

.headline-list {
  counter-reset: headlines;
}

.headline-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.headline-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.headline-index {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(24, 214, 255, 0.42);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.86), rgba(226, 243, 255, 0.86));
  color: var(--accent-deep);
  font-weight: 800;
  font-size: 0.92rem;
  animation: halo-pulse 3.2s ease-out infinite;
}

.headline-item strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1rem;
  line-height: 1.28;
}

.headline-item span:last-child {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.headline-ribbon {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px 22px;
  align-items: start;
  border-radius: var(--radius-xl);
  padding: 20px 22px;
}

.headline-ribbon-head {
  display: grid;
  gap: 8px;
}

.headline-ribbon-head h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.12;
  max-width: 14ch;
}

.headline-ribbon-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.headline-ribbon.is-marquee-ready {
  overflow: hidden;
}

.headline-ribbon.is-marquee-ready .headline-ribbon-track {
  display: flex;
  width: max-content;
  gap: 14px;
  animation: signal-marquee var(--marquee-duration, 30s) linear infinite;
}

.headline-ribbon.is-marquee-ready:hover .headline-ribbon-track {
  animation-play-state: paused;
}

.headline-ribbon.is-marquee-ready .ribbon-item {
  width: min(260px, 32vw);
  flex: 0 0 auto;
}

.ribbon-item {
  display: grid;
  gap: 6px;
  padding: 12px 0 12px 14px;
  border-left: 2px solid rgba(15, 127, 84, 0.16);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(9, 19, 34, 0.7), rgba(9, 20, 36, 0.36));
}

.ribbon-item span,
.ribbon-item em {
  color: var(--muted);
  font-size: 0.84rem;
  font-style: normal;
}

.ribbon-item strong {
  font-family: var(--font-head);
  font-size: 0.97rem;
  line-height: 1.24;
}

.frontpage-grid {
  grid-template-columns: minmax(0, 1.06fr) minmax(300px, 0.94fr);
}

.editors-block {
  align-content: start;
}

.newsroom-brief {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.company-flash-card p:last-of-type,
.newsroom-brief p:last-of-type {
  color: var(--muted);
}

.guide-showcase {
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  align-items: start;
}

.guide-showcase-lead {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 22px;
  border-radius: var(--radius-xl);
  padding: 20px;
  align-items: start;
  container-type: inline-size;
  overflow: hidden;
}

.guide-showcase-media {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 250px;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 4px);
}

.guide-showcase-copy {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}

.guide-showcase-copy h2 {
  margin: 0;
  font-size: clamp(1.26rem, 1.9vw, 1.64rem);
  line-height: 1.16;
  max-width: 18ch;
}

@container (max-width: 760px) {
  .guide-showcase-lead {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .guide-showcase-media {
    min-height: 220px;
    max-height: 300px;
  }

  .guide-showcase-copy h2 {
    max-width: none;
  }
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  gap: 22px;
  align-items: start;
  border-radius: var(--radius-xl);
  padding: 28px;
}

.hero-copy {
  display: grid;
  gap: 18px;
  align-content: start;
}

.hero-copy h1,
.simple-hero h1,
.article-header h1 {
  margin: 0;
  font-size: clamp(1.96rem, 4vw, 3.45rem);
  line-height: 1.04;
}

.hero-copy h1 {
  max-width: 14ch;
}

.simple-hero h1 {
  font-size: clamp(1.86rem, 3.5vw, 2.95rem);
  line-height: 1.06;
}

.article-header h1 {
  max-width: 16ch;
  font-size: clamp(2.2rem, 4.4vw, 3.7rem);
  line-height: 1.04;
}

.hero-text,
.simple-hero p,
.article-dek,
.story-summary,
.article-summary,
.policy-card p,
.author-card p {
  color: var(--muted);
  line-height: 1.72;
  font-size: 1.01rem;
  font-family: var(--font-body);
}

.hero-text {
  max-width: 42rem;
  margin: 0;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.hero-notebook {
  max-width: 760px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(11, 28, 52, 0.92), rgba(8, 21, 39, 0.92));
  padding: 18px 20px;
  display: grid;
  gap: 14px;
}

.hero-notebook-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
}

.hero-notebook h2 {
  margin: 6px 0 0;
  font-size: 1.48rem;
  line-height: 1.16;
}

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

.hero-notebook-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.hero-notebook-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.hero-notebook-item strong {
  display: block;
  font-family: var(--font-head);
  font-size: 0.96rem;
  line-height: 1.42;
}

.hero-notebook-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-family: var(--font-body);
  line-height: 1.6;
}

.hero-notebook-item span {
  color: var(--accent-deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-aside {
  border-radius: var(--radius-lg);
  padding: 18px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.reader-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(10, 27, 50, 0.9), rgba(7, 19, 36, 0.84));
  padding: 18px;
}

.reader-card.accent {
  background: linear-gradient(135deg, rgba(53, 213, 255, 0.14), rgba(147, 255, 84, 0.08));
}

.reader-card h2,
.reader-card h3 {
  margin: 0;
  font-size: 1.34rem;
  line-height: 1.16;
}

.reader-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
  font-family: var(--font-body);
}

.reader-card-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
}

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

.reader-list-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.reader-list-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.reader-list-item strong {
  display: block;
  font-family: var(--font-head);
  font-size: 0.94rem;
  line-height: 1.4;
}

.reader-list-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.reader-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(24, 214, 255, 0.42);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(227, 243, 255, 0.82));
  color: var(--accent-deep);
  font-weight: 800;
  font-size: 0.9rem;
}

.reader-list.compact .reader-list-item {
  grid-template-columns: 1fr;
}

.reader-list-item.compact strong {
  font-size: 1.02rem;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.75);
  padding: 18px;
}

.stat-card strong {
  display: block;
  font-size: 2.2rem;
  font-family: var(--font-head);
}

.stat-card span,
.stat-card p {
  margin: 0;
  color: var(--muted);
}

.stat-card.accent {
  background: linear-gradient(135deg, rgba(15, 127, 84, 0.14), rgba(255, 138, 61, 0.08));
}

.stat-card.caution {
  background: rgba(214, 80, 120, 0.08);
}

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

.featured-split,
.section-grid,
.article-layout,
.topic-band,
.author-grid,
.newsroom-strip,
.lane-grid,
.endpoint-grid {
  display: grid;
  gap: 22px;
}

.featured-split {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.featured-story,
.section-block,
.simple-hero,
.article-shell,
.site-footer {
  border-radius: var(--radius-xl);
  padding: 26px;
}

.briefing-rail,
.policy-stack {
  display: grid;
  gap: 16px;
}

.compact-stack .stack-item {
  padding: 0;
  border-top: 1px solid var(--line);
}

.compact-stack .stack-item:first-child {
  border-top: 0;
}

.rail-card,
.story-card,
.policy-card,
.author-card,
.topic-column {
  border-radius: var(--radius-lg);
  padding: 20px;
}

.story-card {
  display: grid;
  gap: 10px;
  align-content: start;
}

.story-meta-line,
.story-footer,
.topic-title-row,
.stack-topline,
.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.story-meta-line,
.stack-topline,
.article-byline {
  color: var(--muted);
  font-size: 0.92rem;
}

.story-card h3,
.featured-story h2,
.section-head h2,
.rail-card h3,
.topic-column h3,
.article-section h2,
.policy-card h2,
.author-card h2 {
  margin: 0;
  font-size: clamp(1.32rem, 1.95vw, 1.92rem);
  line-height: 1.16;
}

.featured-story h2 {
  font-size: clamp(1.95rem, 3.3vw, 2.85rem);
  line-height: 1.12;
}

.story-card h3 {
  font-size: 1.02rem;
  line-height: 1.34;
}

.featured-media,
.story-media,
.stack-media,
.article-hero-media {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 4px);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
}

.featured-media img,
.lead-feature-media img,
.lead-mini-media img,
.guide-showcase-media img,
.story-media img,
.stack-media img,
.article-hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-image-fallback {
  display: none;
  width: 100%;
  height: 100%;
}

[data-story-image].is-broken img {
  display: none;
}

[data-story-image].is-broken .story-image-fallback {
  display: block;
}

.story-image-fallback .story-placeholder-card,
.story-image-fallback .stack-placeholder-card,
.story-image-fallback .article-placeholder-card {
  min-height: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
}

.featured-media,
.story-media,
.article-hero-media,
.stack-media,
.guide-showcase-media {
  aspect-ratio: 16 / 10;
}

.story-media {
  margin-bottom: 14px;
}

.stack-media {
  width: 112px;
  min-width: 112px;
}

.stack-copy .story-hook,
.hero-notebook-item p,
.brand-note {
  display: none;
}

.article-hero-media {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.78);
  aspect-ratio: 16 / 9;
}

.article-hero-media img {
  border-radius: calc(var(--radius-lg) - 8px);
}

@media (max-width: 640px) {
  .article-hero-media {
    width: 92%;
    margin-inline: auto;
  }
}

/* Homepage-only light editorial interaction layer. */
body.homepage {
  --editorial-bg: #fbfbfc;
  --editorial-ink: #090a0f;
  --editorial-muted: #475569;
  --editorial-line: rgba(15, 23, 42, 0.1);
  background: var(--editorial-bg);
  color: var(--editorial-ink);
}

body.homepage .site-shell,
body.homepage .page-body { position: relative; z-index: 1; }
body.homepage .ambient-glow-wrapper { z-index: 0; }
body.homepage .custom-cursor-dot,
body.homepage .custom-cursor-ring { display: block; }
body.homepage .custom-cursor-dot { position: fixed; width: 8px; height: 8px; border-radius: 50%; background: #4f46e5; pointer-events: none; z-index: 10000; transform: translate(-50%, -50%); }
body.homepage .custom-cursor-ring { position: fixed; width: 44px; height: 44px; border: 1px solid rgba(79, 70, 229, 0.35); border-radius: 50%; pointer-events: none; z-index: 9999; transform: translate(-50%, -50%); }
body.homepage .custom-cursor-ring .cursor-text { opacity: 0; color: #fff; font-size: .62rem; font-weight: 800; }
body.homepage .custom-cursor-ring.active-card { width: 76px; height: 76px; background: #4f46e5; border-color: transparent; }
body.homepage .custom-cursor-ring.active-card .cursor-text { opacity: 1; }
body.homepage .read-progress-bar { position: fixed; inset: 0 0 auto; width: 0; height: 3px; z-index: 10001; background: linear-gradient(90deg, #4f46e5, #06b6d4, #10b981); }
body.homepage .marquee-container { position: relative; z-index: 2; overflow: hidden; padding: 10px 0; background: #fff; border-bottom: 1px solid var(--editorial-line); white-space: nowrap; }
body.homepage .marquee-track { display: flex; width: max-content; gap: 36px; }
body.homepage .marquee-item { display: inline-flex; align-items: center; gap: 8px; color: var(--editorial-muted); font-size: .85rem; font-weight: 600; text-decoration: none; }
body.homepage .live-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #10b981; box-shadow: 0 0 6px #10b981; }
body.homepage .category-nav-container { position: relative; z-index: 2; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 20px auto; padding: 8px 12px; max-width: 1280px; background: #fff; border: 1px solid var(--editorial-line); border-radius: 999px; }
body.homepage .category-nav-container::-webkit-scrollbar { display: none; }
body.homepage .category-pill-btn { position: relative; z-index: 2; flex: 0 0 auto; padding: 8px 18px; border-radius: 999px; color: var(--editorial-muted); text-decoration: none; white-space: nowrap; }
body.homepage .category-pill-btn.active { color: #fff; background: #4f46e5; }
body.homepage .sliding-pill-indicator { position: absolute; z-index: 1; top: 6px; left: 0; height: calc(100% - 12px); width: 0; opacity: 0; border-radius: 999px; background: #4f46e5; }
body.homepage .article-spotlight-card { transform-style: preserve-3d; will-change: transform; border-color: var(--editorial-line); box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }
body.homepage .article-spotlight-card::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; background: radial-gradient(360px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), rgba(79, 70, 229, .08), transparent 78%); transition: opacity .3s ease; }
body.homepage .article-spotlight-card:hover::before { opacity: 1; }
body.homepage .article-spotlight-card img { transition: transform .6s var(--ease-smooth, cubic-bezier(.16, 1, .3, 1)); }
body.homepage .article-spotlight-card:hover img { transform: scale(1.05); }
body.homepage .story-card h3 a,
body.homepage .headline-title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.4; }
body.homepage .story-hook { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
body.homepage .glow-orb { position: absolute; border-radius: 50%; filter: blur(130px); opacity: .45; pointer-events: none; }
body.homepage .glow-orb-1 { top: -150px; right: -100px; width: 550px; height: 550px; background: radial-gradient(circle, rgba(99, 102, 241, .25), transparent 70%); }
body.homepage .glow-orb-2 { bottom: 5%; left: -200px; width: 650px; height: 650px; background: radial-gradient(circle, rgba(6, 182, 212, .18), transparent 70%); }
body.homepage .cosmos-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .28; z-index: 0; }
body.homepage.theme-dark .cosmos-canvas { opacity: .78; mix-blend-mode: screen; }
body.homepage .cyber-door { position: fixed; top: 0; bottom: 0; width: 50vw; display: flex; align-items: center; pointer-events: none; background: #10151c; z-index: 10002; transform: translateX(-100%); }
body.homepage .cyber-door-left { left: 0; justify-content: flex-end; }
body.homepage .cyber-door-right { right: 0; justify-content: flex-start; transform: translateX(100%); }
body.homepage .cyber-door.is-closing { will-change: transform; }
body.homepage .cyber-door-beam { width: 3px; height: 100%; background: var(--amber); box-shadow: 0 0 20px rgba(217, 164, 65, .8); }
body.homepage .eclipse-toggle-btn { position: fixed; right: 24px; bottom: 24px; z-index: 30; width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--ink-line); border-radius: 50%; color: var(--text-on-ink); background: var(--ink-soft); cursor: pointer; }
body.homepage .eclipse-orb { width: 22px; height: 22px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 16px rgba(217, 164, 65, .65); transition: transform .35s ease, background .35s ease; }
body.homepage.theme-dark .eclipse-orb { background: var(--teal); transform: translateX(-3px); }
body.homepage.theme-dark { --ink: #090d13; --ink-soft: #111923; --text-on-ink: #eef4f2; }
body.homepage.theme-dark .cyber-door { background: #05070b; }

/* Shared newsroom atmosphere. The Store route intentionally has no newsroom-page class. */
body.newsroom-page .cosmos-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .28; z-index: 0; }
body.newsroom-page.theme-dark .cosmos-canvas { opacity: .78; mix-blend-mode: screen; }
body.newsroom-page .site-shell,
body.newsroom-page .page-body { position: relative; z-index: 1; }
body.newsroom-page .marquee-container { position: relative; z-index: 2; overflow: hidden; width: 100%; padding: 10px 0; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--editorial-line); white-space: nowrap; }
body.newsroom-page .marquee-track { display: flex; width: max-content; gap: 36px; will-change: transform; }

body.newsroom-page .marquee-item { display: inline-flex; align-items: center; gap: 8px; color: #334155; font-size: .85rem; font-weight: 600; text-decoration: none; }
body.newsroom-page .live-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #10b981; box-shadow: 0 0 6px #10b981; }
body.newsroom-page.theme-dark .marquee-container { background: rgba(8,19,35,.92); border-bottom-color: rgba(180,215,242,.18); }
body.newsroom-page.theme-dark .marquee-item { color: #e6f1ff; }
body.newsroom-page.theme-dark .marquee-item:hover,
body.newsroom-page.theme-dark .marquee-item:focus-visible { color: #ffffff; }
body.newsroom-page .cyber-door { position: fixed; top: 0; bottom: 0; width: 50vw; display: flex; align-items: center; pointer-events: none; z-index: 10002; transform: translateX(-100%); overflow: hidden; contain: paint; transition: transform 1.05s cubic-bezier(.65,0,.35,1); }
body.newsroom-page .cyber-door-left { left: 0; justify-content: flex-end; }
body.newsroom-page .cyber-door-right { right: 0; justify-content: flex-start; transform: translateX(100%); }
body.newsroom-page .cyber-door-left .door-panel { transform-origin: right center; }
body.newsroom-page .cyber-door-right .door-panel { transform-origin: left center; }
body.newsroom-page .cyber-door.is-closing .door-panel { transform: perspective(1100px) rotateY(0deg) translateZ(0); }
body.newsroom-page .cyber-door:not(.is-closing):not(.is-opening) .door-panel { transform: perspective(1100px) rotateY(0deg) translateZ(0); }
body.newsroom-page .cyber-door-left.is-opening .door-panel { transform: perspective(1100px) rotateY(16deg) translateZ(0); }
body.newsroom-page .cyber-door-right.is-opening .door-panel { transform: perspective(1100px) rotateY(-16deg) translateZ(0); }
body.newsroom-page .door-panel { position: relative; display: block; width: calc(100% - 18px); height: 100%; overflow: hidden; background: linear-gradient(118deg, #050b12 0%, #263746 12%, #71899a 20%, #182733 31%, #0b141e 47%, #536978 62%, #121e29 78%, #6b8291 90%, #050a10 100%); border: 10px solid #050a10; border-radius: 4px; transform: perspective(1100px) rotateY(0deg); transform-origin: center; backface-visibility: hidden; box-shadow: inset 0 0 0 2px #9fb4c2, inset 0 0 0 6px #172735, inset 0 0 28px rgba(0,0,0,.9), 0 0 0 2px rgba(131,196,225,.55), 0 18px 44px rgba(0,0,0,.8); }
body.newsroom-page .door-panel::before { content: ""; position: absolute; inset: 5%; background: repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, transparent 1px 46px), linear-gradient(145deg, transparent 0 31%, rgba(117,210,255,.18) 32% 33%, transparent 34% 62%, rgba(255,160,68,.14) 63% 64%, transparent 65%); border: 2px solid rgba(155,211,235,.58); box-shadow: inset 0 0 0 5px rgba(4,12,20,.8), inset 0 0 0 8px rgba(118,170,194,.45), inset 14px 0 20px rgba(255,255,255,.08), inset -16px 0 22px rgba(0,0,0,.55); }
body.newsroom-page .door-panel::after { content: ""; position: absolute; inset: 10% 7%; border: 1px solid rgba(161,222,249,.44); background: radial-gradient(circle at 50% 50%, rgba(80,203,255,.25), transparent 23%), repeating-conic-gradient(from 8deg, rgba(151,222,255,.18) 0 2deg, transparent 2deg 18deg); opacity: .78; transform: rotate(-7deg); }
body.newsroom-page .door-metal-frame { position: absolute; z-index: 2; inset: 7%; border: 4px solid #a8c4d2; box-shadow: inset 0 0 0 4px #08111a, inset 0 0 0 7px #547383, 0 0 0 2px #0a131c; transform: skewY(-2deg); }
body.newsroom-page .door-machinery { position: absolute; z-index: 3; inset: 16% 12%; border: 8px solid #172a36; background: repeating-linear-gradient(0deg, rgba(189,231,245,.22) 0 2px, transparent 2px 18px), linear-gradient(110deg, rgba(8,20,29,.9), rgba(91,132,148,.36) 48%, rgba(3,12,19,.94)); box-shadow: inset 0 0 0 2px #6f9cad, inset 0 0 22px rgba(0,0,0,.95), 0 0 0 2px #08131c, 0 0 24px rgba(79,205,255,.18); transform: skewY(-1deg); }
body.newsroom-page .door-machinery::before { content: ""; position: absolute; inset: 12% 7%; border: 2px solid rgba(162,226,245,.7); background: repeating-linear-gradient(90deg, transparent 0 28px, rgba(135,215,239,.3) 29px 31px, transparent 32px 58px); box-shadow: inset 0 0 0 5px rgba(5,15,23,.8), inset 0 0 16px rgba(91,213,255,.22); }
body.newsroom-page .door-machinery::after { content: ""; position: absolute; right: 8%; top: 12%; width: 16%; height: 76%; border: 2px solid #8bd9ee; background: repeating-linear-gradient(0deg, #1d5264 0 6px, #07131d 6px 12px); box-shadow: 0 0 12px rgba(55,201,255,.55), inset 0 0 10px #071018; }
body.newsroom-page .door-rivets { position: absolute; z-index: 4; inset: 12%; background: radial-gradient(circle at 0 0, #d9f1f7 0 4px, #182a36 5px 8px, transparent 9px) 0 0 / 25% 25%; opacity: .78; }
body.newsroom-page .door-handle { position: absolute; z-index: 6; top: 50%; width: 48px; height: 48px; border: 8px solid #cbe6ef; border-radius: 50%; background: radial-gradient(circle, #03080d 0 34%, #4d7484 36% 49%, #09131b 52%); box-shadow: 0 0 0 3px #071018, inset 0 0 10px #8fd9ef, 0 0 18px rgba(48,202,255,.65), 0 8px 12px rgba(0,0,0,.7); transform: translateY(-50%); }
body.newsroom-page .door-handle-left { right: 8px; } body.newsroom-page .door-handle-right { left: 8px; }
body.newsroom-page .door-brand { position: absolute; z-index: 3; top: 50%; left: 50%; display: flex; width: min(74%, 260px); transform: translate(-50%, -50%); flex-direction: column; align-items: center; gap: 10px; padding: 16px 14px 13px; border: 1px solid rgba(116, 220, 255, .62); border-radius: 10px; background: linear-gradient(180deg, rgba(5, 18, 29, .88), rgba(7, 31, 47, .72)); box-shadow: inset 0 0 0 2px rgba(255, 173, 66, .16), 0 0 22px rgba(33, 190, 255, .3); color: #f4fbff; text-align: center; }
body.newsroom-page .door-brand img { display: block; width: clamp(42px, 7vw, 76px); height: auto; filter: brightness(1.8) drop-shadow(0 0 10px rgba(86, 214, 255, .82)); }
body.newsroom-page .door-brand strong { color: #f4fbff; font-family: var(--font-head); font-size: clamp(.7rem, 1.25vw, 1.05rem); font-weight: 800; letter-spacing: .08em; line-height: 1.2; text-shadow: 0 1px 3px #020a10, 0 0 10px rgba(111, 218, 255, .7); white-space: nowrap; }
body.newsroom-page .door-gap-light { position: absolute; z-index: 5; top: 0; bottom: 0; width: 4px; opacity: 0; background: linear-gradient(180deg, transparent, #fff4b2 24%, #fff 50%, #ffd66f 76%, transparent); box-shadow: 0 0 34px 12px rgba(255,209,93,.9), 0 0 100px 26px rgba(255,151,37,.42); transition: opacity .18s ease; }
body.newsroom-page .cyber-door-left .door-gap-light { right: -2px; } body.newsroom-page .cyber-door-right .door-gap-light { left: -2px; }
body.newsroom-page .cyber-door.is-closing .door-gap-light { opacity: .9; animation: portal-seam-flicker .72s ease-in-out both; }
body.newsroom-page .cyber-door.is-opening .door-gap-light { opacity: 1; }
body.newsroom-page .cyber-door.is-opening .door-panel { transition: box-shadow .35s ease; box-shadow: inset 0 0 0 2px #b9e8f7, inset 0 0 0 7px #172735, inset 0 0 40px rgba(0,0,0,.82), 0 0 0 3px rgba(92,211,255,.8), 0 0 46px rgba(39,194,255,.45); }
body.newsroom-page .cyber-door.is-closing { will-change: transform; }
body.newsroom-page .cyber-door.is-opening .door-panel::before,
body.newsroom-page .cyber-door.is-closing .door-panel::before { animation: portal-scanline 1.05s ease-in-out both; }
body.newsroom-page .cyber-door.is-opening .door-panel::after,
body.newsroom-page .cyber-door.is-closing .door-panel::after { animation: portal-electromagnetic-glitch 1.05s ease-in-out both; }
@keyframes portal-scanline {
  0%, 100% { background-position: 0 0, 0 0; opacity: .72; }
  18% { background-position: 28px 0, 0 0; opacity: 1; }
  23% { background-position: -12px 0, 0 0; opacity: .5; }
  52% { background-position: 42px 0, 0 0; opacity: .9; }
}
@keyframes portal-electromagnetic-glitch {
  0%, 100% { opacity: .72; filter: none; transform: rotate(-7deg) translate3d(0,0,0); }
  14% { opacity: 1; filter: drop-shadow(3px 0 rgba(255,64,120,.45)) drop-shadow(-3px 0 rgba(70,220,255,.5)); transform: rotate(-7deg) translate3d(2px,0,0); }
  19% { opacity: .42; filter: none; transform: rotate(-7deg) translate3d(-1px,0,0); }
  62% { opacity: .9; filter: drop-shadow(-2px 0 rgba(255,64,120,.3)) drop-shadow(2px 0 rgba(70,220,255,.35)); }
}
@keyframes portal-seam-flicker {
  0%, 100% { opacity: .15; filter: none; }
  34% { opacity: 1; filter: drop-shadow(0 0 8px rgba(255,244,178,.95)); }
  42% { opacity: .35; }
  68% { opacity: .95; filter: drop-shadow(0 0 12px rgba(255,151,37,.8)); }
}
body.newsroom-page .eclipse-toggle-btn { position: fixed; top: 76px; right: 28px; z-index: 10003; }
body.newsroom-page .eclipse-toggle-btn { width: 48px; height: 48px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(35,86,132,.24); border-radius: 50%; background: #fff; cursor: pointer; }
body.newsroom-page .theme-icon { display: block; width: 25px; height: 25px; position: relative; font-size: 0; }
body.newsroom-page .theme-icon::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; }
body.newsroom-page .theme-icon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(currentColor 0 7deg, transparent 7deg 45deg); mask: radial-gradient(circle, transparent 0 55%, #000 57% 66%, transparent 68%); }
body.newsroom-page .theme-icon-sun { color: #e08a12; }
body.newsroom-page .theme-icon-sun::before { background: radial-gradient(circle at 35% 30%, #fff8bd 0 10%, #ffc52e 30%, #e08a12 100%); box-shadow: 0 0 12px rgba(255,190,35,.85); }
body.newsroom-page .theme-icon-moon { display: none; color: #9ed5ff; }
body.newsroom-page .theme-icon-moon::before { background: radial-gradient(circle at 35% 30%, #fff 0 6%, #d9efff 35%, #76aee0 100%); box-shadow: 0 0 13px rgba(112,190,255,.8); }
body.newsroom-page .theme-icon-moon::after { background: #111c2b; mask: none; inset: 1px 1px 5px 8px; }
body.newsroom-page.theme-dark .theme-icon-sun { display: none; }
body.newsroom-page.theme-dark .theme-icon-moon { display: block; }
body.newsroom-page.theme-dark .eclipse-toggle-btn { background: #111c2b; border-color: rgba(180,215,242,.3); }
body.newsroom-page .sky-clouds { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(rgba(238,248,255,.32), rgba(255,255,255,.48)), url("https://images.unsplash.com/photo-1499346030926-9a72daac6c63?auto=format&fit=crop&w=2400&q=82") center / cover; filter: saturate(.88) brightness(1.08); transform: scale(1.04); }
body.newsroom-page.theme-dark .sky-clouds { display: none; }
body.newsroom-page.theme-dark { background: #020611; color: #e8f1fa; }
body.newsroom-page.theme-dark::before,
body.newsroom-page.theme-dark::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; }
body.newsroom-page.theme-dark::before { background: linear-gradient(rgba(2,6,17,.28), rgba(2,6,17,.5)), url("https://images.unsplash.com/photo-1462331940025-496dfbfc7564?auto=format&fit=crop&w=2400&q=88") center / cover no-repeat, #020611; }
body.newsroom-page.theme-dark::after { background: linear-gradient(154deg, transparent 28%, rgba(126,178,255,.09) 42%, rgba(210,160,255,.12) 48%, transparent 63%); mix-blend-mode: screen; animation: newsroom-galaxy-drift 32s ease-in-out infinite alternate; }
@keyframes newsroom-galaxy-drift { from { transform: translate3d(-2%,1%,0) scale(1.03); } to { transform: translate3d(2%,-1%,0) scale(1.08); } }
body.newsroom-page.theme-dark .topbar,
body.newsroom-page.theme-dark .page-body > * { color: #e8f1fa; }
body.newsroom-page.theme-dark .topbar { background: rgba(8,19,35,.92); }
body.newsroom-page.theme-dark .topbar-actions a,
body.newsroom-page.theme-dark a { color: #f4f8ff; }
body.newsroom-page.theme-dark .article-layout,
body.newsroom-page.theme-dark .article-shell,
body.newsroom-page.theme-dark .article-section,
body.newsroom-page.theme-dark .story-card,
body.newsroom-page.theme-dark .comment-card,
body.newsroom-page.theme-dark .comment-form,
body.newsroom-page.theme-dark .comment-list,
body.newsroom-page.theme-dark .site-footer,
body.newsroom-page.theme-dark .ad-shell { background: rgba(17,28,43,.95); border-color: rgba(180,215,242,.22); }
body.newsroom-page.theme-dark .article-shell { color: #edf6ff; }
body.newsroom-page.theme-dark .brand-wordmark strong,
body.newsroom-page.theme-dark .brand-wordmark span { color: #f4f8ff !important; opacity: 1 !important; }
body.newsroom-page.theme-dark .topbar-actions .lang-pill:not(.subtle) { background: #182941; border-color: rgba(180,215,242,.3); color: #f4f8ff !important; }
body.newsroom-page.theme-dark .topbar-actions .lang-pill.subtle { color: #ffffff !important; }
body.newsroom-page.theme-dark .article-header h1,
body.newsroom-page.theme-dark .article-header .article-summary,
body.newsroom-page.theme-dark .article-header .article-meta,
body.newsroom-page.theme-dark .article-body p,
body.newsroom-page.theme-dark .article-body li,
body.newsroom-page.theme-dark .article-section p { color: #edf6ff !important; }
body.newsroom-page.theme-dark .article-summary,
body.newsroom-page.theme-dark .article-byline,
body.newsroom-page.theme-dark .article-meta { color: #c5d7ea !important; }
body.newsroom-page.theme-dark .site-footer { color: #edf6ff; }
body.newsroom-page.theme-dark .footer-brand strong,
body.newsroom-page.theme-dark .footer-brand p,
body.newsroom-page.theme-dark .footer-links a,
body.newsroom-page.theme-dark .footer-links a:hover,
body.newsroom-page.theme-dark .footer-links a:focus-visible { color: #edf6ff !important; opacity: 1 !important; }
body.newsroom-page.theme-dark .comment-card p,
body.newsroom-page.theme-dark .comment-empty,
body.newsroom-page.theme-dark .comment-card-head span { color: #c5d7ea !important; }
body.newsroom-page.theme-dark .comment-form input,
body.newsroom-page.theme-dark .comment-form textarea,
body.newsroom-page.theme-dark .comment-form select { background: #0b1728; border-color: rgba(180,215,242,.3); color: #edf6ff; }
body.newsroom-page.theme-dark h1,
body.newsroom-page.theme-dark h2,
body.newsroom-page.theme-dark h3,
body.newsroom-page.theme-dark p,
body.newsroom-page.theme-dark li,
body.newsroom-page.theme-dark .article-body { color: #edf6ff; }
body.newsroom-page.theme-dark .eyebrow,
body.newsroom-page.theme-dark .article-meta,
body.newsroom-page.theme-dark .text-muted { color: #c5d7ea; }
@media (max-width: 640px) {
  body.homepage .eclipse-toggle-btn { right: 16px; bottom: 16px; }
  body.homepage .cosmos-canvas { opacity: .18; }
}
@media (pointer: coarse) { body.homepage .custom-cursor-dot, body.homepage .custom-cursor-ring { display: none; } }
@media (prefers-reduced-motion: reduce) {
  body.homepage .custom-cursor-dot, body.homepage .custom-cursor-ring, body.homepage .glow-orb { display: none; }
  body.homepage .article-spotlight-card { transform: none !important; }
  body.homepage .cyber-door { display: none; }
}

/* Approved homepage direction: restrained editorial dark mode with two signal accents. */
:root {
  --ink: #14181F;
  --ink-soft: #1D222B;
  --ink-line: rgba(236,232,222,0.14);
  --paper: #ECE8DE;
  --text-on-ink: #ECE8DE;
  --text-muted: #A7A99A;
  --amber: #D9A441;
  --teal: #4C8577;
  --bg: var(--ink);
  --bg-2: var(--ink);
  --muted: var(--text-muted);
  --surface: var(--ink-soft);
  --surface-strong: var(--ink-soft);
  --line: var(--ink-line);
  --accent: var(--amber);
  --font-ui: "Inter", sans-serif;
  --font-head: "Fraunces", serif;
  --font-body: "Inter", sans-serif;
}

body:has(.frontpage-masthead) {
  background: var(--ink);
  color: var(--text-on-ink);
}

body:has(.frontpage-masthead) .backdrop,
body:has(.frontpage-masthead)::before,
body:has(.frontpage-masthead)::after {
  display: none;
}

body:has(.frontpage-masthead) .site-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px 48px;
}

body:has(.frontpage-masthead) .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  background: rgba(20, 24, 31, 0.9);
  border-color: var(--ink-line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: none;
}

body:has(.frontpage-masthead) .brand-icon {
  display: none;
}

body:has(.frontpage-masthead) .brand-lockup::after {
  content: "";
  width: 11px;
  height: 11px;
  margin-left: 8px;
  background: var(--amber);
  transform: rotate(45deg);
}

body:has(.frontpage-masthead) .brand-wordmark strong {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.03em;
}

body:has(.frontpage-masthead) .nav-strip {
  border-left: 1px solid var(--ink-line);
  margin-left: 18px;
  padding-left: 18px;
}

body:has(.frontpage-masthead) .topbar-actions a,
body:has(.frontpage-masthead) .nav-strip a,
body:has(.frontpage-masthead) .category-menu summary {
  color: var(--text-muted);
}

body:has(.frontpage-masthead) .page-body {
  gap: 72px;
  padding-top: 62px;
}

body:has(.frontpage-masthead) .frontpage-masthead,
body:has(.frontpage-masthead) .frontpage-hero,
body:has(.frontpage-masthead) .latest-grid,
body:has(.frontpage-masthead) .topics {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body:has(.frontpage-masthead) .hero-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: end;
}

body:has(.frontpage-masthead) .hero-main-banner {
  padding: 0 0 22px;
  background: transparent;
}

body:has(.frontpage-masthead) .hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font: 600 12px/1.2 var(--font-ui);
  color: var(--text-muted);
}

body:has(.frontpage-masthead) .hero-category {
  color: var(--paper);
}

body:has(.frontpage-masthead) .signal {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 9px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
}

body:has(.frontpage-masthead) .signal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

body:has(.frontpage-masthead) .signal-confirmed { color: var(--amber); background: rgba(217,164,65,.16); }
body:has(.frontpage-masthead) .signal-analysis { color: var(--teal); background: rgba(76,133,119,.18); }
body:has(.frontpage-masthead) .signal-developing { color: var(--text-muted); background: rgba(236,232,222,.1); }

body:has(.frontpage-masthead) .hero-big-title {
  max-width: 720px;
  margin: 0;
  color: var(--paper);
  font: 600 clamp(2.8rem, 6vw, 5.8rem)/.98 var(--font-head);
  letter-spacing: -.055em;
}

body:has(.frontpage-masthead) .hero-big-title .line {
  display: block;
  overflow: hidden;
}

body:has(.frontpage-masthead) .hero-big-title .line span {
  display: block;
  transform: translateY(110%);
}

body:has(.frontpage-masthead) .hero-dek {
  max-width: 560px;
  margin: 24px 0 18px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
}

body:has(.frontpage-masthead) .hero-context {
  max-width: 560px;
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

body:has(.frontpage-masthead) .hero-meta,
body:has(.frontpage-masthead) .meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
}

body:has(.frontpage-masthead) .dash {
  width: 18px;
  height: 1px;
  background: var(--ink-line);
}

body:has(.frontpage-masthead) .hero-media {
  padding: 0;
  border: 0;
  background: transparent;
}

body:has(.frontpage-masthead) .hero-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--ink-line);
}

body:has(.frontpage-masthead) .hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body:has(.frontpage-masthead) .hero-image::after {
  content: none;
}

body:has(.frontpage-masthead) .read-track {
  height: 2px;
  margin-top: 8px;
  overflow: hidden;
  background: var(--ink-line);
}

body:has(.frontpage-masthead) #readFill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--amber);
}

body:has(.frontpage-masthead) .masthead-founder {
  display: none;
}

body:has(.frontpage-masthead) .recent-header-row {
  margin-top: 16px;
}

body:has(.frontpage-masthead) .frontpage-hero,
body:has(.frontpage-masthead) .latest-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr);
  gap: 28px;
}

body:has(.frontpage-masthead) .frontpage-hero .hot-featured-card,
body:has(.frontpage-masthead) .story-card,
body:has(.frontpage-masthead) .stacked-article-card,
body:has(.frontpage-masthead) .topic-column {
  border: 1px solid var(--ink-line);
  border-radius: 0;
  background: var(--ink-soft);
  box-shadow: none;
}

body:has(.frontpage-masthead) .hot-featured-card:hover,
body:has(.frontpage-masthead) .story-card:hover,
body:has(.frontpage-masthead) .stacked-article-card:hover {
  transform: none;
  border-color: var(--amber);
  box-shadow: none;
}

body:has(.frontpage-masthead) .hot-featured-body,
body:has(.frontpage-masthead) .story-card,
body:has(.frontpage-masthead) .stacked-article-card {
  padding: 20px;
}

body:has(.frontpage-masthead) .story-card h3,
body:has(.frontpage-masthead) .headline-title,
body:has(.frontpage-masthead) .hot-featured-body h2 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -.025em;
}

body:has(.frontpage-masthead) .topic-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--ink-line);
}

body:has(.frontpage-masthead) .topic-column {
  min-height: 250px;
  padding: 24px;
}

body:has(.frontpage-masthead) .founder-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--ink-line);
}

body:has(.frontpage-masthead) .founder-strip img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

body:has(.frontpage-masthead) .founder-strip strong,
body:has(.frontpage-masthead) .founder-strip span {
  display: block;
}

body:has(.frontpage-masthead) .founder-strip span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

body:has(.frontpage-masthead) .site-footer {
  border-color: var(--ink-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 860px) {
  body:has(.frontpage-masthead) .site-shell { padding-inline: 18px; }
  body:has(.frontpage-masthead) .nav-strip { display: none; }
  body:has(.frontpage-masthead) .hero-grid,
  body:has(.frontpage-masthead) .frontpage-hero,
  body:has(.frontpage-masthead) .latest-grid { grid-template-columns: 1fr; }
  body:has(.frontpage-masthead) .topic-band { grid-template-columns: 1fr; }
}

/* Final light-mode override: the homepage must remain visibly bright by default. */
body:has(.frontpage-masthead) {
  --ink: #16283d;
  --paper: #16283d;
  --ink-soft: rgba(255, 255, 255, .96);
  --text-muted: #35546f;
  --ink-line: rgba(35, 86, 132, .2);
  background: linear-gradient(180deg, #e8f6ff 0%, #f8fcff 42%, #ffffff 100%);
  color: var(--ink);
  white-space: normal;
}

body:has(.frontpage-masthead) .topbar,
body:has(.frontpage-masthead) .hero-main-banner,
body:has(.frontpage-masthead) .hero-recent-box {
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
}

body:has(.frontpage-masthead).theme-dark {
  --ink: #e8f1fa;
  --paper: #e8f1fa;
  --ink-soft: rgba(17, 28, 43, .96);
  --text-muted: #aec4d9;
  background: linear-gradient(180deg, #061323 0%, #0b1728 55%, #101c30 100%);
}

body:has(.frontpage-masthead).theme-dark .topbar,
body:has(.frontpage-masthead).theme-dark .hero-main-banner,
body:has(.frontpage-masthead).theme-dark .hero-recent-box {
  background: rgba(8, 19, 35, .94);
  color: var(--paper);
}

/* Homepage UI contract: media stays inside its reading column at every width. */
body:has(.frontpage-masthead) .hot-featured-card,
body:has(.frontpage-masthead) .stacked-article-card,
body:has(.frontpage-masthead) .story-card,
body:has(.frontpage-masthead) .stack-item {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

body:has(.frontpage-masthead) .hot-featured-card img,
body:has(.frontpage-masthead) .stacked-article-card img,
body:has(.frontpage-masthead) .story-card img,
body:has(.frontpage-masthead) .stack-item img,
body:has(.frontpage-masthead) .guide-showcase-lead img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

body:has(.frontpage-masthead) :where(a, button, summary, input, select, textarea):focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  body:has(.frontpage-masthead) .topbar-inner {
    gap: 10px;
    padding-inline: 14px;
  }

  body:has(.frontpage-masthead) .topbar nav {
    min-width: 0;
    flex-wrap: wrap;
  }

  body:has(.frontpage-masthead) .eclipse-toggle-btn {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
  }

  body:has(.frontpage-masthead) .frontpage-masthead,
  body:has(.frontpage-masthead) .frontpage-hero,
  body:has(.frontpage-masthead) .latest-grid,
  body:has(.frontpage-masthead) .topics {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  body:has(.frontpage-masthead) .topbar-actions { max-width: 52vw; }
  body:has(.frontpage-masthead) .hero-big-title { font-size: clamp(2.5rem, 14vw, 4rem); }
}

@media (prefers-reduced-motion: reduce) {
  body:has(.frontpage-masthead) .hero-big-title .line span { transform: none; }
}

.article-hero-media figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.article-hero-media figcaption span {
  color: var(--accent-deep);
  font-weight: 700;
}

.story-placeholder,
.article-hero-media-placeholder {
  display: flex;
}

.story-placeholder-card,
.stack-placeholder-card,
.article-placeholder-card {
  display: grid;
  align-content: end;
  gap: 10px;
  width: 100%;
  min-height: 100%;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(20, 35, 29, 0.05)),
    linear-gradient(135deg, rgba(245, 228, 200, 0.9), rgba(255, 255, 255, 0.82));
}

.story-placeholder-card span,
.stack-placeholder-card span,
.article-placeholder-card span {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-deep);
}

.story-placeholder-card strong,
.stack-placeholder-card strong,
.article-placeholder-card strong {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 3vw, 2rem);
  line-height: 0.95;
}

.story-placeholder-card p,
.stack-placeholder-card p,
.article-placeholder-card p {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.98rem;
}

.stack-placeholder-card {
  padding: 14px;
}

.stack-placeholder-card strong {
  font-size: 1.12rem;
}

.stack-placeholder-card p {
  font-size: 0.88rem;
}

.article-placeholder-card {
  min-height: 420px;
  padding: 28px;
}

.account-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metrics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.account-card,
.metric-card,
.review-card,
.notice-banner {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.account-card,
.review-card,
.notice-banner {
  padding: 22px;
}

.wide-card {
  grid-column: span 2;
}

.auth-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  padding: 18px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.auth-tab {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  border-radius: 999px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-tab.is-active {
  color: var(--ink);
  border-color: rgba(15, 127, 84, 0.28);
  background: rgba(15, 127, 84, 0.1);
}

.auth-panels {
  display: grid;
}

.auth-panel {
  display: none;
}

.auth-panel.is-active {
  display: block;
}

.auth-panel-head {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.auth-panel-head p {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-body);
}

.auth-form {
  max-width: 640px;
}

.auth-submit {
  width: 100%;
}

.auth-provider-card {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.auth-provider-copy {
  display: grid;
  gap: 8px;
}

.auth-provider-copy h3,
.auth-provider-copy p,
.auth-provider-muted {
  margin: 0;
}

.auth-provider-copy p,
.auth-provider-muted {
  color: var(--muted);
  font-family: var(--font-body);
}

.google-auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 248, 255, 0.88)),
    rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 16px 36px rgba(20, 38, 74, 0.12);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.google-auth-button:hover,
.google-auth-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(23, 115, 255, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 18px 42px rgba(23, 115, 255, 0.18);
}

.google-auth-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4285f4, #34a853 52%, #fbbc05 76%, #ea4335);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.auth-terms {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-family: var(--font-body);
}

.platform-form {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-weight: 700;
  color: var(--accent-deep);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  padding: 12px 14px;
  font: inherit;
}

.field textarea {
  resize: vertical;
}

.action-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
}

.action-button {
  background: linear-gradient(145deg, #1773ff, #14a9ff);
  color: #fffdf8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 10px 24px rgba(14, 71, 153, 0.24);
}

.ghost-button {
  background: rgba(248, 253, 255, 0.74);
  color: var(--ink);
  border-color: var(--line-strong);
}

.ghost-button.danger {
  color: #8f1d30;
  border-color: rgba(214, 80, 120, 0.35);
}

.notice-banner {
  color: var(--accent-deep);
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.company-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}

.tag-list span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  font-size: 0.9rem;
}

.platform-table {
  display: grid;
  gap: 12px;
}

.table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 2fr;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.compact-table .table-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payout-row {
  grid-template-columns: minmax(90px, 0.7fr) minmax(0, 1.4fr) minmax(120px, 0.8fr) auto;
  align-items: center;
}

.table-row.head {
  font-weight: 700;
  color: var(--accent-deep);
}

.review-card {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.review-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.review-head h3 {
  margin: 0;
}

.inline-forms {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.inline-form label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}

.inline-form input {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.82);
}

.payout-form {
  justify-self: end;
}

.metric-card strong {
  display: block;
  font-size: 2.4rem;
  font-family: var(--font-head);
  margin-top: 8px;
}

.muted-text {
  color: var(--muted);
}

.featured-story {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 20px;
}

.featured-copy {
  display: grid;
  gap: 12px;
}

.featured-story::after,
.simple-hero::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -72px;
  top: -52px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(93, 146, 224, 0.10), transparent 72%);
  pointer-events: none;
}

.story-dek,
.article-dek {
  font-size: 1.12rem;
}

.story-hook,
.article-hook {
  position: relative;
  margin: 0;
  padding-left: 16px;
  font-family: var(--font-body);
  font-size: 0.99rem;
  line-height: 1.72;
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
  max-width: 50ch;
}

.story-hook::before,
.article-hook::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  bottom: 0.28em;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(15, 127, 84, 0.95), rgba(255, 138, 61, 0.85));
}

.story-card .story-hook,
.stack-copy .story-hook {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.58;
  color: var(--muted);
  max-width: none;
}

.story-card .story-hook,
.guide-showcase-copy .story-hook,
.lead-feature-hook {
  display: block;
}

.read-link,
.text-link,
.mini-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-deep);
  font-weight: 700;
}

.pull-refresh-indicator {
  position: fixed;
  left: 50%;
  top: 10px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(20, 35, 29, 0.12);
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.94);
  box-shadow: 0 14px 40px rgba(57, 44, 20, 0.16);
  color: var(--accent-deep);
  transform: translate(-50%, calc(-100% + var(--pull-refresh-distance, 0px)));
  opacity: 0;
  pointer-events: none;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}

.pull-refresh-indicator.is-active,
.pull-refresh-indicator.is-refreshing {
  opacity: 1;
}

.pull-refresh-indicator.is-armed {
  box-shadow: 0 18px 46px rgba(15, 127, 84, 0.18);
}

.pull-refresh-hint {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(15, 127, 84, calc(0.12 + (var(--pull-refresh-progress, 0) * 0.12)));
  font-weight: 800;
}

.pull-refresh-status {
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.section-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(290px, 0.88fr);
}

.secondary-grid {
  align-items: start;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
}

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

.compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stack-list {
  display: grid;
  gap: 14px;
}

.newsroom-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.newsroom-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  padding: 22px;
}

.newsroom-card.radar {
  background: linear-gradient(135deg, rgba(255, 138, 61, 0.14), rgba(255, 255, 255, 0.72));
}

.newsroom-card.workflow {
  background: linear-gradient(135deg, rgba(15, 127, 84, 0.12), rgba(255, 255, 255, 0.72));
}

.newsroom-card.feed {
  background: linear-gradient(135deg, rgba(36, 99, 235, 0.12), rgba(255, 255, 255, 0.72));
}

.newsroom-card.stat h2 {
  font-size: 2.6rem;
  margin-top: 8px;
}

.live-desk {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(245, 233, 214, 0.78));
  display: grid;
  gap: 16px;
}

.live-desk-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
}

.live-desk-head h3 {
  margin: 4px 0 0;
  font-size: 1.8rem;
}

.live-ping {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 10px rgba(15, 127, 84, 0.12);
  animation: live-pulse 1.9s infinite;
}

.live-refresh-line {
  margin: 0;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.95rem;
}

.live-refresh-line strong {
  color: var(--ink);
}

.live-separator {
  color: var(--line-strong);
}

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

.live-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  background: rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 8px;
}

.live-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.live-card strong {
  font-size: 1.08rem;
}

.live-ticker {
  display: grid;
  gap: 10px;
}

.live-item {
  display: grid;
  gap: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.live-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.live-item span,
.live-item em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.9rem;
}

.browser-controls {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.browser-caption,
.result-count {
  color: var(--muted);
  margin: 0;
}

.search-input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 14px 18px;
  font: inherit;
  background: rgba(255, 255, 255, 0.82);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip,
.endpoint-chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
}

.filter-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.story-card.is-hidden {
  display: none;
}

.lane-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lane-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  padding: 22px;
}

.lane-trend {
  background: linear-gradient(180deg, rgba(214, 80, 120, 0.09), rgba(255, 255, 255, 0.78));
}

.lane-emerging {
  background: linear-gradient(180deg, rgba(255, 138, 61, 0.09), rgba(255, 255, 255, 0.78));
}

.lane-verified {
  background: linear-gradient(180deg, rgba(15, 127, 84, 0.09), rgba(255, 255, 255, 0.78));
}

.queue-table,
.source-bars {
  display: grid;
  gap: 12px;
}

.queue-row {
  display: grid;
  grid-template-columns: 70px 1.6fr 120px 90px 150px;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.queue-row:first-child {
  border-top: 0;
}

.source-bar-row {
  display: grid;
  gap: 8px;
}

.source-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.source-bar-track {
  height: 10px;
  background: rgba(20, 35, 29, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.source-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--signal));
  border-radius: 999px;
}

.guardrail-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 12px;
}

.endpoint-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.endpoint-chip {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.stack-item {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.stack-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.stack-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
}

.stack-copy {
  display: grid;
  gap: 6px;
}

.stack-item a {
  display: block;
  font-weight: 700;
  margin: 4px 0 6px;
}

.stack-item p,
.stack-date {
  color: var(--muted);
  margin: 0;
  font-family: var(--font-body);
}

.topic-band {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  align-items: start;
}

.topic-column {
  border-top: 4px solid var(--topic-accent, var(--accent));
  align-self: start;
}

.story-flag {
  display: inline-flex;
  margin: 14px 0 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(214, 80, 120, 0.1);
  color: #a43256;
  font-size: 0.88rem;
  font-weight: 700;
}

.ad-shell {
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}

.ad-shell.placeholder {
  background: linear-gradient(145deg, rgba(10, 28, 51, 0.92), rgba(8, 20, 38, 0.86));
}

.ad-slot {
  min-height: 96px;
}

.placeholder-slot {
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
}

.store-promo-slot {
  position: relative;
  justify-items: start;
  align-content: center;
  gap: 8px;
  padding: 20px 22px;
  text-align: left;
  border: 1px solid rgba(53, 213, 255, 0.34);
  background:
    radial-gradient(circle at 100% 0%, rgba(53, 213, 255, 0.24), transparent 36%),
    linear-gradient(135deg, rgba(9, 30, 54, 0.96), rgba(9, 56, 69, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(125, 232, 255, 0.12),
    0 0 0 1px rgba(53, 213, 255, 0.1),
    0 18px 44px rgba(0, 0, 0, 0.28),
    0 0 28px rgba(53, 213, 255, 0.16);
}

.store-promo-slot::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle, rgba(147, 255, 84, 0.18), transparent 58%);
  opacity: 0.6;
  animation: background-drift 7s ease-in-out infinite;
}

.store-promo-slot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 18%, rgba(125, 232, 255, 0.26) 46%, transparent 72%);
  transform: translateX(-120%);
  animation: neon-sweep 3.8s linear infinite;
}

.store-promo-slot > * {
  position: relative;
  z-index: 1;
}

.store-promo-slot strong {
  font-family: var(--font-head);
  font-size: 1.12rem;
  line-height: 1.25;
  color: #f3fbff;
}

.store-promo-slot span:last-child {
  color: rgba(234, 246, 255, 0.8);
  line-height: 1.58;
}

.store-promo-kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 800;
  color: #93ff54;
}

/* Newsroom editorial quick reads and Store promotion banner. */
.headline-ribbon { background: transparent; border: 0; padding: 0; }
.headline-ribbon-track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; animation: none !important; transform: none !important; }
.quick-news-item, .masthead-brief-item { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 13px 14px; border: 1px solid rgba(123, 167, 213, 0.18); border-radius: 12px; background: rgba(14, 32, 58, 0.68); box-shadow: 0 4px 15px rgba(9, 22, 40, 0.14); transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, background 0.25s ease; }
.quick-news-item:hover, .masthead-brief-item:hover { transform: translateX(4px); border-color: rgba(56, 189, 248, 0.48); background: rgba(20, 45, 78, 0.88); }
.rank-badge-num { flex: 0 0 auto; color: #38bdf8; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1rem; font-weight: 800; letter-spacing: 0; }
.ribbon-copy, .masthead-item-copy { display: grid; min-width: 0; gap: 6px; }
.item-headline { overflow: hidden; color: #f8fafc; font-size: 0.92rem; font-weight: 700; line-height: 1.35; text-overflow: ellipsis; }
.meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: #9eb2ca; font-size: 0.72rem; }
.clean-cat-pill { display: inline-flex; padding: 2px 7px; border: 1px solid rgba(56, 189, 248, 0.25); border-radius: 6px; background: rgba(56, 189, 248, 0.11); color: #7dd3fc; font-weight: 700; }
.store-showroom-banner { position: relative; overflow: hidden; margin: 32px 0; padding: 28px 30px; border: 1px solid rgba(125, 211, 252, 0.28); border-radius: 16px; background: linear-gradient(135deg, #102846 0%, #173b5a 50%, #27416f 100%); box-shadow: 0 15px 35px -18px rgba(14, 116, 144, 0.7); }
.store-showroom-banner::after { position: absolute; inset: auto -10% -65% 42%; width: 380px; height: 380px; border-radius: 50%; background: rgba(34, 211, 238, 0.12); content: ""; }
.deal-pill, .showroom-title, .showroom-desc, .btn-showroom-cta { position: relative; z-index: 1; }
.deal-pill { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: #f97316; color: #fff; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; }
.showroom-title { margin: 12px 0 7px; color: #fff; font-family: var(--font-head); font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.18; }
.showroom-desc { max-width: 650px; margin: 0 0 18px; color: #d9ebff; line-height: 1.6; }
.btn-showroom-cta { display: inline-flex; align-items: center; min-height: 42px; padding: 10px 15px; border-radius: 10px; background: linear-gradient(135deg, #2563eb, #38bdf8); box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4); color: #fff; font-weight: 800; text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.btn-showroom-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(56, 189, 248, 0.42); }
@media (max-width: 800px) { .headline-ribbon-track { grid-template-columns: 1fr; } .store-showroom-banner { padding: 22px 20px; } }

/* Clean editorial layout: scoped to the newsroom homepage only. */
body:has(.frontpage-masthead) { background: #f8fafc; color: #334155; }
body:has(.frontpage-masthead) .page-body { max-width: 1240px; }
body:has(.frontpage-masthead) .frontpage-masthead.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(340px, 1fr); gap: 28px; margin: 32px 0; padding: 0; background: transparent; border: 0; box-shadow: none; }
body:has(.frontpage-masthead) .clean-card { border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.05); }
body:has(.frontpage-masthead) .hero-main-banner { min-width: 0; padding: 28px; }
body:has(.frontpage-masthead) .hero-main-banner::after, body:has(.frontpage-masthead) .frontpage-masthead::before { display: none; }
body:has(.frontpage-masthead) .editorial-badge { width: fit-content; margin: 0 0 14px; padding: 4px 10px; border-radius: 6px; background: #eff6ff; color: #2563eb; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em; }
body:has(.frontpage-masthead) .hero-big-title { max-width: 16ch; margin: 0 0 14px; color: #0f172a; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.16; letter-spacing: 0; }
body:has(.frontpage-masthead) .hero-subtitle { max-width: 60ch; color: #475569; font-size: 1rem; line-height: 1.65; }
body:has(.frontpage-masthead) .hero-recent-box { display: block; padding: 22px; color: #334155; }
body:has(.frontpage-masthead) .masthead-founder { margin-bottom: 16px; }
body:has(.frontpage-masthead) .masthead-founder strong, body:has(.frontpage-masthead) .masthead-brief h2 { color: #0f172a; }
body:has(.frontpage-masthead) .recent-header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 2px solid #f1f5f9; }
body:has(.frontpage-masthead) .recent-header-row .eyebrow { margin: 0; color: #64748b; }
body:has(.frontpage-masthead) .recent-header-title { display: flex; align-items: center; gap: 8px; margin: 0; color: #0f172a; font-size: 1rem; }
body:has(.frontpage-masthead) .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 8px #10b981; }
body:has(.frontpage-masthead) .recent-list-clean { gap: 9px; }
body:has(.frontpage-masthead) .recent-item-link { display: flex; gap: 12px; padding: 10px 12px; border: 1px solid #edf2f7; border-radius: 8px; background: #f8fafc; }
body:has(.frontpage-masthead) .recent-item-link:hover { background: #eff6ff; border-color: #bfdbfe; }
body:has(.frontpage-masthead) .recent-item-title { color: #0f172a; font-size: 0.92rem; line-height: 1.4; }
body:has(.frontpage-masthead) .recent-item-meta { color: #64748b; }
body:has(.frontpage-masthead) .frontpage-hero { grid-template-columns: minmax(0, 1.4fr) minmax(340px, 1fr); gap: 28px; }
body:has(.frontpage-masthead) .lead-feature, body:has(.frontpage-masthead) .lead-mini, body:has(.frontpage-masthead) .stack-item { min-width: 0; }
body:has(.frontpage-masthead) .lead-feature h2, body:has(.frontpage-masthead) .lead-mini h3, body:has(.frontpage-masthead) .story-card h3, body:has(.frontpage-masthead) .stack-item a { max-width: 100%; overflow-wrap: anywhere; }
body:has(.frontpage-masthead) .trending-strip-wrap { padding: 20px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.05); }
body:has(.frontpage-masthead) .headline-ribbon-track { grid-template-columns: repeat(5, minmax(0, 1fr)); }
body:has(.frontpage-masthead) .quick-news-item { min-width: 0; padding: 8px 4px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
body:has(.frontpage-masthead) .quick-news-item:hover { background: #f8fafc; transform: none; }
body:has(.frontpage-masthead) .item-headline { color: #1e293b; overflow-wrap: anywhere; }
body:has(.frontpage-masthead) .categories-balanced-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
body:has(.frontpage-masthead) .category-column-box { min-width: 0; padding: 20px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.05); }
body:has(.frontpage-masthead) .category-column-box::before, body:has(.frontpage-masthead) .category-column-box::after { display: none; }
@media (max-width: 992px) { body:has(.frontpage-masthead) .categories-balanced-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } body:has(.frontpage-masthead) .headline-ribbon-track { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { body:has(.frontpage-masthead) .frontpage-masthead.hero-grid, body:has(.frontpage-masthead) .frontpage-hero { grid-template-columns: 1fr; } body:has(.frontpage-masthead) .lead-feature { display: flex; flex-direction: column; min-height: auto; } body:has(.frontpage-masthead) .lead-feature-media, body:has(.frontpage-masthead) .lead-feature-media img { position: static; min-height: 0; height: auto; max-height: none; aspect-ratio: 16 / 9; } body:has(.frontpage-masthead) .lead-feature-overlay { display: none; } body:has(.frontpage-masthead) .lead-feature-copy { position: static; min-height: auto; padding: 18px; background: #fff; color: #0f172a; } body:has(.frontpage-masthead) .lead-feature h2 a, body:has(.frontpage-masthead) .lead-feature-hook, body:has(.frontpage-masthead) .lead-feature-topline, body:has(.frontpage-masthead) .lead-feature-source { color: #0f172a; } }
@media (max-width: 640px) { body:has(.frontpage-masthead) .categories-balanced-grid, body:has(.frontpage-masthead) .headline-ribbon-track { grid-template-columns: 1fr; } body:has(.frontpage-masthead) .hero-main-banner, body:has(.frontpage-masthead) .hero-recent-box { padding: 20px; } }

.article-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.55fr);
  margin-top: 24px;
}

.article-content {
  display: grid;
  gap: 14px;
}

/* Hard layout contract: hero media must never be wider than the reading column. */
.article-content > .article-hero-media {
  inline-size: min(100%, 760px);
  max-inline-size: 100%;
  block-size: auto;
  aspect-ratio: 16 / 9;
  justify-self: start;
  box-sizing: border-box;
}

.article-content > .article-hero-media > img,
.article-content > .article-hero-media > .story-image-fallback {
  inline-size: 100%;
  block-size: 100%;
  max-inline-size: 100%;
  object-fit: cover;
}

.article-summary {
  font-size: 1rem;
  font-family: var(--font-body);
}

.article-section {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.article-section p {
  color: var(--muted);
  line-height: 1.62;
  font-family: var(--font-body);
  font-size: 1rem;
}

.article-section[data-content-type="NewsArticle"] .article-section-heading {
  display: none;
}

.article-section[data-content-type="NewsArticle"] {
  border-top: 0;
  padding-top: 0;
}

.feedback-head {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.feedback-head p {
  margin: 0;
}

.feedback-notice {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  font-size: 0.96rem;
}

.feedback-notice.is-success {
  background: rgba(15, 127, 84, 0.08);
  color: var(--accent-deep);
}

.feedback-notice.is-error {
  background: rgba(214, 80, 120, 0.08);
  color: #a43256;
}

.reaction-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.reaction-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(15, 127, 84, 0.18);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.reaction-button strong,
.comment-list-head strong,
.comment-card-head strong {
  font-family: var(--font-ui);
}

.reaction-button em {
  color: var(--muted);
  font-style: normal;
}

.comment-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.85fr);
  gap: 18px;
}

.comment-form,
.comment-list {
  display: grid;
  gap: 14px;
}

.comment-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.comment-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.76);
  padding: 16px;
}

.comment-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.comment-card-head span,
.comment-empty {
  color: var(--muted);
  font-size: 0.94rem;
}

.article-rail {
  display: grid;
  gap: 16px;
  align-content: start;
}

.verification-note {
  display: inline-grid;
  gap: 6px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(15, 127, 84, 0.08);
}

.source-compact {
  display: grid;
  gap: 12px;
}

.source-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-deep);
  background: rgba(40, 152, 255, 0.08);
  font-size: 0.92rem;
  font-weight: 700;
}

.store-panel.full {
  background: linear-gradient(135deg, rgba(53, 213, 255, 0.1), rgba(78, 125, 255, 0.08));
  border-radius: var(--radius-lg);
  padding: 22px;
}

.store-panel.soft {
  background: linear-gradient(135deg, rgba(147, 255, 84, 0.08), rgba(53, 213, 255, 0.06));
  border-radius: var(--radius-lg);
  padding: 22px;
}

.store-card {
  background: linear-gradient(145deg, rgba(10, 26, 47, 0.9), rgba(7, 18, 34, 0.82));
}

.catalog-shell {
  gap: 22px;
}

.catalog-head {
  align-items: center;
}

.catalog-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.catalog-search {
  display: grid;
  gap: 10px;
}

.catalog-search input {
  width: 100%;
  border: 1px solid rgba(74, 181, 255, 0.22);
  background: rgba(3, 10, 21, 0.72);
  color: var(--ink);
  border-radius: 999px;
  padding: 14px 18px;
  font: inherit;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.catalog-search input::placeholder {
  color: var(--muted);
}

.catalog-search input:focus {
  border-color: rgba(74, 181, 255, 0.44);
  box-shadow: 0 0 0 4px rgba(40, 152, 255, 0.12);
}

.catalog-count {
  color: var(--muted);
  font-size: 0.95rem;
}

.catalog-grid {
  align-items: stretch;
}

.catalog-card {
  display: grid;
  gap: 14px;
}

.catalog-card.is-hidden {
  display: none;
}

.catalog-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.catalog-card h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.35;
}

.catalog-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.catalog-price {
  color: var(--signal);
  font-size: 1.04rem;
  white-space: nowrap;
}

.catalog-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.catalog-meta div {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(74, 181, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
}

.catalog-meta dt {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.catalog-meta dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  word-break: break-word;
}

.author-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.author-role {
  color: var(--accent-deep);
  font-weight: 700;
}

.simple-hero {
  position: relative;
  overflow: hidden;
}

@keyframes live-pulse {
  0% {
    transform: scale(0.94);
    opacity: 0.88;
  }

  70% {
    transform: scale(1.08);
    opacity: 1;
  }

  100% {
    transform: scale(0.94);
    opacity: 0.88;
  }
}

/* Final homepage theme contract: light sky by default, deep space on toggle. */
body:has(.frontpage-masthead) {
  --ink: #17263a;
  --ink-soft: rgba(255, 255, 255, .92);
  --paper: #17263a;
  --text-on-ink: #17263a;
  --text-muted: #46617e;
  --ink-line: rgba(35, 86, 132, .18);
  --amber: #d88918;
  --teal: #087f78;
  background: linear-gradient(180deg, #dff3ff 0, #f7fbff 44%, #ffffff 100%);
  color: var(--ink);
}

body:has(.frontpage-masthead) .topbar {
  background: rgba(255, 255, 255, .82);
  border-color: var(--ink-line);
  box-shadow: 0 1px 0 rgba(35, 86, 132, .12);
}

body:has(.frontpage-masthead) .hero-big-title,
body:has(.frontpage-masthead) .section-head h2,
body:has(.frontpage-masthead) .topic-title-row h3 a,
body:has(.frontpage-masthead) .hot-featured-body h2 a,
body:has(.frontpage-masthead) .story-card h3 a,
body:has(.frontpage-masthead) .stack-item h3 a,
body:has(.frontpage-masthead) .guide-showcase-copy h2,
body:has(.frontpage-masthead) .headline-title,
body:has(.frontpage-masthead) .recent-header-title {
  color: #14243a;
}

body:has(.frontpage-masthead) .hero-dek,
body:has(.frontpage-masthead) .hero-context,
body:has(.frontpage-masthead) .section-head p,
body:has(.frontpage-masthead) .story-card p,
body:has(.frontpage-masthead) .stack-item p,
body:has(.frontpage-masthead) .guide-showcase-copy p,
body:has(.frontpage-masthead) .topic-column .stack-item span {
  color: #35546f;
}

body:has(.frontpage-masthead) .hot-featured-card,
body:has(.frontpage-masthead) .story-card,
body:has(.frontpage-masthead) .stacked-article-card,
body:has(.frontpage-masthead) .stack-item,
body:has(.frontpage-masthead) .guide-showcase-lead,
body:has(.frontpage-masthead) .topic-column,
body:has(.frontpage-masthead) .rail-card {
  background: rgba(255, 255, 255, .9);
  border-color: rgba(35, 86, 132, .17);
  box-shadow: 0 12px 30px rgba(55, 105, 145, .09);
}

body:has(.frontpage-masthead) .eclipse-toggle-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  background: #ffffff;
  border-color: rgba(35, 86, 132, .24);
  box-shadow: 0 8px 24px rgba(35, 86, 132, .18);
}
body:has(.frontpage-masthead) .theme-icon { display: block; width: 25px; height: 25px; position: relative; font-size: 0; }
body:has(.frontpage-masthead) .theme-icon::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; }
body:has(.frontpage-masthead) .theme-icon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(currentColor 0 7deg, transparent 7deg 45deg); mask: radial-gradient(circle, transparent 0 55%, #000 57% 66%, transparent 68%); }
body:has(.frontpage-masthead) .theme-icon-sun { color: #e08a12; }
body:has(.frontpage-masthead) .theme-icon-sun::before { background: radial-gradient(circle at 35% 30%, #fff8bd 0 10%, #ffc52e 30%, #e08a12 100%); box-shadow: 0 0 12px rgba(255, 190, 35, .85); }
body:has(.frontpage-masthead) .theme-icon-moon { display: none; color: #b9d8f4; }
body:has(.frontpage-masthead) .theme-icon-moon::before { background: radial-gradient(circle at 35% 30%, #fff 0 6%, #d9efff 35%, #76aee0 100%); box-shadow: 0 0 13px rgba(112, 190, 255, .8); }
body:has(.frontpage-masthead) .theme-icon-moon::after { background: #111c2b; mask: none; inset: 1px 1px 5px 8px; }
body:has(.frontpage-masthead).theme-dark {
  --ink: #e8f1fa;
  --ink-soft: #111c2b;
  --paper: #e8f1fa;
  --text-on-ink: #e8f1fa;
  --text-muted: #a9bfd5;
  --ink-line: rgba(180, 215, 242, .17);
  background: linear-gradient(180deg, #061323 0, #0b1728 55%, #101c30 100%);
}
body:has(.frontpage-masthead).theme-dark .topbar { background: rgba(8, 19, 35, .88); }
body:has(.frontpage-masthead).theme-dark .theme-icon-sun { display: none; }
body:has(.frontpage-masthead).theme-dark .theme-icon-moon { display: block; }
body:has(.frontpage-masthead).theme-dark .hero-big-title,
body:has(.frontpage-masthead).theme-dark .section-head h2,
body:has(.frontpage-masthead).theme-dark .topic-title-row h3 a,
body:has(.frontpage-masthead).theme-dark .hot-featured-body h2 a,
body:has(.frontpage-masthead).theme-dark .story-card h3 a,
body:has(.frontpage-masthead).theme-dark .stack-item h3 a,
body:has(.frontpage-masthead).theme-dark .guide-showcase-copy h2,
body:has(.frontpage-masthead).theme-dark .headline-title,
body:has(.frontpage-masthead).theme-dark .recent-header-title { color: #edf6ff; }
body:has(.frontpage-masthead).theme-dark .hero-dek,
body:has(.frontpage-masthead).theme-dark .hero-context,
body:has(.frontpage-masthead).theme-dark .section-head p,
body:has(.frontpage-masthead).theme-dark .story-card p,
body:has(.frontpage-masthead).theme-dark .stack-item p,
body:has(.frontpage-masthead).theme-dark .guide-showcase-copy p,
body:has(.frontpage-masthead).theme-dark .topic-column .stack-item span { color: #aec4d9; }
body:has(.frontpage-masthead).theme-dark .hot-featured-card,
body:has(.frontpage-masthead).theme-dark .story-card,
body:has(.frontpage-masthead).theme-dark .stacked-article-card,
body:has(.frontpage-masthead).theme-dark .stack-item,
body:has(.frontpage-masthead).theme-dark .guide-showcase-lead,
body:has(.frontpage-masthead).theme-dark .topic-column,
body:has(.frontpage-masthead).theme-dark .rail-card { background: rgba(17, 28, 43, .94); box-shadow: 0 14px 34px rgba(0, 0, 0, .24); }
body:has(.frontpage-masthead).theme-dark .eclipse-toggle-btn { background: #111c2b; border-color: rgba(180, 215, 242, .3); }

.site-footer {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 24px 32px;
  align-items: start;
}

.footer-brand {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.footer-brand strong {
  display: block;
  font-size: 1.4rem;
  line-height: 1.1;
  white-space: nowrap;
}

.footer-brand p {
  max-width: 30ch;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, max-content));
  justify-content: end;
  align-content: start;
  gap: 12px 18px;
}

.footer-links a {
  color: var(--muted);
  white-space: nowrap;
}

.topic-ai {
  border-top: 4px solid #56e7ff;
}

.topic-apps-software {
  border-top: 4px solid #17c9ff;
}

.topic-devices {
  border-top: 4px solid #4e7dff;
}

.topic-security {
  border-top: 4px solid #1de59c;
}

.topic-gaming {
  border-top: 4px solid #ff7a29;
}

.topic-internet-business-tech {
  border-top: 4px solid #9bff45;
}

@media (max-width: 1320px) {
  .topbar {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .nav-strip {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 1100px) {
  .frontpage-masthead,
  .frontpage-kickerbar,
  .frontpage-hero,
  .frontpage-grid,
  .guide-showcase,
  .hero-panel,
  .featured-split,
  .section-grid,
  .article-layout,
  .comment-shell,
  .site-footer,
  .author-grid,
  .lane-grid {
    grid-template-columns: 1fr;
  }

  .topic-band,
  .newsroom-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .headline-ribbon {
    grid-template-columns: 1fr;
  }

  .headline-ribbon-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-showcase-lead {
    grid-template-columns: 1fr;
  }

  .account-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: start;
    grid-template-columns: repeat(auto-fit, minmax(132px, max-content));
  }
}

@media (max-width: 820px) {
  body {
    background:
      radial-gradient(circle at 10% -8%, rgba(40, 152, 255, 0.16), transparent 34%),
      linear-gradient(180deg, var(--bg), var(--bg-2));
  }

  body::before,
  body::after,
  .backdrop,
  .site-shell::before {
    display: none;
  }

  .topbar,
  .frontpage-masthead,
  .hero-panel,
  .featured-story,
  .hero-aside,
  .rail-card,
  .section-block,
  .story-card,
  .topic-column,
  .article-shell,
  .policy-card,
  .author-card,
  .site-footer,
  .simple-hero,
  .ad-shell,
  .lead-feature,
  .lead-mini,
  .headline-ribbon,
  .guide-showcase-lead {
    backdrop-filter: none;
    animation: none;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
  }

  .topbar::before,
  .frontpage-masthead::before,
  .hero-panel::before,
  .featured-story::before,
  .hero-aside::before,
  .rail-card::before,
  .section-block::before,
  .story-card::before,
  .topic-column::before,
  .article-shell::before,
  .policy-card::before,
  .author-card::before,
  .site-footer::before,
  .simple-hero::before,
  .ad-shell::before {
    display: none;
  }

  body::before {
    opacity: 0.76;
    animation-duration: 24s;
  }

  body::after {
    opacity: 0.24;
    background-size: 82px 82px, 82px 82px, 220px 220px;
  }

  .backdrop::before {
    filter: blur(10px);
  }

  .backdrop::after {
    opacity: 0.34;
    animation-duration: 38s;
  }

  .site-shell {
    padding: 14px 12px 36px;
  }

  .frontpage-masthead,
  .frontpage-hero,
  .frontpage-grid,
  .guide-showcase {
    gap: 14px;
  }

  .hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .topbar {
    grid-template-columns: 1fr;
    position: static;
    border-radius: 28px;
    padding: 14px;
  }

  .nav-strip,
  .topbar-actions {
    justify-content: start;
    width: 100%;
  }

  .brand-lockup {
    width: 100%;
    min-width: 0;
    gap: 12px;
    box-sizing: border-box;
  }

  .brand-mark {
    width: min(238px, 100%);
    max-width: 100%;
    max-height: 68px;
  }

  .topbar-actions {
    width: 100%;
    min-width: 0;
    margin-left: 0;
    padding-left: 0;
    justify-content: flex-start;
    transform: none;
  }

  .topbar-actions .lang-pill {
    flex: 0 0 auto;
  }

  .brand-wordmark strong {
    font-size: clamp(1.3rem, 4.4vw, 1.7rem);
  }

  .nav-strip a,
  .lang-pill,
  .hero-badges span,
  .pill {
    padding: 9px 12px;
    font-size: 0.88rem;
  }

  .hero-panel,
  .featured-story,
  .frontpage-masthead,
  .section-block,
  .simple-hero,
  .article-shell,
  .site-footer {
    padding: 20px;
  }

  .hero-panel,
  .hero-aside {
    gap: 14px;
  }

  .article-content {
    gap: 12px;
  }

  .article-section {
    padding-top: 14px;
  }

  .article-section p,
  .article-summary,
  .article-hook,
  .article-dek {
    line-height: 1.56;
  }

  .article-section h2 {
    font-size: clamp(1.35rem, 6vw, 1.78rem);
  }

  .frontpage-masthead-copy h1 {
    max-width: 100%;
    font-size: clamp(1.88rem, 8vw, 2.72rem);
    line-height: 1.04;
  }

  .masthead-brief {
    padding: 16px;
  }

  .masthead-founder {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .masthead-founder picture,
  .masthead-founder img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .masthead-brief h2 {
    font-size: 1.24rem;
  }

  .lead-feature,
  .lead-feature-media {
    min-height: 460px;
  }

  .lead-feature-copy {
    padding: 18px;
  }

  .lead-feature h2 {
    max-width: none;
    font-size: clamp(1.28rem, 6vw, 1.78rem);
    line-height: 1.18;
  }

  .lead-mini-copy {
    padding: 16px;
  }

  .lead-mini h3 {
    font-size: 1.24rem;
  }

  .hero-notebook {
    padding: 16px;
  }

  .hero-notebook-head,
  .hero-notebook-item {
    grid-template-columns: 1fr;
  }

  .hero-notebook-head {
    align-items: start;
  }

  .hero-notebook h2 {
    font-size: 1.42rem;
  }

  .hero-notebook-item span {
    font-size: 0.76rem;
  }

  .story-grid,
  .compact-grid,
  .headline-ribbon-track,
  .lead-mini-grid,
  .topic-band,
  .newsroom-strip,
  .account-grid,
  .author-grid,
  .stat-grid,
  .endpoint-grid,
  .live-grid {
    grid-template-columns: 1fr;
  }

  .form-grid.two-col,
  .form-grid.three-col,
  .table-row,
  .compact-table .table-row {
    grid-template-columns: 1fr;
  }

  .queue-row {
    grid-template-columns: 1fr;
  }

  .stack-row {
    grid-template-columns: 1fr;
  }

  .stack-media {
    width: 100%;
    min-width: 0;
  }

  .headline-item {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .hero-copy h1,
  .simple-hero h1,
  .article-header h1 {
    max-width: 100%;
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: 1.06;
    letter-spacing: -0.025em;
  }

  .hero-text,
  .simple-hero p,
  .article-dek {
    font-size: 0.98rem;
    line-height: 1.66;
  }

  .reader-card h2,
  .reader-card h3 {
    font-size: 1.3rem;
    line-height: 1.15;
  }

  .story-card h3 {
    font-size: 1.24rem;
  }

  .featured-story h2 {
    font-size: 1.86rem;
  }

  .footer-brand strong {
    font-size: 1.2rem;
    white-space: normal;
  }

  .footer-brand p {
    max-width: none;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .footer-links a {
    white-space: normal;
  }

  .pull-refresh-indicator {
    top: 6px;
    padding: 9px 12px;
  }

  .pull-refresh-status {
    font-size: 0.84rem;
  }
}

/* Editorial refresh: calm the visual system so the reporting leads, not the chrome. */
:root {
  --bg: #07101d;
  --bg-2: #0a1625;
  --ink: #eef5ff;
  --muted: #a5b4c8;
  --surface: #0c1828;
  --surface-strong: #0f1d30;
  --line: rgba(160, 184, 214, 0.18);
  --line-strong: rgba(65, 161, 255, 0.58);
  --accent: #42a4ff;
  --accent-deep: #a9d8ff;
  --shadow: 0 18px 42px rgba(0, 7, 18, 0.22);
  --radius-xl: 22px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --font-ui: "Aptos", "Segoe UI", sans-serif;
  --font-head: "Aptos Display", "Aptos", "Segoe UI", sans-serif;
  --font-body: "Aptos", "Segoe UI", sans-serif;
}

body {
  background:
    radial-gradient(circle at 88% -8%, rgba(66, 164, 255, 0.14), transparent 28%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

body::before,
body::after,
.backdrop,
.site-shell::before {
  display: none;
}

.site-shell {
  max-width: 1360px;
  padding-top: 16px;
}

.topbar,
.frontpage-masthead,
.hero-panel,
.featured-story,
.hero-aside,
.rail-card,
.section-block,
.story-card,
.topic-column,
.article-shell,
.policy-card,
.author-card,
.site-footer,
.simple-hero,
.ad-shell {
  background: var(--surface);
  backdrop-filter: none;
  box-shadow: none;
  animation: none;
}

.topbar::before,
.frontpage-masthead::before,
.hero-panel::before,
.featured-story::before,
.hero-aside::before,
.rail-card::before,
.section-block::before,
.story-card::before,
.topic-column::before,
.article-shell::before,
.policy-card::before,
.author-card::before,
.site-footer::before,
.simple-hero::before,
.ad-shell::before {
  display: none;
}

.topbar {
  top: 0;
  min-height: 66px;
  margin: 0 0 28px;
  padding: 10px 14px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  border-color: var(--line);
  background: rgba(7, 16, 29, 0.96);
  box-shadow: 0 10px 28px rgba(0, 7, 18, 0.2);
}

.brand-lockup {
  overflow: hidden;
}

.platform-topbar .brand-lockup {
  overflow: visible;
}

.brand-mark {
  display: block;
  width: auto;
  max-width: 176px;
  height: 34px;
  object-fit: contain;
  object-position: left center;
}

.nav-strip {
  flex-wrap: nowrap;
  justify-content: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-strip-menu {
  overflow: visible;
}

.category-menu {
  position: relative;
  display: inline-flex;
}

.category-menu summary {
  list-style: none;
  cursor: pointer;
}

.category-menu summary::-webkit-details-marker {
  display: none;
}

.category-menu summary,
.category-menu-panel a {
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 650;
  transition: color 180ms ease, background 180ms ease;
}

.category-menu[open] summary,
.category-menu summary:hover,
.category-menu summary:focus-visible,
.category-menu-panel a:hover,
.category-menu-panel a:focus-visible {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.category-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 30;
  display: none;
  min-width: min(420px, calc(100vw - 28px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(7, 16, 29, 0.98);
  box-shadow: 0 18px 48px rgba(0, 7, 18, 0.28);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.category-menu[open] .category-menu-panel {
  display: grid;
}

.nav-strip::-webkit-scrollbar,
.topbar-actions::-webkit-scrollbar {
  display: none;
}

.nav-strip a,
.lang-pill {
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
  padding: 9px 10px;
}

.nav-strip a:hover,
.lang-pill:hover,
.nav-strip a:focus-visible,
.lang-pill:focus-visible {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
  transform: none;
}

.nav-strip a:focus-visible,
.lang-pill:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.topbar-actions {
  flex-wrap: nowrap;
  gap: 2px;
  overflow-x: auto;
  justify-content: flex-end;
  scrollbar-width: none;
}

.platform-topbar .brand-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.platform-topbar .brand-wordmark strong {
  line-height: 0.94;
}

.lang-pill.subtle {
  color: #061321;
  background: var(--accent-deep);
  border: 0;
  box-shadow: none;
}

.lead-feature,
.lead-mini,
.headline-ribbon,
.guide-showcase-lead {
  box-shadow: none;
  backdrop-filter: none;
}

.lead-feature {
  min-height: 510px;
  border-radius: var(--radius-xl);
  border-color: var(--line);
}

.lead-feature-overlay {
  background:
    linear-gradient(90deg, rgba(5, 13, 24, 0.22) 0%, rgba(5, 13, 24, 0.12) 34%, rgba(5, 13, 24, 0.9) 100%),
    linear-gradient(0deg, rgba(5, 13, 24, 0.94) 0%, rgba(5, 13, 24, 0.02) 68%);
}

.lead-feature-copy {
  gap: 14px;
  padding: 30px;
}

.lead-feature h2 {
  max-width: 26ch;
  font-size: clamp(1.65rem, 2.35vw, 2.48rem);
  line-height: 1.06;
}

.lead-feature-hook {
  max-width: 64ch;
  font-size: 1rem;
  line-height: 1.6;
}

.story-card,
.topic-column,
.rail-card,
.section-block {
  border-color: var(--line);
}

.story-card {
  gap: 12px;
  padding: 18px;
}

.story-card:hover,
.lead-mini:hover,
.rail-card:hover,
.topic-column:hover,
.guide-showcase-lead:hover {
  border-color: var(--line-strong);
  box-shadow: none;
  transform: translateY(-2px);
}

.story-card h3 {
  font-size: 1.08rem;
  line-height: 1.27;
}

.story-meta-line,
.stack-topline,
.article-byline {
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.topic-column {
  padding: 18px;
}

.topic-title-row {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.article-shell {
  border-radius: var(--radius-xl);
}

@media (max-width: 1320px) {
  .topbar {
    grid-template-columns: auto 1fr;
  }

  .nav-strip {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .site-shell {
    padding: 0 0 30px;
  }

  .topbar {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 14px 12px;
    border-radius: 0 0 16px 16px;
  }

  .brand-lockup {
    height: 34px;
  }

  .platform-topbar .brand-lockup {
    height: auto;
    min-height: 42px;
  }

  .platform-topbar .brand-wordmark strong {
    font-size: clamp(1rem, 3.8vw, 1.14rem);
  }

  .category-menu-panel {
    min-width: min(320px, calc(100vw - 28px));
    grid-template-columns: minmax(0, 1fr);
  }

  .brand-mark {
    width: auto;
    max-width: min(168px, 72vw);
    height: 32px;
  }

  .nav-strip,
  .topbar-actions {
    width: calc(100vw - 28px);
    justify-content: flex-start;
    padding-bottom: 1px;
  }

  .nav-strip a,
  .lang-pill {
    font-size: 0.82rem;
    padding: 8px 9px;
  }

  .frontpage-masthead,
  .frontpage-hero,
  .frontpage-grid,
  .guide-showcase,
  .page-body {
    margin-inline: 12px;
  }

  .lead-feature,
  .lead-feature-media {
    min-height: 430px;
  }

  .lead-feature-copy {
    padding: 20px;
  }

  .lead-feature h2 {
    font-size: clamp(1.5rem, 7vw, 2.02rem);
  }

  .story-card,
  .topic-column {
    padding: 16px;
  }
}



/* Bright premium redesign override */
:root {
  --bg: #fbfdff;
  --bg-2: #f4f8fd;
  --ink: #10233f;
  --muted: #5f7390;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --line: rgba(147, 173, 208, 0.32);
  --line-strong: rgba(41, 116, 217, 0.46);
  --accent: #215fcb;
  --accent-deep: #e9f2ff;
  --signal: #13795b;
  --trend: #db6a1b;
  --shadow: 0 22px 52px rgba(34, 63, 109, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font-ui: "Aptos", "Segoe UI", sans-serif;
  --font-head: "Aptos Display", "Aptos", "Segoe UI", sans-serif;
  --font-body: "Aptos", "Segoe UI", sans-serif;
}

html {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(63, 122, 214, 0.05), transparent 20%),
    radial-gradient(circle at left 18%, rgba(99, 163, 255, 0.04), transparent 18%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

.site-shell {
  max-width: 1400px;
  padding: 18px 22px 56px;
}

.page-body {
  gap: 28px;
}

.topbar,
.frontpage-masthead,
.hero-panel,
.featured-story,
.hero-aside,
.rail-card,
.section-block,
.story-card,
.topic-column,
.article-shell,
.policy-card,
.author-card,
.site-footer,
.simple-hero,
.ad-shell,
.lead-feature,
.lead-mini,
.headline-ribbon,
.guide-showcase-lead,
.masthead-brief,
.comment-card,
.verification-note,
.store-panel.full,
.store-panel.soft,
.catalog-meta div,
.catalog-search input {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.topbar,
.frontpage-masthead,
.hero-panel,
.featured-story,
.hero-aside,
.rail-card,
.section-block,
.story-card,
.topic-column,
.article-shell,
.policy-card,
.author-card,
.site-footer,
.simple-hero,
.ad-shell,
.lead-feature,
.lead-mini,
.headline-ribbon,
.guide-showcase-lead {
  overflow: visible;
}

.topbar {
  position: sticky;
  top: 10px;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  min-height: 74px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 24px;
  background: rgba(245, 249, 253, 0.96);
  backdrop-filter: saturate(150%) blur(18px);
}

.brand-lockup {
  gap: 12px;
}

.brand-icon {
  width: 58px;
  height: 58px;
  filter: none;
}

.brand-mark {
  max-width: 190px;
  height: 38px;
  filter: none;
}

.brand-wordmark strong,
.footer-brand strong,
.hero-copy h1,
.simple-hero h1,
.article-header h1,
.frontpage-masthead-copy h1,
.lead-feature h2,
.section-head h2,
.guide-showcase-copy h2,
.story-card h3,
.topic-column h3,
.masthead-brief h2 {
  color: var(--ink);
  text-shadow: none;
}

.brand-company,
.brand-kicker,
.eyebrow,
.rail-label,
.ad-label,
.story-meta-line,
.stack-topline,
.article-byline,
.lead-feature-topline,
.catalog-count,
.comment-card-head span,
.comment-empty,
.footer-links a,
.frontpage-masthead-text,
.story-card p,
.topic-column p,
.masthead-founder span,
.article-summary,
.article-section p,
.article-dek,
.hero-text,
.simple-hero p,
.masthead-brief-item span,
.catalog-card p {
  color: var(--muted);
}

.brand-company,
.brand-kicker,
.eyebrow,
.rail-label,
.ad-label {
  letter-spacing: 0.14em;
}

.nav-strip {
  justify-content: center;
  gap: 6px;
}

.nav-strip a,
.lang-pill,
.hero-badges span,
.pill,
.category-menu summary,
.category-menu-panel a,
.source-chip,
.reaction-button {
  border-radius: 999px;
  border: 1px solid rgba(157, 183, 220, 0.44);
  background: rgba(246, 250, 255, 0.92);
  color: var(--ink);
  box-shadow: none;
}

.nav-strip a:hover,
.lang-pill:hover,
.hero-badges span:hover,
.pill:hover,
.category-menu summary:hover,
.category-menu-panel a:hover,
.source-chip:hover,
.reaction-button:hover {
  background: #ffffff;
  border-color: rgba(33, 95, 203, 0.34);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(33, 95, 203, 0.08);
}

.lang-pill.subtle {
  background: linear-gradient(135deg, #1f5cc7, #2e78eb);
  color: #ffffff;
  border-color: transparent;
}

.category-menu-panel {
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--line);
  box-shadow: 0 22px 54px rgba(33, 61, 108, 0.14);
}

.frontpage-masthead {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 22px;
  padding: 30px;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(248, 251, 255, 0.98)),
    #ffffff;
}

.frontpage-masthead::after,
.frontpage-masthead-copy::after,
.hero-badges span::after {
  display: none;
}

.frontpage-masthead-copy {
  gap: 16px;
}

.frontpage-masthead-copy h1 {
  max-width: 12ch;
  font-size: clamp(2.4rem, 4.6vw, 4.25rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.frontpage-masthead-text {
  max-width: 58ch;
  font-size: 1.05rem;
  line-height: 1.75;
}

.hero-badges {
  gap: 10px;
}

.hero-badges span {
  background: rgba(237, 244, 255, 0.95);
}

.masthead-brief {
  gap: 16px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.masthead-founder picture {
  border-radius: 18px;
}

.masthead-founder img {
  border-color: rgba(157, 183, 220, 0.42);
}

.frontpage-hero,
.frontpage-grid,
.guide-showcase {
  gap: 20px;
}

.lead-feature {
  min-height: 580px;
  border-radius: 32px;
  background: #dfe8f5;
}

.lead-feature-media,
.lead-feature-media img {
  border-radius: 32px;
}

.lead-feature-overlay {
  background:
    linear-gradient(180deg, rgba(15, 35, 63, 0.04) 0%, rgba(15, 35, 63, 0.26) 44%, rgba(15, 35, 63, 0.86) 100%),
    linear-gradient(90deg, rgba(12, 31, 56, 0.18) 0%, rgba(12, 31, 56, 0) 48%);
}

.lead-feature-copy {
  padding: 28px;
  gap: 14px;
}

.lead-feature-copy,
.lead-feature h2 a,
.lead-feature .read-link.inverted,
.lead-feature .lead-feature-source,
.lead-feature-hook,
.lead-feature-topline,
.lead-flag,
.hot-pill {
  color: #f8fbff;
}

.lead-feature h2 {
  max-width: 22ch;
  font-size: clamp(1.9rem, 2.8vw, 3rem);
  line-height: 1.02;
}

.lead-feature-hook {
  max-width: 62ch;
  font-size: 1rem;
  line-height: 1.72;
}

.lead-mini,
.story-card,
.topic-column,
.rail-card,
.section-block,
.guide-showcase-lead,
.article-shell,
.simple-hero,
.site-footer,
.author-card,
.policy-card,
.comment-card {
  border-radius: 24px;
}

.story-card,
.topic-column,
.rail-card,
.section-block {
  padding: 20px;
}

.story-card,
.lead-mini,
.rail-card,
.topic-column,
.guide-showcase-lead {
  transform: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.story-card:hover,
.lead-mini:hover,
.rail-card:hover,
.topic-column:hover,
.guide-showcase-lead:hover {
  transform: translateY(-4px);
  border-color: rgba(33, 95, 203, 0.28);
  box-shadow: 0 22px 38px rgba(34, 63, 109, 0.12);
}

.headline-ribbon {
  padding: 14px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(241,247,255,0.96));
}

.headline-ribbon-track {
  gap: 12px;
}

.guide-showcase-lead {
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.85fr);
  gap: 0;
  overflow: hidden;
}

.guide-showcase-copy {
  padding: 24px;
}

.guide-showcase-copy h2,
.section-head h2,
.simple-hero h1,
.article-header h1 {
  font-size: clamp(1.8rem, 2.5vw, 3rem);
  line-height: 1.02;
}

.section-head {
  margin-bottom: 16px;
}

.topic-band {
  gap: 18px;
}

.topic-column {
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
}

.topic-title-row {
  border-bottom-color: rgba(157, 183, 220, 0.34);
}

.topic-column::before,
.story-card::before,
.section-block::before,
.rail-card::before,
.author-card::before,
.site-footer::before,
.simple-hero::before,
.article-shell::before,
.guide-showcase-lead::before,
.lead-feature::before,
.topbar::before {
  display: none;
}

.article-shell,
.simple-hero,
.site-footer {
  padding: 28px;
}

.verification-note,
.feedback-notice.is-success,
.feedback-notice.is-error,
.store-panel.full,
.store-panel.soft {
  border-radius: 18px;
}

.verification-note {
  background: linear-gradient(180deg, #f7fbff 0%, #eef6ff 100%);
}

.footer-links {
  gap: 10px 20px;
}

.footer-links a:hover {
  color: var(--accent);
}

[data-signal-shell] {
  opacity: 1;
}

[data-signal-shell].is-visible {
  animation: none;
}

[data-signal-shell]::after {
  display: none;
}

@media (max-width: 1100px) {
  .frontpage-masthead,
  .frontpage-hero,
  .frontpage-grid,
  .guide-showcase,
  .guide-showcase-lead,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .frontpage-masthead-copy h1 {
    max-width: 100%;
  }
}

@media (max-width: 820px) {
  .site-shell {
    padding: 10px 12px 36px;
  }

  .topbar {
    position: relative;
    top: 0;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
    border-radius: 20px;
    backdrop-filter: none;
  }

  .nav-strip,
  .topbar-actions {
    justify-content: flex-start;
  }

  .brand-mark {
    max-width: min(180px, 68vw);
    height: 36px;
  }

  .frontpage-masthead,
  .frontpage-hero,
  .frontpage-grid,
  .guide-showcase,
  .page-body {
    margin-inline: 0;
  }

  .frontpage-masthead,
  .story-card,
  .topic-column,
  .section-block,
  .article-shell,
  .simple-hero,
  .site-footer,
  .masthead-brief {
    padding: 18px;
    border-radius: 22px;
  }

  .frontpage-masthead-copy h1 {
    font-size: clamp(2.05rem, 9vw, 3rem);
    line-height: 0.98;
  }

  .lead-feature,
  .lead-feature-media {
    min-height: 430px;
  }

  .lead-feature,
  .lead-feature-media,
  .lead-feature-media img {
    border-radius: 24px;
  }

  .lead-feature-copy {
    padding: 18px;
  }

  .lead-feature h2,
  .guide-showcase-copy h2,
  .section-head h2,
  .simple-hero h1,
  .article-header h1 {
    font-size: clamp(1.5rem, 7vw, 2.15rem);
    line-height: 1.06;
  }

  .topic-band,
  .headline-ribbon-track,
  .story-grid,
  .lead-mini-grid,
  .author-grid,
  .catalog-meta {
    grid-template-columns: 1fr;
  }
}


/* Bright editorial rebuild */
:root {
  --bg: #f6f9fd;
  --bg-2: #eef4fb;
  --ink: #0f2747;
  --muted: #61748f;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --line: rgba(144, 170, 204, 0.26);
  --line-strong: rgba(28, 93, 196, 0.42);
  --accent: #1d59c4;
  --accent-deep: #edf4ff;
  --shadow: 0 18px 40px rgba(43, 72, 117, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

html,
body {
  background: linear-gradient(180deg, #f6f9fd 0%, #eef4fb 58%, #e8f0f9 100%);
}

body {
  color: var(--ink);
  background-image:
    radial-gradient(circle at 100% 0%, rgba(77, 137, 229, 0.05), transparent 18%),
    radial-gradient(circle at 0% 16%, rgba(77, 137, 229, 0.035), transparent 16%),
    linear-gradient(180deg, #f6f9fd 0%, #eef4fb 58%, #e8f0f9 100%);
}

.site-shell {
  max-width: 1440px;
  padding: 20px 24px 64px;
}

.topbar {
  min-height: 78px;
  padding: 16px 20px;
  border-radius: 26px;
  border-color: rgba(184, 202, 228, 0.72);
  background: rgba(245, 249, 253, 0.96);
  box-shadow: 0 14px 34px rgba(42, 66, 106, 0.08);
}

.brand-mark {
  max-width: 204px;
  height: 40px;
}

.nav-strip a,
.lang-pill,
.hero-badges span,
.pill,
.category-menu summary,
.category-menu-panel a,
.source-chip,
.reaction-button {
  min-height: 40px;
  padding: 10px 14px;
  border-color: rgba(184, 202, 228, 0.72);
  background: #f7fbff;
}

.nav-strip a:hover,
.lang-pill:hover,
.hero-badges span:hover,
.pill:hover,
.category-menu summary:hover,
.category-menu-panel a:hover,
.source-chip:hover,
.reaction-button:hover {
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(29, 89, 196, 0.08);
}

.frontpage-masthead {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 26px;
  padding: 34px;
  border-radius: 34px;
  border-color: rgba(184, 202, 228, 0.64);
  background:
    linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(247,251,255,1) 100%);
}

.frontpage-masthead-copy h1 {
  max-width: 10.5ch;
  font-size: clamp(2.9rem, 5vw, 4.8rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.frontpage-masthead-text {
  max-width: 54ch;
  font-size: 1.08rem;
  line-height: 1.78;
}

.masthead-brief {
  padding: 24px;
  border-radius: 26px;
  border-color: rgba(184, 202, 228, 0.64);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.masthead-brief-item {
  padding-top: 14px;
  border-top-color: rgba(184, 202, 228, 0.64);
}

.frontpage-hero {
  grid-template-columns: minmax(0, 1.42fr) minmax(320px, 0.58fr);
  gap: 22px;
}

.lead-feature {
  min-height: 620px;
  border-radius: 34px;
  border-color: rgba(184, 202, 228, 0.64);
}

.lead-feature-media,
.lead-feature-media img {
  border-radius: 34px;
}

.lead-feature-overlay {
  background:
    linear-gradient(180deg, rgba(16, 39, 71, 0.02) 0%, rgba(16, 39, 71, 0.18) 44%, rgba(16, 39, 71, 0.82) 100%),
    linear-gradient(90deg, rgba(16, 39, 71, 0.14) 0%, rgba(16, 39, 71, 0) 50%);
}

.lead-feature-copy {
  padding: 30px;
}

.lead-feature h2 {
  max-width: 20ch;
  font-size: clamp(2rem, 3vw, 3.25rem);
  line-height: 1.01;
}

.lead-feature-hook {
  max-width: 58ch;
  font-size: 1.02rem;
  line-height: 1.74;
}

.lead-mini,
.story-card,
.topic-column,
.rail-card,
.section-block,
.guide-showcase-lead,
.article-shell,
.simple-hero,
.site-footer,
.author-card,
.policy-card,
.comment-card {
  border-radius: 26px;
  border-color: rgba(184, 202, 228, 0.64);
}

.rail-card,
.section-block,
.story-card,
.topic-column {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.story-card,
.topic-column,
.rail-card,
.section-block,
.guide-showcase-copy,
.simple-hero,
.article-shell,
.site-footer {
  padding: 24px;
}

.story-card h3,
.topic-column h3 {
  font-size: 1.14rem;
  line-height: 1.3;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2,
.guide-showcase-copy h2,
.simple-hero h1,
.article-header h1 {
  font-size: clamp(1.9rem, 2.6vw, 3.15rem);
  line-height: 1.02;
}

.headline-ribbon {
  padding: 16px;
  border-radius: 26px;
  border-color: rgba(184, 202, 228, 0.64);
}

.headline-ribbon-track {
  gap: 14px;
}

.guide-showcase-lead {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.88fr);
  border-color: rgba(184, 202, 228, 0.64);
  background: #ffffff;
}

.guide-showcase-media,
.guide-showcase-media img {
  height: 100%;
  min-height: 100%;
}

.topic-band {
  gap: 20px;
}

.topic-column {
  position: relative;
}

.topic-column::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 0;
  height: 4px;
  border-radius: 999px;
  background: var(--topic-accent, var(--accent));
}

.topic-title-row {
  padding-top: 8px;
}

.footer-brand p {
  color: var(--muted);
}

[data-signal-shell] {
  opacity: 1;
}

@media (max-width: 1100px) {
  .frontpage-masthead,
  .frontpage-hero,
  .guide-showcase,
  .guide-showcase-lead,
  .frontpage-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .frontpage-masthead-copy h1 {
    max-width: 100%;
  }
}

@media (max-width: 820px) {
  .site-shell {
    padding: 12px 12px 40px;
  }

  .topbar {
    padding: 14px;
    border-radius: 22px;
  }

  .frontpage-masthead,
  .story-card,
  .topic-column,
  .section-block,
  .article-shell,
  .simple-hero,
  .site-footer,
  .masthead-brief,
  .guide-showcase-copy {
    padding: 18px;
    border-radius: 22px;
  }

  .frontpage-masthead {
    padding: 22px 18px;
  }

  .frontpage-masthead-copy h1 {
    font-size: clamp(2.3rem, 10vw, 3.3rem);
    line-height: 0.96;
  }

  .lead-feature,
  .lead-feature-media {
    min-height: 460px;
  }

  .lead-feature,
  .lead-feature-media,
  .lead-feature-media img {
    border-radius: 26px;
  }

  .lead-feature-copy {
    padding: 18px;
  }

  .lead-feature h2,
  .guide-showcase-copy h2,
  .section-head h2,
  .simple-hero h1,
  .article-header h1 {
    font-size: clamp(1.65rem, 7.5vw, 2.35rem);
  }
}


/* Homepage polish: calmer type rhythm + safer thumbnail framing */
.topbar {
  align-items: start;
}

.nav-strip {
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-strip a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.topbar-actions {
  align-items: center;
  gap: 8px;
}

.topbar-actions .lang-pill {
  min-height: 38px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
}

.section-head h2,
.guide-showcase-copy h2,
.simple-hero h1,
.article-header h1 {
  line-height: 1.08;
}

.story-card h3,
.topic-column h3,
.stack-item h3,
.stack-item a {
  font-size: 1.06rem;
  line-height: 1.34;
}

.stack-item .story-meta-line,
.stack-item time,
.stack-item .story-date,
.story-card .story-meta-line {
  font-size: 0.9rem;
}

.stack-media {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #f9fbff 0%, #eef4fb 100%);
}

.stack-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 8px;
  background: linear-gradient(180deg, #f9fbff 0%, #eef4fb 100%);
}

.story-media img {
  object-position: center top;
}

@media (max-width: 900px) {
  .topbar {
    align-items: stretch;
  }

  .nav-strip a,
  .topbar-actions .lang-pill {
    min-height: 36px;
    font-size: 0.84rem;
  }

  .stack-media {
    width: 104px;
    min-width: 104px;
  }
}

/* Homepage hero must size from its own content instead of stretching to the rail. */
body.newsroom-page.homepage .frontpage-hero {
  align-items: start;
}

body.newsroom-page.homepage .frontpage-hero > *,
body.newsroom-page.homepage .hot-featured-card,
body.newsroom-page.homepage .hot-featured-body {
  align-self: start;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

body.newsroom-page.homepage .hot-featured-card .lead-feature-media,
body.newsroom-page.homepage .hot-featured-card .lead-feature-media img {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 16 / 9;
}

body.newsroom-page.homepage .hot-featured-body .read-link.inverted {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #246fdb;
  border-radius: 6px;
  background: #246fdb;
  color: #ffffff !important;
  opacity: 1 !important;
}

body.newsroom-page.homepage .hot-featured-body .lead-feature-source {
  color: #35546f !important;
  opacity: 1 !important;
}

body.newsroom-page.homepage.theme-dark .hot-featured-body .read-link.inverted {
  border-color: #77baff;
  background: #1b5f9f;
  color: #ffffff !important;
}

body.newsroom-page.homepage.theme-dark .hot-featured-body .lead-feature-source {
  color: #c5d7ea !important;
}


/* Article-page polish: tighter editorial rhythm + lighter support rail */
.article-layout {
  grid-template-columns: minmax(0, 1fr) minmax(148px, 0.22fr);
  gap: 22px;
}

.article-header {
  display: grid;
  gap: 14px;
}

.article-header h1 {
  max-width: 15ch;
  font-size: clamp(2.2rem, 5.4vw, 4.35rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.story-meta-line {
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 0.92rem;
}

.article-hook {
  max-width: 42ch;
  font-size: 1.14rem;
  line-height: 1.62;
  color: #46658f;
}

.article-dek,
.article-summary,
.article-section p {
  max-width: 68ch;
}

.article-dek {
  font-size: 1.03rem;
  line-height: 1.78;
  color: #4f6d96;
}

.article-summary,
.article-section p,
.comment-card p {
  color: #506c92;
  line-height: 1.84;
}

.article-section-heading {
  font-size: 2rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.article-rail {
  justify-items: end;
}

.language-rail-card {
  width: min(100%, 164px);
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(22, 56, 110, 0.08);
}

.language-rail-card .rail-label {
  margin-bottom: 6px;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
}

.language-rail-card .text-link {
  font-size: 0.96rem;
}

.feedback-section {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.feedback-head {
  grid-template-columns: minmax(0, 1fr);
}

.feedback-head h2 {
  font-size: 1.55rem;
  line-height: 1.14;
  margin: 0;
}

.feedback-head p,
.comment-empty,
.comment-card-head span,
.reaction-button em {
  color: #5f7b9f;
}

.reaction-button {
  min-height: 44px;
}

.comment-form,
.comment-list {
  padding: 18px;
  border: 1px solid rgba(184, 202, 228, 0.72);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

@media (max-width: 1100px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-rail {
    justify-items: start;
  }

  .language-rail-card {
    width: auto;
    min-width: 138px;
  }
}

@media (max-width: 820px) {
  .article-header h1 {
    max-width: 100%;
    font-size: clamp(2rem, 8vw, 3.15rem);
    line-height: 1.08;
  }

  .article-hook {
    font-size: 1.03rem;
    line-height: 1.66;
  }

  .article-dek,
  .article-summary,
  .article-section p {
    font-size: 0.99rem;
    line-height: 1.78;
  }
}


/* Homepage cleanup: calmer masthead copy + category menu instead of crowded topic pills */
.topbar {
  align-items: center;
  gap: 16px;
}

.nav-strip.nav-strip-menu {
  justify-content: flex-start;
  flex: 0 0 auto;
}

.category-menu {
  display: inline-flex;
}

.category-menu summary {
  min-height: 40px;
  padding: 0.62rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.category-menu-panel {
  min-width: min(520px, calc(100vw - 32px));
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.category-menu-panel a {
  justify-content: flex-start;
  min-height: 42px;
  white-space: normal;
  line-height: 1.35;
}

.frontpage-masthead-copy .eyebrow {
  color: #4d6a8f;
  letter-spacing: 0.12em;
}

.frontpage-masthead-text {
  max-width: 58ch;
  color: #38506e;
  font-size: 1.04rem;
  line-height: 1.72;
}

.store-promo-slot strong,
.store-promo-slot span {
  word-break: break-word;
}

@media (max-width: 900px) {
  .topbar {
    align-items: stretch;
  }

  .nav-strip.nav-strip-menu {
    width: 100%;
  }

  .category-menu {
    width: 100%;
  }

  .category-menu summary {
    width: 100%;
    justify-content: center;
  }

  .category-menu-panel {
    min-width: min(100%, calc(100vw - 24px));
    grid-template-columns: 1fr;
  }
}


/* Article readability: stronger contrast for body copy on light surfaces */
.article-dek {
  color: #38597f;
}

.article-summary,
.article-section p,
.comment-card p {
  color: #314d73;
}


/* Homepage cleanup round 2: steadier logo, calmer hero, more even card rhythm */
.brand-mark {
  width: auto;
  max-width: 188px;
  height: 40px;
  object-fit: contain;
}

.frontpage-masthead-copy h1 {
  max-width: 11ch;
  font-size: clamp(2.7rem, 5.7vw, 4.85rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.frontpage-masthead-text {
  max-width: 52ch;
  font-size: 1.02rem;
  line-height: 1.68;
}

.frontpage-hero,
.topic-band {
  align-items: stretch;
}

.lead-feature,
.story-card,
.stack-item,
.store-promo-slot {
  overflow: hidden;
}

.story-card {
  min-height: 100%;
}

.story-card h3,
.stack-item h3,
.stack-item a {
  font-size: 1rem;
  line-height: 1.32;
}

.story-card .story-hook,
.stack-item p {
  color: #587394;
  line-height: 1.62;
}

.stack-item {
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.stack-media {
  width: 120px;
  min-width: 120px;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
}

.store-promo-slot {
  background: linear-gradient(135deg, #14304f 0%, #15435a 48%, #1a6f7c 100%);
}

.store-promo-slot strong {
  color: #f7fbff;
  font-size: 1.38rem;
  line-height: 1.22;
}

.store-promo-slot span:last-child {
  color: rgba(232, 244, 255, 0.9);
}

@media (max-width: 900px) {
  .brand-mark {
    max-width: 172px;
    height: 36px;
  }

  .frontpage-masthead-copy h1 {
    max-width: 100%;
    font-size: clamp(2.35rem, 9vw, 4rem);
  }

  .stack-item {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
  }

  .stack-media {
    width: 104px;
    min-width: 104px;
  }
}


/* Homepage balance round 3: reduce outsized lead cards and normalize front-page tiles */
.frontpage-hero {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.lead-feature {
  min-height: 420px;
}

.lead-feature-media,
.lead-feature-media img {
  min-height: 420px;
  max-height: 420px;
}

.lead-feature-copy {
  gap: 12px;
  padding: 22px;
}

.lead-feature h2 {
  max-width: 11ch;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.06;
}

.lead-feature-hook {
  max-width: 46ch;
  font-size: 1rem;
  line-height: 1.58;
}

.lead-mini-grid {
  grid-auto-rows: minmax(0, 1fr);
  gap: 16px;
}

.story-card {
  min-height: 202px;
  padding: 18px;
}

.story-media,
.story-media img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.story-card h3 {
  font-size: 1.08rem;
  line-height: 1.3;
}

.story-card .story-hook {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.topic-band {
  gap: 18px;
}

.stack-item {
  min-height: 138px;
}

@media (max-width: 1100px) {
  .frontpage-hero {
    grid-template-columns: 1fr;
  }

  .lead-feature,
  .lead-feature-media,
  .lead-feature-media img {
    min-height: 360px;
    max-height: 360px;
  }
}

@media (max-width: 900px) {
  .lead-feature,
  .lead-feature-media,
  .lead-feature-media img {
    min-height: 320px;
    max-height: 320px;
  }

  .lead-feature h2 {
    max-width: 100%;
    font-size: clamp(1.85rem, 7vw, 2.6rem);
  }

  .story-card {
    min-height: 186px;
  }
}


/* Header round 4: compact category trigger in the top corner */
.topbar {
  align-items: flex-start;
  gap: 12px;
}

.nav-strip.nav-strip-menu {
  flex: 0 0 auto;
  margin-left: auto;
  width: auto;
}

.category-menu {
  width: auto;
}

.category-menu summary {
  min-height: 34px;
  padding: 0.42rem 0.82rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.topbar-actions {
  width: 100%;
  justify-content: flex-start;
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
  }

  .nav-strip.nav-strip-menu {
    width: auto;
    margin-left: auto;
  }

  .category-menu {
    width: auto;
  }

  .category-menu summary {
    width: auto;
    justify-content: center;
    min-height: 32px;
    padding: 0.38rem 0.74rem;
    font-size: 0.78rem;
  }

  .topbar-actions {
    width: 100%;
  }
}


/* Lead hot pill: keep the label readable over bright hero images */
.lead-feature-topline .hot-pill,
.pill.hot-pill {
  border-color: rgba(255, 214, 170, 0.82);
  background: linear-gradient(135deg, rgba(255, 126, 61, 0.96), rgba(255, 90, 41, 0.96));
  color: #fffdf8;
  text-shadow: 0 1px 2px rgba(62, 18, 0, 0.28);
  box-shadow: 0 10px 24px rgba(128, 43, 14, 0.22);
}


/* Homepage balance round 5: make article cards visually consistent across the page */
.frontpage-hero {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.frontpage-rail {
  display: grid;
  gap: 18px;
  grid-template-rows: 1fr auto;
}

.lead-mini-grid {
  grid-template-columns: 1fr;
  grid-auto-rows: 1fr;
}

.lead-feature,
.story-card,
.stack-item {
  min-height: 220px;
}

.lead-feature {
  border-radius: 28px;
}

.lead-feature-media,
.lead-feature-media img,
.story-media,
.story-media img {
  aspect-ratio: 16 / 10;
  min-height: 220px;
  max-height: 220px;
}

.lead-feature-copy {
  justify-content: flex-end;
  min-height: 220px;
  padding: 18px;
}

.lead-feature h2,
.story-card h3,
.stack-item a {
  max-width: 100%;
  font-size: 1.12rem;
  line-height: 1.28;
}

.lead-feature-hook,
.story-card .story-hook,
.stack-item p {
  font-size: 0.97rem;
  line-height: 1.55;
}

.story-grid,
.stack-list {
  gap: 18px;
}

.topic-band {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (max-width: 1100px) {
  .frontpage-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .lead-feature,
  .story-card,
  .stack-item,
  .lead-feature-media,
  .lead-feature-media img,
  .story-media,
  .story-media img {
    min-height: 200px;
    max-height: 200px;
  }

  .lead-feature-copy {
    min-height: 200px;
  }
}


/* Header round 6: remove empty space and lock logo proportions */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px 14px;
  padding: 14px 18px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 168px;
  min-width: 168px;
  overflow: hidden;
}

.brand-mark {
  display: block;
  width: 100%;
  max-width: 168px;
  height: 34px;
  object-fit: contain;
  object-position: left center;
}

.nav-strip.nav-strip-menu {
  justify-self: end;
  align-self: start;
  margin-left: 0;
}

.topbar-actions {
  grid-column: 1 / -1;
  width: auto;
  justify-content: flex-start;
  gap: 10px;
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
    padding: 12px 16px;
  }

  .brand-lockup {
    width: 156px;
    min-width: 156px;
  }

  .brand-mark {
    max-width: 156px;
    height: 32px;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    width: 100%;
    gap: 8px;
  }
}


/* Final desktop polish: keep the header compact and preserve the full wordmark. */
.topbar {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 14px;
  min-height: 64px;
  padding: 10px 16px;
}

.brand-lockup {
  width: auto;
  min-width: 0;
  gap: 10px;
  overflow: visible;
}

.topbar .brand-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}

.topbar .brand-wordmark {
  gap: 0;
}

.topbar .brand-wordmark strong {
  font-size: 0.98rem;
  line-height: 1;
  letter-spacing: -0.035em;
}

.nav-strip.nav-strip-menu {
  grid-column: auto;
  justify-self: start;
  align-self: center;
  width: auto;
  margin-left: 0;
}

.category-menu summary {
  min-height: 36px;
  padding: 0.5rem 0.86rem;
  font-size: 0.84rem;
}

.topbar .category-menu-panel {
  right: auto;
  left: 0;
  width: min(520px, calc(100vw - 32px));
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.topbar-actions {
  grid-column: auto;
  width: auto;
  justify-content: flex-end;
  gap: 6px;
  overflow: visible;
}

.read-link:not(.inverted),
.text-link,
.mini-link {
  color: #1f5cc7;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 3px;
}

.read-link:not(.inverted):hover,
.text-link:hover,
.mini-link:hover {
  color: #123f91;
}

.story-card {
  min-height: 0;
}

.frontpage-rail {
  grid-template-rows: auto auto;
}

.lead-mini-grid {
  grid-auto-rows: auto;
}

.category-fallback {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  overflow: hidden;
  width: 100%;
  min-height: 100%;
  padding: 18px;
  color: #fffdf8;
  background: linear-gradient(135deg, #153b55 0%, #197278 52%, #e07a5f 100%);
}

.category-fallback::before,
.category-fallback::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 253, 248, 0.28);
  border-radius: 50%;
}

.category-fallback::before {
  width: 180px;
  height: 180px;
  right: -46px;
  top: -62px;
}

.category-fallback::after {
  width: 96px;
  height: 96px;
  left: -28px;
  bottom: -34px;
}

.category-fallback-mark,
.category-fallback-topic {
  position: relative;
  z-index: 1;
}

.category-fallback-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 253, 248, 0.48);
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.category-fallback-topic {
  max-width: 70%;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: right;
  text-transform: uppercase;
}

/* Keep article card copy visible when a narrow grid or decorative layer is active. */
.story-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto;
  align-content: start;
  min-width: 0;
  min-height: 0;
  color: var(--ink);
}

.story-card > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.story-card .story-media {
  grid-column: 1;
  width: 100%;
}

.story-card h3,
.story-card h3 a {
  color: var(--ink) !important;
  opacity: 1;
  visibility: visible;
}

.story-card .story-meta-line,
.story-card .story-hook,
.story-card .story-footer {
  color: var(--muted) !important;
  opacity: 1;
  visibility: visible;
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .brand-lockup {
    width: auto;
    min-width: 0;
  }

  .topbar .brand-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .nav-strip.nav-strip-menu {
    grid-column: auto;
    width: auto;
    justify-self: end;
  }

  .category-menu {
    width: auto;
  }

  .category-menu summary {
    width: auto;
    justify-content: center;
  }

  .topbar .category-menu-panel {
    right: 0;
    left: auto;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .nav-strip.nav-strip-menu {
    justify-self: stretch;
  }

  .category-menu,
  .category-menu summary {
    width: 100%;
  }
}

.related-stories {
  display: grid;
  gap: 12px;
}

.related-story-list {
  display: grid;
  gap: 8px;
}

.related-story-link {
  display: grid;
  gap: 3px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.related-story-link span {
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.related-story-link strong {
  font-family: var(--font-head);
  line-height: 1.35;
}

.related-story-link:hover strong {
  text-decoration: underline;
}

/* Keep the compact header actions together; Courses precedes Write. */
@media (max-width: 767px) {
  .topbar-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .topbar-actions .course-nav-link {
    flex: 0 0 auto;
  }
}

/* Keep the category panel inside the header's viewport on compact screens. */
@media (max-width: 520px) {
  .topbar .nav-strip.nav-strip-menu,
  .topbar .category-menu {
    position: static;
  }

  .topbar .category-menu-panel {
    top: calc(100% + 8px);
    right: 12px;
    left: 12px;
    width: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 360px) {
  .topbar .category-menu-panel {
    grid-template-columns: minmax(0, 1fr);
  }
}

.latest-more {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.latest-more summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--accent-strong, var(--accent));
  background: var(--surface);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.latest-more summary::-webkit-details-marker {
  display: none;
}

.latest-more summary::after {
  content: "+";
  font-size: 1.1rem;
  line-height: 1;
}

.latest-more[open] summary::after {
  content: "-";
}

.latest-more summary:hover,
.latest-more summary:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-raised, rgba(255, 255, 255, 0.72));
}

.latest-more-grid {
  margin-top: 16px;
}

/* Article desktop layout: use the available canvas without turning the body into a wall of text. */
@media (min-width: 1101px) {
  .article-shell,
  .article-header,
  .article-layout,
  .article-content {
    min-width: 0;
  }

  .article-layout {
    grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr);
    gap: clamp(28px, 4vw, 64px);
    align-items: start;
  }

  .article-header h1 {
    max-width: min(100%, 24ch);
    letter-spacing: 0;
  }

  .article-content {
    width: 100%;
  }

  .article-summary,
  .article-section p {
    max-width: 78ch;
  }

  .article-rail {
    justify-items: stretch;
    min-width: 0;
  }

  .language-rail-card {
    width: 100%;
    max-width: 240px;
  }
}

/* Final UI pass: keep the bright editorial system calm, legible, and touch-friendly. */
.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.story-card,
.catalog-card,
.store-card {
  border-radius: min(22px, var(--radius-lg));
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.story-card:hover,
.catalog-card:hover,
.store-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 32px rgba(42, 72, 117, 0.12);
}

.story-media,
.stack-media,
.article-hero-media {
  overflow: hidden;
}

.story-media img,
.stack-media img,
.article-hero-media img {
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.story-card:hover .story-media img,
.stack-item:hover .stack-media img,
.article-hero-media:hover img {
  transform: scale(1.035);
}

.category-fallback-topic {
  max-width: 100%;
  margin-left: auto;
}

.catalog-price {
  color: #087f5b;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 800;
}

.store-newsroom-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 14px;
  padding: 10px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--accent);
  background: var(--surface);
  font-weight: 800;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.store-newsroom-link:hover,
.store-newsroom-link:focus-visible {
  background: var(--accent-deep);
  transform: translateY(-1px);
}

.catalog-grid {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

@media (max-width: 640px) {
  .topbar {
    top: 6px;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    scroll-snap-type: inline proximity;
  }

  .catalog-card {
    scroll-snap-align: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topbar,
  .story-card,
  .catalog-card,
  .store-card,
  .story-media img,
  .stack-media img,
  .article-hero-media img,
  .store-newsroom-link {
    transition: none;
  }

  .story-card:hover,
  .catalog-card:hover,
  .store-card:hover,
  .store-newsroom-link:hover {
    transform: none;
  }
}

/* UI hardening: a single, final layout contract for editorial cards and touch screens. */
:where(.story-card, .stack-item, .guide-showcase-lead, .hot-featured-card, .catalog-card) {
  min-width: 0;
  overflow: hidden;
}

:where(.story-media, .stack-media, .guide-showcase-media, .lead-feature-media) {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

:where(.story-media, .stack-media, .guide-showcase-media, .lead-feature-media) img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

:where(.story-card h3, .story-card h3 a, .stack-item h3, .stack-item a, .guide-showcase-copy h2, .lead-feature h2) {
  min-width: 0;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

:where(.story-card .story-hook, .stack-item p, .guide-showcase-copy .story-hook, .lead-feature-hook) {
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

:where(.story-card, .stack-item, .guide-showcase-lead, .catalog-card) :focus-visible,
.topbar a:focus-visible,
.category-menu summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 62%, white);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .stack-item .stack-row,
  .stacked-article-card .stack-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .stack-item .stack-copy,
  .stacked-article-card .stack-copy {
    min-width: 0;
  }

  .topbar-actions {
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .topbar-actions::-webkit-scrollbar {
    display: none;
  }

  .topbar-actions .lang-pill {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
}

@media (max-width: 640px) {
  :where(.story-card, .stack-item, .guide-showcase-lead, .catalog-card) {
    border-radius: min(16px, var(--radius-lg));
  }

  .catalog-grid {
    grid-template-columns: minmax(0, 1fr);
    overflow-x: visible;
  }
}

/* Keep the homepage direction last so legacy component rules cannot override it. */
body:has(.frontpage-masthead) {
  overflow-x: hidden;
  background: var(--ink);
  color: var(--paper);
}

body:has(.frontpage-masthead) :where(.eyebrow, .rail-label, .pill, .lead-feature-source, .clean-cat-pill) {
  text-transform: none;
  letter-spacing: 0;
}

body:has(.frontpage-masthead) .topbar {
  background: rgba(20, 24, 31, .94);
  border-color: var(--ink-line);
  box-shadow: 0 1px 0 var(--ink-line);
}

body:has(.frontpage-masthead) .frontpage-masthead,
body:has(.frontpage-masthead) .frontpage-hero,
body:has(.frontpage-masthead) .latest-grid,
body:has(.frontpage-masthead) .topics,
body:has(.frontpage-masthead) .section-block,
body:has(.frontpage-masthead) .guide-showcase,
body:has(.frontpage-masthead) .headline-ribbon {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body:has(.frontpage-masthead) .hero-main-banner,
body:has(.frontpage-masthead) .hero-recent-box {
  background: transparent;
  border: 0;
  box-shadow: none;
}

body:has(.frontpage-masthead) .hero-big-title,
body:has(.frontpage-masthead) .section-head h2,
body:has(.frontpage-masthead) .topic-title-row h3 a,
body:has(.frontpage-masthead) .hot-featured-body h2 a,
body:has(.frontpage-masthead) .story-card h3 a,
body:has(.frontpage-masthead) .stack-item h3 a,
body:has(.frontpage-masthead) .guide-showcase-copy h2,
body:has(.frontpage-masthead) .headline-title,
body:has(.frontpage-masthead) .recent-header-title {
  color: var(--paper);
}

body:has(.frontpage-masthead) .hero-dek,
body:has(.frontpage-masthead) .hero-context,
body:has(.frontpage-masthead) .section-head p,
body:has(.frontpage-masthead) .story-card p,
body:has(.frontpage-masthead) .stack-item p,
body:has(.frontpage-masthead) .guide-showcase-copy p,
body:has(.frontpage-masthead) .topic-column .stack-item span {
  color: var(--text-muted);
}

body:has(.frontpage-masthead) .hot-featured-card,
body:has(.frontpage-masthead) .story-card,
body:has(.frontpage-masthead) .stacked-article-card,
body:has(.frontpage-masthead) .stack-item,
body:has(.frontpage-masthead) .guide-showcase-lead,
body:has(.frontpage-masthead) .topic-column,
body:has(.frontpage-masthead) .rail-card {
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  border-radius: 10px;
  box-shadow: none;
}

body:has(.frontpage-masthead) .hot-featured-card:hover,
body:has(.frontpage-masthead) .story-card:hover,
body:has(.frontpage-masthead) .stacked-article-card:hover,
body:has(.frontpage-masthead) .stack-item:hover {
  border-color: var(--amber);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .18);
  transform: translateY(-3px);
}

body:has(.frontpage-masthead) .live-dot,
body:has(.frontpage-masthead) .signal-dot {
  box-shadow: 0 0 0 4px rgba(76, 133, 119, .14);
}

@media (max-width: 860px) {
  body:has(.frontpage-masthead) .topbar {
    overflow-x: auto;
  }

  body:has(.frontpage-masthead) .topbar-inner {
    min-width: 0;
  }
}

/* Absolute final homepage contract. Keep these rules last so legacy layers cannot win. */
body:has(.frontpage-masthead) {
  overflow-x: hidden;
  white-space: normal;
  background: linear-gradient(180deg, #e8f6ff 0%, #f8fcff 42%, #ffffff 100%);
  color: #16283d;
}

body:has(.frontpage-masthead) .topbar {
  background: rgba(255, 255, 255, .96);
  color: #16283d;
}

body:has(.frontpage-masthead) .hero-main-banner,
body:has(.frontpage-masthead) .hero-recent-box,
body:has(.frontpage-masthead) .hot-featured-card,
body:has(.frontpage-masthead) .story-card,
body:has(.frontpage-masthead) .stacked-article-card,
body:has(.frontpage-masthead) .stack-item,
body:has(.frontpage-masthead) .guide-showcase-lead,
body:has(.frontpage-masthead) .topic-column,
body:has(.frontpage-masthead) .rail-card {
  background: rgba(255, 255, 255, .96);
  color: #16283d;
}

body:has(.frontpage-masthead) .hero-big-title,
body:has(.frontpage-masthead) .hero-big-title .line span,
body:has(.frontpage-masthead) .brand-wordmark strong,
body:has(.frontpage-masthead) .brand-wordmark span,
body:has(.frontpage-masthead) .hero-category,
body:has(.frontpage-masthead) .hero-eyebrow,
body:has(.frontpage-masthead) .hero-meta,
body:has(.frontpage-masthead) .section-head h2,
body:has(.frontpage-masthead) .story-card h3 a,
body:has(.frontpage-masthead) .stack-item h3 a {
  color: #16283d;
  opacity: 1;
}

body:has(.frontpage-masthead) .hero-big-title .line span {
  transform: none;
}

body:has(.frontpage-masthead) .eclipse-toggle-btn {
  position: fixed;
  right: 24px;
  top: 76px;
  z-index: 10003;
  width: 48px;
  height: 48px;
}

body:has(.frontpage-masthead) .marquee-container .marquee-track {
  animation: none;
  will-change: transform;
}

body:has(.frontpage-masthead) .sky-clouds {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(238, 248, 255, .32), rgba(255, 255, 255, .48)),
    url("https://images.unsplash.com/photo-1499346030926-9a72daac6c63?auto=format&fit=crop&w=2400&q=82");
  background-position: 50% center;
  background-size: cover;
  filter: saturate(.88) brightness(1.08);
  transform: scale(1.04);
}

body:has(.frontpage-masthead) .sky-clouds::before,
body:has(.frontpage-masthead) .sky-clouds::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: min(42vw, 560px);
  height: min(20vw, 260px);
  background: center / contain no-repeat url("https://pngimg.com/d/cloud_PNG24.png");
  opacity: .42;
  filter: saturate(.7) brightness(1.08);
  will-change: transform;
}

body:has(.frontpage-masthead) .sky-clouds::before {
  top: 12%;
  left: -18%;
  animation: real-cloud-drift-one 72s linear infinite;
}

body:has(.frontpage-masthead) .sky-clouds::after {
  top: 38%;
  left: 48%;
  width: min(34vw, 440px);
  opacity: .3;
  background-image: url("https://pngimg.com/d/cloud_PNG16.png");
  animation: real-cloud-drift-two 96s linear infinite reverse;
}

body:has(.frontpage-masthead) .sky-clouds::before {
  background-image: url("https://pngimg.com/d/cloud_PNG24.png"), url("https://pngimg.com/d/cloud_PNG16.png");
  background-size: 62% 100%, 42% 76%;
  background-position: 0 center, 100% 20%;
}

@keyframes real-cloud-drift-one {
  from { transform: translate3d(0, 0, 0) scale(.96); }
  to { transform: translate3d(135vw, 4vh, 0) scale(1.04); }
}

@keyframes real-cloud-drift-two {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to { transform: translate3d(-110vw, -3vh, 0) scale(.94); }
}

body:has(.frontpage-masthead).theme-dark .sky-clouds::before,
body:has(.frontpage-masthead).theme-dark .sky-clouds::after {
  display: none;
}

body:has(.frontpage-masthead).theme-dark .sky-clouds { display: none; }

body:has(.frontpage-masthead) .topbar-actions .lang-pill.subtle[href*="patricktechmedia.store"] {
  background: #246fdb;
  border-color: #246fdb;
  color: #ffffff;
  font-weight: 700;
}

body:has(.frontpage-masthead) .topbar-actions .lang-pill.subtle[href*="patricktechmedia.store"]:hover,
body:has(.frontpage-masthead) .topbar-actions .lang-pill.subtle[href*="patricktechmedia.store"]:focus-visible {
  background: #1758b8;
  border-color: #1758b8;
  color: #ffffff;
}

body:has(.frontpage-masthead).theme-dark { background: #020611; color: #e8f1fa; }
body:has(.frontpage-masthead).theme-dark::before,
body:has(.frontpage-masthead).theme-dark::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; }
body:has(.frontpage-masthead).theme-dark::before { background: linear-gradient(rgba(2, 6, 17, .28), rgba(2, 6, 17, .5)), url("https://images.unsplash.com/photo-1462331940025-496dfbfc7564?auto=format&fit=crop&w=2400&q=88") center / cover no-repeat, radial-gradient(ellipse at 18% 22%, rgba(65,112,180,.22), transparent 34%), radial-gradient(ellipse at 78% 66%, rgba(116,55,164,.18), transparent 38%), linear-gradient(145deg, #020611 0%, #07152d 48%, #030611 100%); }
body:has(.frontpage-masthead).theme-dark::after { opacity: .72; background: linear-gradient(154deg, transparent 28%, rgba(126,178,255,.09) 42%, rgba(210,160,255,.12) 48%, transparent 63%), radial-gradient(ellipse at 52% 48%, transparent 0 18%, rgba(131,181,255,.08) 34%, transparent 57%); mix-blend-mode: screen; animation: galaxy-drift 32s ease-in-out infinite alternate; }
@keyframes galaxy-drift { from { transform: translate3d(-2%, 1%, 0) scale(1.03); } to { transform: translate3d(2%, -1%, 0) scale(1.08); } }

body:has(.frontpage-masthead) .brand-lockup {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-width: 172px;
  color: #16283d;
}

body:has(.frontpage-masthead) .brand-icon {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  opacity: 1;
  visibility: visible;
}

body:has(.frontpage-masthead) .brand-wordmark strong {
  display: block;
  color: #16283d !important;
  opacity: 1 !important;
  visibility: visible;
}

body:has(.frontpage-masthead).theme-dark .brand-wordmark strong {
  color: #e8f1fa !important;
}

body:has(.frontpage-masthead) .headline-index {
  color: #1459b8 !important;
  border-color: #7db7ef;
  background: #f4faff;
  opacity: 1;
  font-weight: 900;
}

body:has(.frontpage-masthead) .cyber-door {
  display: flex;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  body.newsroom-page .cyber-door { transition-duration: .2s !important; }
  body.newsroom-page .cyber-door .door-panel { transform: none !important; }
  body.newsroom-page .cyber-door .door-panel::before,
  body.newsroom-page .cyber-door .door-panel::after { animation: none !important; filter: none !important; }
  body.newsroom-page .cyber-door .door-gap-light { animation: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  body:has(.frontpage-masthead) .cyber-door {
    display: flex;
    transition-duration: .2s !important;
  }
}

body:has(.frontpage-masthead).theme-dark .topbar,
body:has(.frontpage-masthead).theme-dark .hero-main-banner,
body:has(.frontpage-masthead).theme-dark .hero-recent-box,
body:has(.frontpage-masthead).theme-dark .hot-featured-card,
body:has(.frontpage-masthead).theme-dark .story-card,
body:has(.frontpage-masthead).theme-dark .stacked-article-card,
body:has(.frontpage-masthead).theme-dark .stack-item,
body:has(.frontpage-masthead).theme-dark .guide-showcase-lead,
body:has(.frontpage-masthead).theme-dark .topic-column,
body:has(.frontpage-masthead).theme-dark .rail-card {
  background: rgba(17, 28, 43, .96);
  color: #e8f1fa;
}

body:has(.frontpage-masthead).theme-dark .hero-big-title,
body:has(.frontpage-masthead).theme-dark .hero-big-title .line span,
body:has(.frontpage-masthead).theme-dark .brand-wordmark strong,
body:has(.frontpage-masthead).theme-dark .brand-wordmark span,
body:has(.frontpage-masthead).theme-dark .hero-category,
body:has(.frontpage-masthead).theme-dark .hero-eyebrow,
body:has(.frontpage-masthead).theme-dark .hero-meta,
body:has(.frontpage-masthead).theme-dark .section-head h2,
body:has(.frontpage-masthead).theme-dark .story-card h3 a,
body:has(.frontpage-masthead).theme-dark .stack-item h3 a {
  color: #e8f1fa;
}

body:has(.frontpage-masthead).theme-dark .topbar-actions a,
body:has(.frontpage-masthead).theme-dark .headline-ribbon .item-headline,
body:has(.frontpage-masthead).theme-dark .headline-ribbon .quick-news-item .item-headline,
body:has(.frontpage-masthead).theme-dark .headline-ribbon .quick-news-item strong {
  color: #f4f8ff !important;
  opacity: 1 !important;
}

body:has(.frontpage-masthead).theme-dark .headline-ribbon .meta-row,
body:has(.frontpage-masthead).theme-dark .headline-ribbon .quick-news-item .meta-row {
  color: #c5d7ea !important;
}

body:has(.frontpage-masthead).theme-dark .topbar-actions a:hover,
body:has(.frontpage-masthead).theme-dark .topbar-actions a:focus-visible {
  color: #ffffff !important;
}

@media (max-width: 640px) {
  body:has(.frontpage-masthead) .eclipse-toggle-btn {
    right: 16px;
    top: 64px;
  }
}

/* Final mobile newsroom contract: keep every control inside the viewport. */
@media (max-width: 640px) {
  body.newsroom-page {
    overflow-x: hidden;
  }

  body.newsroom-page .site-shell {
    width: 100%;
    max-width: 100%;
    padding: 0 12px 28px;
  }

  body.newsroom-page .topbar {
    position: relative;
    top: 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 12px;
    overflow: hidden;
  }

  body.newsroom-page .brand-lockup {
    width: auto;
    min-width: 0;
    max-width: calc(100% - 8px);
  }

  body.newsroom-page .brand-wordmark strong {
    font-size: clamp(1.05rem, 5vw, 1.35rem);
  }

  body.newsroom-page .brand-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  body.newsroom-page .category-menu {
    display: none;
  }

  body.newsroom-page .topbar-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    gap: 6px;
    padding-right: 0;
    overflow: visible;
  }

  body.newsroom-page .topbar-actions .lang-pill {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 38px;
    padding: 8px 12px;
    font-size: .78rem;
    white-space: nowrap;
    text-align: center;
  }

  body.newsroom-page .topbar-actions .lang-pill.subtle {
    flex: 0 0 auto;
    min-width: 62px;
  }

  body.newsroom-page .eclipse-toggle-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    z-index: 4;
  }

  body.newsroom-page .marquee-container {
    margin-top: 8px;
    padding: 8px 0;
  }

  body.newsroom-page .page-body {
    margin-top: 12px;
  }

  body.newsroom-page .frontpage-masthead,
  body.newsroom-page .article-shell,
  body.newsroom-page .page-body > * {
    min-width: 0;
    max-width: 100%;
  }

  body.newsroom-page .hero-big-title,
  body.newsroom-page .article-header h1 {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: clamp(2rem, 9vw, 3rem);
  }
}

/* Final dark-mode contrast pass for homepage rail cards. Keep this after legacy homepage rules. */
body.newsroom-page.theme-dark :where(.lead-mini, .lead-mini-copy, .hot-featured-card, .hot-featured-body, .rail-card, .story-card, .stack-item) {
  color: #e8f1fa !important;
  background: rgba(17, 28, 43, .96) !important;
}

body.newsroom-page.theme-dark :where(.lead-mini h3, .lead-mini h3 a, .hot-featured-body h2, .hot-featured-body h2 a, .rail-card h3, .rail-card h3 a, .story-card h3, .story-card h3 a, .stack-item h3, .stack-item h3 a) {
  color: #edf6ff !important;
}

body.newsroom-page.theme-dark :where(.lead-mini-excerpt, .hot-featured-body p, .rail-card p, .story-card p, .stack-item p, .lead-mini .story-meta-line, .hot-featured-body .story-meta-line, .rail-card .story-meta-line) {
  color: #aec4d9 !important;
}

/* Final newsroom background layer: legacy homepage rules hide body pseudo-elements. */
body.newsroom-page.theme-dark::before,
body.newsroom-page.theme-dark::after {
  display: block !important;
  visibility: visible !important;
}
body.newsroom-page.theme-dark::before {
  z-index: 0 !important;
  background: linear-gradient(rgba(2, 6, 17, .2), rgba(2, 6, 17, .38)), url("https://images.unsplash.com/photo-1462331940025-496dfbfc7564?auto=format&fit=crop&w=2400&q=88") center / cover no-repeat !important;
}
body.newsroom-page.theme-dark .site-shell,
body.newsroom-page.theme-dark .page-body {
  z-index: 1;
}

/* Mobile platform performance: avoid GPU-heavy blur and shadow layers in account flows. */
@media (pointer: coarse) and (max-width: 1024px) {
  body.platform-page .backdrop,
  body.platform-page .backdrop::before,
  body.platform-page .backdrop::after,
  body.platform-page .site-shell::before {
    display: none;
  }

  body.platform-page .auth-shell,
  body.platform-page .account-card,
  body.platform-page .metric-card,
  body.platform-page .review-card,
  body.platform-page .notice-banner,
  body.platform-page .google-auth-button {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    animation: none;
    contain: layout paint;
    box-shadow: 0 8px 22px rgba(20, 38, 74, .1);
  }
}

/* Final newsroom visibility and media geometry pass. Store pages are intentionally excluded. */
body.newsroom-page :where(.hot-featured-body, .guide-showcase-copy, .story-card, .stack-item, .lead-mini, .rail-card) {
  color: #16283d;
}

body.newsroom-page :where(.hot-featured-body h2, .hot-featured-body h2 a, .guide-showcase-copy h2, .guide-showcase-copy h2 a, .story-card h3, .story-card h3 a, .stack-item .headline-title, .lead-mini h3, .lead-mini h3 a, .rail-card h3, .rail-card h3 a) {
  color: #14243a !important;
  opacity: 1 !important;
}

body.newsroom-page :where(.hot-featured-body p, .hot-featured-body .lead-feature-source, .hot-featured-body .lead-feature-topline > span:not(.pill), .guide-showcase-copy p, .story-card p, .stack-item .stack-date, .stack-item .stack-topline, .lead-mini-excerpt, .lead-mini .stack-topline, .rail-card p) {
  color: #35546f !important;
  opacity: 1 !important;
}

body.newsroom-page :where(.pill, .tag-pill) {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(20, 74, 126, .28);
  border-radius: 999px;
  background: #eef6ff;
  color: #123d68 !important;
  font-weight: 800;
  opacity: 1 !important;
}

body.newsroom-page .hot-featured-body .hot-pill {
  background: #fff1d2;
  border-color: #d88918;
  color: #713d00 !important;
}

body.newsroom-page :where(.stack-item, .story-card, .guide-showcase-lead, .hot-featured-card) {
  min-height: 0;
}

body.newsroom-page .stack-item {
  display: block !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: hidden;
}

body.newsroom-page .stack-item .stack-row,
body.newsroom-page .stacked-article-card .stack-row {
  display: grid;
  grid-template-columns: minmax(170px, .82fr) minmax(0, 1.18fr);
  align-items: stretch;
  min-height: 180px;
}

body.newsroom-page .stack-item .stack-media,
body.newsroom-page .stacked-article-card .stack-media {
  width: 100%;
  height: 100%;
  min-height: 180px;
  aspect-ratio: 4 / 3;
  align-self: stretch;
}

body.newsroom-page .stack-item .stack-media img,
body.newsroom-page .stacked-article-card .stack-media img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
}

body.newsroom-page .stack-item .stack-copy {
  min-width: 0;
  align-content: center;
  padding: 18px;
}

body.newsroom-page .stack-item .headline-title,
body.newsroom-page .stack-item .stack-date {
  overflow-wrap: anywhere;
}

body.newsroom-page.theme-dark :where(.hot-featured-body, .guide-showcase-copy, .story-card, .stack-item, .lead-mini, .rail-card) {
  color: #e8f1fa;
}

body.newsroom-page.theme-dark :where(.hot-featured-body h2, .hot-featured-body h2 a, .guide-showcase-copy h2, .guide-showcase-copy h2 a, .story-card h3, .story-card h3 a, .stack-item .headline-title, .lead-mini h3, .lead-mini h3 a, .rail-card h3, .rail-card h3 a) {
  color: #edf6ff !important;
}

body.newsroom-page.theme-dark :where(.hot-featured-body p, .hot-featured-body .lead-feature-source, .hot-featured-body .lead-feature-topline > span:not(.pill), .guide-showcase-copy p, .story-card p, .stack-item .stack-date, .stack-item .stack-topline, .lead-mini-excerpt, .lead-mini .stack-topline, .rail-card p) {
  color: #aec4d9 !important;
}

body.newsroom-page.theme-dark :where(.pill, .tag-pill) {
  background: #1b3854;
  border-color: rgba(154, 207, 255, .48);
  color: #e8f5ff !important;
}

body.newsroom-page.theme-dark .hot-featured-body .hot-pill {
  background: #694316;
  border-color: #f1b94a;
  color: #fff5d8 !important;
}

@media (max-width: 900px) {
  body.newsroom-page .stack-item .stack-row,
  body.newsroom-page .stacked-article-card .stack-row {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    height: auto;
  }

  body.newsroom-page .stack-item .stack-media,
  body.newsroom-page .stacked-article-card .stack-media,
  body.newsroom-page .stack-item .stack-media img,
  body.newsroom-page .stacked-article-card .stack-media img {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}
