/* compressvideo.tools — one stylesheet, three switchable palettes (Kadr default, Cobalt, Mint),
   each with light and dark. All colors are tokens. Sans only. No shadows, no gradients. */

@font-face { font-family: "Inter"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("fonts/inter-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Metric-matched local fallback: the swap moves text by a few pixels instead of reflowing the page. */
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("ArialMT"); size-adjust: 107%; ascent-override: 90%; descent-override: 22.4%; line-gap-override: 0%; }

/* ---- tokens -------------------------------------------------------------
   --bg page (pure white in light mode), --tint pure white too in light mode (sections are separated by --line hairlines, never by grey fills), --paper raised surface, --ink text, --ash secondary text,
   --line rules, --primary-* main action, --done-* the "done / Download" moment,
   --key key number colour (text on bg, >= 4.5:1), --focus focus ring. */

/* Kadr (default) */
:root, [data-palette="kadr"] {
  --bg: #ffffff; --tint: #ffffff; --paper: #ffffff; --ink: #111213; --ash: #5e5e5b; --line: #d9d9d5;
  --primary-bg: #111213; --primary-fg: #ffffff;
  --done-bg: #ff4f1f; --done-fg: #111213; --key: #c2370e; --focus: #c2370e;
  --radius: 2px; --chip-on-bg: #111213; --chip-on-fg: #ffffff;
}
:root[data-palette="kadr"][data-theme="dark"], :root[data-theme="dark"]:not([data-palette]) {
  --bg: #0b0b0c; --paper: #151516; --tint: #151516; --ink: #f2f2f0; --ash: #a3a39e; --line: #2c2c2e;
  --primary-bg: #f2f2f0; --primary-fg: #0b0b0c;
  --done-bg: #ff4f1f; --done-fg: #0b0b0c; --key: #ff6a3d; --focus: #ff6a3d;
  --chip-on-bg: #f2f2f0; --chip-on-fg: #0b0b0c;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-palette]), :root[data-palette="kadr"]:not([data-theme="light"]) {
    --bg: #0b0b0c; --paper: #151516; --tint: #151516; --ink: #f2f2f0; --ash: #a3a39e; --line: #2c2c2e;
    --primary-bg: #f2f2f0; --primary-fg: #0b0b0c;
    --done-bg: #ff4f1f; --done-fg: #0b0b0c; --key: #ff6a3d; --focus: #ff6a3d;
    --chip-on-bg: #f2f2f0; --chip-on-fg: #0b0b0c;
  }
}

/* Cobalt */
:root[data-palette="cobalt"] {
  --bg: #ffffff; --tint: #ffffff; --paper: #ffffff; --ink: #0b1b3a; --ash: #4a5878; --line: #d5dbe8;
  --primary-bg: #1f4fff; --primary-fg: #ffffff;
  --done-bg: #1f4fff; --done-fg: #ffffff; --key: #1a3fd1; --focus: #1f4fff;
  --radius: 6px; --chip-on-bg: #0b1b3a; --chip-on-fg: #ffffff;
}
:root[data-palette="cobalt"][data-theme="dark"] {
  --bg: #0a1226; --paper: #111b36; --tint: #111b36; --ink: #e8edfa; --ash: #9aa8c7; --line: #223056;
  --primary-bg: #5b83ff; --primary-fg: #0a1226;
  --done-bg: #5b83ff; --done-fg: #0a1226; --key: #8aa5ff; --focus: #8aa5ff;
  --chip-on-bg: #e8edfa; --chip-on-fg: #0a1226;
}
@media (prefers-color-scheme: dark) {
  :root[data-palette="cobalt"]:not([data-theme="light"]) {
    --bg: #0a1226; --paper: #111b36; --tint: #111b36; --ink: #e8edfa; --ash: #9aa8c7; --line: #223056;
    --primary-bg: #5b83ff; --primary-fg: #0a1226;
    --done-bg: #5b83ff; --done-fg: #0a1226; --key: #8aa5ff; --focus: #8aa5ff;
    --chip-on-bg: #e8edfa; --chip-on-fg: #0a1226;
  }
}

/* Mint */
:root[data-palette="mint"] {
  --bg: #ffffff; --tint: #ffffff; --paper: #ffffff; --ink: #22262a; --ash: #5b6064; --line: #dddbd3;
  --primary-bg: #0f7a4a; --primary-fg: #ffffff;
  --done-bg: #0f7a4a; --done-fg: #ffffff; --key: #0b6b3f; --focus: #0f7a4a;
  --radius: 6px; --chip-on-bg: #22262a; --chip-on-fg: #ffffff;
}
:root[data-palette="mint"][data-theme="dark"] {
  --bg: #14161a; --paper: #1c1f23; --tint: #1c1f23; --ink: #eceae4; --ash: #a1a39e; --line: #2f3338;
  --primary-bg: #3ddc97; --primary-fg: #0c1a12;
  --done-bg: #3ddc97; --done-fg: #0c1a12; --key: #3ddc97; --focus: #3ddc97;
  --chip-on-bg: #eceae4; --chip-on-fg: #14161a;
}
@media (prefers-color-scheme: dark) {
  :root[data-palette="mint"]:not([data-theme="light"]) {
    --bg: #14161a; --paper: #1c1f23; --tint: #1c1f23; --ink: #eceae4; --ash: #a1a39e; --line: #2f3338;
    --primary-bg: #3ddc97; --primary-fg: #0c1a12;
    --done-bg: #3ddc97; --done-fg: #0c1a12; --key: #3ddc97; --focus: #3ddc97;
    --chip-on-bg: #eceae4; --chip-on-fg: #14161a;
  }
}

/* ---- base ---------------------------------------------------------------- */
:root {
  --font: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 16px;
  --measure: 1080px;
  color-scheme: light dark;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
}
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--paper); color: var(--ink); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

.label { font-weight: 600; font-size: 15px; color: var(--ink); }

/* header / footer */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 16px; font-weight: 600; }
.brand svg { width: 20px; height: 20px; flex: none; }
.brand svg rect.m { fill: var(--bg); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
@media (max-width: 640px) {
  .nav { position: relative; flex: 0 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 4px 14px; margin-right: calc(var(--gutter) * -1); padding-right: 32px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; flex: none; font-size: 14px; letter-spacing: -0.01em; } /* Inter is wider than the previous body font: 14px and slight tracking keep the active link in view */
}
.nav a { font-size: 15px; color: var(--ash); text-decoration: none; padding: 4px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
.site-foot { border-top: 1px solid var(--line); margin-top: 72px; padding: 32px 0 48px; color: var(--ash); font-size: 15px; }
.site-foot p { margin: 0 0 10px; max-width: 70ch; }
.site-foot a { color: var(--ash); }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-links a { color: var(--ink); }
.prose { padding-top: 24px; }
.prose h2 { font-family: var(--display); font-size: clamp(1.7rem, 5vw, 2.3rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; margin: 28px 0 10px; }

/* hero */
.hero { padding-top: 36px; padding-bottom: 8px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.hero > .cs-widget { min-height: 300px; }
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 0 56px; align-items: start; padding-top: 56px; }
  .hero > .hero-head { grid-column: 1; grid-row: 1; }
  .hero { grid-template-rows: auto auto 1fr; }
  .hero > .cs-widget, .hero > .cs-widget-noscript { grid-column: 2; grid-row: 1 / span 3; margin-top: 8px; max-width: none; }
  .hero > .ticks { grid-column: 1; grid-row: 2; align-self: start; }
  .hero > .ext-line { grid-column: 2; grid-row: 4; max-width: none; }
  .hero .sub { margin-bottom: 8px; }
}
.hero h1 { font-family: var(--display); font-size: clamp(2.6rem, 9vw, 4.4rem); line-height: 1; letter-spacing: -0.04em; font-weight: 800; margin: 0 0 14px; max-width: 11em; overflow-wrap: break-word; text-wrap: balance; }
.hero .sub { font-size: clamp(1rem, 2.6vw, 1.2rem); color: var(--ash); margin: 0 0 24px; max-width: 52ch; }
.hero .ticks { margin-top: 18px; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 15px; color: var(--ash); }
/* check drawn in CSS: none of the three fonts has U+2713, and a system fallback glyph differs per platform */
.ticks li { display: inline-flex; align-items: center; gap: 8px; }
.ticks li::before { content: ""; width: 5px; height: 10px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); flex: none; }

/* blocks */
.block { padding-top: 64px; } /* side padding comes from .wrap: do not use the padding shorthand here */
.block h2 { font-family: var(--display); font-size: clamp(1.7rem, 5vw, 2.3rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; margin: 0 0 16px; max-width: 18em; overflow-wrap: break-word; text-wrap: balance; }
.block p { max-width: 64ch; margin: 0 0 12px; }
.block .lead { color: var(--ash); }
.grid { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 18px; }
@media (min-width: 640px) { .grid.g2 { grid-template-columns: repeat(2, 1fr); } .grid.g3 { grid-template-columns: repeat(3, 1fr); } .grid.g4 { grid-template-columns: repeat(4, 1fr); } }
.tile { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; }
.tile:hover { border-color: var(--ink); }
.tile b { display: block; font-weight: 600; font-size: 17px; margin-bottom: 4px; }
.tile span { color: var(--ash); font-size: 15px; }
.steps { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; counter-reset: s; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.steps li::before { content: counter(s); display: block; font-weight: 600; font-size: 15px; color: var(--ash); margin-bottom: 8px; }

/* figure / table */
.fig { margin: 18px 0 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.fig table { width: 100%; border-collapse: collapse; }
.fig th, .fig td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 400; }
.fig tr:last-child th, .fig tr:last-child td { border-bottom: 0; }
.fig td.num { font-family: var(--font); font-variant-numeric: tabular-nums; font-weight: 500; text-align: right; white-space: nowrap; }
.fig td.num.hl { color: var(--key); }
.fig figcaption { font-size: 14px; color: var(--ash); padding: 10px 16px; border-top: 1px solid var(--line); }
.cmp { display: grid; gap: 0; margin-top: 18px; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); }
.cmp > div { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cmp > div:last-child { border-bottom: 0; }
.cmp .label { display: block; margin-bottom: 4px; }

/* faq */
.faq { margin-top: 18px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 0; }
.faq summary { cursor: pointer; padding: 16px 28px 16px 0; font-weight: 500; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 20px; color: var(--ash); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 16px; max-width: 64ch; color: var(--ash); }

/* Chrome extension line, directly under the widget */
.ext-line { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 15px; color: var(--ash); max-width: 760px; }
.ext-line svg { flex: none; margin-top: 1px; fill: none; stroke: var(--ink); stroke-width: 1.6; }
.ext-line svg .o { stroke: var(--key); }
.ext-line b { color: var(--ink); font-weight: 600; }
.ext-line a { color: var(--ink); font-weight: 600; }
/* buttons (shared by page + widget) */
.cs-btn, .btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px;
  font: 500 16px/1 var(--font); border-radius: var(--radius); border: 1px solid var(--ink); background: transparent; color: var(--ink);
  text-decoration: none; cursor: pointer;
}
.cs-btn-primary, .btn-primary { background: var(--primary-bg); color: var(--primary-fg); border-color: var(--primary-bg); }
.cs-btn-done { background: var(--done-bg); color: var(--done-fg); border-color: var(--done-bg); }
.cs-btn-ghost, .btn-ghost { background: transparent; border-color: var(--line); }
.cs-btn-ghost:hover, .btn-ghost:hover { border-color: var(--ink); }

/* widget ------------------------------------------------------------------ */
.cs-widget { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 14px; max-width: 760px; }
@media (min-width: 640px) { .cs-widget { padding: 24px; } }
.cs-widget-noscript { padding: 18px; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); max-width: 760px; }
.cs-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.cs-chip, .cs-mode {
  font: 500 15px/1.2 var(--font); color: var(--ink); background: transparent; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 14px; min-height: 48px; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.cs-chip b { font-weight: 600; font-size: 15px; }
.cs-chip small { font-size: 12px; font-weight: 400; }
.cs-chip[aria-checked="true"], .cs-mode[aria-checked="true"] { background: var(--chip-on-bg); color: var(--chip-on-fg); border-color: var(--chip-on-bg); }
.cs-chip:disabled, .cs-mode:disabled { opacity: 0.5; cursor: not-allowed; }
.cs-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-mode { flex: 1 1 180px; flex-direction: row; }
.cs-custom-wrap { display: inline-flex; align-items: center; gap: 6px; }
.cs-custom { width: 96px; min-height: 48px; font: 500 16px var(--font); background: var(--bg); color: var(--ink); border: 1px solid var(--ink); border-radius: var(--radius); padding: 0 10px; }
.cs-link-input { width: 100%; max-width: 360px; }
.cs-unit { font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ash); }
.cs-guarantee { margin: 8px 0 0; font-size: 15px; color: var(--ash); }
.cs-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.cs-dz {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 150px; padding: 24px 16px; cursor: pointer; width: 100%;
}
.cs-drop { position: relative; border: 1px dashed var(--ash); border-radius: var(--radius); background: var(--tint); display: flex; flex-direction: column; align-items: center; }
.cs-drop:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.cs-drop.is-over { border-style: solid; border-color: var(--ink); }
.cs-drop.is-disabled { opacity: 0.5; pointer-events: none; }
.cs-thumb-slot { display: block; line-height: 0; }
.cs-thumb { height: 96px; width: auto; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.cs-preview { display: block; height: auto; max-height: 280px; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: #000; justify-self: start; }
.cs-dz-title { display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px; background: var(--primary-bg); color: var(--primary-fg); font-weight: 500; font-size: 17px; border-radius: var(--radius); max-width: 100%; overflow-wrap: anywhere; }
.cs-dz-hint { font-size: 15px; color: var(--ash); }
.cs-opts { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); margin-bottom: 12px; }
@media (min-width: 640px) { .cs-opts { grid-template-columns: repeat(4, 1fr); } }
.cs-opt { display: grid; gap: 4px; font-size: 13px; color: var(--ash); }
.cs-opt input, .cs-opt select { min-height: 44px; font: 400 16px var(--font); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 8px; width: 100%; }
.cs-progress { display: grid; gap: 10px; }
.cs-prog-head { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.cs-prog-file { font-weight: 500; }
.cs-prog-text { font-family: var(--font); font-variant-numeric: tabular-nums; color: var(--ash); text-align: right; }
.cs-bar { height: 6px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.cs-bar-fill { display: block; height: 100%; width: 0; background: var(--ink); }
.cs-status { margin: 0; min-height: 0; font-size: 15px; color: var(--ash); }
.cs-status:empty { display: none; }
.cs-message { border: 1px solid var(--line); border-left: 3px solid var(--ink); padding: 12px 14px; border-radius: var(--radius); }
.cs-message p { margin: 0 0 8px; }
.cs-message p:last-child { margin: 0; }
.cs-result { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 14px; }
.cs-result-title { font-size: 19px; margin: 0; font-weight: 600; }
.cs-rows { margin: 0; display: grid; }
.cs-row { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.cs-row dt { font-size: 14px; color: var(--ash); }
.cs-row dd { margin: 0; overflow-wrap: anywhere; }
.cs-key { color: var(--key); font-weight: 600; }
.cs-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cs-note { margin: 0; font-size: 15px; color: var(--ash); }
.cs-next { margin: 0; font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.cs-gif { max-width: 100%; height: auto; border: 1px solid var(--line); }
.cs-soon { margin: 0; padding: 12px 0; }
/* fixedsize tool (/compress-to-20mb/): one fixed target and a "ready to send" result */
.cs-fixed { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--bg); }
.cs-fixed-n { white-space: nowrap; flex: none; font-family: var(--display); font-size: 2rem; line-height: 1; letter-spacing: -0.03em; font-weight: 800; }
.cs-fixed-t { font-size: 15px; color: var(--ash); }
.cs-result-ready { border-top: 0; padding-top: 0; }
.cs-ready { border: 1px solid var(--ink); border-left-width: 4px; border-radius: var(--radius); padding: 14px 16px; background: var(--bg); display: grid; gap: 6px; }
.cs-ready p { margin: 0; }
.cs-ready-name { font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 14px; overflow-wrap: anywhere; }
.cs-ready-size { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 2.2rem; line-height: 1.05; }
.cs-ready-size b { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; }
.cs-fits { display: inline-flex; align-items: center; gap: 8px; font: 600 14px/1 var(--font); color: var(--ink); border: 1px solid var(--ink); border-radius: var(--radius); padding: 6px 10px; }
.cs-fits::before { content: ""; width: 5px; height: 9px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.cs-ready-was { font-size: 14px; color: var(--ash); }

/* trim-to-fit panel (/compress-to-20mb/): two range inputs share one timeline */
.cs-stale { border: 1px solid var(--key); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 10px; }
.cs-stale p { margin: 0; font-weight: 600; }
.cs-result.is-stale .cs-ready, .cs-result.is-stale .cs-actions, .cs-result.is-stale .cs-preview { opacity: 0.4; }
.cs-result.is-stale a[aria-disabled="true"] { pointer-events: none; }
.cs-ready-len { font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 14px; }
/* the trimmer has its own preview frame, so the small still in the drop zone steps aside */
.cs-widget:has(.cs-trim:not([hidden])) .cs-thumb-slot { display: none; }
.cs-trim { display: grid; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--bg); }
.cs-trim-view { line-height: 0; justify-self: start; max-width: 100%; }
.cs-trim-video { display: block; height: auto; max-height: 220px; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: #000; }
.cs-range { --thumb: 22px; --a: 0; --b: 1; position: relative; height: 48px; touch-action: pan-y; }
.cs-range-track, .cs-range-sel { position: absolute; top: 50%; height: 6px; margin-top: -3px; border-radius: var(--radius); }
.cs-range-track { left: 0; right: 0; background: var(--line); }
.cs-range-sel { left: calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--a)); right: calc(var(--thumb) / 2 + (100% - var(--thumb)) * (1 - var(--b))); background: var(--ink); }
.cs-range-in { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; background: transparent; -webkit-appearance: none; appearance: none; pointer-events: none; touch-action: pan-y; }
.cs-range-in::-webkit-slider-runnable-track { height: 100%; background: transparent; border: 0; }
.cs-range-in::-moz-range-track { height: 100%; background: transparent; border: 0; }
.cs-range-in::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; pointer-events: auto; width: var(--thumb); height: 44px; border-radius: var(--radius); background: var(--ink); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--ink); cursor: ew-resize; }
.cs-range-in::-moz-range-thumb { pointer-events: auto; box-sizing: border-box; width: var(--thumb); height: 44px; border-radius: var(--radius); background: var(--ink); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--ink); cursor: ew-resize; }
.cs-range-in:focus { outline: 0; }
.cs-range-in:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--focus); outline-offset: 3px; }
.cs-range-in:focus-visible::-moz-range-thumb { outline: 2px solid var(--focus); outline-offset: 3px; }
.cs-range-in:disabled { opacity: 0.5; }
.cs-trim-labels { display: flex; justify-content: space-between; gap: 12px; font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ash); }
.cs-trim-readout { margin: 0; font-size: 16px; font-weight: 600; }
.cs-trim-hint { margin: 0; font-size: 15px; color: var(--ash); border-left: 3px solid var(--line); padding-left: 10px; }
.cs-trim-hint.is-good { border-left-color: var(--ink); color: var(--ink); }
.cs-trim-hint.is-long { border-left-color: var(--key); }
.cs-trim-actions .cs-btn { flex: 1 1 auto; }
.cs-trim-bar { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 15px; color: var(--ash); }
.cs-linkbtn { font: 600 15px/1 var(--font); color: var(--ink); background: none; border: 0; padding: 12px 0; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cs-linkbtn:disabled { opacity: 0.5; cursor: not-allowed; }
/* home: one widget, four modes */
.cs-sub { display: grid; gap: 14px; }
.cs-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 480px) { .cs-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cs-tab { font: 500 15px/1.2 var(--font); color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 6px; min-height: 48px; cursor: pointer; white-space: nowrap; }
.cs-tab[aria-selected="true"] { border-color: var(--ink); font-weight: 700; box-shadow: inset 0 -3px 0 var(--done-bg); }
.cs-tab:disabled { opacity: 0.5; cursor: not-allowed; }
.cs-switch > .cs-panel { display: grid; gap: 10px; }
.cs-switch > .cs-panel[hidden] { display: none; }
.cs-fullpage { margin: 0; font-size: 14px; color: var(--ash); order: 2; }
.cs-fullpage a { color: var(--ink); }

/* demo screencast ---------------------------------------------------------- */
.demo { margin: 0; position: relative; width: 100%; max-width: 280px; }
.demo.demo-wide { max-width: none; }
.demo-frame { position: relative; border: 1px solid var(--ink); border-radius: calc(var(--radius) * 8); overflow: hidden; background: var(--paper); line-height: 0; }
.demo-wide .demo-frame { border-radius: var(--radius); }
.demo-video { display: block; width: 100%; height: auto; background: var(--paper); }
.demo-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.demo-frame.is-playing .demo-poster { visibility: hidden; }
.demo-toggle { position: absolute; right: 8px; bottom: 8px; line-height: 1; font: 600 13px var(--font); background: var(--paper); color: var(--ink); border: 1px solid var(--ink); border-radius: var(--radius); padding: 8px 12px; min-height: 32px; cursor: pointer; }
.demo figcaption, .ba-cap { font-size: 14px; color: var(--ash); margin-top: 8px; line-height: 1.5; }

/* before / after stills */
.ba { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; max-width: 640px; }
.ba figure { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ba img { display: block; width: 100%; height: auto; }
.ba figcaption { padding: 10px 12px; font-size: 15px; border-top: 1px solid var(--line); }
.ba figcaption b { display: block; font-weight: 600; font-size: 14px; color: var(--ash); }
.ba figcaption .num { font-family: var(--font); font-variant-numeric: tabular-nums; font-weight: 500; font-size: 17px; }
.ba figure:last-child figcaption .num { color: var(--key); }

/* tile thumbnails */
.tile.has-img { padding: 0; overflow: hidden; }
.tile.has-img img { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--line); background: var(--tint); }
.tile.has-img .tt { display: block; padding: 14px 16px 16px; }
.tile.has-img .tt b { display: block; font-weight: 600; font-size: 17px; margin-bottom: 4px; }
.tile.has-img .tt span { color: var(--ash); font-size: 15px; }

/* dev palette switcher (only exists when ?palette= or #dev) */
.dev-switch { position: fixed; right: 8px; bottom: 8px; z-index: 50; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; font: 12px var(--font); font-variant-numeric: tabular-nums; max-width: calc(100vw - 16px); }
.dev-switch button { font: inherit; background: transparent; color: inherit; border: 1px solid var(--line); padding: 6px 8px; cursor: pointer; }
.dev-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

@media (prefers-reduced-motion: no-preference) {
  .cs-bar-fill { transition: width 0.2s linear; }
  .tile, .cs-chip, .cs-mode { transition: border-color 0.15s; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
.grid:has(.tile.has-img) { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .grid.g4:has(.tile.has-img) { grid-template-columns: repeat(4, 1fr); } }

/* compact cross-link row (home, below FAQ) */
.xlinks ul { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.xlinks a { color: var(--ink); font-size: 15px; }
.cs-estimate { margin: 0 0 12px; font-size: 15px; color: var(--ash); }
.still { margin: 24px 0 0; }
.still img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.still figcaption { font-size: 14px; color: var(--ash); margin-top: 8px; line-height: 1.5; }

/* portrait media must not run past one screen on phones: centered crop */
@media (max-width: 640px) {
  .still img { width: 100%; height: 50vh; max-height: 50vh; object-fit: cover; object-position: center; }
  .ba img { height: 40vh; object-fit: cover; object-position: center; }
}

/* ---- restyle: frame motifs, bands, steps, sample chooser, slider, story ------------------------ */
.band { background: var(--tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 48px; padding-bottom: 44px; }
.band > .block { padding-top: 48px; }
.band .fig, .band .cmp, .band .still img { background: var(--paper); }

/* crop marks: four L-shaped corners drawn with gradients */
.crop { position: relative; }
.crop::after { content: ""; position: absolute; inset: -5px; pointer-events: none; z-index: 3;
  background:
    linear-gradient(var(--done-bg), var(--done-bg)) left top / 16px 2px, linear-gradient(var(--done-bg), var(--done-bg)) left top / 2px 16px,
    linear-gradient(var(--done-bg), var(--done-bg)) right top / 16px 2px, linear-gradient(var(--done-bg), var(--done-bg)) right top / 2px 16px,
    linear-gradient(var(--done-bg), var(--done-bg)) left bottom / 16px 2px, linear-gradient(var(--done-bg), var(--done-bg)) left bottom / 2px 16px,
    linear-gradient(var(--done-bg), var(--done-bg)) right bottom / 16px 2px, linear-gradient(var(--done-bg), var(--done-bg)) right bottom / 2px 16px;
  background-repeat: no-repeat; }

/* widget: sample chooser */
.cs-samples { border-top: 1px solid var(--line); padding-top: 14px; }
.cs-samples-h { margin: 0 0 10px; font-size: 14px; color: var(--ash); }
.cs-samp-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cs-samp { display: grid; gap: 6px; width: 100%; padding: 0; background: none; border: 0; color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.cs-samp img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--tint); }
.cs-samp:hover img { border-color: var(--done-bg); }
.cs-samp:focus-visible { outline-offset: 3px; }
.cs-samp:disabled { opacity: 0.5; cursor: not-allowed; }
.cs-samp:not(:has(img)) { border: 1px solid var(--line); padding: 10px; }
.cs-samp-cap { display: grid; font-size: 14px; line-height: 1.3; }
.cs-samp-cap b { font-weight: 600; overflow-wrap: anywhere; }
.cs-samp-cap small { font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 12px; color: var(--ash); }
.cs-sample-note { margin: 10px 0 0; font-size: 13px; color: var(--ash); }
.cs-samples:has(li:only-child) .cs-samp-list { grid-template-columns: minmax(0, 140px); }
@media (max-width: 420px) { .cs-samp-cap { font-size: 13px; } .cs-samp-cap small { font-size: 11px; } .cs-samp-cap b { overflow-wrap: normal; } }

/* steps with icons and arrows */
.steps li { display: grid; align-content: start; gap: 0; position: relative; }
.steps li::before { order: -2; }
.steps .ic { order: -1; margin-bottom: 10px; line-height: 0; }
.steps .ic svg { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: miter; stroke-linecap: square; }
.steps .ic .o { stroke: var(--done-bg); }
.steps .ic .t { fill: var(--ink); stroke: none; font: 600 12px var(--font); font-variant-numeric: tabular-nums; }
.steps li b { font-weight: 600; font-size: 17px; margin-bottom: 4px; }
.steps li p { margin: 0; color: var(--ash); font-size: 15px; }
@media (min-width: 640px) { .steps li:not(:last-child)::after { content: ""; position: absolute; right: -11px; top: 50%; width: 9px; height: 9px; border: solid var(--ink); border-width: 2px 2px 0 0; transform: translateY(-50%) rotate(45deg); background: var(--bg); z-index: 1; } }
.steps.two { grid-template-columns: repeat(2, 1fr); }

/* airplane test */
.airplane { list-style: none; counter-reset: a; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; font-size: 15px; }
.airplane li { counter-increment: a; display: flex; gap: 12px; align-items: baseline; }
.airplane li::before { content: counter(a); flex: none; width: 24px; height: 24px; display: inline-grid; place-items: center; border: 1px solid var(--ink); font-size: 13px; font-weight: 600; }

/* feature row */
.feat { display: grid; gap: 24px; align-items: center; }
.feat .demo { justify-self: center; }
@media (min-width: 800px) { .feat { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; } .feat:has(.demo-wide) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); } }
.feat .demo-wide { max-width: none; }

/* quality slider */
.cmpr-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-top: 18px; max-width: 640px; border: 1px solid var(--ink); border-radius: var(--radius); }
@media (min-width: 560px) { .cmpr-tabs { grid-template-columns: repeat(4, auto); } }
.cmpr-tabs [role="tab"] { font: 600 15px/1 var(--font); color: var(--ink); background: var(--paper); border: 0; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 0 16px; min-height: 44px; cursor: pointer; }
.cmpr-tabs [role="tab"]:nth-child(2n) { border-right: 0; }
.cmpr-tabs [role="tab"]:nth-child(n+3) { border-bottom: 0; }
@media (min-width: 560px) { .cmpr-tabs [role="tab"] { border-bottom: 0; border-right: 1px solid var(--ink) !important; } .cmpr-tabs [role="tab"]:last-child { border-right: 0 !important; } }
.cmpr-tabs [role="tab"][aria-selected="true"] { background: var(--chip-on-bg); color: var(--chip-on-fg); }
.cmpr { margin: 18px 0 0; max-width: 960px; }
.cmpr-stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--tint); touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize; --x: 50%; }
.cmpr-stage img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; -webkit-user-drag: none; pointer-events: none; }
.cmpr-before { clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.cmpr-chip { position: absolute; top: 10px; z-index: 2; font: 500 12px/1 var(--font); font-variant-numeric: tabular-nums; background: #ffffff; color: #111213; border: 1px solid #111213; padding: 7px 8px; pointer-events: none; }
.cmpr-chip.l { left: 10px; }
.cmpr-chip.r { right: 10px; }
.cmpr-tc { position: absolute; left: 10px; bottom: 10px; z-index: 2; font: 500 12px/1 var(--font); font-variant-numeric: tabular-nums; background: #111213; color: #fff; padding: 6px 8px; pointer-events: none; }
.cmpr-line { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: var(--done-bg); z-index: 2; pointer-events: none; }
.cmpr-knob { position: absolute; top: 50%; left: 50%; width: 28px; height: 36px; margin: -18px 0 0 -14px; background: var(--paper); border: 2px solid var(--done-bg); display: block; background-image: linear-gradient(#111213, #111213), linear-gradient(#111213, #111213), linear-gradient(#111213, #111213); background-size: 2px 14px, 2px 14px, 2px 14px; background-position: 6px center, 11px center, 16px center; background-repeat: no-repeat; }
.cmpr-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; z-index: 4; pointer-events: none; }
.cmpr-range:focus-visible ~ .cmpr-line .cmpr-knob { outline: 2px solid var(--focus); outline-offset: 3px; }
.cmpr-stage:has(.cmpr-range:focus-visible) { outline: 0; }
.cmpr .ba-cap { max-width: 78ch; }

/* /compress-to-20mb/ story */
.story { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 28px; counter-reset: p; }
@media (min-width: 900px) { .story { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; } }
.panel { position: relative; display: grid; gap: 10px; align-content: start; }
.panel .bar { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border: 1px solid var(--ink); border-bottom: 0; padding: 8px 10px; background: var(--paper); border-radius: var(--radius) var(--radius) 0 0; }
.panel .bar span { font: 400 14px var(--font); color: var(--ash); }
.panel .bar b { font: 600 16px/1.2 var(--font); }
.panel .mock { position: relative; margin-top: -10px; border: 1px solid var(--ink); border-radius: 0 0 var(--radius) var(--radius); line-height: 0; --paper: #ffffff; --ink: #111213; --ash: #5e5e5b; --line: #d9d9d5; --tint: #ffffff; --done-bg: #ff4f1f; --key: #c2370e; background: #fff; }
.panel .mock svg { display: block; width: 100%; height: auto; }
.panel .mock-link { display: block; color: inherit; }
.panel p { margin: 0; font-size: 15px; color: var(--ash); max-width: 38ch; }
@media (min-width: 900px) { .panel:not(:last-child)::after { content: ""; position: absolute; right: -27px; top: 150px; width: 12px; height: 12px; border: solid var(--ink); border-width: 2px 2px 0 0; transform: rotate(45deg); } }
.mock .bgp { fill: #fff; stroke: none; }
.mock .tl { fill: #fff; stroke: #111213; stroke-width: 1; }
.mock .ini { font-size: 11px; font-weight: 500; fill: #111213; }
.mock .msg { font-size: 14px; fill: #111213; }
.mock .ts { font-size: 11px; fill: #5e5e5b; }
.mock .hr { stroke: #d9d9d5; stroke-width: 1; fill: none; }
.mock .m, .mock .g { font-family: var(--font); } .mock .m { font-variant-numeric: tabular-nums; }
.mock .note { fill: #fff; stroke: #ff4f1f; stroke-width: 1; } .mock .noterule { fill: #ff4f1f; }
.mock .nt { font-size: 13px; font-weight: 600; fill: #111213; } .mock .nd { font-size: 12px; fill: #5e5e5b; }
.mock .box { fill: none; stroke: #111213; stroke-width: 1; }
.mock .pl { stroke: #111213; stroke-width: 1.5; fill: none; }
.mock .chip { fill: #ffffff; stroke: #d9d9d5; } .mock .cf { font-size: 12px; fill: #111213; }
.mock .strike { stroke: #ff4f1f; stroke-width: 2; }
.mock .dz { fill: #ffffff; stroke: #5e5e5b; stroke-dasharray: 4 3; } .mock .mk { stroke: #ff4f1f; stroke-width: 2; fill: none; }
.mock .btnk { fill: #111213; } .mock .bt { font-size: 13px; font-weight: 600; fill: #fff; }
.mock .on { fill: #111213; } .mock .off { fill: #fff; stroke: #d9d9d5; }
.mock .trk { fill: #d9d9d5; } .mock .fill { fill: #111213; }
.mock .big { font-size: 22px; font-weight: 500; fill: #111213; } .mock .big.key, .mock .key { fill: #c2370e; }
.mock .arw { stroke: #111213; stroke-width: 2; fill: none; }
.p3 .mock .att { position: absolute; left: 4.72%; top: 21.8%; width: 90.56%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 0; }
.p3 .mock .play { position: absolute; left: 44.4%; top: 45.3%; width: 11.1%; aspect-ratio: 1; background: #fff; border: 1px solid #111213; }
.p3 .mock .play::after { content: ""; position: absolute; left: 36%; top: 26%; width: 34%; height: 48%; background: #111213; clip-path: polygon(0 0, 100% 50%, 0 100%); }

.p3 .mock .prog { position: absolute; left: 4.72%; top: calc(82.9% - 3px); width: 26%; height: 3px; background: #ff4f1f; }

/* mov diagram, size bars, film strip */
.diagram svg { display: block; width: 100%; height: auto; max-height: 190px; padding: 12px 16px 0; }
.diagram .fl path, .diagram .fl rect { fill: none; stroke: var(--ink); stroke-width: 2; }
.diagram .fl .vid { fill: var(--tint); }
.diagram .aw { stroke: var(--done-bg); stroke-width: 3; fill: none; }
.diagram .m { font-family: var(--font); font-variant-numeric: tabular-nums; } .diagram .df { font-size: 12px; fill: var(--ink); } .diagram .dl { font-size: 13px; fill: var(--ash); }
.bars { padding: 14px 16px 0; }
.bar-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) 68px; gap: 12px; align-items: center; margin-bottom: 10px; }
.bar-track { display: block; height: 18px; border: 1px solid var(--line); background: var(--tint); }
.bar-track svg { display: block; width: 100%; height: 100%; }
.bar-gif { fill: var(--ink); } .bar-mp4 { fill: var(--done-bg); }
.bars .num { font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 14px; text-align: right; } .bars .num.key { color: var(--key); }
.bars figcaption { margin: 4px -16px 0; }
.strip { margin: 18px 0 0; }
.strip-in { background: var(--ink); padding: 14px 0; border-radius: var(--radius); overflow: hidden; position: relative; max-width: 820px; }
.strip-in::before, .strip-in::after { content: ""; position: absolute; left: 0; right: 0; height: 6px; background: repeating-linear-gradient(90deg, var(--bg) 0 9px, transparent 9px 18px); opacity: 0.9; }
.strip-in::before { top: 4px; } .strip-in::after { bottom: 4px; }
.strip img { display: block; width: 100%; max-width: 800px; height: auto; margin: 0 auto; }
.strip figcaption { font-size: 14px; color: var(--ash); margin-top: 8px; line-height: 1.5; }

/* closing call to action (scrolls to the tool at the top) */
.cta-band { background: var(--ink); color: var(--bg); margin-top: 56px; padding: 44px 0; }
.cta-band h2 { font-family: var(--display); font-size: clamp(1.9rem, 6.5vw, 2.8rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 10px; text-wrap: balance; }
.cta-band p { margin: 0 0 20px; max-width: 56ch; opacity: 0.85; }
.btn-paper { background: var(--bg); color: var(--ink); border-color: var(--bg); min-height: 52px; padding: 0 28px; font-size: 17px; }
.btn-paper:hover { background: var(--done-bg); border-color: var(--done-bg); color: #111213; }
.cta-band :focus-visible { outline-color: var(--done-bg); }
.site-foot .credits { font-size: 13px; }
.site-foot { margin-top: 0; }
.cta-band + .block, .cta-band + .site-foot { margin-top: 0; }


@media (max-width: 640px) { .demo { max-width: 200px; } .demo.demo-wide { max-width: none; } }
.block .fig + p { margin-top: 14px; }

.cmp .label { display: block; margin-bottom: 4px; }
.bar-row .label { font-size: 14px; }
