:root {
  --component-button-height: 3rem;
  --component-button-radius: 12px;
  --component-pill-radius: 999px;
  --component-card-content-padding: 1.1rem;
  --component-card-action-height: 2.8rem;
  --component-card-action-radius: 12px;
  --component-card-media-ratio: 16 / 10;
  --component-input-radius: 12px;
  --component-card-radius: 16px;
  --component-window-shadow: 0 20px 44px -20px rgba(10, 19, 27, 0.45);
  --component-focus-width: 3px;
  --component-motion: 160ms ease;
}

.vn-card-media {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
}

.vn-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.vn-card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--card-grid-gap, 1rem);
}

.vn-card-grid > * {
  min-width: 0;
}

/* Every button in an action group is as wide as the others. Two or four
   sit two to a row. Three, five or six sit three to a row when the group
   is wide enough for their labels on one line, with a short last row
   centred; otherwise an odd count stacks one per row. No button is ever stretched past its neighbours. */
.vn-action-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--action-grid-gap, 0.55rem);
  container: vn-actions / inline-size;
}

.vn-action-grid > * {
  min-width: 0;
  grid-column: span 3;
  white-space: normal;
  overflow-wrap: break-word;
}

.vn-action-grid > :only-child,
.vn-action-grid:has(> :last-child:nth-child(odd)) > * {
  grid-column: 1 / -1;
}

:is(.sb-actions, .mm-actions, .qz-actions).vn-action-grid {
  width: min(100%, 34rem);
}

@container vn-actions (min-width: 40rem) {
  .vn-action-grid:has(> :last-child:nth-child(odd)) > :not(:only-child),
  .vn-action-grid:has(> :nth-child(6):last-child) > * {
    grid-column: span 2;
  }

  .vn-action-grid:has(> :last-child:nth-child(6n + 5)) > :nth-last-child(2) {
    grid-column: 2 / span 2;
  }

  .vn-action-grid:has(> :last-child:nth-child(6n + 7)) > :last-child {
    grid-column: 3 / span 2;
  }
}

/* Leave room for complete button labels. The first action fills any spare
   tracks so the shorter row still lines up with the full rows. */
.app-directory-item .app-links.vn-action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.375rem;
}

.app-directory-item .app-links.vn-action-grid > a.app-action {
  grid-column: auto;
  padding: 0.25rem;
}

@container card-actions (11rem <= width < 18rem) {
  .app-directory-item .app-links.vn-action-grid:has(> :last-child:nth-child(odd)) > :first-child {
    grid-column: span 2;
  }
}

@container card-actions (min-width: 18rem) {
  .app-directory-item .app-links.vn-action-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-directory-item .app-links.vn-action-grid:has(> :last-child:nth-child(3n + 1)) > :first-child {
    grid-column: span 3;
  }

  .app-directory-item .app-links.vn-action-grid:has(> :last-child:nth-child(3n + 2)) > :first-child {
    grid-column: span 2;
  }
}

@container card-actions (width < 11rem) {
  .app-directory-item .app-links.vn-action-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.app-directory-preview {
  display: grid;
  flex: none;
  aspect-ratio: var(--component-card-media-ratio);
  place-items: center;
  background: linear-gradient(145deg, #35445a, #192536);
  background: radial-gradient(ellipse at 42% 15%, color-mix(in srgb, var(--app-bg) 42%, #202c3f), transparent 85%), linear-gradient(145deg, #2b384c, #172230);
  padding: 3.4% 5.5%;
}

.app-directory-preview picture {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--component-card-media-ratio);
  filter: drop-shadow(0 12px 16px #0c152968);
}

@supports not (aspect-ratio: 1) {
  .app-directory-preview picture::before {
    display: block;
    padding-top: 62.5%;
    content: "";
  }
}

/* Card pictures are the app window alone at 16:10, built by
   scripts/build-card-previews.js, so every frame draws the same window. */
.app-directory-preview img {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 0 1px #ffffff1f;
}

.app-directory-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.75rem;
  container: card-actions / inline-size;
}

.app-directory-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.app-directory-title .product-icon {
  width: 36px;
  height: 36px;
}

/* Apps without an icon of their own get a tile the size of the app icons. */
.app-directory-title .product-icon-glyph {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  color: #8ff0c9;
  font: 700 0.8rem/1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: -0.04em;
}

.app-directory-title .product-icon-glyph::before {
  position: absolute;
  z-index: -1;
  inset: 1px;
  border-radius: 8px;
  background: linear-gradient(160deg, #2c3a52, #141c2b);
  box-shadow: inset 0 0 0 1px #ffffff1a;
  content: "";
}

:is(.rune-product-page, .inkline-deck-page, .qz-page) main :is(section, article)[id] {
  scroll-margin-top: 4.75rem;
}

html:not(.deck-ready):has([data-vn-deck]) {
  scroll-behavior: auto;
}

.vn-feature-slide-controls:not([hidden]) {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin: 1.8rem 0 0.8rem;
}

.vn-feature-slide-track {
  position: relative;
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.vn-feature-slide-track:focus-visible,
.vn-gallery-track:focus-visible {
  outline: 2px solid var(--feature-accent, #315f9d);
  outline-offset: 3px;
}

.vn-feature-slide {
  display: grid;
  flex: 0 0 100%;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4.5rem);
  min-width: 0;
  min-height: 470px;
  padding: clamp(1.5rem, 4vw, 4rem);
  scroll-snap-align: start;
}

.vn-feature-slide-copy h3 {
  max-width: 690px;
  margin: 0;
  font-size: clamp(1.9rem, 3.3vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.vn-feature-slide-copy > p:not(.vn-feature-slide-label) {
  max-width: 630px;
  color: var(--feature-muted);
  font-size: 1.05rem;
}

.vn-feature-slide-image {
  min-width: 0;
  margin: 0;
}

.vn-feature-slide-image picture {
  display: block;
  filter: drop-shadow(0 10px 16px rgba(10, 19, 27, 0.2));
}

.vn-feature-slide-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--component-button-radius);
}

.vn-feature-slide-image figcaption {
  margin-top: 0.65rem;
  color: var(--feature-muted);
  font-size: 0.8rem;
  text-align: right;
}

.vn-feature-slide-image figcaption a {
  color: var(--feature-accent);
  font-weight: 700;
}

@media (max-width: 850px) {
  .vn-feature-slide {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  html:has(.vn-feature-slide-track) {
    scroll-behavior: auto;
  }

  .vn-feature-slide-track {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
    gap: 1rem;
    scroll-snap-type: none;
  }

  .vn-feature-slide {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    padding-inline: 0;
  }

  .vn-feature-slide-controls:not([hidden]) {
    display: none;
  }
}

@media (max-width: 540px) {
  .vn-feature-slide {
    padding-block: 1.25rem;
  }

  .vn-feature-slide-copy h3 {
    font-size: 1.8rem;
  }

  .vn-feature-slide-copy > p:not(.vn-feature-slide-label) {
    font-size: 0.98rem;
  }
}

.vn-policy-page {
  --policy-ink: #17243a;
  --policy-muted: #526179;
  --policy-line: #dce3ed;
  --policy-accent: #315f9d;
  margin: 0;
  color-scheme: light;
  color: var(--policy-ink);
  background: linear-gradient(#fff, #f5f7fa);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

.vn-policy-page[data-theme="inkline"],
.vn-policy-page[data-theme="teamscribe"] {
  --policy-accent: #6341a0;
}

.vn-policy-page[data-theme="mymole"],
.vn-policy-page[data-theme="rune"] {
  --policy-accent: #0f6f6b;
}

.vn-policy-page[data-theme="storebench"] {
  --policy-accent: #246044;
}

.vn-policy-page[data-theme="quikzip"] {
  --policy-accent: #954a12;
}

.vn-policy-page *,
.vn-policy-page *::before,
.vn-policy-page *::after {
  box-sizing: border-box;
}

.vn-policy,
.vn-policy-footer > div {
  width: min(880px, calc(100% - 2rem));
  margin-inline: auto;
  overflow-wrap: anywhere;
}

.vn-policy {
  padding-block: clamp(2.5rem, 7vw, 5rem);
}

.vn-policy-skip {
  position: absolute;
  z-index: 20;
  inset: -10rem auto auto 1rem;
  padding: 0.6rem 1rem;
  border-radius: var(--component-button-radius);
  background: #fff;
  color: var(--policy-accent);
}

.vn-policy-skip:focus {
  top: 1rem;
}

.vn-policy-label {
  margin: 0 0 0.65rem;
  color: var(--policy-accent);
  font-size: 0.8rem;
  font-weight: 760;
  text-transform: uppercase;
}

.vn-policy h1 {
  max-width: 24ch;
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 4.5rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.vn-policy-intro {
  margin: 1.2rem 0 0;
  color: var(--policy-muted);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.vn-policy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.vn-policy-meta span {
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--policy-line);
  border-radius: var(--component-pill-radius);
  background: #fff;
  color: var(--policy-muted);
  font-size: 0.875rem;
  font-weight: 650;
}

.vn-policy > section {
  margin-top: 1rem;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  border: 1px solid var(--policy-line);
  border-radius: var(--component-card-radius);
  background: #fff;
}

.vn-policy > section:first-of-type {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}

.vn-policy h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.vn-policy section p {
  margin: 0.7rem 0 0;
  color: var(--policy-muted);
}

.vn-policy strong {
  color: var(--policy-ink);
}

.vn-policy code {
  padding: 0.1rem 0.25rem;
  border-radius: 4px;
  background: #f0f3f8;
  color: var(--policy-ink);
  font-size: 0.9em;
}

.vn-policy-footer {
  padding-block: 1.25rem 1.75rem;
  border-top: 1px solid var(--policy-line);
  color: var(--policy-muted);
  font-size: 0.9rem;
}

.vn-policy-footer > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.vn-policy-footer p {
  margin: 0;
}

:is(.vn-policy, .vn-policy-footer) a {
  color: var(--policy-accent);
  font-weight: 650;
  text-underline-offset: 0.18em;
}

:is(.vn-policy, .vn-policy-footer) a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* One shape for every button: 12px corners, the same height and weight. Pills
   are kept for chips, dots and the floating control bars. */
.vn-action-button {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: 1px solid var(--action-border);
  background: white;
  padding: 0.7rem 1.12rem;
  font-weight: 760;
  text-align: center;
  text-decoration: none;
}

.vn-action-grid > .vn-action-button {
  padding-inline: 0.6rem;
}

.vn-action-button-primary {
  border-color: var(--action-accent);
  background: var(--action-accent);
  color: white;
}

@media (hover: hover) {
  .vn-action-button:hover {
    border-color: var(--action-accent);
    background: var(--action-hover);
  }
  .vn-action-button-primary:hover {
    background: var(--action-accent-hover);
  }
}

:is(.button, .qz-button, .vn-action-button) {
  min-height: var(--component-button-height);
  border-radius: var(--component-button-radius);
  transition:
    color var(--component-motion),
    background-color var(--component-motion),
    border-color var(--component-motion),
    box-shadow var(--component-motion),
    transform var(--component-motion);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  :is(.button, .qz-button, .vn-action-button):hover {
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  :is(.button, .qz-button, .vn-action-button):active {
    transform: translateY(1px);
  }
}

:is(.button, .qz-button, .vn-action-button):focus-visible {
  outline: var(--component-focus-width) solid #275aab;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px white;
}

.deck-ready .vn-toolbar[data-axis="vertical"] {
  display: flex;
}

.tag,
.tool-chip,
.format-chip,
.qz-command-row span {
  border-radius: var(--component-pill-radius);
}

@media (prefers-reduced-motion: reduce) {
  :is(.button, .qz-button, .vn-action-button) {
    transition: none;
  }
}

.button,
.app-action {
  font-weight: 760;
}

/* On a feature guide the card-style actions are the slide's main buttons.
   Phones keep the compact height so the slide's media gets the room. */
@media (min-width: 761px) {
  .inkline-page .app-action {
    min-height: var(--component-button-height);
  }
}

.support-form :is(input, select, textarea),
.inkline-feature-search :is(input, button) {
  border-radius: var(--component-input-radius);
}

/* Cards on the feature guides share one corner radius. */
.inkline-feature-grid article,
.inkline-tool-directory article,
.inkline-deck-ready .inkline-tool-directory article,
.rune-deck-ready :is(.rune-benefits, .rune-workflow-list, .rune-troubleshooting-list, .rune-faq) article,
.qz-feature-groups article {
  border-radius: var(--component-card-radius);
}

/* ------------------------------------------------------------------ */
/* App screenshots keep the shape and chrome of the captured window. */
/* ------------------------------------------------------------------ */

:is(.qz-shot, .inkline-product-shot, .screenshot-media),
:is(.qz-shot, .inkline-product-shot, .sb-hero-art, .mm-hero-art) img {
  border-radius: var(--component-button-radius, 12px);
}

:is(.qz-shot, .inkline-product-shot) {
  border: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

:is(.qz-shot, .inkline-product-shot, .sb-hero-art, .mm-hero-art) img {
  border: 0;
  background: transparent;
  box-shadow: var(--component-window-shadow);
}

:is(.rune-shot-frame, .screenshot-media) {
  box-shadow: var(--component-window-shadow);
}

/* Captures are the app window alone (scripts/build-window-captures.js), so
   frames only round their corners and cast the window shadow. */
.mm-hero-art picture {
  display: block;
}

:is(.qz-shot, .mm-hero-art) picture {
  filter: drop-shadow(0 10px 16px rgba(10, 19, 27, 0.2));
}

:is(.qz-shot, .mm-hero-art) picture img {
  box-shadow: none;
  filter: none;
}

.mac-preview {
  --preview-surface: #202632;
  --preview-titlebar: #303847;
  --preview-panel: #242d3a;
  --preview-text: #ecf1f8;
  --preview-muted: #bac6d7;
  width: min(100%, 46rem);
  min-width: 0;
  min-height: max-content;
  margin: clamp(0.8rem, 2vh, 1.25rem) 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--preview-surface);
  box-shadow: var(--component-window-shadow);
  color: var(--preview-text);
  font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

.mac-preview-archive {
  --preview-surface: #252631;
  --preview-titlebar: #353744;
  --preview-panel: #2c2c3a;
}

.mac-preview-title {
  position: relative;
  margin: 0;
  padding: 0.48rem 3.4rem;
  background: var(--preview-titlebar);
  color: var(--preview-text);
  font-size: 0.79rem;
  font-weight: 650;
  text-align: center;
}

.mac-preview-title::before {
  position: absolute;
  top: 50%;
  left: 0.85rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff625b;
  box-shadow: 13px 0 #ffc44c, 26px 0 #36cb65;
  transform: translateY(-50%);
  content: "";
}

.mac-preview-panes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1px;
  background: var(--preview-titlebar);
}

.mac-preview-pane {
  min-width: 0;
  background: var(--preview-surface);
  padding: 0.7rem 0.9rem;
}

.mac-preview-pane:first-child {
  background: var(--preview-panel);
}

.mac-preview-pane h3 {
  margin: 0 0 0.35rem;
  color: var(--preview-muted);
  font-size: 0.75rem;
  font-weight: 650;
}

.mac-preview-pane pre {
  margin: 0;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  color: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.mac-preview-pane :is(code, p, ul) {
  color: inherit;
  font-size: 0.83rem;
  line-height: 1.45;
}

.mac-preview-pane :is(p, ul) {
  margin: 0;
}

.mac-preview-key { color: #a9caff; }
.mac-preview-value { color: #afe3be; }

.mac-preview-list {
  padding: 0;
  list-style: none;
}

.mac-preview-list li {
  border-radius: 5px;
  padding: 0.16rem 0.4rem;
}

.mac-preview-selected {
  background: #455477;
}

.screenshot-media {
  display: block;
  aspect-ratio: var(--component-card-media-ratio);
  align-self: center;
  background: transparent;
}

.screenshot-media picture {
  display: block;
  width: 100%;
  height: 100%;
}

/* ------------------------------------------------------------------ */
/* Control bar: one component for every set of slide controls. The home
   slideshow, the feature guides, the product page carousels and the video
   preview all use it. A bar is a rounded strip with a hairline edge;
   its buttons are flat until pointed at, like a Mac toolbar. A page sets
   the colours with the --bar-* properties; the shapes are the same
   everywhere.                                                           */
/* ------------------------------------------------------------------ */

.vn-toolbar {
  --bar-bg: rgba(22, 26, 35, 0.84);
  --bar-line: rgba(255, 255, 255, 0.15);
  --bar-ink: #f4f6fa;
  --bar-muted: rgba(244, 246, 250, 0.64);
  --bar-hover: rgba(255, 255, 255, 0.12);
  --bar-press: rgba(255, 255, 255, 0.2);
  --bar-track: rgba(255, 255, 255, 0.28);
  --bar-accent: #8fb4ff;
  /* A button is a full 44px target; the lit part inside it is 34px. */
  --bar-size: 44px;
  --bar-inset: 5px;
  --bar-radius: var(--component-button-radius, 12px);
  --bar-inner-radius: calc(8px + var(--bar-inset));
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, "Segoe UI", sans-serif;
}

.inkline-deck-controls { --bar-accent: #aa8cff; }
.rune-deck-controls { --bar-accent: #55d8eb; }
.qz-deck-controls { --bar-accent: #ff8a2b; }

.vn-home-page .screenshot-controls {
  --bar-bg: linear-gradient(180deg, #404a3e, #2d382f);
  --bar-line: #ffffff30;
  --bar-ink: #f7f8f2;
  --bar-muted: #e1e7de;
  --bar-accent: var(--accent);
  --bar-inset: 4px;
}

:is(.screenshot-controls, .vn-gallery-controls) {
  --bar-radius: var(--component-pill-radius);
  --bar-inner-radius: var(--component-pill-radius);
}

.vn-gallery-controls {
  --bar-bg: linear-gradient(180deg, #fff, #eaf0f7);
  --bar-line: #cbd8e8;
  --bar-ink: #17243a;
  --bar-muted: #344764;
  --bar-hover: #e1e8f2;
  --bar-press: #d6e1ee;
  --bar-accent: #315f9d;
}

.vn-feature-slide-controls {
  --bar-bg: rgba(255, 255, 255, 0.78);
  --bar-line: var(--feature-line);
  --bar-ink: var(--feature-ink);
  --bar-muted: var(--feature-muted);
  --bar-hover: rgba(16, 41, 45, 0.07);
  --bar-press: rgba(16, 41, 45, 0.14);
  --bar-track: rgba(16, 41, 45, 0.2);
  --bar-accent: var(--feature-accent);
}

/* The strip. */
html:root .vn-toolbar {
  min-height: 0 !important;
  align-items: center;
  gap: 0 !important;
  border: 1px solid var(--bar-line) !important;
  border-radius: var(--bar-radius) !important;
  background: var(--bar-bg) !important;
  padding: 0 !important;
  color: var(--bar-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 12px 32px -14px rgba(8, 12, 20, 0.5) !important;
  -webkit-backdrop-filter: saturate(1.5) blur(18px);
  backdrop-filter: saturate(1.5) blur(18px);
}

html:root :is(.screenshot-controls, .vn-gallery-controls) {
  padding: 2px !important;
}

html:root .screenshot-rotation[data-playing="false"]:not(:active):not(:hover) {
  background: rgba(242, 203, 152, 0.14) padding-box !important;
  color: var(--bar-accent) !important;
}

/* Buttons: flat, lit when pointed at. */
html:root .vn-toolbar-button:not([hidden]) {
  display: grid !important;
  width: auto !important;
  min-width: var(--bar-size) !important;
  height: var(--bar-size) !important;
  min-height: var(--bar-size) !important;
  flex: 0 0 auto !important;
  grid-auto-flow: column;
  place-items: center;
  gap: 0.4rem;
  border: var(--bar-inset) solid transparent !important;
  border-radius: var(--bar-inner-radius) !important;
  background: transparent padding-box !important;
  padding: 0 !important;
  color: var(--bar-ink) !important;
  font-family: inherit !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  transform: none !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

html:root .vn-toolbar[data-axis="vertical"] .vn-toolbar-button {
  padding: 0 0.7rem !important;
}

html:root .vn-toolbar-button:disabled {
  opacity: 0.36 !important;
  cursor: default;
}

@media (hover: hover) {
  html:root :is(.vn-toolbar-button, .vn-preview-clip):not(:disabled):hover {
    background: var(--bar-hover) padding-box !important;
  }
}

html:root :is(.vn-toolbar-button, .vn-preview-clip):not(:disabled):active {
  background: var(--bar-press) padding-box !important;
}

html:root :is(.vn-toolbar-button, .vn-toolbar-marker, .vn-preview-clip):focus-visible {
  outline: 2px solid var(--bar-accent) !important;
  outline-offset: -4px !important;
  box-shadow: none !important;
}

/* Arrows are drawn with the same stroke in both directions. */
html:root .vn-toolbar[data-axis="vertical"] .vn-toolbar-button > span[aria-hidden="true"],
html:root .vn-feature-slide-controls .vn-toolbar-button {
  font-size: 0 !important;
}

.vn-toolbar[data-axis="vertical"] .vn-toolbar-button > span[aria-hidden="true"]::before,
.vn-toolbar:not([data-axis="vertical"]) .vn-toolbar-button:is([data-step], [data-slide-step])::before {
  display: block;
  width: 0.48rem;
  height: 0.48rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  border-radius: 1px;
  content: "";
  rotate: 45deg;
  translate: -1px 0;
}

.vn-toolbar:not([data-axis="vertical"]) .vn-toolbar-button:is([data-step="-1"], [data-slide-step="-1"])::before {
  rotate: -135deg;
  translate: 1px 0;
}

.vn-toolbar[data-axis="vertical"] .vn-toolbar-button[data-step="-1"] > span[aria-hidden="true"]::before {
  rotate: -45deg;
  translate: 0 2px;
}

.vn-toolbar[data-axis="vertical"] .vn-toolbar-button[data-step="1"] > span[aria-hidden="true"]::before {
  rotate: 135deg;
  translate: 0 -2px;
}

/* The counter. */
html:root .vn-toolbar-count {
  width: auto !important;
  min-width: 3.4rem !important;
  padding-inline: 0.35rem;
  color: var(--bar-muted) !important;
  font-family: inherit !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  text-align: center;
  white-space: nowrap;
}

/* One marker per slide. The whole marker is easy to hit; the line inside it
   stays thin, and the current one takes the accent colour. */
html:root .vn-toolbar-markers {
  display: flex;
  align-items: center;
  gap: 0 !important;
  margin-inline: 0.3rem;
}

html:root .vn-toolbar-marker {
  display: grid !important;
  box-sizing: border-box !important;
  width: 18px !important;
  min-width: 0 !important;
  max-width: none !important;
  height: var(--bar-size) !important;
  min-height: 0 !important;
  flex: 0 0 18px !important;
  place-items: center;
  border: solid transparent !important;
  border-width: var(--bar-inset) 0 !important;
  border-radius: var(--bar-inner-radius) !important;
  background: transparent padding-box !important;
  padding: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
}

html:root .screenshot-dot {
  width: auto !important;
  flex: 1 1 auto !important;
}

html:root .vn-toolbar-marker:not(.screenshot-dot)::before,
html:root .screenshot-controls .screenshot-dot > span {
  display: block;
  width: calc(100% - 5px) !important;
  height: 4px !important;
  border: 0 !important;
  border-radius: 2px !important;
  background: var(--bar-track) !important;
  box-shadow: none !important;
  content: "";
}

html:root .vn-toolbar-marker:is([aria-current="true"], [aria-current="step"])::before {
  background: var(--bar-accent) !important;
}

html:root .screenshot-controls .screenshot-dot.is-active > span {
  background: var(--bar-accent) !important;
}

@media (hover: hover) {
  html:root .vn-toolbar-marker:hover {
    background: var(--bar-hover) padding-box !important;
  }
}

/* The markers need room: below this width the counter carries the position. */
@media (max-width: 1020px) {
  .deck-ready .vn-toolbar[data-axis="vertical"] .vn-toolbar-markers {
    display: none !important;
  }
}

@media (max-width: 640px) {
  html:root .vn-feature-slide-markers {
    display: none !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  :is(.vn-toolbar-button, .vn-toolbar-marker, .vn-preview-clip) {
    transition: background-color 140ms ease-out, opacity 140ms ease-out !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(.vn-toolbar-button, .vn-toolbar-marker, .vn-preview-clip) {
    transition: none !important;
  }
}

/* Mobile feature pages use a native horizontal track inside the vertical page. */
.vn-feature-gallery {
  width: min(100% - 2rem, 38rem);
  margin: clamp(2rem, 6vw, 3.5rem) auto;
  color: var(--ink, #17243a);
}

:is(.rune-feature-gallery, .sb-features, .mm-features) > .vn-feature-gallery {
  width: min(100%, 38rem);
}

.vn-feature-gallery h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 5vw, 1.7rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.vn-gallery-track {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 0.7rem;
  overflow-x: auto;
  padding: 4px 0.25rem 0.8rem;
  scroll-padding-inline: 0.25rem;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.vn-gallery-track::-webkit-scrollbar {
  display: none;
}

.vn-gallery-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  color: #f4f8ff;
  background: radial-gradient(ellipse at 50% 3%, #394963 0%, #202c3f 60%, #182231 100%);
  border-radius: var(--component-card-radius);
  overflow: hidden;
  scroll-snap-align: start;
  text-decoration: none;
}

.vn-gallery-card picture {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  aspect-ratio: var(--component-card-media-ratio);
  padding: clamp(0.45rem, 1.75vw, 0.85rem);
}

@media (orientation: landscape) and (max-height: 500px) {
  .vn-gallery-card picture {
    max-height: 48vh;
    max-height: 48svh;
  }
}

.vn-gallery-card img {
  width: auto;
  max-width: 100%;
  height: 100%;
  border-radius: 7px;
  filter: drop-shadow(0 7px 10px #10162280);
}

.vn-gallery-card > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.35rem 0.9rem 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.vn-gallery-card > span::after {
  content: "";
  flex: 0 0 auto;
  width: 0.48rem;
  height: 0.48rem;
  border: solid currentColor;
  border-width: 2px 2px 0 0;
  transform: rotate(45deg);
}

.vn-gallery-controls {
  display: grid;
  width: fit-content;
  grid-template-columns: 44px auto 44px;
  margin: 0 auto;
}

.vn-gallery-card:focus-visible {
  outline: 3px solid #5382c6;
  outline-offset: -3px;
}

@media (forced-colors: active) {
  html:root .vn-toolbar {
    --bar-line: ButtonText;
    --bar-track: ButtonText;
    --bar-accent: Highlight;
  }

  html:root .vn-toolbar-marker:not(.screenshot-dot)::before,
  html:root .screenshot-controls .screenshot-dot > span,
  .screenshot-rotation::before {
    forced-color-adjust: none;
    color: ButtonText;
  }

  .vn-gallery-card {
    border: 1px solid LinkText;
  }
}
