/* ClipLabs / ClipCloud shared stylesheet.
   Source of truth: tools/shared/site.css. `python3 tools/build.py` copies it into
   both sites' /assets/ folders, so the two sites always share one design system.
   The accent colour is the only per-site difference (html[data-site]). */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --ink: #12161c;
  --ink-2: #39424e;
  --muted: #5b6673;
  --line: #e1e4e9;
  --line-strong: #c9ced6;
  --accent: #1a6dc4;
  --accent-hover: #155aa3;
  --accent-ink: #ffffff;
  --accent-soft: #eaf2fb;
  --link: #165fae;
  --ok: #1a7a4a;
  --no: #8a94a1;
  --code-bg: #10161d;
  --code-ink: #e4eaf1;
  --code-muted: #8d99a8;
  --shot-border: #d5d9e0;
  --radius: 10px;
  --radius-sm: 6px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "PingFang SC", "Hiragino Sans", "Yu Gothic UI", "Microsoft YaHei",
    "Vazirmatn", Tahoma, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
html[data-site="cliplabs"] {
  --accent: #3a3fb5;
  --accent-hover: #2d3196;
  --accent-soft: #eeeffa;
  --link: #33389f;
}
/* Dark colours, twice on purpose: once for visitors whose system is dark and who chose nothing
   (no data-theme), once for those who switched to dark with the header button (data-theme="dark",
   set before the first paint by the inline script in <head>). Keep the two blocks identical;
   tools/build.py fails if they differ. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0f1216;
    --bg-alt: #151a20;
    --ink: #e9ecf0;
    --ink-2: #c6ccd5;
    --muted: #97a1ae;
    --line: #242b34;
    --line-strong: #36404c;
    --accent: #5aa7ea;
    --accent-hover: #7ab9f0;
    --accent-ink: #07131f;
    --accent-soft: #14273a;
    --link: #7dbbf3;
    --ok: #4cc38a;
    --no: #7b8592;
    --code-bg: #0a0d11;
    --shot-border: #2c343f;
  }
  html[data-site="cliplabs"]:not([data-theme]) {
    --accent: #9198ff;
    --mark-bg: #eef0f5;
    --accent-hover: #aeb3ff;
    --accent-ink: #0c0d24;
    --accent-soft: #1c1e3b;
    --link: #a8adff;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1216;
  --bg-alt: #151a20;
  --ink: #e9ecf0;
  --ink-2: #c6ccd5;
  --muted: #97a1ae;
  --line: #242b34;
  --line-strong: #36404c;
  --accent: #5aa7ea;
  --accent-hover: #7ab9f0;
  --accent-ink: #07131f;
  --accent-soft: #14273a;
  --link: #7dbbf3;
  --ok: #4cc38a;
  --no: #7b8592;
  --code-bg: #0a0d11;
  --shot-border: #2c343f;
}
html[data-site="cliplabs"][data-theme="dark"] {
  --accent: #9198ff;
  --mark-bg: #eef0f5;
  --accent-hover: #aeb3ff;
  --accent-ink: #0c0d24;
  --accent-soft: #1c1e3b;
  --link: #a8adff;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
html.i18n-wait body { visibility: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: -0.015em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.12; letter-spacing: -0.022em; }
h2 { font-size: clamp(23px, 2.8vw, 30px); }
h3 { font-size: 18px; letter-spacing: -0.005em; }
code, pre, kbd { font-family: var(--mono); font-size: .92em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.wrap { width: min(100% - 40px, var(--max)); margin-inline: auto; }
/* Hidden with a transform, not an off-screen offset: a negative left offset makes
   right-to-left pages (Persian) scroll sideways into empty space. */
.skip { position: absolute; inset-inline-start: 12px; top: 8px; transform: translateY(-300%); background: var(--bg); padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); z-index: 60; }
.skip:focus { transform: none; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; flex: 0 0 auto; }
/* --mark-bg: in the dark theme the ClipLabs mark (its "L" is dark navy) sits on a light tile. */
.brand img { width: 30px; height: 30px; object-fit: contain; border-radius: 7px; background: var(--mark-bg, transparent); box-shadow: 0 0 0 3px var(--mark-bg, transparent); }
/* "by ClipLabs" next to the product name: a second, quieter link behind a hairline. It leaves the
   header on narrow phones, where it would crowd the buttons; the footer carries the same link. */
.brand-group { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand-by { padding: 6px 0; padding-inline-start: 12px; border-inline-start: 1px solid var(--line-strong); color: var(--muted); font-size: 13px; font-weight: 500; line-height: 1; text-decoration: none; white-space: nowrap; }
.brand-by:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-inline-end: auto; }
.main-nav a { padding: 8px 12px; border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--ink); background: var(--bg-alt); }
.header-tools { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: 8px; font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--bg-alt); border-color: var(--muted); }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn svg, .ext svg { width: 15px; height: 15px; flex: 0 0 auto; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg); color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.icon-btn:hover { background: var(--bg-alt); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.nav-toggle { display: none; }
/* Theme button: a toggle (aria-pressed = dark is on). Hidden until the script shows it. */
.theme-btn { width: 38px; padding: 0; justify-content: center; }
.theme-btn[hidden] { display: none; }
.theme-btn .i-sun, .theme-btn[aria-pressed="true"] .i-moon { display: none; }
.theme-btn[aria-pressed="true"] .i-sun { display: block; }

/* Language menu */
.lang { position: relative; }
.lang-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 50; width: 220px; max-height: min(70vh, 480px); overflow-y: auto; padding: 6px; background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(15, 20, 30, .14); }
.lang-menu[hidden] { display: none; }
.lang-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 9px 12px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink); font: inherit; font-size: 15px; text-align: start; cursor: pointer; }
.lang-option:hover { background: var(--bg-alt); }
.lang-option[aria-checked="true"] { font-weight: 600; }
.lang-option .lang-code { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.lang-option[aria-checked="true"] .lang-code { color: var(--accent); }

/* ---------- Sections ---------- */
.error-code { margin-bottom: 12px; color: var(--muted); font: 600 14px/1 var(--mono); letter-spacing: .08em; }
main > section { padding: 72px 0; border-top: 1px solid var(--line); }
main > section:first-child { border-top: 0; }
section.alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p { margin-top: 12px; color: var(--muted); font-size: 17px; }
.kicker { margin-bottom: 10px; color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.more-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 24px; font-weight: 600; }
.ext { display: inline-flex; align-items: center; gap: 5px; }
.muted { color: var(--muted); }

/* Hero */
.hero { padding: 72px 0 64px !important; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.hero-text { max-width: 720px; }
.lead { margin-top: 20px; color: var(--ink-2); font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-note { margin-top: 14px; color: var(--muted); font-size: 14px; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 56px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.facts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
.fact { padding: 20px 22px; border-inline-start: 1px solid var(--line); }
.fact:first-child { border-inline-start: 0; }
.fact-value { display: block; color: var(--ink); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.fact-label { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.fact-label a { color: inherit; }

/* Example images */
.samples { display: grid; grid-template-columns: 1.1fr 1fr; gap: 10px; }
.samples-col { display: grid; gap: 10px; }
.sample { position: relative; overflow: hidden; border-radius: 8px; background: var(--bg-alt); border: 1px solid var(--line); }
.sample img { width: 100%; height: 100%; object-fit: cover; }
.samples-caption, figcaption { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* Style gallery: real generations, one per style, each captioned with style, size and prompt */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 16px; }
.gallery figure { margin: 0; min-width: 0; }
.gallery a { display: block; overflow: hidden; aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-alt); }
.gallery a:hover { border-color: var(--line-strong); }
.gallery img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption { margin-top: 10px; }
.gallery-style { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.gallery-style code { color: var(--ink); font-family: var(--mono); font-size: 13px; font-weight: 600; }
.gallery-style span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; unicode-bidi: plaintext; }
.gallery-prompt { display: block; margin-top: 3px; text-align: start; }
.gallery-note { margin-top: 28px; color: var(--muted); font-size: 14px; max-width: 720px; }
.gallery a { position: relative; cursor: zoom-in; }
.gallery-count { position: absolute; inset-block-end: 8px; inset-inline-end: 8px; padding: 2px 8px; border-radius: 6px; background: rgba(15, 18, 25, .72); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.5; font-variant-numeric: tabular-nums; direction: ltr; }

/* Hero showcase: real generations shown one at a time with their style and prompt */
.showcase { margin: 0; min-width: 0; }
.showcase-stage { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-alt); }
.showcase-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .7s ease; }
.showcase-stage img.is-active { opacity: 1; }
.showcase-caption { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 12px; }
.showcase-text { display: block; min-height: 4.5em; min-width: 0; }
.showcase-lead { display: block; }
.showcase-style { color: var(--ink); font-family: var(--mono); font-size: 13px; font-weight: 600; margin-inline-end: 6px; }
.showcase-prompt { color: var(--ink-2); unicode-bidi: isolate; }
.showcase-controls { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.showcase-dots { display: inline-flex; gap: 2px; }
.showcase-dot { width: 18px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.showcase-dot[hidden] { display: none; }
.showcase-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.showcase-dot[aria-current="true"]::before { background: var(--accent); }
.showcase-toggle { width: 28px; height: 28px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--bg); color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.showcase-toggle[hidden] { display: none; }
.showcase-toggle .i-play, .showcase-toggle[aria-pressed="true"] .i-pause { display: none; }
.showcase-toggle[aria-pressed="true"] .i-play { display: block; }
@media (prefers-reduced-motion: reduce) { .showcase-stage img { transition: none; } }

/* Viewer for the style samples */
.lightbox { width: min(1180px, calc(100vw - 24px)); max-width: none; max-height: calc(100vh - 24px); padding: 12px 16px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); overflow: auto; }
.lightbox::backdrop { background: rgba(8, 11, 16, .8); }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.lb-count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; unicode-bidi: plaintext; }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 220px; border-radius: 8px; background: var(--bg-alt); overflow: hidden; touch-action: pan-y; }
.lb-stage img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 250px); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--bg); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-caption { display: grid; gap: 4px; margin-top: 12px; }
.lb-caption .gallery-prompt { color: var(--ink-2); font-size: 15px; }
.lb-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 8px; font-size: 14px; font-weight: 600; }

/* Sample thumbnails in the price table */
.style-sample { display: inline-block; width: 36px; height: 36px; margin-inline-end: 12px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-alt); overflow: hidden; vertical-align: middle; cursor: zoom-in; }
.style-sample.is-empty { border-color: transparent; background: none; cursor: default; }
.style-sample img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Cards and grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-2); font-size: 15px; }
.card .card-link { margin-top: auto; padding-top: 16px; font-weight: 600; font-size: 15px; }
.card-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 16px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.card-icon svg { width: 22px; height: 22px; }
.card-icon img { width: 22px; height: 22px; }
.wp-mark { filter: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .wp-mark { filter: brightness(0) invert(.88); } }
:root[data-theme="dark"] .wp-mark { filter: brightness(0) invert(.88); }

/* Product blocks (cliplabs) */
/* A product card that is one link: the name carries it, the smaller links stay clickable above it */
.card-linked { position: relative; }
.card-linked:hover { border-color: var(--line-strong); }
.card-cover { color: inherit; text-decoration: none; }
.card-cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-linked:hover .card-cover { color: var(--accent); }
.card-cover:focus-visible { outline: none; }
.card-cover:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 2px; }
.card-linked .link-row a, .card-linked .spec a { position: relative; z-index: 1; }
.product-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.product-logo { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.product-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.product-kind { color: var(--muted); font-size: 13px; line-height: 1.35; }
.spec { margin-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }
.spec > div { display: grid; grid-template-columns: minmax(96px, .8fr) 1.6fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--muted); }
.spec dd { color: var(--ink); font-variant-numeric: tabular-nums; }
.link-row { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: auto; padding-top: 18px; font-size: 15px; font-weight: 600; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); counter-reset: step; }
.step { padding: 24px; border-inline-start: 1px solid var(--line); counter-increment: step; }
.step:first-child { border-inline-start: 0; }
.step::before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 14px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 700; }
.step h3 { margin-bottom: 6px; font-size: 17px; }
.step p { color: var(--ink-2); font-size: 15px; }
.step-product { display: block; margin-top: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }

/* Screenshots */
/* ClipLabs first screen: two real screenshots, one over the other */
.hero-shots { margin: 0; min-width: 0; }
.hero-shots-stage { position: relative; aspect-ratio: 5 / 4; }
.hero-shot { position: absolute; }
.hero-shot img { display: block; width: 100%; height: auto; }
.hero-shot-back { inset-inline-start: 0; top: 0; width: 82%; }
.hero-shot-front { inset-inline-end: 0; bottom: 0; width: 80%; box-shadow: 0 18px 40px -18px rgba(15, 18, 25, .45); }
.hero-shots figcaption { margin-top: 14px; color: var(--muted); font-size: 13px; }
.shot { border: 1px solid var(--shot-border); border-radius: 8px; overflow: hidden; background: var(--bg-alt); }
.shot img { width: 100%; }
.shot-crop { aspect-ratio: 16 / 10.5; }
.shot-crop img { height: 100%; object-fit: cover; object-position: top left; }
/* A screenshot that opens the product (new tab): the frame takes the accent colour, nothing moves. */
.shot-link { display: block; border-radius: 8px; }
.shot-link .shot { transition: border-color .15s; }
.shot-link:hover .shot { border-color: var(--accent); }
.shot-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Reviews */
.quote { display: flex; flex-direction: column; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.quote blockquote { color: var(--ink); font-size: 15.5px; line-height: 1.6; }
.quote footer { margin-top: auto; padding-top: 16px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.quote cite { display: block; color: var(--ink); font-style: normal; font-weight: 600; font-size: 14.5px; }

/* Timeline */
.timeline { border-inline-start: 2px solid var(--line); margin-inline-start: 6px; }
.timeline li { position: relative; padding: 0 0 26px 26px; padding-inline: 26px 0; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
section.alt .timeline li::before { background: var(--bg-alt); }
.timeline time { display: block; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.timeline h3 { margin: 2px 0 4px; font-size: 17px; }
.timeline p { color: var(--ink-2); font-size: 15px; max-width: 640px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.prose { max-width: 720px; }
.prose p { color: var(--ink-2); margin-top: 14px; }
.lead-answer { color: var(--ink) !important; font-size: 18px; line-height: 1.6; }
.prose p strong, .prose p code { color: var(--ink); }
p code, li code, td code, dd code { padding: 1px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg-alt); font-size: .88em; white-space: nowrap; }

/* Lists */
.checklist { display: grid; gap: 10px; margin-top: 20px; }
.checklist li { position: relative; padding-inline-start: 28px; color: var(--ink-2); }
.checklist li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .42em; width: 14px; height: 8px; border: solid var(--ok); border-width: 0 0 2px 2px; transform: rotate(-45deg) scale(.85); }
.contact-list { border-top: 1px solid var(--line); }
.contact-list > div { display: grid; grid-template-columns: minmax(140px, .7fr) 1.6fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list dt { color: var(--muted); font-size: 15px; }
.contact-list dd { color: var(--ink); }
.contact-list dd span { display: block; color: var(--muted); font-size: 14px; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
thead th { background: var(--bg-alt); color: var(--ink-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
/* Two tables side by side (ClipCloud home): tighter cells, headers may wrap, so neither needs a scrollbar */
.split .table-wrap th, .split .table-wrap td { padding: 11px 12px; }
.split .table-wrap thead th { white-space: normal; }
.split .table-wrap td.num { white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 600; color: var(--ink); }
td.num, th.num { text-align: end; white-space: nowrap; }
/* Figures such as "3840 × 2048" or "~60×" must not be reordered on right-to-left pages. */
td.num, .fact-value, .plan-price, .spec dd { unicode-bidi: plaintext; }
.compare td:nth-child(2), .compare thead th:nth-child(2) { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.yes, .no { display: inline-block; margin-inline-end: 6px; font-weight: 700; }
.yes { color: var(--ok); }
.no { color: var(--no); }
.table-note { margin-top: 12px; color: var(--muted); font-size: 13.5px; max-width: 780px; }
tr.group th { background: var(--bg-alt); color: var(--ink-2); font-size: 13px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.sort-btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.sort-btn::after { content: "↕"; opacity: .45; font-size: 12px; }
.sort-btn[aria-sort="ascending"]::after { content: "↑"; opacity: 1; }
.sort-btn[aria-sort="descending"]::after { content: "↓"; opacity: 1; }

/* Plans */
.plan { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.plan-name { color: var(--muted); font-size: 14px; font-weight: 600; }
.plan-price { margin: 6px 0 4px; color: var(--ink); font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.plan-price small { color: var(--muted); font-size: 15px; font-weight: 500; letter-spacing: 0; }
.plan .checklist { margin-top: 18px; }
.plan .checklist li { font-size: 15px; }

/* Code */
.code { margin-top: 18px; border-radius: var(--radius); background: var(--code-bg); color: var(--code-ink); overflow: hidden; border: 1px solid var(--shot-border); }
.code-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,.08); color: var(--code-muted); font-size: 13px; }
.code-head strong { color: var(--code-ink); font-weight: 600; }
.method { margin-inline-start: auto; padding: 2px 8px; border-radius: 5px; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.m-post { background: rgba(88, 196, 140, .16); color: #7fdcae; }
.m-get { background: rgba(110, 170, 240, .16); color: #8fc2f5; }
.code pre { margin: 0; padding: 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.65; direction: ltr; text-align: left; }
.t-key { color: #9cc7f4; } .t-str { color: #a8dba8; } .t-num { color: #f0b877; } .t-com { color: var(--code-muted); }
.resource-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none; }
a.chip:hover { border-color: var(--muted); color: var(--ink); }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }

/* FAQ */
.faq { max-width: 820px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 18px 0; color: var(--ink); font-size: 17px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 22px; font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 18px; color: var(--ink-2); max-width: 720px; }
.faq details a { display: inline-block; margin: -6px 0 18px; font-weight: 600; font-size: 15px; }

/* Closing call to action */
.cta-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.cta-row > div:first-child { flex: 1 1 360px; }
.cta-row p { margin-top: 8px; color: var(--muted); }
.cta-row .actions { margin-top: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-alt); font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 32px; padding: 52px 0 40px; }
.footer-about p { margin-top: 12px; color: var(--muted); max-width: 300px; }
.footer-about > a:not(.brand) { display: inline-block; margin-top: 12px; }
.footer-col h2 { margin-bottom: 12px; color: var(--ink); font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.footer-col li + li { margin-top: 8px; }
.footer-col a { color: var(--ink-2); text-decoration: none; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding: 18px 0 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.footer-bottom a { color: inherit; }

/* ---------- Responsive ---------- */
/* The menu collapses at 960 px, and on ClipCloud already at 1160 px (the width at which the page
   stops growing): its Russian and Romanian menus do not fit beside the header buttons below
   that. Keep the two sets of rules identical. */
@media (max-width: 1160px) {
  html[data-site="clipcloud"] .icon-btn.nav-toggle { display: inline-flex; }
  html[data-site="clipcloud"] .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 16px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 16px 24px rgba(15, 20, 30, .08); }
  html[data-site="clipcloud"] .nav-open .main-nav { display: flex; }
  html[data-site="clipcloud"] .main-nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 16px; }
  html[data-site="clipcloud"] .main-nav a:last-child { border-bottom: 0; }
  html[data-site="clipcloud"] .header-row { gap: 12px; justify-content: space-between; }
  html[data-site="clipcloud"] .header-tools { margin-inline-start: auto; }
}
@media (max-width: 960px) {
  .icon-btn.nav-toggle { display: inline-flex; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 16px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 16px 24px rgba(15, 20, 30, .08); }
  .nav-open .main-nav { display: flex; }
  .main-nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 16px; }
  .main-nav a:last-child { border-bottom: 0; }
  .header-row { gap: 12px; justify-content: space-between; }
  .header-tools { margin-inline-start: auto; }
  .hero-grid, .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { border-inline-start: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .facts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts-3 .fact:nth-child(3) { border-inline-start: 1px solid var(--line); border-top: 0; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(odd) { border-inline-start: 0; }
  .step:nth-child(n+3) { border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  main > section { padding: 52px 0; }
  .hero { padding: 44px 0 48px !important; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .steps { grid-template-columns: 1fr; }
  .step { border-inline-start: 0; }
  .step + .step { border-top: 1px solid var(--line); }
  .spec > div, .contact-list > div { grid-template-columns: 1fr; gap: 2px; }
  .fact { padding: 16px; }
  .facts-3 { grid-template-columns: minmax(0, 1fr); }
  .facts-3 .fact, .facts-3 .fact:nth-child(3) { border-inline-start: 0; }
  .facts-3 .fact + .fact, .facts-3 .fact:nth-child(3) { border-top: 1px solid var(--line); }
  .fact-value { font-size: 22px; }
  .footer-grid { gap: 28px 20px; }
  th, td { padding: 10px 12px; }
  .lang-menu { position: fixed; inset: auto 12px 12px 12px; top: auto; width: auto; max-height: 70vh; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* The header gives things up as it narrows; the footer keeps the ClipLabs link, and without the
   theme button the page still follows the system setting. */
@media (max-width: 720px) { .header-cta { display: none; } }
@media (max-width: 480px) { .brand-by { display: none; } }
@media (max-width: 400px) { #currentLanguageLabel { display: none; } }
@media (max-width: 339px) { .theme-btn { display: none; } }
@media print { .site-header, .site-footer, .actions { display: none; } }
