/* Blog-specific editorial treatment. Keep selectors scoped to blog and article pages. */

.blog-page .blog-hero {
  grid-template-columns: minmax(0, 1fr);
}

.blog-page .blog-hero-copy {
  width: 100%;
}

.blog-page .blog-hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.blog-page .blog-title-mark {
  flex: 0 1 auto;
  min-width: 0;
  margin-bottom: 0;
}

.blog-page .blog-title-mark b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-page .blog-hero-context {
  display: flex;
  min-height: 42px;
  flex: 0 0 auto;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent), transparent 72%);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.blog-page .blog-hero-context > span,
.blog-page .blog-hero-context > a {
  display: flex;
  min-height: 40px;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blog-page .blog-hero-context > * + * {
  border-left: 1px solid color-mix(in srgb, var(--accent), transparent 82%);
}

.blog-page .blog-hero-context > span:first-child {
  display: grid;
  align-content: center;
  gap: 1px;
}

.blog-page .blog-hero-context small {
  color: var(--muted);
  font: inherit;
  font-size: 8px;
}

.blog-page .blog-hero-context strong {
  overflow: hidden;
  max-width: 150px;
  color: var(--ink);
  font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
  font-size: 11px;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.blog-page .blog-hero-context > a {
  color: var(--ink);
  transition:
    color 160ms ease,
    background 160ms ease;
}

.blog-page .blog-hero-context > a:hover {
  color: color-mix(in srgb, var(--accent), #171717 32%);
  background: color-mix(in srgb, var(--accent), transparent 93%);
}

.blog-page .blog-filter-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.blog-page .blog-filter-hint {
  display: none;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-page .blog-featured-card,
.blog-page .blog-article-card {
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.blog-page .blog-featured-card:hover,
.blog-page .blog-article-card:hover {
  border-color: color-mix(in srgb, var(--accent, #171717), transparent 55%);
  box-shadow: 0 18px 50px rgba(28, 24, 17, 0.09);
  transform: translateY(-2px);
}

.blog-page .blog-featured-logo {
  overflow: hidden;
  text-decoration: none;
}

.blog-page .blog-featured-logo.has-cover {
  display: block;
  padding: 0;
  background: #17191a;
}

.blog-page .blog-card-cover {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  transition: transform 320ms ease;
}

.blog-page .blog-featured-card:hover .blog-card-cover {
  transform: scale(1.025);
}

.blog-page .blog-card-logo {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.blog-page .blog-card-kicker {
  width: max-content;
  margin-bottom: 8px;
  color: color-mix(in srgb, var(--accent, #171717), #171717 35%);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.blog-page .blog-featured-copy,
.blog-page .blog-article-card {
  min-width: 0;
}

.blog-page .blog-featured-card h2,
.blog-page .blog-article-card h3 {
  overflow-wrap: anywhere;
}

.blog-page .blog-featured-copy > p,
.blog-page .blog-article-card > p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.blog-page .blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.blog-page .blog-card-footer > span {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.blog-page .blog-card-footer .text-link {
  align-items: center;
  gap: 6px;
  border-bottom: 0;
}

.blog-page .blog-card-footer .text-link span {
  transition: transform 160ms ease;
}

.blog-page .blog-card-footer .text-link:hover span {
  transform: translateX(3px);
}

.blog-page .blog-article-card {
  display: flex;
  flex-direction: column;
}

.blog-page .mobile-blog-filter-dock,
.blog-page .mobile-blog-filter-sheet {
  display: none;
}

.article-page .article-reading-progress {
  position: fixed;
  z-index: 120;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: rgba(23, 23, 23, 0.08);
  pointer-events: none;
}

.article-page .article-reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 80ms linear;
}

.article-page .article-header h1 {
  max-width: 760px;
  overflow-wrap: anywhere;
  font-size: 52px;
  line-height: 1.02;
}

.article-page .back-link {
  align-items: center;
  gap: 7px;
  min-height: 34px;
  margin-left: -4px;
  padding: 0 4px;
  border-bottom: 0;
}

.article-page .back-link span {
  font-size: 17px;
}

.article-page .article-reading-time {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-page .article-cover {
  aspect-ratio: 16 / 9;
  max-height: none;
  object-fit: cover;
}

.article-page .article-toc {
  margin: 0 0 36px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.article-page .article-toc summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 800;
}

.article-page .article-toc summary::-webkit-details-marker {
  display: none;
}

.article-page .article-toc summary span::before {
  display: inline-block;
  width: 16px;
  margin-right: 8px;
  content: "+";
}

.article-page .article-toc details[open] summary span::before {
  content: "−";
}

.article-page .article-toc summary small {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-page .article-toc ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0 0 14px;
  list-style: none;
}

.article-page .article-toc li {
  border-top: 1px solid var(--line);
}

.article-page .article-toc li.level-3 a {
  padding-left: 24px;
}

.article-page .article-toc a {
  display: block;
  padding: 10px 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.article-page .article-toc a:hover {
  color: var(--ink);
}

.article-page .article-content {
  min-width: 0;
}

.article-page .article-content h1,
.article-page .article-content h2,
.article-page .article-content h3,
.article-page .article-content h4 {
  overflow-wrap: anywhere;
  scroll-margin-top: 86px;
}

.article-page .article-content p,
.article-page .article-content li {
  font-size: 17px;
  line-height: 1.78;
}

.article-page .article-content p {
  margin-bottom: 22px;
}

.article-page .article-content li + li {
  margin-top: 8px;
}

.article-page .article-content pre,
.article-page .article-content table {
  font-variant-ligatures: none;
}

.article-page .article-content pre {
  position: relative;
  max-width: 100%;
  overscroll-behavior-inline: contain;
}

.article-page .article-content pre[data-language]::before {
  display: block;
  margin-bottom: 10px;
  color: rgba(242, 234, 220, 0.52);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  content: attr(data-language);
}

.article-page .article-figure {
  margin: 36px 0;
}

.article-page .article-figure img {
  width: 100%;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.article-page .article-figure figcaption {
  margin-top: 10px;
  padding-left: 12px;
  border-left: 2px solid var(--green);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 680px) {
  body.blog-filter-sheet-open {
    overflow: hidden;
  }

  .blog-page .blog-hero {
    gap: 8px;
    padding: 18px 0 12px;
    --blog-hero-card-height: auto;
  }

  .blog-page .blog-hero-copy,
  .blog-page .blog-filter-panel,
  .blog-page .blog-featured-card,
  .blog-page .blog-article-card {
    padding: 16px;
  }

  .blog-page .blog-hero-copy {
    height: 244px;
  }

  .blog-page .blog-hero-copy::after {
    right: -12px;
    bottom: -10px;
    width: 150px;
    height: 112px;
  }

  .blog-page .blog-title-mark {
    gap: 8px;
    padding: 5px 10px 5px 5px;
  }

  .blog-page .blog-title-mark span {
    width: 34px;
    height: 34px;
  }

  .blog-page .blog-hero-top {
    gap: 8px;
    margin-bottom: 18px;
  }

  .blog-page .blog-title-mark b {
    max-width: 76px;
    font-size: 11px;
  }

  .blog-page .blog-hero-context {
    min-width: 0;
    min-height: 36px;
  }

  .blog-page .blog-hero-context > span,
  .blog-page .blog-hero-context > a {
    min-height: 34px;
    padding: 0 7px;
    font-size: 8px;
    letter-spacing: 0.03em;
  }

  .blog-page .blog-hero-context small {
    display: none;
  }

  .blog-page .blog-hero-context strong {
    max-width: 70px;
    font-size: 9px;
  }

  .blog-page .blog-hero-context > span:first-child {
    display: flex;
  }

  .blog-page .blog-hero h1 {
    margin-bottom: 12px;
    font-size: 35px;
  }

  .blog-page .blog-hero .hero-lede {
    max-width: calc(100% - 12px);
    font-size: 15px;
    line-height: 1.58;
    -webkit-line-clamp: 3;
  }

  .blog-page .blog-browser {
    gap: 20px;
    padding-bottom: 52px;
  }

  .blog-page .blog-filter-panel {
    width: 100vw;
    min-width: 0;
    max-width: 100vw;
    overflow: hidden;
    margin-inline: calc((100vw - 100%) / -2);
    padding: 14px max(12px, calc((100vw - 100%) / 2));
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: 0 12px 34px rgba(28, 24, 17, 0.07);
  }

  .blog-page .blog-filter-heading {
    margin-bottom: 10px;
  }

  .blog-page .blog-filter-heading .eyebrow {
    display: none;
  }

  .blog-page .blog-filter-panel h2 {
    margin: 0;
    font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .blog-page .blog-filter-hint {
    display: block;
  }

  .blog-page .blog-filter-panel .blog-filter-rail {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    grid-template-columns: none;
    gap: 8px;
    margin-inline: -12px;
    padding: 0 12px 4px;
    border: 0;
    background: transparent;
    box-shadow: none;
    scroll-padding-inline: 12px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .blog-page .blog-filter-panel .blog-filter-rail::-webkit-scrollbar {
    display: none;
  }

  .blog-page .blog-filter-panel .blog-filter-chip {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 12px 0 7px;
    scroll-snap-align: start;
  }

  .blog-page .blog-feed-head {
    gap: 6px;
    margin-bottom: 12px;
    padding-bottom: 12px;
  }

  .blog-page .blog-feed-head .eyebrow {
    margin-bottom: 8px;
  }

  .blog-page .blog-feed-head h2 {
    font-size: 29px;
  }

  .blog-page .blog-featured-card {
    gap: 16px;
  }

  .blog-page .blog-featured-logo {
    min-height: 88px;
    max-height: 180px;
  }

  .blog-page .blog-featured-logo:not(.has-cover) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
  }

  .blog-page .blog-featured-logo:not(.has-cover)::after {
    color: rgba(246, 239, 226, 0.42);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 9px;
    letter-spacing: 0.08em;
    content: "FEATURED";
  }

  .blog-page .blog-card-logo {
    width: 54px;
    height: 54px;
  }

  .blog-page .blog-featured-logo.has-cover {
    aspect-ratio: 16 / 9;
  }

  .blog-page .blog-card-kicker {
    margin-bottom: 6px;
  }

  .blog-page .blog-card-meta-line {
    gap: 7px;
    margin-bottom: 10px;
  }

  .blog-page .blog-featured-card h2 {
    margin-bottom: 10px;
    font-size: 27px;
    line-height: 1.04;
  }

  .blog-page .blog-featured-copy > p {
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.55;
  }

  .blog-page .blog-featured-card .tag-row {
    margin-bottom: 14px;
  }

  .blog-page .blog-card-footer {
    padding-top: 12px;
  }

  .blog-page .blog-article-card {
    min-height: 0;
  }

  .blog-page .blog-article-card h3 {
    font-size: 22px;
  }

  .blog-page .blog-article-card > p {
    font-size: 14px;
    line-height: 1.55;
  }

  .blog-page .blog-feed {
    scroll-margin-top: 72px;
  }

  .blog-page .mobile-blog-filter-dock {
    position: fixed;
    z-index: 90;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    display: block;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 24px));
    transition:
      opacity 180ms ease,
      transform 220ms ease,
      visibility 220ms;
  }

  .blog-page .mobile-blog-filter-dock.is-visible {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .blog-page .mobile-blog-filter-trigger {
    display: grid;
    width: 100%;
    min-height: 62px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    color: #f6efe2;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
      #17191a;
    background-size: 24px 24px;
    box-shadow: 0 16px 46px rgba(20, 18, 15, 0.28);
    text-align: left;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }

  .blog-page .mobile-filter-current-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
  }

  .blog-page .mobile-filter-current-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .blog-page .mobile-filter-current-icon.filter-letter {
    color: #f6efe2 !important;
  }

  .blog-page .mobile-filter-current-copy {
    display: grid;
    min-width: 0;
    gap: 1px;
  }

  .blog-page .mobile-filter-current-copy small {
    overflow: hidden;
    color: rgba(246, 239, 226, 0.58);
    font-size: 9px;
    font-weight: 760;
    letter-spacing: 0.06em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .blog-page .mobile-filter-current-copy strong {
    overflow: hidden;
    color: #fffaf0;
    font-size: 14px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .blog-page .mobile-filter-change {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #f6efe2;
    background: rgba(255, 255, 255, 0.08);
    font-size: 12px;
    font-weight: 800;
  }

  .blog-page .mobile-blog-filter-sheet[open] {
    position: fixed;
    z-index: 200;
    inset: auto 0 0;
    display: block;
    width: 100%;
    max-width: 680px;
    max-height: min(78dvh, 680px);
    overflow: auto;
    margin: 0 auto;
    padding: 10px 14px calc(18px + env(safe-area-inset-bottom));
    border: 1px solid var(--line-strong);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    color: var(--ink);
    background: #f8f3e9;
    box-shadow: 0 -24px 70px rgba(20, 18, 15, 0.24);
    animation: mobile-filter-sheet-in 200ms ease both;
  }

  .blog-page .mobile-blog-filter-sheet::backdrop {
    background: rgba(18, 18, 17, 0.48);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
  }

  .blog-page .mobile-filter-sheet-handle {
    width: 38px;
    height: 4px;
    margin: 0 auto 10px;
    border-radius: 4px;
    background: rgba(23, 23, 23, 0.2);
  }

  .blog-page .mobile-blog-filter-sheet header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
  }

  .blog-page .mobile-blog-filter-sheet header .eyebrow {
    margin-bottom: 5px;
  }

  .blog-page .mobile-blog-filter-sheet h2 {
    margin: 0;
    font-size: 26px;
  }

  .blog-page .mobile-filter-close {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: rgba(255, 252, 246, 0.74);
    font-size: 27px;
    line-height: 1;
  }

  .blog-page .mobile-blog-filter-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .blog-page .mobile-filter-option {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 68px;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 9px 25px 9px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 252, 246, 0.68);
  }

  .blog-page .mobile-filter-option.product-filter {
    border-color: color-mix(in srgb, var(--accent), transparent 76%);
    background: linear-gradient(
      135deg,
      color-mix(in srgb, var(--accent), transparent 90%),
      rgba(255, 252, 246, 0.72)
    );
  }

  .blog-page .mobile-filter-option.active {
    border-color: color-mix(in srgb, var(--accent, #171717), transparent 30%);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent, #171717), transparent 65%);
  }

  .blog-page .mobile-filter-option .product-badge-icon,
  .blog-page .mobile-filter-option .filter-letter {
    width: 32px;
    height: 32px;
  }

  .blog-page .mobile-filter-option > span:nth-child(2) {
    display: grid;
    min-width: 0;
    gap: 2px;
  }

  .blog-page .mobile-filter-option strong {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .blog-page .mobile-filter-option small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
  }

  .blog-page .mobile-filter-option > b {
    position: absolute;
    top: 8px;
    right: 9px;
    color: var(--muted);
    font-size: 12px;
  }

  .blog-page .mobile-filter-option.active > b {
    color: color-mix(in srgb, var(--accent, #171717), #171717 35%);
  }

  @keyframes mobile-filter-sheet-in {
    from {
      opacity: 0;
      transform: translateY(24px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .article-page .article-shell {
    width: calc(100% - 24px);
    padding: 24px 0 38px;
  }

  .article-page .article-header {
    margin-bottom: 26px;
  }

  .article-page .back-link {
    margin-bottom: 14px;
  }

  .article-page .article-meta-line {
    gap: 8px;
    margin-bottom: 14px;
  }

  .article-page .article-header h1 {
    margin-bottom: 16px;
    font-size: 38px;
    line-height: 1.02;
  }

  .article-page .article-header > p:not(.eyebrow) {
    font-size: 15px;
    line-height: 1.62;
  }

  .article-page .article-header .tag-row {
    margin-top: 18px;
  }

  .article-page .article-cover {
    margin-bottom: 28px;
    border-radius: 6px;
  }

  .article-page .article-toc {
    margin-bottom: 28px;
  }

  .article-page .article-toc summary {
    min-height: 52px;
  }

  .article-page .article-content h1 {
    font-size: 30px;
  }

  .article-page .article-content h2 {
    margin-top: 38px;
    font-size: 27px;
    line-height: 1.08;
  }

  .article-page .article-content h3 {
    margin-top: 30px;
    font-size: 22px;
  }

  .article-page .article-content p,
  .article-page .article-content li {
    font-size: 16px;
    line-height: 1.76;
  }

  .article-page .article-content ul,
  .article-page .article-content ol {
    padding-left: 20px;
  }

  .article-page .article-content blockquote {
    margin: 26px 0;
    padding: 16px 16px 16px 18px;
  }

  .article-page .article-content pre {
    margin: 26px -12px;
    padding: 16px 12px;
    border-radius: 0;
  }

  .article-page .table-scroll {
    margin: 26px -12px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .article-page .article-figure {
    margin: 30px -12px;
  }

  .article-page .article-figure img {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .article-page .article-figure figcaption {
    margin-inline: 12px;
  }

  .article-page .article-cta {
    margin-bottom: 24px;
    padding: 18px;
  }

  .article-page .article-cta h2 {
    font-size: 26px;
  }
}
