/* ==========================================================================
   Portable blog — theme.css

   Every rule is namespaced under .vblog, because these pages are wrapped in
   a HOST site's header and footer: this stylesheet must never restyle the
   shell, and loading it after the shell's CSS means .vblog rules win ties
   inside the blog's own content and nowhere else.

   No webfonts, deliberately. The shell already loads the host site's fonts;
   the system stack below inherits the platform's best UI face at zero bytes
   and zero layout shift, and looks native everywhere.

   Colour is expressed as custom properties with light values as the
   default and a prefers-color-scheme override, so a host page that is dark
   gets a dark article for free. All pairings hold WCAG AA (>= 4.5:1 for
   text) in both schemes.
   ========================================================================== */

.vblog {
  /* palette — light */
  --vb-surface: #f5f6f8;      /* cards, code-adjacent chrome */
  --vb-ink: #1b2230;          /* 15.4:1 on white */
  --vb-muted: #4c5666;        /* 7.2:1 on white */
  --vb-line: #e2e5ea;
  --vb-accent: #0b57d0;       /* 6.5:1 on white */
  --vb-chip-bg: #e8f0fe;
  --vb-chip-ink: #0b46a8;
  --vb-code-bg: #10161f;
  --vb-code-ink: #e3e8ef;
  --vb-card-bg: #ffffff;

  /* rhythm */
  --vb-radius: 14px;
  --vb-gap: clamp(1rem, 0.6rem + 1.6vw, 1.75rem);
  --vb-shadow: 0 1px 2px rgba(16, 22, 31, 0.06), 0 10px 30px rgba(16, 22, 31, 0.08);

  /* Inherit the host's typeface: the whole point of wearing the host's
     shell is that the text sets in the host's own font (whatever
     the host project uses). */
  font-family: inherit;
  color: var(--vb-ink);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  /* No background: the host page owns the ground the blog sits on. */
  display: block;
  /* Generous top clearance: many host headers are fixed and
     expect the page to start below them; on static-header sites this simply
     reads as editorial whitespace. */
  padding: clamp(6rem, 4.5rem + 5vw, 8.5rem) 1.25rem clamp(3rem, 2rem + 4vw, 5rem);
}

@media (prefers-color-scheme: dark) {
  .vblog {
    --vb-surface: #161c26;
    --vb-ink: #e7ebf1;        /* 13.9:1 on #161c26 */
    --vb-muted: #a6b0bf;      /* 6.6:1 on #161c26 */
    --vb-line: #29313e;
    --vb-accent: #8ab8ff;     /* 7.6:1 on #161c26 */
    --vb-chip-bg: #1d2c47;
    --vb-chip-ink: #b7d1ff;
    --vb-code-bg: #0c1118;
    --vb-code-ink: #dde3ec;
    --vb-card-bg: #10151d;
    --vb-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}

/* --------------------------------------------------------------------------
   Layout containers
   -------------------------------------------------------------------------- */

.vblog .vblog-wrap {
  max-width: 72rem;
  margin-inline: auto;
}

.vblog .vblog-article {
  max-width: 44rem; /* ~68ch at this size: the comfortable reading measure */
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Type — fluid scale, real hierarchy
   -------------------------------------------------------------------------- */

.vblog h1 {
  font-size: clamp(2rem, 1.35rem + 2.8vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.022em;
  font-weight: 750;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

.vblog .vblog-body h2 {
  font-size: clamp(1.45rem, 1.15rem + 1.2vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 700;
  margin: 2.2em 0 0.6em;
}

.vblog .vblog-body h3 {
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.4rem);
  line-height: 1.3;
  font-weight: 650;
  margin: 1.8em 0 0.5em;
}

.vblog .vblog-body h4 {
  font-size: 1.0625rem;
  font-weight: 650;
  margin: 1.6em 0 0.4em;
}

.vblog p {
  margin: 0 0 1.1em;
}

.vblog a {
  color: var(--vb-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.vblog a:hover {
  text-decoration-thickness: 2px;
}

.vblog a:focus-visible {
  outline: 2px solid var(--vb-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.vblog .vblog-meta,
.vblog .vblog-card-meta,
.vblog .vblog-page-sub {
  color: var(--vb-muted);
  font-size: 0.9375rem;
}

.vblog .vblog-page-head {
  margin-bottom: var(--vb-gap);
}

.vblog .vblog-article-head {
  margin-bottom: 1.75rem;
}

.vblog .vblog-article-head .vblog-meta {
  margin-bottom: 0.9em;
}

/* --------------------------------------------------------------------------
   Category chip
   -------------------------------------------------------------------------- */

.vblog .vblog-chip {
  display: inline-block;
  background: var(--vb-chip-bg);
  color: var(--vb-chip-ink);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.2em 0.75em;
  border-radius: 999px;
  text-decoration: none;
}

.vblog a.vblog-chip:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Card grid (index + taxonomy listings)
   -------------------------------------------------------------------------- */

.vblog .vblog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: var(--vb-gap);
}

.vblog .vblog-card {
  background: var(--vb-card-bg);
  border: 1px solid var(--vb-line);
  border-radius: var(--vb-radius);
  overflow: hidden;
}

.vblog .vblog-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.vblog .vblog-card-link:focus-visible {
  outline: 2px solid var(--vb-accent);
  outline-offset: 2px;
  border-radius: var(--vb-radius);
}

.vblog .vblog-card-cover {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 16 / 9;
  background: var(--vb-surface);
}

/* Older engines without aspect-ratio still get intrinsic sizing from the
   width/height attributes the generator writes on every image. */
@supports not (aspect-ratio: 16 / 9) {
  .vblog .vblog-card-cover {
    max-height: 14rem;
  }
}

.vblog .vblog-card-body {
  padding: 1.1rem 1.25rem 1.25rem;
}

.vblog .vblog-card-title {
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.012em;
  font-weight: 700;
  margin: 0.55em 0 0.4em;
}

.vblog .vblog-card-excerpt {
  color: var(--vb-muted);
  font-size: 0.9375rem;
  margin-bottom: 0.9em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vblog .vblog-card-meta {
  margin: 0;
}

/* The lift is a treat for devices that can enjoy it: real hover hardware
   and no request for reduced motion. Everyone else gets the same card,
   simply still — degraded gracefully, not switched off. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .vblog .vblog-card {
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .vblog .vblog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--vb-shadow);
  }
}

.vblog .vblog-empty {
  color: var(--vb-muted);
}

/* --------------------------------------------------------------------------
   Article body
   -------------------------------------------------------------------------- */

.vblog .vblog-cover {
  margin: 0 0 2rem;
}

.vblog .vblog-cover img {
  width: 100%;
  height: auto;
  border-radius: var(--vb-radius);
  display: block;
}

.vblog .vblog-body img {
  max-width: 100%;
  height: auto;
  border-radius: calc(var(--vb-radius) - 4px);
}

.vblog .vblog-body hr {
  border: 0;
  border-top: 1px solid var(--vb-line);
  margin: 2.5em 0;
}

.vblog .vblog-body ul,
.vblog .vblog-body ol {
  padding-left: 1.4em;
  margin: 0 0 1.1em;
}

.vblog .vblog-body li {
  margin-bottom: 0.35em;
}

.vblog .vblog-body blockquote {
  margin: 1.6em 0;
  padding: 0.2em 0 0.2em 1.2em;
  border-left: 3px solid var(--vb-accent);
  color: var(--vb-muted);
  font-size: 1.125rem;
}

.vblog .vblog-body blockquote p:last-child {
  margin-bottom: 0;
}

/* Code — inline and fenced. The block keeps its own dark scheme in both
   colour modes; contrast holds either way. */
.vblog .vblog-body code {
  font-family: ui-monospace, SFMono-Regular, "Cascadia Code", Menlo, Consolas,
    "Liberation Mono", monospace;
  font-size: 0.875em;
  background: var(--vb-surface);
  border: 1px solid var(--vb-line);
  border-radius: 6px;
  padding: 0.12em 0.4em;
}

.vblog .vblog-body pre {
  background: var(--vb-code-bg);
  color: var(--vb-code-ink);
  border-radius: var(--vb-radius);
  padding: 1.1rem 1.3rem;
  overflow-x: auto;
  margin: 1.6em 0;
  line-height: 1.55;
  -webkit-overflow-scrolling: touch;
}

.vblog .vblog-body pre code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: 0.875rem;
}

/* Tables scroll inside themselves rather than widening the page — display
   block + overflow keeps the layout intact without a wrapper element. */
.vblog .vblog-body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 0.9375rem;
  -webkit-overflow-scrolling: touch;
}

.vblog .vblog-body th,
.vblog .vblog-body td {
  border: 1px solid var(--vb-line);
  padding: 0.55em 0.85em;
  text-align: left;
}

.vblog .vblog-body th {
  background: var(--vb-surface);
  font-weight: 650;
}

/* --------------------------------------------------------------------------
   Tags, prev/next, pagination
   -------------------------------------------------------------------------- */

.vblog .vblog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2.2rem 0 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--vb-line);
}

.vblog .vblog-tags a {
  background: var(--vb-surface);
  border: 1px solid var(--vb-line);
  color: var(--vb-muted);
  border-radius: 999px;
  padding: 0.25em 0.85em;
  font-size: 0.875rem;
  text-decoration: none;
}

.vblog .vblog-tags a:hover {
  color: var(--vb-accent);
  border-color: var(--vb-accent);
}

.vblog .vblog-prevnext {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.vblog .vblog-adj {
  display: block;
  border: 1px solid var(--vb-line);
  border-radius: var(--vb-radius);
  padding: 1rem 1.2rem;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.35;
}

.vblog .vblog-adj span {
  display: block;
  color: var(--vb-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3em;
}

.vblog .vblog-adj-older {
  text-align: right;
}

.vblog .vblog-adj:hover {
  border-color: var(--vb-accent);
}

.vblog .vblog-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: var(--vb-gap);
  padding-top: 1.25rem;
  border-top: 1px solid var(--vb-line);
}

.vblog .vblog-page-status {
  color: var(--vb-muted);
  font-size: 0.9375rem;
  margin-inline: auto;
}

.vblog .vblog-page-prev,
.vblog .vblog-page-next {
  font-weight: 600;
  text-decoration: none;
}

.vblog .vblog-page-prev:hover,
.vblog .vblog-page-next:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Print — an article should print like a document, not a screenshot
   -------------------------------------------------------------------------- */

@media print {
  .vblog {
    padding: 0;
    color: #000;
    font-size: 11pt;
  }
  .vblog .vblog-tags,
  .vblog .vblog-prevnext,
  .vblog .vblog-pagination {
    display: none;
  }
  .vblog a {
    color: #000;
  }
  /* Links are useless on paper unless the destination is on the paper. */
  .vblog .vblog-body a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #444;
    word-break: break-all;
  }
  .vblog .vblog-body pre {
    background: #f2f2f2;
    color: #000;
    border: 1px solid #ccc;
    white-space: pre-wrap;
    word-break: break-word;
  }
  .vblog .vblog-card,
  .vblog .vblog-cover img,
  .vblog .vblog-body img {
    break-inside: avoid;
  }
}
/* ==========================================================================
   RICH ELEMENTS (include mode)

   Everything above dresses an ordinary article. Everything below dresses the
   block vocabulary from ELEMENTS.md — the fixed shapes `api/directives.py`
   expands a `:::directive` fence into. The author never writes markup, so the
   HTML these rules meet is always ours; that is the whole reason a page
   builder can be replaced by a stylesheet.

   Its twin is ../../src/styles/blog.css, which dresses the SAME class names
   for the Victory TechNxt site using that site's tokens. The rules are
   byte-identical between the two files apart from the `.vblog` namespace;
   only the --vb-* block below knows where it is. A change made in one file is
   a change you can paste into the other.

   Four rules govern all of it.

   1. NOTHING HERE NEEDS JAVASCRIPT. Accordions are <details>, tabs are radio
      inputs read by :checked sibling selectors, carousels are scroll-snap,
      counters print their final number. Where a script can add polish (the
      counter roll-up, the comparison slider's live reveal) the element is
      already correct without it. Script blocked costs a reader an animation,
      never a sentence.

   2. SPECIFICITY IS BOUGHT ONCE, NOT SHOUTED. One heavy hook claims flow
      margins, list padding and image geometry inside every rich block, and
      each element tunes it through inherited custom properties (--vb-flow,
      --vb-flow-top, --vb-list-pad, --vb-img-r, --vb-img-m). No !important
      anywhere: a host page that needs to override us must be able to.

   3. CONTRAST IS FIXED AT THE SOURCE. The tone inks and the solid-button ramp
      are literal values rather than derivations of --vb-accent, because this
      file lands on hosts we have never seen. Every text/ground pairing below
      clears 4.5:1 in both colour schemes.

   4. EVERY EFFECT DEGRADES TO SOMETHING FINISHED. Reduced motion, no hover,
      no :has(), no aspect-ratio, no mask, no clip-path and no colour on paper
      each have a stated fallback, and not one of them is "the element
      vanishes".
   ========================================================================== */

.vblog {
  /* The article palette above stops at ink, muted, line and accent. Cards and
     rich blocks need three more steps between them. */
  --vb-mid: #39434f;                        /* 10:1 on white — copy in a card */
  --vb-dim: var(--vb-muted);
  --vb-line-strong: rgba(16, 22, 31, 0.17);
  --vb-radius-lg: 20px;
  --vb-el-gap: clamp(1.8rem, 1.2rem + 2vw, 3rem);
  --vb-shadow-lift: 0 4px 12px rgba(16, 22, 31, 0.07), 0 28px 60px -24px rgba(16, 22, 31, 0.24);
  --vb-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --vb-spring: cubic-bezier(0.34, 1.36, 0.42, 1);   /* ~3% overshoot, no more */
  --vb-focus: var(--vb-accent);

  /* Type. --vb-display is `inherit` on purpose: the article already wears the
     host's typeface, and a rich block that suddenly switched face would be
     the one thing on the page that looked pasted in. Weight and size do all
     the distinguishing instead. The numeric steps are stated rather than
     inherited so a host with an unusual root size cannot warp a price. */
  --vb-display: inherit;
  --vb-mono: ui-monospace, SFMono-Regular, "Cascadia Code", Menlo, Consolas,
    "Liberation Mono", monospace;
  --vb-t--2: 0.75rem;
  --vb-t--1: 0.875rem;
  --vb-t-0: 1rem;
  --vb-t-1: clamp(1.1rem, 1.02rem + 0.4vw, 1.32rem);
  --vb-t-2: clamp(1.45rem, 1.15rem + 1.2vw, 1.9rem);
  --vb-t-3: clamp(2rem, 1.5rem + 2.2vw, 3rem);

  /* Defaults for the heavy hook. Components override them on themselves.
     --vb-list-pad matches the article's own list indent, so a plain list
     inside a column or a callout keeps the page's rhythm. */
  --vb-flow: 0.85em;
  --vb-list-pad: 1.4em;
  --vb-img-r: calc(var(--vb-radius) - 4px);
  --vb-img-m: 0.9em;

  /* The iridescent ramp, for decoration only — bars, rules, glows. Never body
     text: a four-stop gradient cannot be held to a contrast ratio. */
  --vb-ir: linear-gradient(96deg, #4d7cff, #00c2f0 34%, #8b5cf6 68%, #ff7ac8);

  /* The solid button, pinned to the two deep stops of that ramp in BOTH
     schemes: white is 6.5:1 on #2b46f0 and 5.7:1 on #7c3aed, so one pairing
     holds on a light host, on a dark one and on paper. Following --vb-accent
     instead would put white on #8ab8ff in dark mode — 1.9:1. */
  --vb-solid: linear-gradient(120deg, #2b46f0, #7c3aed);
  --vb-solid-ink: #ffffff;
  --vb-solid-ring: rgba(43, 70, 240, 0.42);

  /* Display numerals carry the ramp rather than a flat ink — the one place on
     a light ground where colour can be loud without being cheap. */
  --vb-figure: linear-gradient(158deg, var(--vb-ink) 14%, #2b46f0 86%, #7c3aed 126%);

  /* Tones. The ink is used for the accent bar, the icon well and small
     labels; body copy inside a callout stays --vb-ink, so a tone never has to
     carry a paragraph. All four clear 4.5:1 on their own tint. */
  --vb-info: #2b46f0;
  --vb-info-bg: rgba(43, 70, 240, 0.065);
  --vb-success: #0a7a4e;
  --vb-success-bg: rgba(10, 122, 78, 0.08);
  --vb-warn: #9a5b00;
  --vb-warn-bg: rgba(154, 91, 0, 0.09);
  --vb-quote: #6d3bd6;
  --vb-quote-bg: rgba(109, 59, 214, 0.07);

  --vb-mark: rgba(0, 194, 240, 0.34);
}

@media (prefers-color-scheme: dark) {
  .vblog {
    --vb-mid: #c3ccd9;                      /* 11.5:1 on #10151d */
    --vb-line-strong: rgba(180, 200, 230, 0.26);
    --vb-shadow-lift: 0 4px 12px rgba(0, 0, 0, 0.5), 0 28px 60px -24px rgba(0, 0, 0, 0.75);
    --vb-figure: linear-gradient(158deg, var(--vb-ink) 14%, #8ab4ff 86%, #b39cff 126%);

    /* Lifted tones: the light-scheme inks sit at about 2:1 on #161c26. These
       are the same four hues opened up until each clears 4.5:1 there. */
    --vb-info: #8ab4ff;
    --vb-info-bg: rgba(138, 180, 255, 0.1);
    --vb-success: #5fd6a4;
    --vb-success-bg: rgba(95, 214, 164, 0.1);
    --vb-warn: #f5b544;
    --vb-warn-bg: rgba(245, 181, 68, 0.11);
    --vb-quote: #b39cff;
    --vb-quote-bg: rgba(179, 156, 255, 0.1);

    --vb-mark: rgba(127, 230, 255, 0.3);
  }
}

/* --------------------------------------------------------------------------
   The heavy hook

   Every rich block's root carries a class beginning `vb-`, and no other class
   in a post body does. Repeating that attribute selector three times buys
   (0,3,x) once, for the four properties the host's prose CSS would otherwise
   dictate inside a card. The VALUES all come through custom properties, so
   every element below tunes its own interior at ordinary specificity — which
   is why this is the only rule here that has to look like this.
   -------------------------------------------------------------------------- */

.vblog [class*='vb-'][class*='vb-'][class*='vb-'] :is(p, ul, ol) {
  margin-block: var(--vb-flow-top, 0) var(--vb-flow);
}

.vblog [class*='vb-'][class*='vb-'][class*='vb-'] :is(ul, ol) {
  padding-left: var(--vb-list-pad);
}

.vblog [class*='vb-'][class*='vb-'][class*='vb-'] li { margin-block: 0; }

.vblog [class*='vb-'][class*='vb-'][class*='vb-'] img {
  margin-block: 0 var(--vb-img-m);
  border-radius: var(--vb-img-r);
}

/* Nothing trails a margin into a card's padding, at any depth. */
.vblog [class*='vb-'][class*='vb-'][class*='vb-'] :last-child { margin-bottom: 0; }

/* And nothing OPENS one with the article's heading margin either. A host
   gives an <h3> a 1.8em rise because it starts a section; the same heading at
   the top of a column, a tab panel or a card is a title, and the rise drops
   that one track below its neighbours until the row stops reading as a row.
   Direct children only — a heading further down inside a panel is still
   starting something and keeps its air. */
.vblog [class*='vb-'][class*='vb-'][class*='vb-'] > :first-child { margin-top: 0; }

/* --------------------------------------------------------------------------
   Shared behaviour
   -------------------------------------------------------------------------- */

/* One rhythm for every rich block, so a post built out of them scans as a
   column and not as a stack of unrelated cards. Split in two by what the
   ROOT ELEMENT is: a <div>, an <aside> or a <details> meets no prose rule and
   needs no weight, while the eight roots that are themselves prose elements —
   <ul>, <p>, <figure> — have to out-weigh a host's own list, paragraph and
   figure rules, which land at about (0,2,1) wherever we have met them.
   The class list is exactly what directives.py emits as a root, and nothing
   else: `vb-btn-wrap` is here because a button is an element in the flow,
   `vb-btn` is not because it is the thing inside it. */
.vblog .vb-btn-wrap,
.vblog .vb-callout,
.vblog .vb-accordion,
.vblog .vb-tabs,
.vblog .vb-columns,
.vblog .vb-profile,
.vblog .vb-pricing,
.vblog .vb-flip,
.vblog .vb-video {
  margin-block: var(--vb-el-gap);
}

.vblog .vb-checklist.vb-checklist.vb-checklist,
.vblog .vb-counters.vb-counters.vb-counters,
.vblog .vb-progress.vb-progress.vb-progress,
.vblog .vb-gallery.vb-gallery.vb-gallery,
.vblog .vb-notice.vb-notice.vb-notice,
.vblog .vb-video-link.vb-video-link.vb-video-link,
.vblog .vb-testimonial.vb-testimonial.vb-testimonial,
.vblog .vb-compare.vb-compare.vb-compare {
  margin-block: var(--vb-el-gap);
}

/* The four roots that are lists lose their bullets and their indent once and
   for all, here, at the weight a host's own list rule carries. */
.vblog .vb-checklist.vb-checklist.vb-checklist,
.vblog .vb-counters.vb-counters.vb-counters,
.vblog .vb-progress.vb-progress.vb-progress,
.vblog .vb-gallery.vb-gallery.vb-gallery {
  --vb-list-pad: 0;
  list-style: none;
  padding-left: 0;
}

/* Plenty of host themes warm or lift every p / li / label on hover — a lovely
   effect down an editorial column, a nervous tic inside a pricing card or a
   tab strip. Rich elements opt out: their hover states belong on the
   component, where the reader can act on them. :is() carries the specificity
   of its heaviest argument, so this lands heavy enough with no repetition. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .vblog :is(.vb-btn-wrap, .vb-callout, .vb-checklist, .vb-accordion, .vb-tabs,
      .vb-columns, .vb-counters, .vb-progress, .vb-testimonial, .vb-profile,
      .vb-pricing, .vb-flip, .vb-compare, .vb-video, .vb-gallery, .vb-notice)
  :is(p, li, dt, dd, blockquote, figcaption, label, summary):hover {
    color: inherit;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   button — :::button label= url= style=solid|ghost size=sm|md|lg align=

   Shape:  <div class="vb-btn-wrap vb-btn-wrap--center">
             <a class="vb-btn vb-btn--solid vb-btn--lg" href="…">Label</a>
           </div>

   The wrapper is a flex line, not `text-align`, so two buttons written one
   after the other sit on one row with a real gap between them instead of two
   inline boxes separated by a space character.
   -------------------------------------------------------------------------- */

.vblog .vb-btn-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.vblog .vb-btn-wrap--left { justify-content: flex-start; }
.vblog .vb-btn-wrap--center { justify-content: center; }
.vblog .vb-btn-wrap--right { justify-content: flex-end; }

/* The variants are VALUES, not rules. The chrome below has to be repeated to
   beat a host's `.prose a` for colour and text-decoration; a `--ghost` rule
   written the ordinary way would then have to beat THAT, and would lose.
   Custom properties sidestep the contest: they are only ever weighed against
   each other, where source order is the whole story — solid first, ghost
   second, and exactly one of the two classes is ever present. */
.vblog .vb-btn--solid {
  --vb-btn-bg: var(--vb-solid);
  --vb-btn-ink: var(--vb-solid-ink);
  --vb-btn-line: transparent;
  --vb-btn-shadow: 0 1px 2px rgba(10, 20, 50, 0.12), 0 12px 26px -14px var(--vb-solid-ring);
  --vb-btn-bg-hover: var(--vb-solid);
  --vb-btn-line-hover: transparent;
  --vb-btn-shadow-hover: 0 2px 4px rgba(10, 20, 50, 0.14), 0 20px 40px -16px var(--vb-solid-ring);
}

.vblog .vb-btn--ghost {
  --vb-btn-bg: transparent;
  /* The label is --vb-ink rather than the accent: accent-on-white under a 1px
     border is exactly where this pattern usually slips below AA. */
  --vb-btn-ink: var(--vb-ink);
  --vb-btn-line: var(--vb-line-strong);
  --vb-btn-shadow: none;
  --vb-btn-bg-hover: var(--vb-info-bg);
  --vb-btn-line-hover: var(--vb-accent);
  --vb-btn-shadow-hover: none;
}

.vblog .vb-btn--sm { --vb-btn-pad: 0.6em 1.15em; --vb-btn-size: var(--vb-t--1); }
.vblog .vb-btn--md { --vb-btn-pad: 0.85em 1.6em; --vb-btn-size: var(--vb-t-0); }
.vblog .vb-btn--lg { --vb-btn-pad: 1.05em 2.1em; --vb-btn-size: var(--vb-t-1); }

/* Colour and text-decoration are what a host's link rule claims, so the
   anchor's own class is repeated three times and nothing else here has to be.
   min-height is the 44px touch target, stated rather than hoped for. */
.vblog .vb-btn.vb-btn.vb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 2.75rem;
  padding: var(--vb-btn-pad, 0.85em 1.6em);
  border: 1px solid var(--vb-btn-line, transparent);
  border-radius: 999px;
  background: var(--vb-btn-bg, var(--vb-solid));
  color: var(--vb-btn-ink, var(--vb-solid-ink));
  font-family: var(--vb-display);
  font-size: var(--vb-btn-size, var(--vb-t-0));
  font-weight: 650;
  letter-spacing: -0.012em;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  text-wrap: balance;
  box-shadow: var(--vb-btn-shadow, 0 1px 2px rgba(10, 20, 50, 0.12), 0 12px 26px -14px var(--vb-solid-ring));
  transition: transform 0.32s var(--vb-spring), box-shadow 0.32s var(--vb-ease),
    background-color 0.24s var(--vb-ease), border-color 0.24s var(--vb-ease);
}

@media (hover: hover) {
  .vblog .vb-btn.vb-btn.vb-btn:hover {
    background: var(--vb-btn-bg-hover, var(--vb-btn-bg, var(--vb-solid)));
    border-color: var(--vb-btn-line-hover, var(--vb-btn-line, transparent));
  }
}

/* The lift is a treat for hardware that can enjoy it. Everyone else gets the
   same button, simply still. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .vblog .vb-btn.vb-btn.vb-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--vb-btn-shadow-hover, 0 2px 4px rgba(10, 20, 50, 0.14), 0 20px 40px -16px var(--vb-solid-ring));
  }
}

.vblog .vb-btn.vb-btn.vb-btn:focus-visible {
  outline: 2px solid var(--vb-focus);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   callout — :::callout tone=info|success|warn|quote title= icon=

   Shape:  <aside class="vb-callout vb-callout--info vb-callout--icon-info">
             <p class="vb-callout__title">…</p>
             <div class="vb-callout__body">…markdown…</div>
           </aside>

   THE ICON IS A CLASS, NOT AN ELEMENT. directives.py emits no icon markup at
   all — `icon=star` is `vb-callout--icon-star` and nothing else — so the mark
   is drawn here, on ::before, as a mask over the tone colour. A mask rather
   than an <svg> or a glyph for two reasons: it takes the tone without a
   second copy of every shape per tone, and there is no font to be substituted
   out from under it. Where masks are unsupported it degrades to a filled
   disc — a marker, not a gap.
   -------------------------------------------------------------------------- */

.vblog .vb-callout {
  --vb-tone: var(--vb-info);
  --vb-tone-bg: var(--vb-info-bg);
  --vb-flow: 0.7em;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  padding: clamp(1.1rem, 0.8rem + 1.2vw, 1.7rem) clamp(1.2rem, 0.9rem + 1.4vw, 1.9rem);
  border: 1px solid var(--vb-line);
  /* The accent bar is a border rather than a pseudo-element, so it survives a
     page break in print and can never overlap the rounded corner. */
  border-left: 3px solid var(--vb-tone);
  border-radius: var(--vb-radius);
  background: var(--vb-tone-bg);
  color: var(--vb-ink);
}

.vblog .vb-callout--info { --vb-tone: var(--vb-info);    --vb-tone-bg: var(--vb-info-bg); }
.vblog .vb-callout--success { --vb-tone: var(--vb-success); --vb-tone-bg: var(--vb-success-bg); }
.vblog .vb-callout--warn { --vb-tone: var(--vb-warn);    --vb-tone-bg: var(--vb-warn-bg); }
.vblog .vb-callout--quote { --vb-tone: var(--vb-quote);   --vb-tone-bg: var(--vb-quote-bg); }

.vblog .vb-callout--icon-check {
  --vb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.6 16.9 5 12.3l1.5-1.5 3.1 3.1 7.9-7.9L19 7.5z'/%3E%3C/svg%3E");
}

.vblog .vb-callout--icon-arrow {
  --vb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13.1 4.9 11.7 6.3 16.4 11H4v2h12.4l-4.7 4.7 1.4 1.4L20.2 12z'/%3E%3C/svg%3E");
}

.vblog .vb-callout--icon-star {
  --vb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.4l2.95 5.98 6.6.96-4.78 4.66 1.13 6.57L12 17.47l-5.9 3.1 1.13-6.57L2.45 9.34l6.6-.96z'/%3E%3C/svg%3E");
}

.vblog .vb-callout--icon-dot {
  --vb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3C/svg%3E");
}

.vblog .vb-callout--icon-info {
  --vb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1.1 15.2h-2.2v-6.4h2.2zm0-8.2h-2.2V6.8h2.2z'/%3E%3C/svg%3E");
}

.vblog .vb-callout--icon-warn {
  --vb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.4 1.2 21.6h21.6zm1.1 15.8h-2.2V16h2.2zm0-3.9h-2.2V9.6h2.2z'/%3E%3C/svg%3E");
}

.vblog .vb-callout--icon-check,
.vblog .vb-callout--icon-arrow,
.vblog .vb-callout--icon-star,
.vblog .vb-callout--icon-dot,
.vblog .vb-callout--icon-info,
.vblog .vb-callout--icon-warn {
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.95rem;
}

/* The mark is decorative — the callout's words carry the meaning — so it
   answers to the 3:1 non-text bar; every tone clears 4.5:1 anyway. */
.vblog .vb-callout--icon-check::before,
.vblog .vb-callout--icon-arrow::before,
.vblog .vb-callout--icon-star::before,
.vblog .vb-callout--icon-dot::before,
.vblog .vb-callout--icon-info::before,
.vblog .vb-callout--icon-warn::before {
  content: '';
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  width: 1.45rem;
  height: 1.45rem;
  margin-top: 0.08em;
  background: var(--vb-tone);
  -webkit-mask: var(--vb-icon) center / contain no-repeat;
  mask: var(--vb-icon) center / contain no-repeat;
}

.vblog .vb-callout--icon-check > *,
.vblog .vb-callout--icon-arrow > *,
.vblog .vb-callout--icon-star > *,
.vblog .vb-callout--icon-dot > *,
.vblog .vb-callout--icon-info > *,
.vblog .vb-callout--icon-warn > * {
  grid-column: 2;
}

@supports not ((-webkit-mask: none) or (mask: none)) {
  .vblog .vb-callout--icon-check::before,
  .vblog .vb-callout--icon-arrow::before,
  .vblog .vb-callout--icon-star::before,
  .vblog .vb-callout--icon-dot::before,
  .vblog .vb-callout--icon-info::before,
  .vblog .vb-callout--icon-warn::before {
    width: 0.7rem;
    height: 0.7rem;
    margin-top: 0.5em;
    border-radius: 50%;
  }
}

/* The title is a <p>, not a heading — directives.py refuses to add a rung to
   the document outline the author did not choose — so it is made to read as
   one here. */
.vblog .vb-callout__title {
  font-family: var(--vb-display);
  font-size: var(--vb-t-0);
  font-weight: 700;
  letter-spacing: -0.014em;
  color: var(--vb-ink);
  --vb-flow: 0.35em;
}

.vblog .vb-callout__body { min-width: 0; }

/* The quote tone is the pull-quote variant: bigger, lighter, still legible at
   the same ratio because the ink never changes. */
.vblog .vb-callout--quote :is(p, .vb-callout__title) {
  font-size: var(--vb-t-1);
  line-height: 1.45;
  letter-spacing: -0.012em;
}

/* --------------------------------------------------------------------------
   notice — :::notice text= tone=   (Salient's nectar_badge)

   Shape:  <p class="vb-notice vb-notice--warn">
             <span class="vb-notice__text">…</span>
           </p>
   A badge, not a callout: one line, no icon, sits in the column.
   -------------------------------------------------------------------------- */

/* --vb-tone inherits, and a notice can legitimately sit inside a callout, so
   the badge restates the default rather than accepting whatever tone it
   happens to be standing in. */
.vblog .vb-notice {
  --vb-tone: var(--vb-info);
  --vb-tone-bg: var(--vb-info-bg);
}

.vblog .vb-notice--info { --vb-tone: var(--vb-info);    --vb-tone-bg: var(--vb-info-bg); }
.vblog .vb-notice--success { --vb-tone: var(--vb-success); --vb-tone-bg: var(--vb-success-bg); }
.vblog .vb-notice--warn { --vb-tone: var(--vb-warn);    --vb-tone-bg: var(--vb-warn-bg); }
.vblog .vb-notice--quote { --vb-tone: var(--vb-quote);   --vb-tone-bg: var(--vb-quote-bg); }

.vblog .vb-notice.vb-notice.vb-notice {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.4em 0.95em;
  border-radius: 999px;
  background: var(--vb-tone-bg, var(--vb-info-bg));
  box-shadow: inset 0 0 0 1px var(--vb-tone, var(--vb-info));
  color: var(--vb-tone, var(--vb-info));
}

/* The span is what carries the type, so the pill can keep its own line-height
   without the letter-spacing pushing the right-hand curve off centre. */
.vblog .vb-notice__text {
  font-family: var(--vb-mono);
  font-size: var(--vb-t--2);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
  /* The tracking adds a trailing gap the pill would otherwise centre on. */
  margin-right: -0.08em;
}

/* --------------------------------------------------------------------------
   checklist — :::checklist icon=check|arrow|star|dot

   Shape:  <ul class="vb-checklist vb-checklist--check">
             <li class="vb-checklist__item">…</li>
           </ul>
   -------------------------------------------------------------------------- */

.vblog .vb-checklist.vb-checklist.vb-checklist {
  display: grid;
  gap: 0.55em;
}

.vblog .vb-checklist .vb-checklist__item {
  position: relative;
  padding-left: 2.35em;
  min-height: 1.6em;
  color: var(--vb-mid);
  text-wrap: pretty;
}

/* ::before is the well and ::after the glyph, one geometry for all four
   markers, so changing `icon=` never shifts a text baseline. */
.vblog .vb-checklist__item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.5em;
  height: 1.5em;
  border-radius: 50%;
  background: var(--vb-info-bg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--vb-accent) 34%, transparent);
}

@supports not (color: color-mix(in srgb, red, blue)) {
  .vblog .vb-checklist__item::before { box-shadow: inset 0 0 0 1px var(--vb-line-strong); }
}

/* check is the default, and it is drawn rather than typed: a glyph would be
   at the mercy of whatever font the reader's platform substitutes. */
.vblog .vb-checklist__item::after,
.vblog .vb-checklist--check .vb-checklist__item::after {
  content: '';
  position: absolute;
  left: 0.47em;
  top: 0.44em;
  width: 0.34em;
  height: 0.62em;
  border-right: 2px solid var(--vb-accent);
  border-bottom: 2px solid var(--vb-accent);
  transform: rotate(42deg);
}

.vblog .vb-checklist--arrow .vb-checklist__item::after {
  left: 0.5em;
  top: 0.52em;
  width: 0.42em;
  height: 0.42em;
  border: 0;
  border-top: 2px solid var(--vb-accent);
  border-right: 2px solid var(--vb-accent);
  transform: rotate(45deg);
}

.vblog .vb-checklist--dot .vb-checklist__item::after {
  left: 0.6em;
  top: 0.7em;
  width: 0.32em;
  height: 0.32em;
  border: 0;
  border-radius: 50%;
  background: var(--vb-accent);
  transform: none;
}

/* A star is the one marker borders cannot draw. A mask rather than an image
   keeps it currentColor, so it re-tints with the theme instead of baking an
   ink into the stylesheet. */
.vblog .vb-checklist--star .vb-checklist__item::after {
  --vb-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.4l2.95 5.98 6.6.96-4.78 4.66 1.13 6.57L12 17.47l-5.9 3.1 1.13-6.57L2.45 9.34l6.6-.96z'/%3E%3C/svg%3E");
  left: 0.42em;
  top: 0.42em;
  width: 0.66em;
  height: 0.66em;
  border: 0;
  transform: none;
  background: var(--vb-accent);
  -webkit-mask: var(--vb-star) center / contain no-repeat;
  mask: var(--vb-star) center / contain no-repeat;
}

/* Without mask support the star degrades to the dot — a marker, not a gap. */
@supports not ((-webkit-mask: none) or (mask: none)) {
  .vblog .vb-checklist--star .vb-checklist__item::after {
    left: 0.6em;
    top: 0.7em;
    width: 0.32em;
    height: 0.32em;
    border-radius: 50%;
  }
}

/* --------------------------------------------------------------------------
   accordion — :::accordion, items split on ---, first line = title

   Shape:  <div class="vb-accordion">
             <details class="vb-accordion__item">
               <summary class="vb-accordion__summary">Title</summary>
               <div class="vb-accordion__body">…</div>
             </details>
           </div>
   <details> because it is the one disclosure widget that works with script
   off, is keyboard operable for free, and is reachable by the browser's own
   find-in-page.
   -------------------------------------------------------------------------- */

.vblog .vb-accordion {
  border-top: 1px solid var(--vb-line);
  border-bottom: 1px solid var(--vb-line);
}

.vblog .vb-accordion__item { border-bottom: 1px solid var(--vb-line); }
.vblog .vb-accordion__item:last-child { border-bottom: 0; }

.vblog .vb-accordion__summary {
  /* Both spellings: Safari needs the pseudo-element, everyone else the
     list-style. Neither alone clears the default triangle everywhere. */
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  /* A generous hit area is the whole point of a touch accordion: this is
     3.4rem tall at the smallest step, comfortably past the 44px target. */
  padding: 1.05rem 0.35rem;
  cursor: pointer;
  font-family: var(--vb-display);
  font-size: var(--vb-t-0);
  font-weight: 650;
  letter-spacing: -0.014em;
  color: var(--vb-ink);
  transition: color 0.22s var(--vb-ease);
}

.vblog .vb-accordion__summary::-webkit-details-marker { display: none; }

@media (hover: hover) {
  .vblog .vb-accordion__summary:hover { color: var(--vb-accent); }
}

.vblog .vb-accordion__summary:focus-visible {
  outline: 2px solid var(--vb-focus);
  outline-offset: 2px;
  border-radius: 6px;
}

/* The marker rotates rather than swaps, so open and shut are the same object
   and the row never reflows by a pixel. */
.vblog .vb-accordion__summary::after {
  content: '';
  flex: none;
  width: 0.5em;
  height: 0.5em;
  margin-right: 0.35em;
  border-right: 2px solid var(--vb-accent);
  border-bottom: 2px solid var(--vb-accent);
  transform: translateY(-0.14em) rotate(45deg);
  transition: transform 0.3s var(--vb-ease);
}

.vblog .vb-accordion__item[open] > .vb-accordion__summary::after {
  transform: translateY(0.08em) rotate(225deg);
}

.vblog .vb-accordion__body {
  padding: 0 0.35rem 1.25rem;
  color: var(--vb-mid);
}

@media (prefers-reduced-motion: no-preference) {
  .vblog .vb-accordion__item[open] > .vb-accordion__body {
    animation: vb-unfold 0.32s var(--vb-ease) both;
  }
}

/* Opacity and a small rise only. Animating height needs a measured value and
   therefore a script, and the fade already says "this opened". */
@keyframes vb-unfold {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   tabs — :::tabs, items split on ---, first line = title

   Shape (THE ORDER IS LOAD-BEARING — every radio precedes both the strip and
   the panels, because `:checked ~` only reaches forward across siblings):

     <div class="vb-tabs">
       <input class="vb-tabs__in" type="radio" name="…" id="…" checked>
       <input class="vb-tabs__in" …>
       <div class="vb-tabs__list" role="tablist">
         <label class="vb-tabs__tab" for="…">One</label>
         <label class="vb-tabs__tab" for="…">Two</label>
       </div>
       <div class="vb-tabs__panels">
         <div class="vb-tabs__panel" role="tabpanel">…</div>
         <div class="vb-tabs__panel" role="tabpanel">…</div>
       </div>
     </div>

   The strip is its own element, so nothing has to be reordered with flex
   `order` and the DOM the selectors read is the DOM the reader tabs through.
   Eight tabs are addressed; a ninth simply stays visible, which is the
   failure mode we want.
   -------------------------------------------------------------------------- */

.vblog .vb-tabs { display: block; }

/* Off-screen, not display:none — a hidden input cannot be focused, and the
   keyboard is the whole reason this is a radio group and not a link list. */
.vblog .vb-tabs__in {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.vblog .vb-tabs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  column-gap: 0.4rem;
  border-bottom: 1px solid var(--vb-line);
}

.vblog .vb-tabs__tab {
  position: relative;
  display: block;
  margin-bottom: -1px;
  padding: 0.7rem 0.95rem 0.85rem;
  cursor: pointer;
  font-family: var(--vb-display);
  font-size: var(--vb-t--1);
  font-weight: 650;
  letter-spacing: -0.008em;
  line-height: 1.3;
  color: var(--vb-dim);
  transition: color 0.24s var(--vb-ease);
}

@media (hover: hover) {
  .vblog .vb-tabs__tab:hover { color: var(--vb-ink); }
}

/* The underline is per-label and scales from the centre. A single sliding bar
   would have to know each label's width, which is a script; this reads as the
   same gesture and costs nothing. */
.vblog .vb-tabs__tab::after {
  content: '';
  position: absolute;
  left: 0.35rem;
  right: 0.35rem;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--vb-ir);
  transform: scaleX(0);
  transition: transform 0.34s var(--vb-ease);
}

.vblog .vb-tabs__panels {
  min-width: 0;
  padding-top: clamp(1.1rem, 0.8rem + 1vw, 1.6rem);
  color: var(--vb-mid);
}

.vblog .vb-tabs__panel { min-width: 0; }

/* Panels hide ONLY once a checked radio has been found as a sibling. If a
   future shape moves the inputs, every panel stays visible — a stack instead
   of a tab set, rather than an empty box. */
.vblog .vb-tabs__in:checked ~ .vb-tabs__panels > .vb-tabs__panel { display: none; }

.vblog .vb-tabs__in:nth-of-type(1):checked ~ .vb-tabs__panels > .vb-tabs__panel:nth-child(1),
.vblog .vb-tabs__in:nth-of-type(2):checked ~ .vb-tabs__panels > .vb-tabs__panel:nth-child(2),
.vblog .vb-tabs__in:nth-of-type(3):checked ~ .vb-tabs__panels > .vb-tabs__panel:nth-child(3),
.vblog .vb-tabs__in:nth-of-type(4):checked ~ .vb-tabs__panels > .vb-tabs__panel:nth-child(4),
.vblog .vb-tabs__in:nth-of-type(5):checked ~ .vb-tabs__panels > .vb-tabs__panel:nth-child(5),
.vblog .vb-tabs__in:nth-of-type(6):checked ~ .vb-tabs__panels > .vb-tabs__panel:nth-child(6),
.vblog .vb-tabs__in:nth-of-type(7):checked ~ .vb-tabs__panels > .vb-tabs__panel:nth-child(7),
.vblog .vb-tabs__in:nth-of-type(8):checked ~ .vb-tabs__panels > .vb-tabs__panel:nth-child(8) {
  display: block;
}

.vblog .vb-tabs__in:nth-of-type(1):checked ~ .vb-tabs__list > .vb-tabs__tab:nth-child(1),
.vblog .vb-tabs__in:nth-of-type(2):checked ~ .vb-tabs__list > .vb-tabs__tab:nth-child(2),
.vblog .vb-tabs__in:nth-of-type(3):checked ~ .vb-tabs__list > .vb-tabs__tab:nth-child(3),
.vblog .vb-tabs__in:nth-of-type(4):checked ~ .vb-tabs__list > .vb-tabs__tab:nth-child(4),
.vblog .vb-tabs__in:nth-of-type(5):checked ~ .vb-tabs__list > .vb-tabs__tab:nth-child(5),
.vblog .vb-tabs__in:nth-of-type(6):checked ~ .vb-tabs__list > .vb-tabs__tab:nth-child(6),
.vblog .vb-tabs__in:nth-of-type(7):checked ~ .vb-tabs__list > .vb-tabs__tab:nth-child(7),
.vblog .vb-tabs__in:nth-of-type(8):checked ~ .vb-tabs__list > .vb-tabs__tab:nth-child(8) {
  color: var(--vb-ink);
}

.vblog .vb-tabs__in:nth-of-type(1):checked ~ .vb-tabs__list > .vb-tabs__tab:nth-child(1)::after,
.vblog .vb-tabs__in:nth-of-type(2):checked ~ .vb-tabs__list > .vb-tabs__tab:nth-child(2)::after,
.vblog .vb-tabs__in:nth-of-type(3):checked ~ .vb-tabs__list > .vb-tabs__tab:nth-child(3)::after,
.vblog .vb-tabs__in:nth-of-type(4):checked ~ .vb-tabs__list > .vb-tabs__tab:nth-child(4)::after,
.vblog .vb-tabs__in:nth-of-type(5):checked ~ .vb-tabs__list > .vb-tabs__tab:nth-child(5)::after,
.vblog .vb-tabs__in:nth-of-type(6):checked ~ .vb-tabs__list > .vb-tabs__tab:nth-child(6)::after,
.vblog .vb-tabs__in:nth-of-type(7):checked ~ .vb-tabs__list > .vb-tabs__tab:nth-child(7)::after,
.vblog .vb-tabs__in:nth-of-type(8):checked ~ .vb-tabs__list > .vb-tabs__tab:nth-child(8)::after {
  transform: scaleX(1);
}

/* The focus ring lands on the LABEL, because the input it belongs to is a
   pixel off-screen. Without this the keyboard user moving through the strip
   would see nothing move at all. */
.vblog .vb-tabs__in:nth-of-type(1):focus-visible ~ .vb-tabs__list > .vb-tabs__tab:nth-child(1),
.vblog .vb-tabs__in:nth-of-type(2):focus-visible ~ .vb-tabs__list > .vb-tabs__tab:nth-child(2),
.vblog .vb-tabs__in:nth-of-type(3):focus-visible ~ .vb-tabs__list > .vb-tabs__tab:nth-child(3),
.vblog .vb-tabs__in:nth-of-type(4):focus-visible ~ .vb-tabs__list > .vb-tabs__tab:nth-child(4),
.vblog .vb-tabs__in:nth-of-type(5):focus-visible ~ .vb-tabs__list > .vb-tabs__tab:nth-child(5),
.vblog .vb-tabs__in:nth-of-type(6):focus-visible ~ .vb-tabs__list > .vb-tabs__tab:nth-child(6),
.vblog .vb-tabs__in:nth-of-type(7):focus-visible ~ .vb-tabs__list > .vb-tabs__tab:nth-child(7),
.vblog .vb-tabs__in:nth-of-type(8):focus-visible ~ .vb-tabs__list > .vb-tabs__tab:nth-child(8) {
  outline: 2px solid var(--vb-focus);
  outline-offset: -2px;
  border-radius: 6px;
  color: var(--vb-ink);
}

/* --------------------------------------------------------------------------
   columns — :::columns count=2|3|4 ratio=even|wide-left|wide-right

   Shape:  <div class="vb-columns vb-columns--3 vb-columns--even"
                style="--vb-cols: 3;">
             <div class="vb-columns__col">…</div> …
           </div>

   The count arrives BOTH as a class and as an inline --vb-cols, and the
   inline one always wins the number. So the classes carry what a number
   cannot: the ratio pairs, and how a wall of four steps down as the page
   narrows. Every override below therefore sets grid-template-columns
   directly — setting --vb-cols in a media query would lose to the attribute.
   -------------------------------------------------------------------------- */

.vblog .vb-columns {
  --vb-flow: 0.9em;
  display: grid;
  grid-template-columns: repeat(var(--vb-cols, 2), minmax(0, 1fr));
  gap: clamp(1.2rem, 0.8rem + 1.8vw, 2.4rem);
  align-items: start;
}

.vblog .vb-columns__col { min-width: 0; }

/* even is the default and is stated anyway, so the class is never inert: it
   is what puts equal tracks back if a ratio rule above it ever matched. */
.vblog .vb-columns--even { grid-template-columns: repeat(var(--vb-cols, 2), minmax(0, 1fr)); }

/* The ratio variants. 1.7fr rather than 2fr: at 2fr the narrow column stops
   holding a readable measure once the page is under about 900px. */
.vblog .vb-columns--wide-left.vb-columns--2 { grid-template-columns: 1.7fr minmax(0, 1fr); }
.vblog .vb-columns--wide-right.vb-columns--2 { grid-template-columns: minmax(0, 1fr) 1.7fr; }
.vblog .vb-columns--wide-left.vb-columns--3 { grid-template-columns: 1.8fr minmax(0, 1fr) minmax(0, 1fr); }
.vblog .vb-columns--wide-right.vb-columns--3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 1.8fr; }
.vblog .vb-columns--wide-left.vb-columns--4 { grid-template-columns: 1.8fr repeat(3, minmax(0, 1fr)); }
.vblog .vb-columns--wide-right.vb-columns--4 { grid-template-columns: repeat(3, minmax(0, 1fr)) 1.8fr; }

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

/* One column under the fold point, at two classes so it takes the argument
   with every ratio pair above. */
@media (max-width: 640px) {
  .vblog .vb-columns.vb-columns { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------------------------
   counters — :::counters, items `number | label`

   Shape:  <ul class="vb-counters">
             <li class="vb-counter">
               <span class="vb-counter__num">1,200</span>
               <span class="vb-counter__label">schools</span>
             </li>
           </ul>
   The number is in the markup, finished. A site-side script may roll it up
   from zero; with script blocked the figure is simply already correct.
   -------------------------------------------------------------------------- */

.vblog .vb-counters.vb-counters.vb-counters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: clamp(1.2rem, 0.8rem + 1.6vw, 2.2rem);
}

.vblog .vb-counter { min-width: 0; }

.vblog .vb-counter__num {
  display: block;
  font-family: var(--vb-display);
  font-size: var(--vb-t-3);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
  line-height: 0.9;
  color: var(--vb-ink);
}

/* The ramp inside the numeral, where background-clip can carry it. The colour
   above is the fallback, so an engine without clipped text gets ink rather
   than an invisible figure. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .vblog .vb-counter__num {
    background-image: var(--vb-figure);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.vblog .vb-counter__label {
  display: block;
  margin-top: 0.55em;
  font-family: var(--vb-mono);
  font-size: var(--vb-t--2);
  font-weight: 500;
  letter-spacing: 0.13em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--vb-dim);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   progress — :::progress, items `label | percent`

   Shape:  <ul class="vb-progress">
             <li class="vb-progress__row">
               <span class="vb-progress__label">Uptime</span>
               <span class="vb-progress__value">99%</span>
               <span class="vb-progress__track">
                 <span class="vb-progress__fill" style="--vb-fill: 99.0%"></span>
               </span>
             </li>
           </ul>
   Label, value and track are three SIBLINGS, not a head and a bar, so the row
   is a two-column grid and the track spans it. The percentage is both printed
   as text and written as --vb-fill: the value is never carried by a length
   alone, which is why directives.py can refuse aria-valuenow with a clear
   conscience.
   -------------------------------------------------------------------------- */

.vblog .vb-progress.vb-progress.vb-progress {
  display: grid;
  gap: 1.1rem;
}

.vblog .vb-progress__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 1rem;
  row-gap: 0.5em;
  font-size: var(--vb-t--1);
}

.vblog .vb-progress__label {
  min-width: 0;
  font-weight: 600;
  color: var(--vb-ink);
  text-wrap: pretty;
}

.vblog .vb-progress__value {
  font-family: var(--vb-mono);
  font-variant-numeric: tabular-nums;
  color: var(--vb-dim);
}

.vblog .vb-progress__track {
  grid-column: 1 / -1;
  display: block;
  height: 8px;
  border-radius: 999px;
  background: var(--vb-surface);
  box-shadow: inset 0 0 0 1px var(--vb-line);
  overflow: hidden;
}

.vblog .vb-progress__fill {
  display: block;
  width: var(--vb-fill, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--vb-ir);
  transition: width 0.9s var(--vb-ease);
}

/* A bar that grows is a nice touch and a distraction to anyone who asked for
   less motion. The width is correct either way. */
@media (prefers-reduced-motion: reduce) {
  .vblog .vb-progress__fill { transition: none; }
}

/* --------------------------------------------------------------------------
   testimonial — :::testimonial name= role= image=

   Shape:  <figure class="vb-testimonial">
             <blockquote class="vb-testimonial__quote">…</blockquote>
             <figcaption class="vb-testimonial__by">
               <img class="vb-testimonial__img" alt="">
               <span class="vb-testimonial__name">…</span>
               <span class="vb-testimonial__role">…</span>
             </figcaption>
           </figure>
   The portrait lives INSIDE the caption, so the quote always takes the full
   width of the card and a testimonial with no photo needs no special case.
   -------------------------------------------------------------------------- */

.vblog .vb-testimonial {
  padding: clamp(1.4rem, 1rem + 1.6vw, 2.2rem);
  border: 1px solid var(--vb-line);
  border-radius: var(--vb-radius-lg);
  background: var(--vb-card-bg);
  box-shadow: var(--vb-shadow);
}

/* Not the running blockquote: no rule down the left, because the card is
   already the frame and two frames read as a mistake. */
.vblog .vb-testimonial .vb-testimonial__quote {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: var(--vb-display);
  font-size: var(--vb-t-1);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.014em;
  color: var(--vb-ink);
  text-wrap: pretty;
}

/* Two classes, because a host's `figcaption` rule is one class and one type. */
.vblog .vb-testimonial .vb-testimonial__by {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.75rem;
  margin-top: 1.3rem;
  font-size: var(--vb-t--1);
  color: var(--vb-mid);
}

.vblog .vb-testimonial__img {
  --vb-img-r: 50%;
  --vb-img-m: 0;
  flex: none;
  width: 3rem;
  /* aspect-ratio rather than a height, because a host's `img { height: auto }`
     outweighs anything reasonable here and squares the portrait for free. */
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--vb-surface);
}

@supports not (aspect-ratio: 1) {
  .vblog .vb-testimonial .vb-testimonial__img { height: 3rem; }
}

.vblog .vb-testimonial__name { font-weight: 650; color: var(--vb-ink); }

/* The role sits on its own line under the name when both are present and the
   card is narrow, which is why the gap above has a row value. */
.vblog .vb-testimonial__role {
  font-family: var(--vb-mono);
  font-size: var(--vb-t--2);
  letter-spacing: 0.06em;
  color: var(--vb-dim);
}

/* --------------------------------------------------------------------------
   profile — :::profile name= role= image= link=

   Shape:  <div class="vb-profile">
             <img class="vb-profile__img" alt="">
             <div class="vb-profile__body">
               <p class="vb-profile__name"><a class="vb-profile__link">…</a></p>
               <p class="vb-profile__role">…</p>
               <div class="vb-profile__bio">…</div>
             </div>
           </div>
   THE LINK IS THE NAME, not a call to action underneath one — so it is dressed
   as a heading that happens to be clickable, with the underline arriving on
   hover rather than an arrow that would sit mid-sentence.
   -------------------------------------------------------------------------- */

.vblog .vb-profile {
  display: grid;
  grid-template-columns: minmax(0, 9rem) minmax(0, 1fr);
  gap: clamp(1rem, 0.7rem + 1.4vw, 1.75rem);
  align-items: start;
  color: var(--vb-mid);
}

/* No portrait: the body takes the whole width rather than leaving a hole. */
.vblog .vb-profile > .vb-profile__body:first-child { grid-column: 1 / -1; }

.vblog .vb-profile__img {
  --vb-img-r: var(--vb-radius-lg);
  --vb-img-m: 0;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--vb-surface);
  box-shadow: var(--vb-shadow);
}

@supports not (aspect-ratio: 1) {
  .vblog .vb-profile .vb-profile__img { height: 9rem; }
}

.vblog .vb-profile__body { min-width: 0; }

.vblog .vb-profile__name {
  font-family: var(--vb-display);
  font-size: var(--vb-t-1);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.2;
  color: var(--vb-ink);
  --vb-flow: 0.35em;
}

.vblog .vb-profile__link.vb-profile__link.vb-profile__link {
  color: inherit;
  text-decoration: none;
  text-decoration-color: var(--vb-accent);
  text-underline-offset: 0.14em;
}

@media (hover: hover) {
  .vblog .vb-profile__link.vb-profile__link.vb-profile__link:hover {
    color: var(--vb-accent);
    text-decoration: underline;
  }
}

.vblog .vb-profile__link.vb-profile__link.vb-profile__link:focus-visible {
  outline: 2px solid var(--vb-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.vblog .vb-profile__role {
  font-family: var(--vb-mono);
  font-size: var(--vb-t--2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vb-accent);
  --vb-flow: 0.8em;
}

.vblog .vb-profile__bio { color: var(--vb-mid); }

@media (max-width: 520px) {
  .vblog .vb-profile { grid-template-columns: minmax(0, 1fr); }
  .vblog .vb-profile__img { width: 8rem; }
}

/* --------------------------------------------------------------------------
   pricing — :::pricing, items split on ---, a `*featured*` line marks one

   Shape:  <div class="vb-pricing">
             <div class="vb-pricing__plan vb-pricing__plan--featured">
               <p class="vb-pricing__name">…</p>
               <p class="vb-pricing__price">
                 <span class="vb-pricing__amount">₹9,999</span>
                 <span class="vb-pricing__period">/month</span>
               </p>
               <ul class="vb-pricing__features">
                 <li class="vb-pricing__feature">…</li>
               </ul>
             </div>
           </div>
   -------------------------------------------------------------------------- */

.vblog .vb-pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: clamp(1rem, 0.7rem + 1.4vw, 1.6rem);
  align-items: stretch;
}

.vblog .vb-pricing__plan {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(1.3rem, 1rem + 1.4vw, 2rem);
  border: 1px solid var(--vb-line);
  border-radius: var(--vb-radius-lg);
  background: var(--vb-card-bg);
  box-shadow: var(--vb-shadow);
}

.vblog .vb-pricing__name {
  font-family: var(--vb-mono);
  font-size: var(--vb-t--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vb-dim);
  --vb-flow: 0.6em;
}

.vblog .vb-pricing__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35em;
  --vb-flow: 0;
}

/* The price stays TEXT in the renderer — "Free" and "Talk to us" are as
   legitimate as a number — so the display face has to look right holding a
   word as well as a figure. */
.vblog .vb-pricing__amount {
  font-family: var(--vb-display);
  font-size: var(--vb-t-2);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--vb-ink);
  text-wrap: balance;
}

.vblog .vb-pricing__period {
  font-family: var(--vb-mono);
  font-size: var(--vb-t--1);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--vb-dim);
}

.vblog .vb-pricing__features {
  --vb-list-pad: 0;
  --vb-flow-top: 1.3rem;
  list-style: none;
  padding-top: 1.3rem;
  border-top: 1px solid var(--vb-line);
  display: grid;
  gap: 0.5em;
  font-size: var(--vb-t--1);
  color: var(--vb-mid);
}

.vblog .vb-pricing__feature {
  position: relative;
  padding-left: 1.5em;
  text-wrap: pretty;
}

.vblog .vb-pricing__feature::before {
  content: '';
  position: absolute;
  left: 0.1em;
  top: 0.45em;
  width: 0.3em;
  height: 0.55em;
  border-right: 2px solid var(--vb-accent);
  border-bottom: 2px solid var(--vb-accent);
  transform: rotate(42deg);
}

/* The featured plan is lifted, ringed in the accent and given the ramp along
   its top edge. Lifted by a translate rather than by a larger type size, so
   the plans still line their prices up with one another. */
.vblog .vb-pricing__plan--featured {
  position: relative;
  border-color: transparent;
  box-shadow: var(--vb-shadow-lift), inset 0 0 0 2px var(--vb-accent);
}

.vblog .vb-pricing__plan--featured::before {
  content: '';
  position: absolute;
  left: 12%;
  right: 12%;
  top: 0;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--vb-ir);
}

@media (min-width: 641px) and (prefers-reduced-motion: no-preference) {
  .vblog .vb-pricing__plan--featured { transform: translateY(-0.6rem); }
}

/* --------------------------------------------------------------------------
   flip — :::flip front= back_title= image=

   Shape:  <details class="vb-flip">
             <summary class="vb-flip__front">
               <img class="vb-flip__img" alt="">
               <span class="vb-flip__title">Front</span>
             </summary>
             <div class="vb-flip__back">
               <p class="vb-flip__back-title">…</p> …markdown…
             </div>
           </details>

   A DISCLOSURE, NOT A 3D TURN. directives.py chose <details> deliberately: a
   tabbable div with no role announces nothing, and on a touch screen there is
   no hover to give the back face at all. So the card is dressed as a card and
   the turn becomes the thing it should always have been — decoration on
   [open], gated behind reduced-motion, with the content present either way.
   -------------------------------------------------------------------------- */

.vblog .vb-flip {
  border: 1px solid var(--vb-line);
  border-radius: var(--vb-radius-lg);
  background: var(--vb-card-bg);
  box-shadow: var(--vb-shadow);
  overflow: hidden;
  transition: box-shadow 0.4s var(--vb-ease);
}

.vblog .vb-flip[open] { box-shadow: var(--vb-shadow-lift); }

.vblog .vb-flip__front {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 0.7rem + 0.8vw, 1.3rem);
  /* 44px-plus even with no picture. */
  padding: clamp(1rem, 0.8rem + 0.9vw, 1.4rem);
  cursor: pointer;
  color: var(--vb-ink);
}

.vblog .vb-flip__front::-webkit-details-marker { display: none; }

.vblog .vb-flip__front:focus-visible {
  outline: 2px solid var(--vb-focus);
  outline-offset: -3px;
  border-radius: var(--vb-radius-lg);
}

.vblog .vb-flip__img {
  --vb-img-r: var(--vb-radius);
  --vb-img-m: 0;
  flex: none;
  width: clamp(3.5rem, 3rem + 2vw, 5rem);
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--vb-surface);
}

@supports not (aspect-ratio: 1) {
  .vblog .vb-flip .vb-flip__img { height: 4rem; }
}

.vblog .vb-flip__title {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--vb-display);
  font-size: var(--vb-t-1);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--vb-ink);
  text-wrap: pretty;
}

/* The same marker the accordion uses, so two disclosures on one page are one
   idiom rather than two. */
.vblog .vb-flip__front::after {
  content: '';
  flex: none;
  width: 0.5em;
  height: 0.5em;
  border-right: 2px solid var(--vb-accent);
  border-bottom: 2px solid var(--vb-accent);
  transform: translateY(-0.14em) rotate(45deg);
  transition: transform 0.3s var(--vb-ease);
}

.vblog .vb-flip[open] > .vb-flip__front::after {
  transform: translateY(0.08em) rotate(225deg);
}

.vblog .vb-flip__back {
  padding: 0 clamp(1rem, 0.8rem + 0.9vw, 1.4rem) clamp(1.1rem, 0.9rem + 1vw, 1.6rem);
  border-top: 1px solid var(--vb-line);
  padding-top: clamp(1.1rem, 0.9rem + 1vw, 1.6rem);
  color: var(--vb-mid);
}

.vblog .vb-flip__back-title {
  font-family: var(--vb-display);
  font-size: var(--vb-t-1);
  font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--vb-ink);
  --vb-flow: 0.4em;
}

@media (prefers-reduced-motion: no-preference) {
  .vblog .vb-flip[open] > .vb-flip__back { animation: vb-unfold 0.34s var(--vb-ease) both; }
}

/* --------------------------------------------------------------------------
   compare — :::compare before= after= before_label= after_label=

   Shape:  <figure class="vb-compare">
             <div class="vb-compare__stage" style="--vb-pos: 50%">
               <span class="vb-compare__before"><img class="vb-compare__img"></span>
               <span class="vb-compare__after"><img class="vb-compare__img"></span>
               <input class="vb-compare__range" type="range" min="0" max="100" value="50">
             </div>
             <figcaption class="vb-compare__labels">
               <span class="vb-compare__label">Before</span>
               <span class="vb-compare__label">After</span>
             </figcaption>
           </figure>

   THE TRADE-OFF, stated plainly: CSS cannot read a range input's value, so
   the reveal follows --vb-pos, which the SERVER writes on the stage. Nothing
   in this engine mirrors the slider into it — motion.js never touches
   --vb-pos — and an inert handle a reader can drag with no effect is worse
   than no handle at all, so the range is not shown. What the reader gets is
   the composed comparison at the author's split with both labels printed
   underneath: legible, correct, and never dependent on a script. A future
   site script that writes --vb-pos need only un-hide one selector below.
   -------------------------------------------------------------------------- */

.vblog .vb-compare {
  --vb-img-r: 0;
  --vb-img-m: 0;
}

.vblog .vb-compare__stage {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--vb-radius-lg);
  background: var(--vb-surface);
  box-shadow: var(--vb-shadow);
  line-height: 0;
}

.vblog .vb-compare__before,
.vblog .vb-compare__after { display: block; }

.vblog .vb-compare__img {
  display: block;
  width: 100%;
  height: auto;
}

.vblog .vb-compare__after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--vb-pos, 50%));
}

.vblog .vb-compare__after .vb-compare__img {
  height: 100%;
  object-fit: cover;
}

/* The seam is drawn on the STAGE, not inside the clipped half, or the clip
   would eat the left-hand pixel of its own divider. */
.vblog .vb-compare__stage::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--vb-pos, 50%);
  width: 2px;
  margin-left: -1px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(6, 10, 22, 0.28);
  pointer-events: none;
}

/* Without clip-path the two images would simply stack; showing the second one
   whole, with its label, is the honest degradation. */
@supports not (clip-path: inset(0 0 0 50%)) {
  .vblog .vb-compare__after { position: static; }
  .vblog .vb-compare__stage::after { display: none; }
}

.vblog .vb-compare__range { display: none; }

.vblog .vb-compare .vb-compare__labels {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75em;
  color: var(--vb-dim);
}

.vblog .vb-compare__label {
  font-family: var(--vb-mono);
  font-size: var(--vb-t--2);
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   video — :::video url= title=

   Shape:  <div class="vb-video">
             <iframe class="vb-video__frame" src="…youtube-nocookie…"></iframe>
           </div>
   and, for an address we do not embed:
           <p class="vb-video-link"><a href="…">Title</a></p>

   The frame reserves its box before the iframe loads, so nothing on the page
   moves when the player arrives; the ground underneath is a designed panel
   rather than a white hole for the second it is visible.
   -------------------------------------------------------------------------- */

.vblog .vb-video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--vb-radius-lg);
  overflow: hidden;
  background:
    radial-gradient(70% 90% at 80% 0%, rgba(77, 124, 255, 0.35), transparent 62%),
    radial-gradient(60% 80% at 10% 100%, rgba(139, 92, 246, 0.32), transparent 64%),
    #0a1024;
  box-shadow: var(--vb-shadow);
}

@supports not (aspect-ratio: 16 / 9) {
  .vblog .vb-video { height: 0; padding-top: 56.25%; }
}

.vblog .vb-video__frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.vblog .vb-video__frame:focus-visible {
  outline: 2px solid var(--vb-focus);
  outline-offset: -2px;
}

/* The un-embeddable address. A plain link would read as a stray sentence, so
   it is dressed as what it is — a way out to the video — with the play mark
   drawn from three borders rather than a glyph or an image. */
.vblog .vb-video-link.vb-video-link.vb-video-link > a {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.8em 1.3em 0.8em 1em;
  min-height: 2.75rem;
  border: 1px solid var(--vb-line-strong);
  border-radius: 999px;
  background: var(--vb-surface);
  color: var(--vb-ink);
  font-family: var(--vb-display);
  font-size: var(--vb-t-0);
  font-weight: 650;
  letter-spacing: -0.012em;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color 0.24s var(--vb-ease), color 0.24s var(--vb-ease);
}

.vblog .vb-video-link > a::before {
  content: '';
  flex: none;
  border-style: solid;
  border-width: 0.4em 0 0.4em 0.66em;
  border-color: transparent transparent transparent var(--vb-accent);
}

@media (hover: hover) {
  .vblog .vb-video-link.vb-video-link.vb-video-link > a:hover {
    border-color: var(--vb-accent);
    color: var(--vb-accent);
  }
}

.vblog .vb-video-link.vb-video-link.vb-video-link > a:focus-visible {
  outline: 2px solid var(--vb-focus);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   gallery — :::gallery layout=grid|carousel columns=1..6

   Shape:  <ul class="vb-gallery vb-gallery--grid vb-gallery--c3"
                style="--vb-cols: 3;">
             <li class="vb-gallery__item">
               <figure class="vb-gallery__fig">
                 <img class="vb-gallery__img">
                 <figcaption class="vb-gallery__cap">…</figcaption>
               </figure>
             </li>
           </ul>
   As with columns, the count is inline AND a class; the class is what carries
   the step-down, because a media query cannot outrank a style attribute.
   -------------------------------------------------------------------------- */

.vblog .vb-gallery {
  --vb-img-m: 0;
  display: grid;
  grid-template-columns: repeat(var(--vb-cols, 3), minmax(0, 1fr));
  gap: clamp(0.7rem, 0.5rem + 0.9vw, 1.1rem);
}

/* Stated as well as defaulted: `grid` is a choice the writer made, and the
   carousel rule below has to be able to take the argument back off it. */
.vblog .vb-gallery--grid {
  display: grid;
  grid-template-columns: repeat(var(--vb-cols, 3), minmax(0, 1fr));
}

.vblog .vb-gallery__item { min-width: 0; }

.vblog .vb-gallery__fig { margin: 0; }

.vblog .vb-gallery__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--vb-surface);
}

@supports not (aspect-ratio: 4 / 3) {
  .vblog .vb-gallery .vb-gallery__img { max-height: 16rem; }
}

.vblog .vb-gallery .vb-gallery__cap {
  margin-top: 0.5em;
  font-size: var(--vb-t--2);
  line-height: 1.5;
  color: var(--vb-dim);
  text-wrap: pretty;
}

/* The carousel: scroll-snap, so it is a native, momentum-scrolling,
   keyboard-scrollable strip with no script and no interception of the
   reader's own gestures. directives.py gives it tabindex="0" and a label; the
   focus ring below is what makes that visible. */
.vblog .vb-gallery--carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0.25rem;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.9rem;
  /* Thin and tinted, never `display: none`. A scrollbar removed is a mouse
     user who cannot tell there is more to the right. */
  scrollbar-width: thin;
  scrollbar-color: var(--vb-line-strong) transparent;
}

.vblog .vb-gallery--carousel::-webkit-scrollbar { height: 6px; }
.vblog .vb-gallery--carousel::-webkit-scrollbar-track { background: transparent; }
.vblog .vb-gallery--carousel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--vb-line-strong);
}

.vblog .vb-gallery--carousel:focus-visible {
  outline: 2px solid var(--vb-focus);
  outline-offset: 3px;
  border-radius: 6px;
}

/* One slide is a share of the strip, so `columns=2` is a two-up carousel and
   `columns=5` is a filmstrip — the same number meaning the same thing in both
   layouts. Capped at 22rem so a wide desktop does not show one vast slide. */
.vblog .vb-gallery--carousel > .vb-gallery__item {
  flex: 0 0 min(78%, calc((100% - (var(--vb-cols, 3) - 1) * 1.1rem) / var(--vb-cols, 3)), 22rem);
  scroll-snap-align: center;
}

.vblog .vb-gallery--carousel .vb-gallery__img { aspect-ratio: 3 / 2; }

/* The step-down. Written against the count classes and as
   grid-template-columns, because --vb-cols arrives in a style attribute and
   no rule here can outrank one. */
@media (max-width: 900px) {
  .vblog .vb-gallery--grid.vb-gallery--c4,
  .vblog .vb-gallery--grid.vb-gallery--c5,
  .vblog .vb-gallery--grid.vb-gallery--c6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  /* A phone has room for one slide and the edge of the next, whatever the
     writer asked for: a five-up filmstrip at 390px is five thumbnails. */
  .vblog .vb-gallery--carousel > .vb-gallery__item { flex-basis: min(80%, 22rem); }

  .vblog .vb-gallery--grid.vb-gallery--c1 { grid-template-columns: minmax(0, 1fr); }

  .vblog .vb-gallery--grid.vb-gallery--c2,
  .vblog .vb-gallery--grid.vb-gallery--c3,
  .vblog .vb-gallery--grid.vb-gallery--c4,
  .vblog .vb-gallery--grid.vb-gallery--c5,
  .vblog .vb-gallery--grid.vb-gallery--c6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   divider-fancy — :::divider-fancy style=line|dots|gradient|arrow

   Shape:  <hr class="vb-divider vb-divider--dots">
   A host's `hr` rule already owns border-top and margin, hence the repetition.
   -------------------------------------------------------------------------- */

.vblog .vb-divider.vb-divider.vb-divider {
  position: relative;
  height: 1px;
  border: 0;
  /* Every browser's UA sheet gives <hr> `overflow: hidden`, and a 1px box
     that clips would eat the arrow's mark whole. Stated once, here. */
  overflow: visible;
  margin-block: clamp(2.4rem, 1.8rem + 2.4vw, 4rem);
  background: linear-gradient(90deg, transparent, var(--vb-line-strong) 22%, var(--vb-line-strong) 78%, transparent);
}

/* `line` is the default and is stated, so the class is never inert. */
.vblog .vb-divider--line.vb-divider--line.vb-divider--line {
  background: linear-gradient(90deg, transparent, var(--vb-line-strong) 22%, var(--vb-line-strong) 78%, transparent);
}

/* Three dots, drawn as one repeating background on a short centred bar. No
   pseudo-element, so it holds on an <hr> in every engine. */
.vblog .vb-divider--dots.vb-divider--dots.vb-divider--dots {
  width: 3.4rem;
  height: 6px;
  margin-inline: auto;
  background-color: transparent;
  background-image: radial-gradient(circle at 3px 3px, var(--vb-accent) 2.4px, transparent 2.6px);
  background-size: 1.15rem 6px;
  background-repeat: repeat-x;
  opacity: 0.85;
}

.vblog .vb-divider--gradient.vb-divider--gradient.vb-divider--gradient {
  height: 2px;
  border-radius: 2px;
  background: var(--vb-ir);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

/* The rule is drawn as two segments with a gap in the middle rather than one
   line with the ground painted back over it: a knockout would have to know
   the colour behind the divider, and in include mode the host owns that. */
.vblog .vb-divider--arrow.vb-divider--arrow.vb-divider--arrow {
  /* Tall enough to hold the mark, with the two segments drawn as 1px bands on
     the centre line — so the rule still reads as a rule and the chevron has
     somewhere to sit rather than hanging off a hairline. */
  height: 0.9rem;
  background:
    linear-gradient(90deg, transparent, var(--vb-line-strong) 45%) left center / calc(50% - 1.1rem) 1px no-repeat,
    linear-gradient(90deg, var(--vb-line-strong) 55%, transparent) right center / calc(50% - 1.1rem) 1px no-repeat;
}

.vblog .vb-divider--arrow::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--vb-accent);
  border-bottom: 2px solid var(--vb-accent);
  transform: translate(-50%, -68%) rotate(45deg);
}

/* --------------------------------------------------------------------------
   Inline — ==highlight== and the @@ drop cap
   -------------------------------------------------------------------------- */

/* A marker stroke behind the words rather than a filled block: the text keeps
   the page's own ink and therefore its own contrast ratio, which a tinted
   block would put at the mercy of whatever hue the highlight happens to be. */
.vblog .vb-mark,
.vblog mark {
  padding: 0 0.14em;
  border-radius: 3px;
  background: linear-gradient(180deg, transparent 58%, var(--vb-mark) 58%, var(--vb-mark) 92%, transparent 92%);
  color: inherit;
}

.vblog .vb-dropcap.vb-dropcap.vb-dropcap::first-letter {
  float: left;
  margin: 0.06em 0.1em 0 0;
  font-family: var(--vb-display);
  font-size: 3.4em;
  font-weight: 800;
  line-height: 0.78;
  letter-spacing: -0.04em;
  color: var(--vb-accent);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .vblog .vb-dropcap.vb-dropcap.vb-dropcap::first-letter {
    background-image: var(--vb-ir);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* Below about 420px a four-line drop cap eats the measure. */
@media (max-width: 420px) {
  .vblog .vb-dropcap.vb-dropcap.vb-dropcap::first-letter { font-size: 2.7em; }
}

/* --------------------------------------------------------------------------
   Forced colours

   A system palette has no opinion about a tint, a ramp or a mask, and repaints
   every one of them as the same flat pair. What must survive is structure: a
   card still has an edge, a marker is still there, a bar still has a length.
   -------------------------------------------------------------------------- */

@media (forced-colors: active) {
  .vblog .vb-callout,
  .vblog .vb-testimonial,
  .vblog .vb-pricing__plan,
  .vblog .vb-flip,
  .vblog .vb-video,
  .vblog .vb-progress__track,
  .vblog .vb-compare__stage {
    border: 1px solid CanvasText;
  }

  .vblog .vb-progress__fill,
  .vblog .vb-tabs__tab::after,
  .vblog .vb-pricing__plan--featured::before,
  .vblog .vb-divider.vb-divider.vb-divider {
    background: CanvasText;
    forced-color-adjust: none;
  }

  .vblog .vb-callout--icon-check::before,
  .vblog .vb-callout--icon-arrow::before,
  .vblog .vb-callout--icon-star::before,
  .vblog .vb-callout--icon-dot::before,
  .vblog .vb-callout--icon-info::before,
  .vblog .vb-callout--icon-warn::before,
  .vblog .vb-checklist__item::after,
  .vblog .vb-video-link > a::before { background: CanvasText; }

  .vblog .vb-notice.vb-notice.vb-notice { box-shadow: none; border: 1px solid CanvasText; }
}

/* --------------------------------------------------------------------------
   Print

   Paper has no hover, no scroll and no colour budget. Every element either
   flattens to its content or gets out of the way; nothing prints as an empty
   frame where an interaction used to be.
   -------------------------------------------------------------------------- */

@media print {
  .vblog .vb-callout,
  .vblog .vb-testimonial,
  .vblog .vb-profile,
  .vblog .vb-pricing__plan,
  .vblog .vb-flip,
  .vblog .vb-counter,
  .vblog .vb-gallery__item,
  .vblog .vb-accordion__item {
    break-inside: avoid;
    box-shadow: none;
  }

  /* Gradients print as grey slabs. An outlined button with black text says
     the same thing and spends no ink. */
  .vblog .vb-btn.vb-btn.vb-btn,
  .vblog .vb-video-link.vb-video-link.vb-video-link > a {
    background: none;
    color: #000;
    border: 1px solid #000;
    box-shadow: none;
    transform: none;
  }

  /* A link is useless on paper unless the destination is on the paper. */
  .vblog .vb-btn::after,
  .vblog .vb-video-link > a::after {
    content: ' (' attr(href) ')';
    border: 0;
    transform: none;
    font-size: 0.8em;
    word-break: break-all;
  }

  .vblog .vb-video-link > a::before { display: none; }

  /* Tabs print as a document: every panel, with its own label above it. */
  .vblog .vb-tabs__in { display: none; }
  .vblog .vb-tabs__list { display: none; }
  .vblog .vb-tabs__panels { padding-top: 0; border-top: 0; }
  .vblog .vb-tabs__in:checked ~ .vb-tabs__panels > .vb-tabs__panel { display: block; }

  /* An iframe prints as a grey box on most engines and as nothing on the
     rest. The title is in the markup, so the frame is replaced by its own
     address rather than by a hole. */
  .vblog .vb-video {
    aspect-ratio: auto;
    height: auto;
    padding-top: 0;
    background: none;
    border: 1px solid #999;
    box-shadow: none;
  }

  .vblog .vb-video__frame { position: static; height: 6rem; }

  /* Best effort on a closed <details>: engines disagree about whether a shut
     disclosure can be forced open from CSS, so this reveals the body where it
     can and leaves the summary readable where it cannot. */
  .vblog .vb-accordion__item:not([open]) > .vb-accordion__body,
  .vblog .vb-flip:not([open]) > .vb-flip__back { display: block; }

  .vblog .vb-accordion__item::details-content,
  .vblog .vb-flip::details-content { content-visibility: visible; }

  .vblog .vb-accordion__summary::after,
  .vblog .vb-flip__front::after { display: none; }

  .vblog .vb-flip[open] > .vb-flip__back { animation: none; }

  /* The comparison is two pictures on paper, with their labels. */
  .vblog .vb-compare__after { position: static; clip-path: none; }
  .vblog .vb-compare__stage::after { display: none; }
  .vblog .vb-compare__stage { box-shadow: none; border: 1px solid #999; }

  .vblog .vb-gallery--carousel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    padding-bottom: 0;
  }

  .vblog .vb-gallery--carousel > .vb-gallery__item { flex: none; }

  .vblog .vb-pricing__plan--featured { transform: none; }

  .vblog .vb-progress__track { box-shadow: inset 0 0 0 1px #999; }
  .vblog .vb-progress__fill { background: #555; }

  .vblog .vb-counter__num {
    background-image: none;
    -webkit-text-fill-color: #000;
    color: #000;
  }
}
