/* OpenAI Newsroom Visual Grid & Light-Mode Deep-Dive Article Layout */
.news-main {
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  min-height: 78vh;
  padding-block: 36px 96px;
  background-color: var(--surface);
  color: var(--ink-deep);
}

.news-shell {
  width: min(calc(100% - var(--gutter) * 2), 1280px);
  margin-inline: auto;
}

/* Newsroom Masthead — Clean Sans-Serif */
.news-heading {
  margin: 0 0 24px;
  padding: 0;
  border: 0;
  background: transparent;
}
.news-heading h1 {
  font: 600 clamp(2.25rem, 3.6vw, 3rem)/1.08 var(--font-body);
  letter-spacing: -0.03em;
  color: var(--ink-deep);
  margin: 0 0 10px;
}
.news-lead {
  font: 400 clamp(1rem, 1.15vw, 1.1rem)/1.6 var(--font-body);
  color: var(--gray);
  max-width: 64ch;
  margin: 0;
}

/* Interactive Category Filter Bar — Clean Minimalist Pills */
.news-filter-bar {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  align-items: center;
  gap: 8px;
  padding: 0 0 32px;
  margin-bottom: 0;
  border: 0;
  background: transparent;
  width: 100%;
}
.news-filter-bar::-webkit-scrollbar {
  display: none;
}
.news-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--gray);
  font: 500 0.84rem/1.2 var(--font-body);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  transition:
    color 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease;
}
.news-filter-chip:hover {
  color: var(--ink-deep);
  border-color: var(--gray-line);
  background: var(--wash);
}
.news-filter-count {
  font: 500 0.72rem/1 var(--font-body);
  color: var(--slate-muted);
}
.news-filter-input:checked + .news-filter-chip {
  background: var(--ink-deep);
  border-color: var(--ink-deep);
  color: var(--surface);
  font-weight: 500;
}
.news-filter-input:checked + .news-filter-chip span {
  color: var(--surface);
}
.news-filter-input:checked + .news-filter-chip .news-filter-count {
  color: var(--white-alpha-72-legacy);
}
.news-filter-input:focus-visible + .news-filter-chip {
  outline: 2px solid var(--ink-deep);
  outline-offset: 2px;
}

.news-shell:has(#filter-cat-product:checked)
  [data-news-category]:not([data-news-category="Product"]),
.news-shell:has(#filter-cat-engineering:checked)
  [data-news-category]:not([data-news-category="Engineering"]),
.news-shell:has(#filter-cat-research:checked)
  [data-news-category]:not([data-news-category="Research"]),
.news-shell:has(#filter-cat-company:checked)
  [data-news-category]:not([data-news-category="Company"]),
.news-shell:has(#filter-cat-design:checked) [data-news-category]:not([data-news-category="Design"]),
.news-shell:has(#filter-cat-development:checked)
  [data-news-category]:not([data-news-category="Development"]) {
  display: none;
}

/* OpenAI Newsroom Asymmetric 12-Column Visual Showcase Grid */
.news-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 44px 32px;
  border-top: 0;
  align-items: start;
}

.news-timeline > li {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  min-width: 0;
}

/* Lead Story (Left 8 columns, spanning 2 vertical featured rows — Image 1 Left) */
.news-timeline > li.news-item--lead {
  grid-column: 1 / 9;
  grid-row: 1 / 3;
  gap: 20px;
}

/* Two Stacked Right-Column Featured Stories (Right 4 columns — Image 1 Right) */
.news-timeline > li.news-item--featured {
  grid-column: 9 / 13;
  gap: 14px;
}

/* Subsequent Stories in 3-Column Visual Grid */
.news-timeline > li.news-item--row {
  grid-column: span 4;
  gap: 14px;
}

/* When a category filter is active, normalize all visible stories into a 3-column grid */
.news-shell:has(.news-filter-input:not(#filter-cat-all):checked)
  .news-timeline
  > li.news-item--lead,
.news-shell:has(.news-filter-input:not(#filter-cat-all):checked)
  .news-timeline
  > li.news-item--featured {
  grid-column: span 4;
  grid-row: auto;
}

/* Visual Artwork Cards (Image 1) */
.news-visual-card {
  display: block;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  position: relative;
  border: 1px solid rgba(13, 13, 13, 0.06);
  transition: opacity 0.2s ease;
}
.news-visual-card:hover {
  opacity: 0.94;
}

/* Variant 0: Lead Story UI Showcase Canvas (Image 1 Left) */
.news-visual-card--lead {
  aspect-ratio: 16 / 10.5;
  background: linear-gradient(
    145deg,
    var(--wash-blue) 0%,
    var(--wash-blue-mid) 52%,
    var(--wash-blue-deep) 100%
  );
}
.news-lead-canvas {
  width: 100%;
  height: 100%;
  padding: clamp(24px, 3.6vw, 44px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 24px;
  align-items: center;
}
.news-lead-widgets {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 310px;
}
.news-widget {
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 8px 24px var(--slate-ink-alpha-06-legacy);
}
.news-widget--amber {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  width: 78%;
}
.news-widget-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.news-widget-grid span {
  display: block;
  height: 22px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.26);
}
.news-widget-grid span.is-hi {
  background: var(--surface);
}
.news-chat-pill {
  align-self: flex-end;
  background: var(--surface);
  color: var(--ink-deep);
  font: 500 0.74rem/1.3 var(--font-body);
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 14px var(--slate-ink-alpha-06-legacy);
}
.news-widget--orange {
  background: var(--gold-wash);
  width: 82%;
  padding: 10px 14px;
}
.news-widget--orange svg {
  width: 100%;
  height: 64px;
  display: block;
}
.news-widget--blue {
  background: linear-gradient(135deg, var(--blue-mid) 0%, var(--blue-deep) 100%);
  width: 86%;
  padding: 10px 14px;
}
.news-widget--blue svg {
  width: 100%;
  height: 52px;
  display: block;
}
.news-lead-headline {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font: 600 clamp(1.65rem, 2.7vw, 2.5rem)/1.08 var(--font-body);
  letter-spacing: -0.03em;
  color: var(--ink-deep);
}

/* Variant 1: Warm Golden-Coral Gradient Card (Image 1 Top Right) */
.news-visual-card--warm {
  aspect-ratio: 16 / 10;
}
.news-art-warm {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 22% 24%, var(--lemon) 0%, transparent 55%),
    radial-gradient(circle at 82% 78%, var(--coral) 0%, transparent 62%),
    linear-gradient(135deg, var(--gold-soft) 0%, var(--peach) 48%, var(--salmon) 100%);
}

/* Variant 2: Deep Obsidian Dark Card with Chromatic Wordmark & Nodes (Image 1 Bottom Right) */
.news-visual-card--dark {
  aspect-ratio: 16 / 10;
  background: var(--ink-void);
}
.news-art-dark {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 50% 42%, rgba(99, 102, 241, 0.22) 0%, transparent 62%),
    var(--ink-void);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 24px;
}
.news-art-wordmark {
  font: 600 clamp(2rem, 3vw, 2.75rem)/1 var(--font-body);
  letter-spacing: -0.03em;
  background: linear-gradient(
    90deg,
    var(--sky-soft) 0%,
    var(--lilac) 35%,
    var(--pink-soft) 70%,
    var(--sand) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.news-art-nodes {
  position: absolute;
  bottom: 18px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.news-art-nodes::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
  z-index: 0;
}
.news-node {
  width: 24px;
  height: 14px;
  border-radius: 4px;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.news-node--blue {
  background: var(--blue);
}
.news-node--green {
  background: var(--emerald);
}
.news-node--gold {
  background: var(--amber);
}
.news-node--pink {
  background: var(--pink);
}

/* Variants 3–5: Curated Architectural Cards for Lower 3-Column Grid */
.news-visual-card--violet,
.news-visual-card--emerald,
.news-visual-card--cobalt {
  aspect-ratio: 16 / 10;
}
.news-art-violet,
.news-art-emerald,
.news-art-cobalt {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.news-art-violet {
  background:
    radial-gradient(circle at 25% 25%, var(--indigo-wash) 0%, transparent 55%),
    linear-gradient(135deg, var(--indigo-mid) 0%, var(--indigo) 52%, var(--indigo-bright) 100%);
}
.news-art-emerald {
  background:
    radial-gradient(circle at 75% 25%, var(--mint-wash) 0%, transparent 55%),
    linear-gradient(135deg, var(--mint) 0%, var(--mint-mid) 52%, var(--mint-deep) 100%);
}
.news-art-cobalt {
  background:
    radial-gradient(circle at 30% 75%, var(--sky-wash) 0%, transparent 55%),
    linear-gradient(135deg, var(--sky) 0%, var(--sky-mid) 52%, var(--sky-bright) 100%);
}
.news-art-tag {
  font: 600 1.65rem/1 var(--font-body);
  letter-spacing: -0.03em;
  color: var(--ink-deep);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(8px);
  padding: 10px 20px;
  border-radius: 999px;
}

/* Story Entry Typography & Metadata (Image 1 Exact Match) */
.news-entry {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-entry h2 {
  font: 600 1.2rem/1.3 var(--font-body);
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink-deep);
  text-wrap: pretty;
}

.news-timeline > li.news-item--lead .news-entry h2,
.news-entry.news-spotlight h2 {
  font: 600 clamp(1.75rem, 2.5vw, 2.25rem)/1.16 var(--font-body);
  letter-spacing: -0.028em;
}

.news-entry h2 a {
  text-decoration: none;
  color: var(--ink-deep);
  transition: color 0.16s ease;
}
.news-entry h2 a:hover {
  color: var(--gray);
}

/* Single-line metadata directly below title: Category   Date   Reading time */
.news-meta {
  padding: 0;
  background: transparent;
  border: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font: 400 0.82rem/1.4 var(--font-body);
  color: var(--slate);
}
.news-meta-left,
.news-meta-right {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}
.news-category {
  display: inline-block;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-deep);
  font: 500 0.82rem/1.4 var(--font-body);
  text-transform: none;
  letter-spacing: 0;
}
.news-meta time,
.news-reading-time {
  font: 400 0.82rem/1.4 var(--font-body);
  color: var(--slate);
  font-variant-numeric: tabular-nums;
}

/* Keep index cards clean like OpenAI Newsroom (Image 1: Title + Meta only) */
.news-timeline .news-entry > p,
.news-timeline .news-entry-footer {
  display: none;
}

/* Pagination */
.news-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 48px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--mist);
  font: 500 0.86rem/1.4 var(--font-body);
}
.news-pagination a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-deep);
  text-decoration: none;
}
.news-pagination a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.news-page-count {
  color: var(--slate);
  font: 400 0.84rem/1.4 var(--font-body);
}
.news-empty {
  width: 100%;
  margin: 0 0 36px;
  padding: 24px 0;
  border-bottom: 1px solid var(--mist);
  font-size: 1rem;
  color: var(--gray);
}

/* Topic Tags */
.news-tags,
.news-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.news-tag {
  font: 500 0.74rem/1.2 var(--font-body);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--wash);
  color: var(--gray);
}

/* 3-Column Deep-Dive Article Layout — OpenAI Light Mode */
.news-article-workspace {
  width: min(calc(100% - var(--gutter) * 2), 1380px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 210px;
  column-gap: 48px;
  row-gap: 0;
  align-items: start;
}
.news-article-workspace > .dev-portal-bar {
  width: 100%;
  max-width: 780px;
  margin-inline: auto;
  grid-column: 2;
  grid-row: 1;
}
.article-rail-left {
  grid-column: 1;
  grid-row: 1 / 3;
  position: sticky;
  top: calc(var(--header-offset, var(--header, 76px)) + 20px);
  max-height: calc(100vh - var(--header-offset, var(--header, 76px)) - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  min-width: 0;
  padding-right: 0;
  border-right: 0;
}
.article-rail-right {
  grid-column: 3;
  grid-row: 1 / 3;
  position: sticky;
  top: calc(var(--header-offset, var(--header, 76px)) + 20px);
  max-height: calc(100vh - var(--header-offset, var(--header, 76px)) - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  min-width: 0;
  padding-left: 0;
  border-left: 0;
  display: grid;
  gap: 28px;
}
.article-meta-card,
.article-toc-box,
.article-related-box {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.article-rail-header {
  padding: 0 0 10px;
}
.article-rail-header .docs-toc-current,
.article-rail-header .docs-toc-chevron {
  display: none;
}
.article-rail-heading {
  font: 600 0.76rem/1.3 var(--font-body);
  color: var(--ink-deep);
  margin: 0;
}
.article-meta-body {
  display: grid;
  gap: 14px;
}
.article-meta-block {
  display: grid;
  gap: 3px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--wash-strong);
}
.article-meta-block:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.article-meta-label {
  font: 500 0.74rem/1.3 var(--font-body);
  color: var(--slate-muted);
}
.article-meta-value {
  font: 500 0.85rem/1.45 var(--font-body);
  color: var(--ink-deep);
}
.news-category-badge {
  display: inline-flex;
  align-self: flex-start;
  font: 600 0.78rem/1.3 var(--font-body);
  color: var(--ink-deep);
}
.article-stage.reading-shell {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  max-width: 780px;
  min-width: 0;
  margin-inline: auto;
}
.article-heading {
  padding: 0 0 28px;
  border-bottom: 1px solid var(--mist);
  margin-bottom: 0;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font: 400 0.84rem/1.4 var(--font-body);
  color: var(--slate);
  margin-bottom: 14px;
}
.article-head-rt {
  font: 400 0.84rem/1.4 var(--font-body);
  color: var(--slate);
}
.article-heading h1 {
  font: 600 clamp(2rem, 3.4vw, 2.75rem)/1.12 var(--font-body);
  letter-spacing: -0.03em;
  color: var(--ink-deep);
  margin: 0 0 14px;
  text-wrap: pretty;
}
.article-lead {
  font: 400 1.08rem/1.64 var(--font-body);
  color: var(--ink-muted);
  max-width: 66ch;
  margin: 0;
}
.article-content-sheet {
  padding: 28px 0 0;
}

/* Executive Key Takeaways — Soft Light Card */
.article-takeaways {
  margin: 0 0 32px;
  padding: 20px 24px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--wash);
}
.article-takeaways-title {
  font: 600 0.82rem/1.3 var(--font-body);
  color: var(--ink-deep);
  margin: 0 0 12px;
}
.article-takeaways-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font: 400 0.92rem/1.6 var(--font-body);
  color: var(--ink-muted);
  counter-reset: art-tk;
}
.article-takeaways-list > li {
  counter-increment: art-tk;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
}
.article-takeaways-list > li::before {
  content: counter(art-tk, decimal-leading-zero);
  font: 600 0.74rem/1 var(--font-mono);
  color: var(--slate);
}

/* Rich Article Body Blocks */
.article-body {
  font: 400 0.98rem/1.72 var(--font-body);
  color: var(--ink-muted);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  min-width: 0;
}
.article-section {
  scroll-margin-top: calc(var(--header) + 24px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}
.article-h2,
.article-body h2 {
  font: 600 clamp(1.35rem, 1.9vw, 1.65rem)/1.25 var(--font-body);
  letter-spacing: -0.022em;
  color: var(--ink-deep);
  margin: 12px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--mist);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.article-sec-num {
  display: none;
}
.article-section:first-child h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.article-body p {
  max-width: 68ch;
  margin: 0;
}
.article-list {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 8px;
  max-width: 66ch;
}

/* Soft Light Callout (Image 3 Style) */
.article-callout {
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--wash);
  display: grid;
  gap: 6px;
}
.article-callout-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.article-callout-kind {
  font: 600 0.72rem/1.2 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
}
.article-callout-title {
  font: 600 0.92rem/1.35 var(--font-body);
  color: var(--ink-deep);
}
.article-callout-text {
  font: 400 0.9rem/1.6 var(--font-body);
  color: var(--ink-muted);
  margin: 0;
}

/* Light-Mode Code Block (Image 3 & 5 Style) */
.article-codeblock {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--wash);
  color: var(--ink-deep);
  min-width: 0;
  max-width: 100%;
}
.article-code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--wash);
  border-bottom: 1px solid var(--mist);
}
.article-code-lang {
  font: 500 0.76rem/1 var(--font-mono);
  color: var(--slate);
}
.article-code-title {
  font: 500 0.8rem/1 var(--font-body);
  color: var(--ink-muted);
}
.article-pre,
.article-pre code {
  margin: 0;
  font: 400 0.82rem/1.65 var(--font-mono);
  color: var(--ink-deep);
  background: transparent;
}
.article-pre {
  padding: 14px 16px;
  overflow-x: auto;
}

/* Tables */
.article-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}
.article-table th {
  font: 600 0.76rem/1.3 var(--font-body);
  color: var(--ink-deep);
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--line-strong);
}
.article-table td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--wash-strong);
  vertical-align: top;
  line-height: 1.54;
  color: var(--ink-muted);
}
.article-table tbody tr:last-child td {
  border-bottom: 0;
}
.article-quote {
  margin: 4px 0;
  padding: 14px 20px;
  border-radius: 12px;
  background: var(--wash);
  border: 1px solid var(--line-strong);
  display: grid;
  gap: 6px;
}
.article-quote-text {
  font: 500 1.02rem/1.56 var(--font-body);
  color: var(--ink-deep);
  margin: 0;
}
.article-quote-cite {
  font: 400 0.8rem/1.3 var(--font-body);
  color: var(--slate);
  font-style: normal;
}

/* Related Documentation Links & Pager */
.article-resources {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--mist);
}
.article-resources-title {
  font: 600 0.8rem/1.3 var(--font-body);
  color: var(--ink-deep);
  margin: 0 0 12px;
}
.article-resources-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.article-resource-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font: 500 0.88rem/1.35 var(--font-body);
  color: var(--ink-deep);
}
.article-resource-card:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-pager {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--mist);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.article-pager-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
}
.article-pager-card--next {
  grid-column: 2;
  text-align: right;
  align-items: flex-end;
}
.article-pager-dir {
  font: 500 0.76rem/1.2 var(--font-body);
  color: var(--slate);
}
.article-pager-title {
  font: 600 1rem/1.35 var(--font-body);
  color: var(--ink-deep);
}
.article-pager-card:hover .article-pager-title {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.article-return {
  border-top: 1px solid var(--mist);
  margin-top: 28px;
  padding-top: 20px;
}

/* Right TOC & Related Dispatches Rail — OpenAI Left Indicator Line */
.article-toc-list,
.article-related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.article-toc-list {
  border-left: 1px solid var(--mist);
}
.article-toc-list a {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font: 400 0.8rem/1.38 var(--font-body);
  color: var(--slate);
  text-decoration: none;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}
.article-toc-list li.is-active a,
.article-toc-list a.is-active,
.article-toc-list a:hover {
  color: var(--ink-deep);
  border-left-color: var(--ink-deep);
  font-weight: 500;
}
.article-toc-num {
  display: none;
}
.article-related-list li {
  display: grid;
  gap: 3px;
  padding: 8px 0;
  border-bottom: 1px solid var(--wash-strong);
}
.article-related-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.article-related-date {
  font: 400 0.74rem/1.2 var(--font-body);
  color: var(--slate-muted);
}
.article-related-link {
  font: 500 0.82rem/1.35 var(--font-body);
  color: var(--ink-deep);
  text-decoration: none;
}
.article-related-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Responsive Breakpoints */
@media (max-width: 78rem) {
  .news-article-workspace {
    grid-template-columns: 184px minmax(0, 1fr) 184px;
    column-gap: 28px;
    row-gap: 0;
  }
}

@media (max-width: 63.999rem) {
  .news-main:has(.news-article-workspace) {
    padding-top: 12px;
  }
  .news-timeline > li.news-item--lead {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .news-timeline > li.news-item--featured,
  .news-timeline > li.news-item--row {
    grid-column: span 6;
  }
  .news-article-workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .news-article-workspace > .dev-portal-bar {
    order: 1;
    grid-column: 1 / -1;
    grid-row: 1;
    max-width: none;
    padding: 0 0 8px;
    margin-bottom: 0;
  }
  .article-rail-left,
  .article-related-box {
    display: none;
  }
  .article-rail-right {
    order: 2;
    grid-column: 1 / -1;
    grid-row: 2;
    display: block;
    position: sticky;
    top: var(--header-offset, var(--header, 64px));
    z-index: 25;
    width: calc(100% + var(--gutter) * 2);
    max-height: none;
    overflow: visible;
    margin-inline: calc(var(--gutter) * -1);
    padding: 0 var(--gutter);
    background: var(--white-alpha-96-legacy);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--wash-hot);
    border-bottom: 1px solid var(--line-strong);
    border-radius: 0;
    transition:
      background 0.2s cubic-bezier(0.22, 1, 0.36, 1),
      border-color 0.2s ease,
      border-radius 0.2s cubic-bezier(0.22, 1, 0.36, 1),
      box-shadow 0.2s ease;
  }
  .article-stage.reading-shell {
    order: 3;
    grid-column: 1 / -1;
    grid-row: 3;
    padding-top: 18px;
  }
  .header:has(~ main .news-article-workspace.is-subbar-docked) {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 1px solid var(--white-alpha-8);
  }
  .news-article-workspace.is-subbar-docked .article-rail-right {
    background: var(--noir);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top-color: var(--noir);
    border-bottom: 1px solid var(--white-alpha-9);
    border-radius: 0 0 var(--shell-radius) var(--shell-radius);
    box-shadow:
      0 -2px 0 var(--noir),
      0 14px 32px -12px var(--black-alpha-38);
  }
  .news-article-workspace.is-subbar-docked:has(.article-toc-box.is-open) .article-rail-right {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 -2px 0 var(--noir);
  }
  .news-article-workspace.is-subbar-docked .article-toc-box .article-rail-heading {
    color: var(--white-alpha-56);
  }
  .news-article-workspace.is-subbar-docked .article-toc-box .docs-toc-current {
    color: var(--surface);
  }
  .news-article-workspace.is-subbar-docked .article-toc-box .docs-toc-current:not(:empty)::before {
    color: var(--white-alpha-34);
  }
  .news-article-workspace.is-subbar-docked .article-toc-box .docs-toc-chevron {
    color: var(--white-alpha-68);
  }
  .news-article-workspace.is-subbar-docked .article-toc-box.is-open .article-toc-list {
    background: var(--noir-alpha-98);
    border-top: 1px solid var(--white-alpha-8);
    border-bottom: 1px solid var(--white-alpha-12);
    border-radius: 0 0 var(--shell-radius) var(--shell-radius);
    box-shadow: 0 20px 44px -12px var(--black-alpha-55);
  }
  .news-article-workspace.is-subbar-docked .article-toc-box.is-open .article-toc-list a {
    color: var(--white-alpha-64);
  }
  .news-article-workspace.is-subbar-docked
    .article-toc-box.is-open
    .article-toc-list
    li.is-active
    a,
  .news-article-workspace.is-subbar-docked .article-toc-box.is-open .article-toc-list a.is-active,
  .news-article-workspace.is-subbar-docked .article-toc-box.is-open .article-toc-list a:hover {
    color: var(--surface);
    border-left-color: var(--surface);
  }
  .article-toc-box .article-rail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 46px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    user-select: none;
  }
  .article-toc-box .article-rail-heading {
    font: 600 0.75rem/1.2 var(--font-body);
    color: var(--slate);
    flex-shrink: 0;
  }
  .article-toc-box .docs-toc-current {
    display: block;
    font: 500 0.8rem/1.25 var(--font-body);
    color: var(--ink-deep);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: auto;
    min-width: 0;
  }
  .article-toc-box .docs-toc-current:not(:empty)::before {
    content: "·";
    margin-right: 6px;
    color: var(--slate-light);
  }
  .article-toc-box .docs-toc-chevron {
    display: inline-flex;
    font-size: 0.85rem;
    line-height: 1;
    color: var(--slate);
    flex-shrink: 0;
    transition: transform 0.16s ease;
  }
  .article-toc-box.is-open .docs-toc-chevron {
    transform: rotate(180deg);
  }
  .article-toc-box:not(.is-open) .article-toc-list {
    display: none;
  }
  .article-toc-box.is-open .article-toc-list {
    display: grid;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 55vh;
    overflow-y: auto;
    padding: 8px var(--gutter) 14px;
    background: var(--white-alpha-98-legacy);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--wash-strong);
    border-bottom: 1px solid var(--line-strong);
    border-left: 0;
    box-shadow: 0 14px 32px var(--black-alpha-08-legacy);
  }
}

@media (max-width: 47.999rem) {
  .news-main {
    padding-block: var(--space-3) 48px;
  }
  .news-shell > .dev-portal-bar {
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
  }
  .news-filter-bar {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 6px;
    padding-bottom: 24px;
  }
  .news-filter-chip {
    padding: 5px 11px;
    font-size: 0.78rem;
  }
  .news-timeline {
    gap: 32px 20px;
  }
  .news-timeline > li.news-item--lead,
  .news-timeline > li.news-item--featured,
  .news-timeline > li.news-item--row {
    grid-column: 1 / -1;
  }
  .news-visual-card--lead {
    aspect-ratio: auto;
  }
  .news-lead-canvas {
    grid-template-columns: 1fr;
    height: auto;
    padding: 20px;
    gap: 16px;
  }
  .news-lead-widgets {
    max-width: 100%;
  }
  .article-pager {
    grid-template-columns: minmax(0, 1fr);
  }
  .article-pager-card--next {
    grid-column: 1;
    text-align: left;
    align-items: flex-start;
  }
}
