:root {
  --article-bg: #01030f;
  --article-ink: #f7fbff;
  --article-soft: rgba(197, 206, 231, 0.76);
  --article-muted: rgba(197, 206, 231, 0.52);
  --article-faint: rgba(247, 251, 255, 0.14);
  --article-blue: #4ea8ff;
  --article-panel: #080a10;
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--article-bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-sans);
  color: var(--article-soft);
  background: var(--article-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

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

img {
  max-width: 100%;
}

.page-shell,
.article-main {
  width: 100%;
  min-height: 100vh;
  background: var(--article-bg);
}

.article-main {
  margin: 0;
  padding: 0;
}

/* ==============================
   ARTICLE HERO + LAYOUT
   ============================== */

.article-hero {
  width: 100%;
  margin: 0;
  padding:
    calc(var(--cb-header-offset, 0px) + 18px)
    24px
    clamp(96px, 10vw, 152px);
  background: var(--article-bg);
}

.article-hero-shell {
  width: min(1440px, calc(100vw - 96px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 900px) minmax(220px, 300px);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.article-content {
  grid-column: 2;
  min-width: 0;
}

.article-rail {
  grid-column: 1;
  padding-top: 7px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--article-muted);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.article-breadcrumb:hover,
.article-breadcrumb:focus-visible {
  color: var(--article-ink);
}

.article-head {
  min-width: 0;
}

.article-date {
  margin: 0 0 10px;
  color: var(--article-muted);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.article-head h1 {
  max-width: 100%;
  margin: 0;
  color: var(--article-ink);
  font-size: clamp(24px, 2vw, 40px);
  line-height: 0.98;
  font-weight: 500;
  letter-spacing: -0.075em;
  white-space: nowrap;
}

.article-author-row {
  margin-top: 18px;
  margin-bottom: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--article-muted);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.018em;
}

.article-author-avatar {
  width: 28px;
  height: 28px;
  display: block;
  border-radius: 999px;
  object-fit: cover;
  background: rgba(247, 251, 255, 0.08);
}

.article-author-name {
  color: var(--article-muted);
}

.article-side {
  grid-column: 3;
  position: sticky;
  top: calc(var(--cb-header-offset, 0px) + 32px);
  align-self: start;
  padding-top: 122px;
}

.article-toc {
  display: grid;
  gap: 13px;
}

.article-toc p {
  margin: 0 0 4px;
  color: var(--article-ink);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 520;
  letter-spacing: -0.02em;
}

.article-toc a {
  width: fit-content;
  color: var(--article-muted);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.article-toc a:hover,
.article-toc a:focus-visible,
.article-toc a.is-active {
  color: var(--article-blue);
}

.article-toc a:focus-visible {
  outline: 1px solid rgba(78, 168, 255, 0.58);
  outline-offset: 4px;
}

/* ==============================
   ANNOUNCEMENT PROSE
   ============================== */

.article-prose {
  color: var(--article-soft);
}

.article-prose p {
  max-width: 820px;
  margin: 0 0 24px;
  color: var(--article-soft);
  font-size: clamp(16px, 1.22vw, 19px);
  line-height: 1.62;
  font-weight: 400;
  letter-spacing: -0.034em;
}

.article-inline-link {
  color: var(--article-blue);
}

.article-inline-link:hover,
.article-inline-link:focus-visible {
  color: #8fcfff;
}

.article-inline-link:focus-visible {
  outline: 1px solid rgba(78, 168, 255, 0.58);
  outline-offset: 4px;
}

/* ==============================
   QWEN IMAGE
   ============================== */

.article-cover {
  width: min(720px, 100%);
  margin: 46px 0 0;
}

.article-cover-art {
  width: 100%;
  min-height: clamp(260px, 27vw, 360px);
}

.cb-model-thumb {
  position: relative;
  overflow: hidden;
  display: grid;
  align-items: stretch;
  padding: clamp(28px, 3.5vw, 42px);
  background: #030821;
  isolation: isolate;
}

.cb-model-thumb::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(247, 251, 255, 0.12);
  pointer-events: none;
  z-index: 2;
}

.cb-model-thumb--qwen {
  background:
    linear-gradient(135deg, #8fcfff 0%, #76c3ff 10%, #4ea8ff 30%, #1f6fb7 76%, #061632 100%);
}

.cb-model-thumb-copy {
  position: relative;
  z-index: 3;
  align-self: start;
  display: grid;
  gap: 6px;
  max-width: 58%;
}

.cb-model-thumb-copy strong {
  display: block;
  color: #ffffff;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 0.98;
  font-weight: 650;
  letter-spacing: -0.065em;
}

.cb-model-thumb-copy span {
  display: block;
  color: rgba(247, 251, 255, 0.82);
  font-size: clamp(15px, 1.25vw, 21px);
  line-height: 1.02;
  font-weight: 400;
  letter-spacing: -0.052em;
}

.cb-model-thumb-ui {
  position: absolute;
  z-index: 4;
  right: clamp(28px, 3.5vw, 42px);
  bottom: clamp(28px, 3.5vw, 42px);
  width: min(235px, 44%);
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(247, 251, 255, 0.22);
  background: rgba(1, 3, 15, 0.22);
}

.cb-model-search {
  display: block;
  min-height: 28px;
  padding: 8px 9px;
  border: 1px solid rgba(247, 251, 255, 0.15);
  color: rgba(247, 251, 255, 0.52);
  font-size: 9px;
  line-height: 1;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.cb-model-row {
  min-height: 42px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid rgba(247, 251, 255, 0.25);
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.cb-model-row img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
  border-radius: 999px;
  filter: brightness(0) invert(1);
}

.cb-model-row b {
  font-size: 17px;
  line-height: 1;
  font-weight: 500;
  color: rgba(247, 251, 255, 0.70);
}

/* ==============================
   RESPONSIVE
   ============================== */

@media (max-width: 1120px) {
  .article-hero {
    padding:
      calc(var(--cb-header-offset, 0px) + 18px)
      24px
      clamp(96px, 10vw, 152px);
  }

  .article-hero-shell {
    width: min(920px, calc(100vw - 48px));
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .article-rail,
  .article-content,
  .article-side {
    grid-column: 1;
  }

  .article-head h1 {
    white-space: normal;
    max-width: 780px;
  }

  .article-side {
    position: static;
    padding-top: 0;
  }

  .article-toc {
    display: none;
  }

  .article-cover {
    width: min(680px, 100%);
  }

  .article-cover-art {
    min-height: clamp(250px, 40vw, 340px);
  }
}

@media (max-width: 760px) {
  .article-hero {
    padding:
      calc(var(--cb-header-offset, 0px) + 14px)
      18px
      clamp(96px, 10vw, 152px);
  }

  .article-hero-shell {
    width: min(100%, 620px);
  }

  .article-rail {
    padding-top: 0;
    font-size: 14px;
  }

  .article-head h1 {
    font-size: clamp(34px, 10.5vw, 52px);
    white-space: normal;
  }

  .article-author-row {
    margin-top: 18px;
    margin-bottom: 28px;
  }

  .article-prose p {
    font-size: 17px;
    line-height: 1.6;
  }

  .article-cover {
    width: 100%;
    margin-top: 40px;
  }

  .article-cover-art {
    min-height: 260px;
  }

  .cb-model-thumb {
    padding: 24px;
  }

  .cb-model-thumb-copy {
    max-width: 72%;
  }

  .cb-model-thumb-copy strong {
    font-size: clamp(30px, 9vw, 46px);
  }

  .cb-model-thumb-copy span {
    font-size: clamp(15px, 4.5vw, 20px);
  }

  .cb-model-thumb-ui {
    right: 24px;
    bottom: 24px;
    width: min(215px, 56%);
    padding: 10px;
  }

  .cb-model-search {
    min-height: 26px;
    padding: 8px 9px;
    font-size: 9px;
  }

  .cb-model-row {
    min-height: 40px;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    padding: 8px 9px;
    font-size: 11px;
  }

  .cb-model-row img {
    width: 22px;
    height: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
