.editorial-learning-path,
.editorial-lesson-outline,
.editorial-learning-map,
.editorial-at-a-glance {
  position: relative;
  overflow: hidden;
}

.editorial-learning-path::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--info-color, #38bdf8));
}

.editorial-section-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--primary-color);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.editorial-learning-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.editorial-learning-heading h2,
.editorial-lesson-outline h2,
.editorial-learning-map h2,
.editorial-at-a-glance h2 {
  margin: 0 0 0.45rem;
}

.editorial-learning-heading p,
.editorial-lesson-outline > p,
.editorial-learning-map > p,
.editorial-at-a-glance > p {
  margin: 0;
}

.editorial-path-position {
  flex: 0 0 auto;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
}

.editorial-path-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.editorial-path-step {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.55rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.editorial-path-step:hover {
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.editorial-path-step.current {
  border-color: var(--primary-color);
  background: color-mix(in srgb, var(--primary-color) 10%, transparent);
}

.editorial-path-number {
  display: grid;
  width: 1.65rem;
  height: 1.65rem;
  flex: 0 0 1.65rem;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary-color) 16%, transparent);
  color: var(--primary-color);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.editorial-path-step.current .editorial-path-number {
  background: var(--primary-color);
  color: #06201e;
}

.editorial-path-copy {
  min-width: 0;
}

.editorial-path-copy strong,
.editorial-path-copy small {
  display: block;
}

.editorial-path-copy strong {
  line-height: 1.25;
}

.editorial-path-copy small {
  margin-top: 0.15rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.editorial-lesson-list {
  columns: 2;
  column-gap: 2rem;
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}

.editorial-lesson-list li {
  break-inside: avoid;
  margin: 0 0 0.55rem;
  padding-left: 0.2rem;
}

.editorial-lesson-list a {
  color: var(--text-primary);
  font-weight: 650;
  text-decoration: none;
}

.editorial-lesson-list a:hover {
  color: var(--primary-color);
}

.editorial-map-grid,
.editorial-glance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.editorial-map-step,
.editorial-glance-item {
  padding: 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 0.55rem;
  background: color-mix(in srgb, var(--card-bg, var(--background-secondary)) 92%, transparent);
}

.editorial-map-step span {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  margin-bottom: 0.55rem;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-color);
  color: #06201e;
  font-size: 0.75rem;
  font-weight: 900;
}

.editorial-map-step h3,
.editorial-glance-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.editorial-map-step p,
.editorial-glance-item p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
}

.blog-standardized .sidebar .content-card > .feature-list {
  display: grid;
  gap: 0.65rem;
  list-style: none;
  margin-top: 1rem;
  padding: 0;
}

.blog-standardized .sidebar .content-card > .feature-list > li {
  display: block;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.blog-standardized .sidebar .content-card > .feature-list > li code {
  font: inherit;
  font-weight: 700;
  white-space: normal;
}

/* Keep lesson tables inside one complete, visible frame. */
.blog-standardized .table-responsive,
.blog-standardized .programmability-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
}

.blog-standardized .table-responsive table,
.blog-standardized .programmability-table-wrap table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.blog-standardized .table-responsive th,
.blog-standardized .table-responsive td,
.blog-standardized .programmability-table-wrap th,
.blog-standardized .programmability-table-wrap td {
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-top: 0;
  border-left: 0;
  padding: 0.82rem;
  text-align: left;
  vertical-align: top;
}

.blog-standardized .table-responsive th,
.blog-standardized .programmability-table-wrap th {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.blog-standardized .table-responsive tr:last-child > td,
.blog-standardized .programmability-table-wrap tr:last-child > td {
  border-bottom: 0;
}

.blog-standardized .table-responsive tr > :last-child,
.blog-standardized .programmability-table-wrap tr > :last-child {
  border-right: 0;
}

/* Day mode uses a light terminal surface; night mode keeps the dark CLI. */
html[data-theme="light"] body.blog-standardized .blog-standard-article pre,
html[data-theme="light"] body.blog-standardized .programmability-code {
  background: #f3f6fa;
  border-color: #c5d1df;
  color: #172033;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

html[data-theme="light"] body.blog-standardized .blog-standard-article pre code,
html[data-theme="light"] body.blog-standardized .programmability-code code {
  color: inherit;
}

/* Make the On This Page control clearly bounded against the white day surface. */
html[data-theme="light"] body.blog-standardized .sidebar > .on-page-card,
html[data-theme="light"] body.blog-standardized .sidebar > .content-card:has(.side-menu) {
  border-color: #c4d1df !important;
  box-shadow: 0 8px 22px rgba(30, 41, 59, 0.07) !important;
}

html[data-theme="light"] body.blog-standardized .on-page-card .side-menu a,
html[data-theme="light"] body.blog-standardized .sidebar .side-menu a {
  background: #f6f8fb !important;
  border: 1px solid #cbd7e6 !important;
  color: #42526a !important;
}

html[data-theme="light"] body.blog-standardized .on-page-card .side-menu a:hover,
html[data-theme="light"] body.blog-standardized .on-page-card .side-menu a:focus-visible,
html[data-theme="light"] body.blog-standardized .sidebar .side-menu a:hover,
html[data-theme="light"] body.blog-standardized .sidebar .side-menu a:focus-visible {
  border-color: var(--primary-color) !important;
  color: var(--primary-hover) !important;
}

@media (max-width: 800px) {
  .editorial-path-grid,
  .editorial-map-grid,
  .editorial-glance-grid {
    grid-template-columns: 1fr;
  }

  .editorial-lesson-list {
    columns: 1;
  }
}

@media (max-width: 560px) {
  .editorial-learning-heading {
    display: block;
  }

  .editorial-path-position {
    display: inline-block;
    margin-top: 0.65rem;
  }
}
