/* SPDX-License-Identifier: LicenseRef-VINCIS-ARR */

/* The house format for an official article body.
 *
 * Everything here is driven by what the body HTML may contain, and the body
 * may contain exactly what ARTICLE_FORMAT_CLASSES in
 * src/lib/knowledge/officialArticleHtml.ts allows -- the sanitizer drops any
 * other class before this stylesheet ever sees it. The two lists are one
 * list in two places: add a block here and there, or the block does not
 * exist.
 *
 * Colours come from the site's own tokens so the article follows the light
 * and dark themes. --cat is the article's topic accent. It is inherited from
 * the article root, never declared here: a declaration on this element would
 * beat the inherited value whatever its specificity, so the default lives in
 * each use's fallback instead. */

.knowledge-article-prose {
  max-width: 748px;
  color: hsl(var(--foreground) / 0.82);
  font-size: 1.0625rem;
  line-height: 1.86;
}

.knowledge-article-prose > * + * {
  margin-top: 1.5rem;
}

.knowledge-article-prose > :first-child {
  margin-top: 0;
}

/* ─── headings ───
 * These carry no class on purpose: withOfficialHeadingIds rewrites a bare
 * <h2>/<h3> into the anchor the table of contents links to. */

.knowledge-article-prose h2 {
  margin-top: 3.625rem;
  margin-bottom: 0;
  font-size: 1.625rem;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.32;
  color: hsl(var(--foreground));
  scroll-margin-top: calc(var(--nav-h, 58px) + 1.875rem);
}

.knowledge-article-prose h2 + p {
  margin-top: 1rem;
}

.knowledge-article-prose h3 {
  margin-top: 2.375rem;
  margin-bottom: 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.4;
  color: hsl(var(--foreground));
  scroll-margin-top: calc(var(--nav-h, 58px) + 1.875rem);
}

.knowledge-article-prose h3 + p {
  margin-top: 0.75rem;
}

.knowledge-article-prose h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

/* ─── running text ─── */

.knowledge-article-prose p {
  margin-bottom: 0;
}

/* The line under a figure or a cover: what the picture is saying. */
.knowledge-article-prose p.cap {
  margin-top: 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: hsl(var(--muted-foreground));
  max-width: 760px;
}

.knowledge-article-prose p.cap b,
.knowledge-article-prose p.cap strong {
  font-weight: 600;
  color: hsl(var(--foreground) / 0.82);
}

/* The opening paragraph. */
.knowledge-article-prose p.lede {
  font-size: 1.1875rem;
  line-height: 1.74;
  color: hsl(var(--foreground) / 0.92);
}

.knowledge-article-prose a {
  color: hsl(var(--primary));
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: hsl(var(--primary) / 0.4);
}

.knowledge-article-prose a:hover {
  text-decoration-color: hsl(var(--primary));
}

.knowledge-article-prose strong,
.knowledge-article-prose b {
  font-weight: 600;
  color: hsl(var(--foreground));
}

.knowledge-article-prose hr {
  border: 0;
  height: 1px;
  background: hsl(var(--border));
  margin: 3.25rem 0;
}

/* ─── lists ───
 * The marker is drawn rather than inherited, so it can take the topic
 * accent and sit on the first line of a wrapped item. */

.knowledge-article-prose ul,
.knowledge-article-prose ol {
  margin-top: 1.125rem;
  margin-bottom: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: vg-ol;
}

.knowledge-article-prose li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.7rem;
  font-size: 1.0375rem;
  line-height: 1.8;
}

.knowledge-article-prose li:last-child {
  margin-bottom: 0;
}

.knowledge-article-prose ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.86em;
  width: 6px;
  height: 2px;
  border-radius: 1px;
  background: hsl(var(--cat, var(--primary)));
}

.knowledge-article-prose ol > li {
  padding-left: 1.875rem;
  counter-increment: vg-ol;
}

.knowledge-article-prose ol > li::before {
  content: counter(vg-ol) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: hsl(var(--cat, var(--primary)));
}

/* Nested lists keep the outer indent but drop the extra gap. */
.knowledge-article-prose li > ul,
.knowledge-article-prose li > ol {
  margin-top: 0.5rem;
}

/* ─── figures and images ─── */

.knowledge-article-prose figure {
  margin-top: 2.5rem;
}

.knowledge-article-prose img {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 0.875rem;
  border: 1px solid hsl(var(--border));
}

.knowledge-article-prose figcaption {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
}

/* ─── code ─── */

.knowledge-article-prose code {
  font-size: 0.87em;
  background: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
  border-radius: 5px;
  padding: 1.5px 6px;
  color: hsl(var(--foreground));
}

.knowledge-article-prose pre {
  margin-top: 2rem;
  overflow-x: auto;
  border-radius: 0.875rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted));
  padding: 1.25rem 1.375rem;
  font-size: 0.8375rem;
  line-height: 1.75;
  color: hsl(var(--foreground));
}

.knowledge-article-prose pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}

/* A code block written to be read: the keyword, comment and string marks are
 * put in by hand, because nothing here runs a highlighter over the body. */
.knowledge-article-prose pre.code .k {
  color: hsl(var(--cat, var(--primary)));
}

.knowledge-article-prose pre.code .c {
  color: hsl(var(--muted-foreground));
}

.knowledge-article-prose pre.code .s {
  color: hsl(var(--primary));
}

/* ─── tables ─── */

.knowledge-article-prose table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2.125rem;
  font-size: 0.9375rem;
}

.knowledge-article-prose thead th {
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  font-weight: 600;
  padding: 0 1rem 0.75rem;
  border-bottom: 1px solid hsl(var(--border));
}

.knowledge-article-prose tbody td {
  padding: 0.9375rem 1rem;
  border-bottom: 1px solid hsl(var(--border) / 0.7);
  vertical-align: top;
}

.knowledge-article-prose tbody tr:last-child td {
  border-bottom: 0;
}

.knowledge-article-prose tbody td:first-child {
  color: hsl(var(--foreground));
  font-weight: 500;
  white-space: nowrap;
}

/* A wide table scrolls inside its own box instead of stretching the page. */
.knowledge-article-prose .tbl-scroll {
  overflow-x: auto;
  margin-top: 2.125rem;
}

.knowledge-article-prose .tbl-scroll table {
  margin-top: 0;
}

/* ─── blocks ─── */

/* What the article wants the reader to leave with. */
.knowledge-article-prose .takeaway {
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  background: hsl(var(--card));
  padding: 1.625rem 1.75rem;
  margin-top: 2.5rem;
  box-shadow:
    0 1px 2px hsl(var(--foreground) / 0.05),
    0 8px 24px -12px hsl(var(--foreground) / 0.12);
}

.knowledge-article-prose .takeaway h4 {
  font-size: 0.7188rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: hsl(var(--cat, var(--primary)));
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5625rem;
}

.knowledge-article-prose .takeaway h4::before {
  content: "";
  width: 14px;
  height: 1.5px;
  background: hsl(var(--cat, var(--primary)));
}

.knowledge-article-prose .takeaway ul {
  margin: 0;
}

.knowledge-article-prose .takeaway li {
  font-size: 0.9625rem;
  line-height: 1.72;
}

/* An aside the reader can skip; .warn is the one they should not. */
.knowledge-article-prose .callout {
  border: 1px solid hsl(var(--border));
  border-left: 3px solid hsl(var(--cat, var(--primary)));
  border-radius: 4px 0.875rem 0.875rem 4px;
  background: hsl(var(--foreground) / 0.03);
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
}

.knowledge-article-prose .callout .t {
  font-size: 0.7813rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: hsl(var(--cat, var(--primary)));
  margin-bottom: 0.5rem;
}

.knowledge-article-prose .callout p {
  font-size: 0.975rem;
  line-height: 1.74;
  color: hsl(var(--foreground) / 0.9);
}

/* A warning changes the left border and the title, nothing else -- the box
 * keeps the same neutral tint. The two values are the design's own #8a5b12
 * and #e2c179, to the byte. */
.knowledge-article-prose .callout.warn {
  border-left-color: hsl(36.5 76.92% 30.59%);
}

.knowledge-article-prose .callout.warn .t {
  color: hsl(36.5 76.92% 30.59%);
}

.dark .knowledge-article-prose .callout.warn,
.dark .knowledge-article-prose .callout.warn .t {
  border-left-color: hsl(41.14 64.42% 68.04%);
  color: hsl(41.14 64.42% 68.04%);
}

/* One sentence lifted out of the flow. */
.knowledge-article-prose .pull {
  margin: 3.25rem 0;
  padding: 0 0 0 1.875rem;
  border-left: 2px solid hsl(var(--cat, var(--primary)));
}

.knowledge-article-prose .pull p {
  font-size: 1.4375rem;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: -0.018em;
  color: hsl(var(--foreground));
}

/* A row of short definitions. */
.knowledge-article-prose .stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: hsl(var(--border));
  border: 1px solid hsl(var(--border));
  border-radius: 0.875rem;
  overflow: hidden;
  margin-top: 2.25rem;
}

.knowledge-article-prose .stat-row .st {
  background: hsl(var(--card));
  padding: 1.5rem 1.375rem;
}

.knowledge-article-prose .stat-row .st b {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: hsl(var(--foreground));
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.knowledge-article-prose .stat-row .st span {
  display: block;
  margin-top: 0.4375rem;
  font-size: 0.825rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.55;
}

@media (max-width: 720px) {
  .knowledge-article-prose .stat-row {
    grid-template-columns: 1fr;
  }

  .knowledge-article-prose .pull {
    margin: 2.5rem 0;
    padding-left: 1.25rem;
  }

  .knowledge-article-prose .pull p {
    font-size: 1.25rem;
  }

  .knowledge-article-prose .takeaway {
    padding: 1.25rem 1.25rem;
  }
}

/* SPDX-License-Identifier: LicenseRef-VINCIS-ARR */

/* What the template draws around an article body.
 *
 * The division of labour: every class here is put on the page by
 * page.tsx from the article's own fields, and nothing in the body can
 * produce one. The classes the body may produce live in
 * knowledge-article-prose.css. The vg- prefix is the line between them.
 *
 * --cat is the topic's accent. It is set once, on the article root, from
 * the topic slug, and the body inherits it -- which is why a callout, a
 * list marker and the reading-progress bar are all the same colour on one
 * article and all a different colour on the next. */

/* One accent for every article: the site's own primary, which is the brand
 * blue and already flips with the theme. The design file this page was built
 * from carried six per-topic colours; the site has one brand colour, and a
 * second palette that appeared on no other page was a second brand. Topics
 * are told apart by their name, not by their colour.
 *
 * --cat is what the accent is called throughout the article, including in
 * the body's stylesheet, so the name stays. */
.vg-article-root {
  --cat: 0 0% 14%;
}

.dark .vg-article-root {
  --cat: 0 0% 92%;
}

.vg-article {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.75rem;
}

/* ─── reading progress ─── */

.vg-prog {
  position: fixed;
  top: var(--nav-h, 58px);
  left: 0;
  height: 2px;
  width: 0;
  z-index: 40;
  background: hsl(var(--cat));
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ─── head ─── */

.vg-backlink {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8375rem;
  color: hsl(var(--muted-foreground));
  transition: color 0.2s;
}

.vg-backlink:hover {
  color: hsl(var(--foreground));
}

.vg-backlink svg {
  width: 15px;
  height: 15px;
}

.vg-head {
  max-width: 940px;
  margin-top: 2.125rem;
}

.vg-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7813rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: hsl(var(--cat));
  margin-bottom: 1.375rem;
}

.vg-cat .d {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: hsl(var(--cat));
  box-shadow: 0 0 0 4px hsl(var(--cat) / 0.12);
}

.vg-title {
  font-size: clamp(1.9375rem, 4.1vw, 3.125rem);
  line-height: 1.13;
  font-weight: 600;
  letter-spacing: -0.032em;
  color: hsl(var(--foreground));
}

.vg-deck {
  margin-top: 1.375rem;
  font-size: 1.1875rem;
  line-height: 1.72;
  color: hsl(var(--muted-foreground));
  max-width: 740px;
}

.vg-meta {
  margin-top: 2.125rem;
  padding-top: 1.25rem;
  border-top: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.vg-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  background: hsl(var(--cat) / 0.12);
  color: hsl(var(--cat));
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.vg-who {
  display: flex;
  flex-direction: column;
  line-height: 1.45;
}

.vg-who b {
  font-size: 0.8625rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.vg-who span {
  font-size: 0.7813rem;
  color: hsl(var(--muted-foreground));
}

.vg-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: hsl(var(--muted-foreground) / 0.6);
  flex: none;
}

.vg-meta time,
.vg-rt {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  font-variant-numeric: tabular-nums;
}

.vg-share {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.vg-share button,
.vg-share a {
  width: 32px;
  height: 32px;
  border: 1px solid hsl(var(--border));
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--muted-foreground));
  transition:
    color 0.2s,
    background 0.2s;
}

.vg-share button:hover,
.vg-share a:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--muted));
}

.vg-share svg {
  width: 15px;
  height: 15px;
}

.vg-copied {
  font-size: 0.75rem;
  color: hsl(var(--cat));
  white-space: nowrap;
}

/* ─── cover ─── */

.vg-cover {
  margin-top: 2.875rem;
}

/* The design's frame for a cover: a rounded panel with a wash of the topic
 * accent from the top left and of the brand from the bottom right. */
.vg-cover .box {
  border: 1px solid hsl(var(--border));
  border-radius: 1.125rem;
  overflow: hidden;
  padding: 1.625rem 1.375rem;
  background:
    radial-gradient(58% 130% at 16% 8%, hsl(var(--cat) / 0.1), transparent 60%),
    radial-gradient(
      50% 120% at 90% 92%,
      hsl(var(--primary) / 0.09),
      transparent 58%
    ),
    hsl(var(--muted));
}

.vg-cover img {
  display: block;
  width: 100%;
  height: auto;
}

/* A diagram cover ships as a light file and a dark twin; exactly one of them
 * is shown. Both are in the markup, so switching the theme is a repaint, not
 * a fetch. */
.vg-cover img.only-dark {
  display: none;
}

.dark .vg-cover img.only-light {
  display: none;
}

.dark .vg-cover img.only-dark {
  display: block;
}

/* ─── body and side column ─── */

.vg-grid {
  margin-top: 3.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
}

@media (min-width: 1080px) {
  .vg-grid {
    grid-template-columns: minmax(0, 1fr) 232px;
    gap: 3rem;
  }
}

.vg-side {
  display: flex;
  flex-direction: column;
  gap: 1.625rem;
}

@media (min-width: 1080px) {
  .vg-side {
    position: sticky;
    top: calc(var(--nav-h, 58px) + 2.125rem);
    align-self: start;
    max-height: calc(100vh - var(--nav-h, 58px) - 4rem);
    overflow-y: auto;
  }
}

.vg-lbl {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.875rem;
}

.vg-toc {
  display: flex;
  flex-direction: column;
}

.vg-toc a {
  font-size: 0.8125rem;
  line-height: 1.5;
  padding: 0.4375rem 0 0.4375rem 0.875rem;
  border-left: 2px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
  transition:
    color 0.2s,
    border-color 0.2s;
}

.vg-toc a:hover {
  color: hsl(var(--foreground));
}

.vg-toc a.active {
  color: hsl(var(--foreground));
  border-left-color: hsl(var(--cat));
}

.vg-toc a.lvl3 {
  padding-left: 1.75rem;
}

.vg-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.vg-tags span {
  font-size: 0.7188rem;
  color: hsl(var(--muted-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  padding: 3px 10px;
}

/* ─── article footer ─── */

.vg-end {
  max-width: 720px;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid hsl(var(--border));
}

.vg-tagrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.vg-tagrow a {
  font-size: 0.7813rem;
  color: hsl(var(--muted-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  padding: 5px 13px;
  transition: 0.2s;
}

.vg-tagrow a:hover {
  color: hsl(var(--foreground));
  border-color: hsl(var(--muted-foreground) / 0.5);
  background: hsl(var(--muted));
}

.vg-author {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-top: 2.25rem;
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  background: hsl(var(--card));
  padding: 1.5rem;
}

.vg-author .vg-av {
  width: 44px;
  height: 44px;
  font-size: 0.8125rem;
}

.vg-author b {
  display: block;
  font-size: 0.9125rem;
  color: hsl(var(--foreground));
  font-weight: 600;
}

.vg-author em {
  display: block;
  font-style: normal;
  font-size: 0.8rem;
  color: hsl(var(--muted-foreground));
  margin-top: 2px;
}

.vg-author p {
  margin-top: 0.625rem;
  font-size: 0.8875rem;
  line-height: 1.7;
  color: hsl(var(--muted-foreground));
}

/* ─── related ─── */

.vg-related {
  max-width: 1240px;
  margin: 5.5rem auto 0;
  padding: 0 1.75rem;
}

.vg-rh {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid hsl(var(--border));
  margin-bottom: 1.75rem;
}

.vg-rh h2 {
  font-size: 1.1875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  letter-spacing: -0.018em;
}

.vg-rh a {
  font-size: 0.825rem;
  color: hsl(var(--muted-foreground));
  transition: 0.2s;
}

.vg-rh a:hover {
  color: hsl(var(--foreground));
}

.vg-rcards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.125rem;
}

@media (min-width: 760px) {
  .vg-rcards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.vg-rcard {
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  background: hsl(var(--card));
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  transition: 0.24s;
}

.vg-rcard:hover {
  border-color: hsl(var(--muted-foreground) / 0.45);
  transform: translateY(-2px);
}

.vg-rcard .rc {
  font-size: 0.7188rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: hsl(var(--cat));
  text-transform: uppercase;
}

.vg-rcard h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  color: hsl(var(--foreground));
  letter-spacing: -0.012em;
}

.vg-rcard p {
  font-size: 0.85rem;
  line-height: 1.66;
  color: hsl(var(--muted-foreground));
  flex: 1;
}

/* ─── closing call to action ─── */

.vg-cta {
  max-width: 1240px;
  margin: 5.5rem auto 0;
  padding: 0 1.75rem;
}

.vg-cta .box {
  position: relative;
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  border-radius: 1.375rem;
  background: hsl(var(--card));
  padding: 3.25rem 3rem;
  text-align: center;
}

.vg-cta .box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    60% 140% at 50% 0%,
    hsl(var(--cat) / 0.1),
    transparent 68%
  );
}

.vg-cta .box > * {
  position: relative;
}

.vg-cta h2 {
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.026em;
  color: hsl(var(--foreground));
  line-height: 1.28;
}

.vg-cta p {
  margin-top: 0.875rem;
  font-size: 0.9688rem;
  color: hsl(var(--muted-foreground));
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.vg-btns {
  margin-top: 1.75rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.vg-b1 {
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0 1.5rem;
  line-height: 42px;
  border-radius: 999px;
  transition: opacity 0.2s;
}

.vg-b1:hover {
  opacity: 0.85;
}

.vg-b2 {
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0 1.5rem;
  line-height: 40px;
  border-radius: 999px;
  transition: 0.2s;
}

.vg-b2:hover {
  background: hsl(var(--muted));
}

/* ─── back to top ─── */

.vg-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--muted-foreground));
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s,
    color 0.2s;
  z-index: 39;
}

.vg-top.on {
  opacity: 1;
  pointer-events: auto;
}

.vg-top:hover {
  color: hsl(var(--foreground));
}

@media (max-width: 720px) {
  .vg-article,
  .vg-related,
  .vg-cta {
    padding: 0 1.25rem;
  }

  .vg-cta .box {
    padding: 2.25rem 1.5rem;
  }

  .vg-share {
    margin-left: 0;
  }
}

/* "Original in Chinese / English" under the title, when the reader's
 * language has no version of the article (Owner spec v1 §2.3). */
.vg-article .vg-original {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted-foreground, currentColor);
  opacity: 0.8;
}

