:root {
  --dev-date-badge-border: 3px solid rgb(7 12 18 / 74%);
  --dev-date-badge-bg: var(--gradient-elit-button-primary);
  --dev-date-badge-shadow: 0 3px 0 var(--ui-shadow-edge-color), 0 0 0 3px rgb(7 12 18 / 72%);
}

.devblog-grid {
  --dev-card-max: 540px;
  --dev-card-gap: clamp(2.6rem, 4.8vw, 4.4rem);
  --connector-length: clamp(2.2rem, 7vw, 4.6rem);
  --dev-card-width: min(var(--dev-card-max), calc(50% - (var(--connector-length) * 0.55)));
  --dev-thumb-height: 158px;
  --dev-card-body-padding: 1rem;
  --dev-date-gap: clamp(1.05rem, 2vw, 1.8rem);
  --dev-date-width: clamp(9.25rem, 18vw, 13.5rem);
  --dev-mobile-date-space: 2.15rem;
  --dev-road-surface-color: rgb(76 85 93 / 98%);
  --dev-road-shoulder-color: rgb(229 233 226 / 98%);
  --dev-road-lane-color: rgb(246 244 232 / 94%);
  position: relative;
  padding: 0.45rem 0 0.65rem;
  isolation: isolate;
}

.dev-road-shell {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

.dev-entry-stack {
  display: flex;
  flex-direction: column;
  gap: var(--dev-card-gap);
  position: relative;
  z-index: 1;
}

.dev-entry {
  position: relative;
  z-index: 1;
}

.dev-entry-date {
  display: block;
  position: absolute;
  top: calc(var(--dev-thumb-height) + var(--dev-card-body-padding));
  margin: 0;
  width: var(--dev-date-width);
  color: rgb(255 249 241 / 94%);
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 1.8vw, 1.34rem);
  font-weight: 780;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
}

.dev-card {
  position: relative;
  z-index: 1;
  width: var(--dev-card-width);
  isolation: isolate;
  overflow: hidden;
  border-color: var(--ui-border-strong);
  background: var(--gradient-ui-panel);
}

.dev-entry-right .dev-card {
  margin-left: auto;
}

.dev-entry-left .dev-card {
  margin-right: auto;
}

.dev-entry-right .dev-entry-date {
  right: calc(var(--dev-card-width) + var(--dev-date-gap));
  text-align: right;
}

.dev-entry-left .dev-entry-date {
  left: calc(var(--dev-card-width) + var(--dev-date-gap));
  text-align: left;
}

.dev-road {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 16px 20px rgb(3 10 18 / 16%));
}

.dev-road-shoulder,
.dev-road-surface,
.dev-road-lane {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dev-road-shoulder {
  stroke: var(--dev-road-shoulder-color);
  stroke-width: var(--dev-road-shoulder-width, 30px);
}

.dev-road-surface {
  stroke: var(--dev-road-surface-color);
  stroke-width: var(--dev-road-width, 22px);
}

.dev-road-lane {
  stroke: var(--dev-road-lane-color);
  stroke-width: var(--dev-road-lane-width, 3px);
  stroke-dasharray: var(--dev-road-dash, 14 12);
  opacity: 0.92;
}

.dev-card a {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  z-index: 1;
  border-radius: inherit;
  overflow: hidden;
  background: transparent;
}

.dev-card a:focus-visible {
  outline: 3px solid var(--elit-blue-light);
  outline-offset: -3px;
}

.thumb {
  position: relative;
  min-height: var(--dev-thumb-height);
  height: var(--dev-thumb-height);
  overflow: hidden;
  border-bottom: 4px solid var(--ui-border-strong);
  background-color: #16224a;
  filter: saturate(1.02) contrast(0.98) brightness(0.92);
}

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

.thumb::before,
.thumb::after {
  content: none;
}

.dev-card-body {
  padding: var(--dev-card-body-padding);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.dev-card-body h3,
.dev-card-body p {
  margin: 0;
}

.dev-summary {
  color: var(--surface-dark-text-muted);
}

.dev-entry-cta {
  align-self: flex-end;
  min-width: 8.9rem;
  margin-top: auto;
  white-space: nowrap;
  pointer-events: none;
}

.dev-card a:focus-visible .dev-entry-cta {
  color: var(--btn-fg);
  transform: translateY(-2px);
  filter: saturate(1.04);
}

@media (max-width: 860px) {
  .devblog-grid {
    --dev-card-gap: clamp(1rem, 3.8vw, 1.45rem);
    padding-left: 0;
  }

  .dev-entry-date,
  .dev-entry-right .dev-entry-date,
  .dev-entry-left .dev-entry-date {
    display: inline-flex;
    align-items: center;
    top: calc(var(--dev-thumb-height) + 0.85rem);
    left: var(--dev-card-body-padding);
    right: auto;
    margin: 0;
    width: fit-content;
    max-width: calc(100% - (var(--dev-card-body-padding) * 2));
    padding: 0.34rem 0.92rem 0.38rem 0.78rem;
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-align: left;
    line-height: 1.15;
    border: 0;
    border-radius: var(--radius-chip);
    background: var(--dev-date-badge-bg);
    box-shadow: none;
    z-index: 2;
  }

  .dev-card {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .dev-card-body {
    padding-top: calc(var(--dev-card-body-padding) + var(--dev-mobile-date-space));
  }

  .dev-entry-cta {
    margin-top: 0.45rem;
  }
}

.article-shell {
  position: relative;
  padding: clamp(1rem, 2.1vw, 1.35rem);
  margin-bottom: 2rem;
  border-color: rgb(var(--ui-accent-soft-rgb) / 34%);
  background: var(--gradient-panel-warm);
}

.article-shell::after {
  content: none;
}

.article-shell h1 {
  font-size: clamp(2rem, 7vw, 3.1rem);
  margin-top: 0;
  margin-bottom: 0.55rem;
}

.date-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.34rem 0.92rem 0.38rem 0.78rem;
  border: 0;
  border-radius: var(--radius-chip);
  background: var(--dev-date-badge-bg);
  box-shadow: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.15;
  white-space: nowrap;
}

.article-shell .dev-date {
  margin: 0 0 1rem;
  font-size: clamp(0.82rem, 1.8vw, 0.98rem);
}

.article-shell h2 {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  margin: 1rem 0 0.45rem;
}

.article-shell h3 {
  font-size: clamp(1.2rem, 4vw, 1.55rem);
  margin: 0.7rem 0 0.35rem;
}

.article-shell p,
.article-shell li {
  color: var(--surface-dark-text-muted);
  line-height: 1.58;
}

.article-shell a:not(.btn) {
  color: var(--surface-dark-link);
}

.article-shell a:not(.btn):hover,
.article-shell a:not(.btn):focus-visible {
  color: var(--surface-dark-heading);
}

.article-shell .video-consent :is(h1, h2, h3, h4) {
  color: var(--surface-light-heading);
  text-shadow: none;
}

.article-shell .video-consent :is(p, li) {
  color: var(--surface-light-text-muted);
}

.article-shell .video-consent strong {
  color: var(--surface-light-heading);
}

.article-shell .video-consent a:not(.btn) {
  color: var(--surface-light-link);
}

.article-shell .video-consent a:not(.btn):hover,
.article-shell .video-consent a:not(.btn):focus-visible {
  color: var(--surface-light-heading);
}

.article-shell ul,
.article-shell ol {
  margin: 0.35rem 0 0.95rem 1.25rem;
  padding: 0;
  line-height: 1.5;
}

.article-shell li {
  margin-bottom: 0.3rem;
}

.devblog-nav {
  display: flex;
  gap: 0.65rem;
  justify-content: space-between;
  align-items: center;
  margin: 0.85rem 0 1rem;
  flex-wrap: wrap;
}

.devblog-nav-btn {
  min-width: 3.35rem;
  padding-inline: 1rem;
  font-size: 0.94rem;
}

.devblog-nav-btn-home {
  padding-inline: 0.86rem;
}

.devblog-nav-home-icon {
  width: 1.32rem;
  height: 1.32rem;
  display: block;
  overflow: visible;
}

.devblog-nav-home-icon path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.devblog-nav-home-icon-roof,
.devblog-nav-home-icon-body {
  stroke-width: 2.35;
}

.devblog-media-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
  margin: 0.95rem 0 1.2rem;
}

.devblog-media-grid > figure {
  align-self: start;
}

.devblog-media-grid > figure:only-child {
  max-width: 560px;
  width: 100%;
  justify-self: center;
}

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

.devblog-media-grid.devblog-media-triplet img,
.devblog-media-grid.devblog-media-triplet video {
  max-height: 230px;
  object-fit: contain;
}

.devblog-media-full {
  margin: 0.95rem 0 1.2rem;
}

.devblog-video-frame .trailer-frame.panel {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: none;
}

@media (max-width: 900px) {
  .devblog-media-grid.devblog-media-triplet {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .article-shell {
    padding: 0.95rem;
  }
}

@media (max-width: 620px) {
  .devblog-media-grid.devblog-media-triplet {
    grid-template-columns: 1fr;
  }
}
