:root {
  --body-bg: #f5f5f5;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --surface-hover: #f9f9f9;
  --border: #d6d6d7;
  --border-strong: #bdbdbd;
  --text: #171717;
  --muted: #575757;
  --muted-2: #717171;
  --accent: #3b49df;
  --accent-hover: #2f3ab2;
  --accent-soft: #eef0ff;
  --accent-border: #c5c9ff;
  --danger-soft: #fff4f4;
  --warning-soft: #fff8e6;
  --success-soft: #edfff3;
  --shadow-card: 0 1px 1px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.08);
  --radius-dev: 0.5rem;
  --header-height: 58px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--body-bg);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent);
  color: #ffffff;
}

img,
svg {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
}

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

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

:focus-visible {
  outline: 3px solid rgba(59, 73, 223, 0.35);
  outline-offset: 2px;
}

.fw-black {
  font-weight: 600;
  letter-spacing: -0.03em;
}

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

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 2000;
  transform: translateY(-200%);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: var(--text);
  color: #ffffff;
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  min-height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.site-main {
  min-height: 0;
}

.navbar {
  --bs-navbar-color: var(--muted);
  --bs-navbar-hover-color: var(--accent);
  --bs-navbar-active-color: var(--accent);
}

.brand-logo {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 0.45rem;
  background: #0a0a0a;
  color: #ffffff !important;
  font-weight: 600;
  letter-spacing: -0.08em;
  box-shadow: inset 0 0 0 2px #0a0a0a;
}

.brand-logo--image {
  padding: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.brand-logo--image .custom-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-logo.mini {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  font-size: 0.82rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  text-decoration: none;
}

.site-brand__title {
  display: none;
  min-width: 0;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.site-brand:hover .site-brand__title,
.site-brand:focus-visible .site-brand__title {
  color: var(--accent);
}

.header-search {
  flex: 1 1 auto;
  min-width: 0;
}

.site-search {
  width: min(100%, 420px);
  max-width: 720px;
}

.site-search .form-control,
.blog-search .form-control,
textarea.form-control {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.form-control::placeholder {
  color: #8a8a8a;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem rgba(59, 73, 223, 0.14);
}

.nav-link {
  border-radius: 0.45rem;
  color: var(--muted);
  font-weight: 500;
}

.nav-link:hover {
  background: var(--surface-hover);
  color: var(--accent) !important;
}

.primary-menu > .menu-item-has-children {
  position: relative;
}

.primary-menu > .menu-item-has-children > .nav-link::after {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.45rem;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateY(-0.1rem) rotate(45deg);
  transition: transform 0.16s ease;
}

.primary-menu > .menu-item-has-children:hover > .nav-link::after,
.primary-menu > .menu-item-has-children:focus-within > .nav-link::after {
  transform: translateY(0.05rem) rotate(-135deg);
}

.primary-menu .sub-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  z-index: 1050;
  display: grid;
  width: min(56rem, calc(100vw - 2rem));
  min-width: 18rem;
  max-width: 56rem;
  max-height: calc(100vh - var(--header-height) - 1.25rem);
  margin: 0;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface);
  box-shadow: var(--shadow-hover);
  gap: 0.4rem;
  overflow: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.35rem);
  transition: opacity 0.16s ease, visibility 0.16s ease, transform 0.16s ease;
}

.primary-menu > .menu-item-has-children:hover > .sub-menu,
.primary-menu > .menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-menu .sub-menu .menu-item {
  position: relative;
}

.primary-menu .sub-menu .nav-link {
  display: block;
  padding: 0.8rem 0.9rem;
  border-radius: 0.45rem;
  white-space: normal;
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.32;
}

.primary-menu .sub-menu .nav-link:hover,
.primary-menu .sub-menu .nav-link.active {
  background: var(--accent-soft);
}

.primary-menu > .menu-item-has-children > .sub-menu > .menu-item > .nav-link {
  min-height: 100%;
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px transparent;
}

.primary-menu > .menu-item-has-children > .sub-menu > .menu-item > .nav-link:hover,
.primary-menu > .menu-item-has-children > .sub-menu > .menu-item > .nav-link.active {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-border);
}

.primary-menu .sub-menu .sub-menu {
  top: -0.45rem;
  left: calc(100% + 0.45rem);
}

.primary-menu .sub-menu .menu-item-has-children > .nav-link::after {
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-left: 0.45rem;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateY(-0.05rem) rotate(-45deg);
}

.mobile-nav {
  width: 100%;
}

.mobile-nav__list {
  max-height: calc(100vh - var(--header-height) - 0.75rem);
  overflow-y: auto;
  gap: 0.14rem;
}

.mobile-nav__item .mobile-nav__link {
  width: 100%;
  padding: 0.45rem 0.7rem;
  font-size: 0.86rem;
  line-height: 1.18;
}

.mobile-nav__item + .mobile-nav__item {
  margin-top: 0.06rem;
}

.btn {
  border-radius: 0.45rem;
}

.btn-primary {
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-bg: var(--accent-hover);
  --bs-btn-hover-border-color: var(--accent-hover);
  --bs-btn-active-bg: var(--accent-hover);
  --bs-btn-active-border-color: var(--accent-hover);
}

.btn-outline-primary {
  --bs-btn-color: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-bg: var(--accent);
  --bs-btn-hover-border-color: var(--accent);
  --bs-btn-active-bg: var(--accent-hover);
  --bs-btn-active-border-color: var(--accent-hover);
}

.btn-light {
  --bs-btn-bg: var(--surface);
  --bs-btn-border-color: transparent;
  --bs-btn-hover-bg: var(--accent-soft);
  --bs-btn-hover-color: var(--accent);
}

.sidebar-sticky {
  position: sticky;
  top: calc(var(--header-height) + 1rem);
}

.feed-card,
.sidebar-card,
.search-panel,
.category-hero,
.article-shell,
.author-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-dev);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.sidebar-title {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-rail {
  display: grid;
  max-height: 26rem;
  overflow: auto;
  padding-right: 0.2rem;
}

.tag-rail a {
  border-radius: 0.45rem;
  padding: 0.5rem 0.6rem;
  color: var(--muted);
  font-weight: 500;
}

.tag-rail a:hover,
.tag-rail a.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.feed-card {
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.feed-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
}

.feed-card-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: stretch;
}

.feed-card-compact {
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr);
  align-items: stretch;
}

.feed-card-feature__media {
  display: block;
  overflow: hidden;
  background: var(--surface-soft);
  aspect-ratio: 1 / 1;
  align-self: start;
}

.feed-card-feature__image,
.feed-card-feature__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 18rem;
}

.feed-card-compact__media {
  display: block;
  overflow: hidden;
  background: var(--surface-soft);
  aspect-ratio: 16 / 9;
  align-self: start;
}

.feed-card-compact__image,
.feed-card-compact__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-body {
  padding: 1.25rem;
}

.feed-card-feature .feed-body {
  display: grid;
  gap: 0.75rem;
  padding: 1.4rem 1.5rem 1.35rem;
}

.feed-card-compact .feed-body {
  display: grid;
  gap: 0.65rem;
  align-content: start;
  padding: 1rem 1.1rem;
}

.feed-excerpt {
  color: var(--muted);
  font-size: 0.95rem;
}

.feed-more {
  display: inline-flex;
  align-self: start;
  justify-self: start;
  margin-top: 0.1rem;
  width: auto;
}

.recent-posts {
  display: grid;
  gap: 1rem;
}

.recent-posts__grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.recent-posts__grid .feed-card-compact {
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 0.6fr);
  height: 100%;
}

.recent-posts__grid .feed-card-compact__media {
  aspect-ratio: auto;
  height: 100%;
}

.single-breadcrumbs {
  padding-inline: 0;
}

.author-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.avatar {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  box-shadow: 0 0 0 1px var(--border);
}

.avatar-lg {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
  font-size: 0.9rem;
}

.avatar-purple {
  background: linear-gradient(135deg, #6d28d9, #a855f7);
}

.avatar-blue {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.avatar-green {
  background: linear-gradient(135deg, #047857, #22c55e);
}

.avatar-orange {
  background: linear-gradient(135deg, #ea580c, #f59e0b);
}

.author-name {
  display: inline-flex;
  color: #3d3d3d;
  font-size: 0.92rem;
  font-weight: 600;
}

.author-name:hover {
  color: var(--accent);
}

.post-date {
  color: var(--muted-2);
  font-size: 0.78rem;
}

.feed-title {
  margin: 0.45rem 0 0.55rem;
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1.14;
}

.feed-card-compact .feed-title {
  margin: 0;
  font-size: clamp(1.08rem, 1.25vw, 1.35rem);
  line-height: 1.18;
}

.display-feed {
  font-size: clamp(1.85rem, 3vw, 3.2rem);
}

.feed-title a:hover {
  color: var(--accent);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
}

.post-tags a {
  border-radius: 0.35rem;
  padding: 0.25rem 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.post-tags a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.post-actions a,
.post-actions button {
  border-radius: 0.45rem;
}

.post-actions a {
  padding: 0.4rem 0.45rem;
  color: var(--muted);
}

.post-actions a:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.cover-gradient,
.article-cover,
.sidebar-card-cover {
  display: block;
  min-height: 13.5rem;
  background: linear-gradient(135deg, #0f172a, #334155);
}

.cover-ai {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.8), transparent 0.3rem),
    radial-gradient(circle at 80% 24%, rgba(255, 255, 255, 0.75), transparent 0.25rem),
    radial-gradient(circle at 38% 72%, rgba(255, 255, 255, 0.8), transparent 0.25rem),
    linear-gradient(135deg, #3b49df 0%, #7c3aed 48%, #0f172a 100%);
}

.cover-challenge {
  min-height: 8rem;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.5), transparent 1.8rem),
    linear-gradient(135deg, #0f172a, #3b49df 58%, #a855f7);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
}

.section-kicker {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.text-link {
  color: var(--accent);
  font-weight: 600;
}

.category-list-grid > [class*="col-"] + [class*="col-"] {
  border-left: 1px solid var(--border);
}

.category-list {
  display: grid;
  gap: 0.7rem;
  padding: 1.1rem;
}

.category-list h3 {
  margin: 0 0 0.1rem;
  font-size: 1rem;
  font-weight: 600;
}

.category-list h3 a {
  color: var(--accent);
}

.category-list > a {
  color: var(--text);
  font-weight: 600;
  line-height: 1.3;
}

.category-list > a:hover {
  color: var(--accent);
}

.home-category-section {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-dev);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.home-category-section__header {
  padding: 1rem 1.1rem 0;
}

.home-category-section__header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.home-category-section__body {
  padding: 1rem 1.1rem 1.1rem;
}

.home-category-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 1rem;
  align-items: start;
}

.home-category-feature__media {
  display: block;
  overflow: hidden;
  border-radius: 0.7rem;
  background: var(--surface-soft);
  aspect-ratio: 16 / 9;
  align-self: start;
}

.home-category-feature__image,
.home-category-feature__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-category-feature__content {
  display: grid;
  gap: 0.65rem;
  align-content: start;
  padding-top: 0.1rem;
}

.home-category-feature__meta .author-name {
  font-size: 0.9rem;
}

.home-category-feature__title {
  margin: 0;
  font-size: clamp(1.2rem, 1.7vw, 1.7rem);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.recent-posts__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.home-category-feature__title a:hover {
  color: var(--accent);
}

.home-category-feature__excerpt {
  color: var(--muted);
  font-size: 0.94rem;
}

.home-category-feature__more {
  align-self: start;
  margin-top: 0.1rem;
  width: auto;
}

.home-category-posts {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 992px) {
  .home-category-posts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1rem;
  }
}

.home-category-posts__item {
  border-radius: 0.7rem;
}

.home-category-posts__item--media {
  display: grid;
  grid-template-columns: minmax(8.5rem, 11rem) minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  padding: 0.25rem 0;
}

.home-category-posts__media {
  display: block;
  overflow: hidden;
  border-radius: 0.7rem;
  background: var(--surface-soft);
  aspect-ratio: 16 / 9;
  align-self: start;
}

.home-category-posts__image,
.home-category-posts__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-category-posts__link {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  justify-content: center;
  padding: 0.35rem 0.15rem;
}

.home-category-posts__link:hover {
  color: var(--accent);
}

.home-category-posts__title {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.35;
}

.home-category-posts__meta {
  color: var(--muted-2);
  font-size: 0.8rem;
}

.search-panel {
  padding: 1.25rem;
}

.search-panel {
  background:
    radial-gradient(circle at top right, rgba(59, 73, 223, 0.10), transparent 16rem),
    var(--surface);
}

.sidebar-card {
  overflow: hidden;
}

.sidebar-card h2 a:hover {
  color: var(--accent);
}

.category-nav-list,
.story-list,
.author-mini-list {
  display: grid;
}

.category-nav-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--border);
  padding: 0.8rem 1rem;
  font-weight: 500;
}

.category-nav-list a:first-child {
  border-top: 0;
}

.category-nav-list a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.category-nav-list a.active {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(30, 100, 89, 0.12);
}

.category-nav-list a.active strong {
  color: var(--accent);
}

.category-nav-list strong {
  color: var(--muted-2);
  font-size: 0.82rem;
}

.story-list a {
  border-top: 1px solid var(--border);
  padding: 0.85rem 1rem;
  line-height: 1.32;
  font-weight: 600;
}

.story-list a:first-child {
  border-top: 0;
}

.story-list a:hover {
  background: var(--surface-hover);
  color: var(--accent);
}

.author-mini-list a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-top: 1px solid var(--border);
  padding: 0.8rem 1rem;
  font-weight: 600;
}

.author-mini-list a:first-child {
  border-top: 0;
}

.category-hero {
  overflow: hidden;
}

.category-accent {
  height: 0.9rem;
  background: linear-gradient(90deg, var(--accent), #a855f7, #06b6d4);
}

.category-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.category-stats span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.9rem;
}

.category-stats strong {
  color: var(--text);
}

.pagination-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
}

.pagination-wrap a,
.pagination-wrap span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  min-height: 2.4rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
}

.pagination-wrap .active {
  background: var(--accent);
  color: #ffffff;
}

.pagination-wrap .current {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.pagination-wrap a:hover {
  border-color: var(--accent-border);
  color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.brand-footer {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  gap: 1rem;
}

.footer-links--horizontal {
  align-items: center;
}

.footer-links a {
  color: var(--muted);
  font-weight: 400;
}

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

.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 2000;
  height: 3px;
  background: transparent;
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.08s linear;
}

.article-shell {
  overflow: hidden;
}

.page .article-shell {
  padding-bottom: 0.25rem;
}

.page .article-header {
  padding-bottom: 0.35rem;
}

.page .article-header h1 {
  margin-bottom: 0.5rem;
}

.page .article-content {
  padding-top: 0.35rem;
}

.article-cover {
  min-height: clamp(12rem, 32vw, 22rem);
}

.article-header {
  padding: 1rem 1.1rem;
}

.article-header h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 7vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.075em;
  line-height: 1.1;
}

.article-subtitle {
  max-width: 62rem;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.article-content {
  padding: 1rem 1.1rem;
  font-size: 1.08rem;
  line-height: 1.78;
}

.article-content > * {
  max-width: 48rem;
}

.article-content > .article-figure,
.article-content > .rich-table-wrap,
.article-content > pre {
  max-width: 100%;
}

.article-content .lead {
  color: #2e2e2e;
  font-size: clamp(1.24rem, 2vw, 1.45rem);
  font-weight: 500;
  line-height: 1.55;
}

.article-content h2 {
  margin: 2.4rem 0 1rem;
  scroll-margin-top: calc(var(--header-height) + 1rem);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.article-content p,
.article-content li {
  color: #303030;
}

.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.article-content ol,
.article-content ul {
  padding-left: 1.35rem;
}

.article-content li + li {
  margin-top: 0.45rem;
}

.callout {
  border-left: 0.35rem solid var(--accent);
  border-radius: 0.55rem;
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  background: var(--accent-soft);
  color: #242424;
}

.callout-warning {
  border-left-color: #f59e0b;
  background: var(--warning-soft);
}

.article-content blockquote {
  border-left: 0.4rem solid var(--accent);
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: #242424;
  font-size: clamp(1.08rem, 1.6vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.35;
}

.article-content pre {
  position: relative;
  overflow: auto;
  border-radius: 0.65rem;
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: #0d1117;
  color: #e6edf3;
  font-size: 0.92rem;
  line-height: 1.65;
}

.article-content code {
  border-radius: 0.32rem;
  padding: 0.1rem 0.25rem;
  background: #f0f0f0;
  color: #1f2937;
  font-size: 0.92em;
}

.article-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.code-copy-btn {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.45rem;
  padding: 0.32rem 0.55rem;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
}

.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.article-figure {
  margin: 1.8rem 0;
}

.article-figure figcaption {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.workflow-diagram {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f8f9ff, #ffffff);
}

.workflow-diagram span {
  display: grid;
  min-height: 4.25rem;
  place-items: center;
  border: 1px solid var(--accent-border);
  border-radius: 0.6rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
}

.rich-table-wrap {
  margin: 1.5rem 0;
}

.rich-table {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  margin-bottom: 0;
}

.rich-table th {
  color: var(--text);
  background: var(--surface-soft);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rich-table td,
.rich-table th {
  border-color: var(--border);
  padding: 0.9rem 1rem;
}

.article-content h2,
.article-content h3 {
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
  font-weight: 500;
}

.article-content h2 strong,
.article-content h3 strong {
  font-weight: inherit;
}

.article-featured-figure {
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  margin: 0 0 1.8rem;
  background: var(--surface-soft);
}

.article-featured-image {
  display: block;
  width: 100%;
  height: auto;
}

.cdev-breadcrumbs {
  padding: 0.25rem 0;
}

.cdev-breadcrumbs__list {
  display: flex;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted-2);
  font-size: 0.88rem;
  overflow-x: auto;
  white-space: nowrap;
}

.cdev-breadcrumbs__item {
  display: inline-flex;
  align-items: center;
}

.cdev-breadcrumbs__item + .cdev-breadcrumbs__item::before {
  content: "/";
  margin-right: 0.35rem;
  color: var(--border-strong);
}

.cdev-breadcrumbs__link {
  color: var(--muted);
  font-weight: 500;
}

.cdev-breadcrumbs__link:hover {
  color: var(--accent);
}

.cdev-breadcrumbs__current {
  color: var(--text);
  font-weight: 600;
}

.article-footer {
  border-top: 1px solid var(--border);
  padding: 1.1rem 1rem;
}

.author-box {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
}

.author-box-sidebar {
  flex-direction: column;
  gap: 0.9rem;
}

.author-box-sidebar .avatar-lg {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  font-size: 0.82rem;
}

.single-sidebar {
  top: calc(var(--header-height) + 1rem);
}

.author-banner {
  height: 2.7rem;
  background: linear-gradient(90deg, var(--accent), #a855f7);
}

.avatar.lifted {
  margin-top: -2rem;
}

.toc-nav {
  display: grid;
  padding: 0;
  gap: 0.25rem;
}

.toc-list {
  display: grid;
  gap: 0.25rem;
  max-height: 300px;
  overflow-y: auto;
  padding: 0.25rem 0.35rem 0.35rem 0;
  scrollbar-color: var(--accent) var(--surface);
  scrollbar-width: thin;
}

.toc-list::-webkit-scrollbar {
  width: 10px;
}

.toc-list::-webkit-scrollbar-track {
  background: var(--surface);
  border-radius: 999px;
}

.toc-list::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 75%, #ffffff 25%);
  border: 2px solid var(--surface);
  border-radius: 999px;
}

.toc-list::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.toc-header-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 0.95rem 1.1rem;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: inherit;
  gap: 1rem;
  text-align: left;
  appearance: none;
  cursor: pointer;
}

.toc-header-toggle:hover {
  background: var(--surface-hover);
}

.toc-header-toggle:focus-visible {
  outline-offset: -2px;
}

.toc-header-toggle__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.toc-header-toggle__label {
  min-width: 0;
  text-align: left;
}

.toc-header-toggle__icon {
  position: relative;
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  transition: transform 0.18s ease;
}

.toc-header-toggle__icon.is-collapsed {
  transform: rotate(-180deg);
}

.toc-header-toggle__icon svg,
.toc-header-toggle__icon path {
  display: block;
  width: 100%;
  height: 100%;
}

.toc-link {
  border-left: 0.22rem solid transparent;
  padding: 0.48rem 1rem;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.94rem;
}

.toc-link-sub {
  padding-left: 1.5rem;
  font-size: 0.94rem;
}

.toc-link:hover,
.toc-link.active {
  border-left-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.toc-empty {
  padding: 0.25rem 0.1rem 0.25rem 0.95rem;
}

.post-related__list {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.post-related__item {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: var(--surface-soft);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.post-related__item:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.post-related__link {
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem 1rem;
}

.post-related__title {
  color: var(--text);
  font-weight: 600;
  line-height: 1.35;
}

.post-related__date {
  color: var(--muted-2);
  font-size: 0.82rem;
}

.post-related__card {
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.post-related__footer {
  padding: 0 1rem 1rem;
}

.post-related__more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  font-weight: 600;
}

.post-related__more:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
}

@media (max-width: 991.98px) {
  .container-xxl {
    max-width: 760px;
  }

  .site-header .navbar-collapse {
    padding-top: 0.5rem;
  }

  .site-brand__title {
    display: none;
  }

  .mobile-nav {
    margin-top: 0.25rem;
    padding: 0.25rem 0 0.5rem;
    border-top: 1px solid var(--border);
  }

  .feed-body,
  .feed-card-feature .feed-body,
  .search-panel {
    padding: 1rem;
  }

  .feed-card-feature {
    grid-template-columns: 1fr;
  }

  .feed-card-feature__image,
  .feed-card-feature__placeholder {
    min-height: 11rem;
  }

  .home-category-section__body {
    padding: 0.9rem;
  }

  .home-category-feature {
    grid-template-columns: 1fr;
  }

  .home-category-feature__media,
  .home-category-feature__image,
  .home-category-feature__placeholder {
    min-height: 11rem;
  }

  .feed-card-compact {
    grid-template-columns: 1fr;
  }

  .recent-posts__grid {
    grid-template-columns: 1fr;
  }

  .feed-card-compact__media {
    min-height: 11rem;
  }

  .home-category-posts__item--media {
    grid-template-columns: 1fr;
  }

  .home-category-posts__media {
    min-height: 10rem;
  }

  .category-list-grid > [class*="col-"] + [class*="col-"] {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

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

@media (min-width: 992px) {
  .site-brand__title {
    display: inline-block;
  }
}

@media (max-width: 575.98px) {
  :root {
    --header-height: 56px;
  }

  .site-main {
    padding-top: 0.5rem !important;
  }

  .display-feed {
    font-size: 1.65rem;
  }

  .feed-title {
    font-size: 1.35rem;
  }

  .cover-gradient {
    min-height: 9rem;
  }

  .feed-title {
    font-size: 1.35rem;
  }

  .post-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-header h1 {
    max-width: 100%;
    font-size: 2.45rem;
  }

  .article-content {
    font-size: 1rem;
  }

  .primary-menu .sub-menu {
    width: min(36rem, calc(100vw - 1.2rem));
  }

  .workflow-diagram {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1200px) {
  .primary-menu > .menu-item-has-children > .sub-menu {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .primary-menu > .menu-item-has-children > .sub-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
