/* Video Converter - site styles.
 *
 * Two worlds on purpose. The marketing sections are light so long-form guides stay
 * readable; the converter itself wears the app's own dark palette, so the tool on the
 * page and the tool on your phone read as the same product.
 *
 * Colour tokens are lifted from the app source (src/screens/HomeScreen.tsx): #070B1B
 * background, #0E1428 card, #1C2540 stroke, #6BE4FF accent, #4ADE80 success. The web
 * accent is darkened to #0E7490 wherever it carries text, because #6BE4FF on white is
 * 1.6:1 and unreadable.
 */

:root {
  --ink: #070b1b;
  --ink-2: #0e1428;
  --ink-3: #1c2540;
  --accent: #22b8da;
  --accent-dark: #0e7490;
  --accent-soft: #e2f5fb;
  --indigo: #5968f5;
  --indigo-dark: #4453d8;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;

  --cream: #f6f8fc;
  --cream-2: #eaeff7;
  --white: #ffffff;
  --slate: #475569;
  --slate-2: #5a6a80; /* 4.5:1 on --cream; #64748b was 4.48:1 and failed AA */
  --slate-3: #94a3b8;
  --line: #dde4ef;

  --radius: 16px;
  --radius-lg: 24px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.14);
  --wrap: 1120px;

  --sans: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* The UA rule for [hidden] is display:none, but any author rule that sets display wins
   on cascade origin regardless of specificity — .btn{display:inline-flex} and
   .cv-chips{display:flex} were both keeping elements on screen that the tool had
   hidden. This is why normalize.css ships the same rule. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 800; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); }
p { margin: 0 0 1.1em; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 40px, 760px); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* --accent is 2.35:1 on cream and fails the 3:1 minimum for a focus indicator;
   --accent-dark measures 5.04:1 on cream and 5.36:1 on white. */
:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 2px; border-radius: 4px; }
/* On the accent-coloured band the default ring is nearly the background colour. */
.cta-band :focus-visible, .cv :focus-visible, .section--dark :focus-visible {
  outline-color: #fff;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246, 248, 252, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 1.02rem; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a { color: var(--slate); font-weight: 600; font-size: 0.94rem; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: var(--cream-2); color: var(--ink); text-decoration: none; }
.nav a.is-current { color: var(--accent-dark); }
.nav__cta {
  background: var(--ink) !important; color: #fff !important;
  padding: 9px 16px !important; border-radius: 999px !important;
}
.nav__cta:hover { background: var(--accent-dark) !important; }

.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--line);
  border-radius: 10px; width: 42px; height: 38px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ''; display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--cream); border-bottom: 1px solid var(--line); padding: 10px 20px 18px; gap: 2px;
    box-shadow: var(--shadow); display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 10px; }
  .nav__cta { text-align: center; margin-top: 8px; }
}

/* ---------------------------------------------------------------- hero */

.hero { padding: clamp(48px, 7vw, 84px) 0 clamp(40px, 5vw, 64px); position: relative; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 940px) { .hero__grid { grid-template-columns: 1fr; } }

/* The converter column runs long once a file is loaded - facts, format chips, quality,
   advanced options and the plan summary all stack. Pin the copy beside it instead of
   letting it scroll away and leave half the viewport empty. */
@media (min-width: 941px) {
  /* align-self: stretch matters — with the grid's align-items: start the item box is
     only as tall as its text, and sticky has nothing to stick inside. */
  .hero__copy { position: sticky; top: 96px; align-self: stretch; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft); color: var(--accent-dark);
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.02em;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--accent-dark); }
.hero__lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--slate); max-width: 56ch; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: inherit; font-weight: 700; font-size: 1rem;
  padding: 14px 26px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
/* White on --accent (#22b8da) is 2.35:1, far under the 4.5:1 AA minimum for normal text. Anything
   that carries text uses --accent-dark (white on #0e7490 = 4.87:1); --accent stays for
   decorative fills, where the 3:1 non-text threshold applies. */
.btn--primary { background: var(--accent-dark); color: #fff; box-shadow: 0 6px 20px rgba(14, 116, 144, 0.32); }
.btn--primary:hover { background: #0b5d74; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-2); }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn--sm { padding: 10px 18px; font-size: 0.92rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

.trust { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--slate-2); font-size: 0.9rem; font-weight: 600; }
.trust span { display: inline-flex; align-items: center; gap: 7px; }
.trust svg { width: 16px; height: 16px; color: var(--green); flex: none; }

/* ---------------------------------------------------------------- sections */

.section { padding: clamp(52px, 7vw, 88px) 0; }
.section--light { background: var(--white); }
.section--cream { background: var(--cream-2); }
.section--dark { background: var(--ink); color: #fff; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: #cbd5e1; }

.section__head { max-width: 720px; margin: 0 auto clamp(32px, 4vw, 52px); text-align: center; }
.section__head p { color: var(--slate); font-size: 1.06rem; margin: 0; }
.section--dark .section__head p { color: var(--slate-3); }

.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 940px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--slate); font-size: 0.95rem; margin: 0; }
.card__icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-dark);
  display: grid; place-items: center; margin-bottom: 14px; font-size: 1.3rem;
}
a.card { color: inherit; display: block; transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease; }
a.card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-lg); }
a.card .card__more { color: var(--accent-dark); font-weight: 700; font-size: 0.9rem; margin-top: 12px; display: inline-block; }

.steps { counter-reset: step; display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-left: 60px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-dark); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem;
}
.step h3 { margin-bottom: 6px; font-size: 1.1rem; }
.step p { color: var(--slate); font-size: 0.95rem; margin: 0; }
.section--dark .step p { color: var(--slate-3); }

/* screenshots */
.shots { display: flex; gap: 20px; overflow-x: auto; padding: 8px 4px 24px; scroll-snap-type: x mandatory; }
.shots::-webkit-scrollbar { height: 8px; }
.shots::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.shot { flex: none; width: 240px; scroll-snap-align: center; }
.shot img {
  width: 100%; border-radius: 22px; border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); background: var(--white);
}
.shot figcaption { text-align: center; color: var(--slate-2); font-size: 0.86rem; margin-top: 12px; font-weight: 600; }
.section--dark .shot figcaption { color: var(--slate-3); }
.section--dark .shot img { border-color: rgba(148, 163, 184, 0.2); }

/* store badges */
.badges { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.badge-link { display: inline-block; }
.badge-link:hover { opacity: 0.85; text-decoration: none; }
.badge-link img, .badge-link svg { height: 54px; width: auto; }

.rating { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: #5a6a80; font-weight: 600; }
.section--dark .rating { color: var(--slate-3); }
.free-line { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: #5a6a80; font-weight: 600; }
.rating__stars { color: var(--amber); letter-spacing: 1px; }

/* FAQ */
.faq { max-width: 820px; margin-inline: auto; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  margin-bottom: 12px; overflow: hidden;
}
.faq details[open] { border-color: var(--accent); }
.faq summary {
  padding: 18px 52px 18px 22px; font-weight: 700; cursor: pointer; position: relative; list-style: none;
  font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--slate-2); border-bottom: 2px solid var(--slate-2);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq__body { padding: 0 22px 20px; color: var(--slate); }
.faq__body p { margin: 0 0 12px; }
.faq__body a { font-weight: 700; }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, #0e7490 0%, var(--indigo-dark) 100%);
  color: #fff; border-radius: var(--radius-lg); padding: clamp(32px, 5vw, 56px);
  text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: 12px; }
.cta-band p { color: #fff; max-width: 60ch; margin-inline: auto; }
.cta-band .btn--primary { background: #fff; color: var(--accent-dark); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); }
.cta-band .btn--primary:hover { background: var(--cream); }
.cta-band .btn--ghost { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.cta-band .btn--ghost:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, 0.1); }
.cta-band .badges { justify-content: center; margin-top: 24px; }

/* prose (guides) */
.prose { font-size: 1.06rem; }
.prose h2 { margin-top: 2em; scroll-margin-top: 90px; }
.prose h3 { margin-top: 1.6em; scroll-margin-top: 90px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent);
  color: var(--slate); font-style: italic;
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 0.94rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 700; background: var(--cream-2); }
.prose figure { margin: 1.6em 0; }
/* tabindex="0" on the wrapper (set in build.mjs) is what lets a keyboard user scroll
   these; without a focusable element inside, arrow keys have nothing to act on. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.5em 0; }
.table-scroll:focus-visible, .shots:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 4px; border-radius: 8px; }
.table-scroll table { margin: 0; }

.callout {
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 16px 20px; margin: 1.6em 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--accent-dark); }
.callout--warn { background: #fef6e7; border-left-color: var(--amber); }
.callout--warn strong { color: #92610a; }

.breadcrumb { font-size: 0.86rem; color: var(--slate-2); margin-bottom: 18px; }
.breadcrumb a { color: var(--slate-2); font-weight: 600; }
.breadcrumb span { margin: 0 6px; opacity: 0.6; }

.guide-meta { color: var(--slate-2); font-size: 0.88rem; margin-bottom: 26px; }

.toc {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; margin: 0 0 32px;
}
.toc h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--slate-2); margin: 0 0 12px; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin-bottom: 6px; font-size: 0.95rem; }

.related { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); margin-top: 20px; }
@media (max-width: 620px) { .related { grid-template-columns: 1fr; } }

/* inline tool card inside a guide */
.tool-inline {
  background: var(--ink); color: #fff; border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 34px); margin: 2.4em 0; text-align: center;
}
.tool-inline h3 { color: #fff; margin-bottom: 10px; }
.tool-inline p { color: var(--slate-3); font-size: 0.98rem; max-width: 52ch; margin-inline: auto; }

/* ---------------------------------------------------------------- footer */

.site-footer { background: var(--ink); color: var(--slate-3); padding: 56px 0 32px; font-size: 0.92rem; }
.site-footer a { color: var(--slate-3); }
.site-footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; margin-bottom: 36px; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer__brand img { width: 34px; height: 34px; border-radius: 9px; }
.footer h3 { color: #fff; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.09em; margin: 0 0 14px; font-weight: 800; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 9px; }
.footer__bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18); padding-top: 24px;
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 0.85rem;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- converter */

/* The tool wears the app's dark palette. Everything inside .cv is scoped so the widget
   can drop into a light marketing section or a dark one without restyling. */

.cv {
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 3vw, 26px);
  color: #e8edf7;
  box-shadow: var(--shadow-lg);
}
.cv h2, .cv h3 { color: #fff; }
.cv p { color: #b8c1d4; }

.cv-drop {
  border: 2px dashed rgba(107, 228, 255, 0.4);
  border-radius: var(--radius);
  background: rgba(107, 228, 255, 0.05);
  padding: clamp(26px, 5vw, 44px) 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cv-drop:hover, .cv-drop.is-over { border-color: #6be4ff; background: rgba(107, 228, 255, 0.12); }
.cv-drop-icon { color: #6be4ff; display: grid; place-items: center; margin-bottom: 12px; }
.cv-drop-hint { font-size: 0.92rem; margin: 14px 0 0; color: #98a3ba; }
.cv-drop-hint strong { color: #d7e3f5; }
.cv-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.cv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 0.98rem;
  padding: 13px 24px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, opacity 0.15s ease;
}
.cv-btn:hover { transform: translateY(-1px); text-decoration: none; }
.cv-btn-primary { background: #6be4ff; color: #05202b; }
.cv-btn-primary:hover { background: #8beeff; }
.cv-btn-ghost { background: transparent; color: #cbd5e1; border: 1.5px solid rgba(148, 163, 184, 0.55); }
.cv-btn-ghost:hover { border-color: #6be4ff; color: #fff; }
.cv-btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.cv-btn-go { flex: 1 1 190px; }

.cv-status { margin: 14px 0 0; font-size: 0.92rem; color: #98a3ba; min-height: 0; }
.cv-status.is-error { color: #ffb4b4; }
.cv-status.is-warn { color: #fcd28a; }
.cv-status.is-info { color: #9fd9ea; }
.cv-status:empty { margin: 0; }

.cv-panel { margin-top: 20px; }

.cv-facts {
  background: rgba(7, 11, 27, 0.6);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.cv-filename {
  font-weight: 700; color: #fff; margin: 0 0 12px; font-size: 0.98rem;
  overflow-wrap: anywhere;
}
.cv-fact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; margin: 0; }
@media (max-width: 720px) { .cv-fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cv-fact dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: #7f8aa3; margin: 0 0 2px; }
.cv-fact dd { margin: 0; font-weight: 700; font-size: 0.95rem; color: #e8edf7; overflow-wrap: anywhere; }

.cv-field { margin-top: 22px; }
.cv-field-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.09em; color: #8a93aa; margin: 0 0 10px; font-weight: 700; }
.cv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-chip {
  font: inherit; font-size: 0.9rem; font-weight: 700;
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  background: rgba(148, 163, 184, 0.1); color: #cbd5e1;
  border: 1.5px solid rgba(148, 163, 184, 0.55);
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.cv-chip:hover { border-color: #6be4ff; color: #fff; }
.cv-chip.is-active { background: rgba(107, 228, 255, 0.16); border-color: #6be4ff; color: #d9f6ff; }
.cv-chip.is-disabled, .cv-chip[disabled] { opacity: 0.38; cursor: not-allowed; }
.cv-chip.is-disabled:hover { border-color: rgba(148, 163, 184, 0.55); color: #cbd5e1; }

.cv-advanced { margin-top: 22px; border-top: 1px solid var(--ink-3); padding-top: 14px; }
.cv-advanced summary { cursor: pointer; font-weight: 700; font-size: 0.92rem; color: #9fd9ea; }
.cv-adv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
@media (max-width: 620px) { .cv-adv-grid { grid-template-columns: 1fr; } }
.cv-select { display: grid; gap: 6px; font-size: 0.82rem; color: #8a93aa; font-weight: 700; }
.cv-select select {
  font: inherit; font-size: 0.92rem; font-weight: 600;
  background: rgba(7, 11, 27, 0.7); color: #e8edf7;
  border: 1.5px solid rgba(148, 163, 184, 0.55); border-radius: 10px; padding: 10px 12px;
}

.cv-summary {
  margin-top: 22px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: rgba(107, 228, 255, 0.08); border: 1px solid rgba(107, 228, 255, 0.24);
}
.cv-summary-headline { margin: 0; font-size: 0.95rem; color: #d9f6ff; }
.cv-summary-headline strong { color: #6be4ff; }
.cv-summary-list { margin: 10px 0 0; padding-left: 1.15em; font-size: 0.88rem; color: #a9b4c9; }
.cv-summary-list li { margin-bottom: 5px; }
.cv-summary-list li.is-warn { color: #fcd28a; }

.cv-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.cv-progress { margin-top: 18px; }
.cv-progress-track { height: 10px; border-radius: 999px; background: rgba(148, 163, 184, 0.45); overflow: hidden; }
.cv-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, #6be4ff, #4ade80); transition: width 0.25s ease; }
.cv-progress-text { margin: 8px 0 0; font-size: 0.88rem; color: #9fd9ea; font-variant-numeric: tabular-nums; }

.cv-result {
  margin-top: 20px; padding: 18px; border-radius: var(--radius);
  background: rgba(74, 222, 128, 0.1); border: 1px solid rgba(74, 222, 128, 0.3);
}
.cv-result-title { margin: 0 0 4px; font-weight: 800; color: #4ade80; font-size: 1.05rem; }
.cv-result-stats { margin: 0 0 14px; font-size: 0.92rem; color: #cbd5e1; }
.cv-result-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cv-preview { margin-top: 16px; width: 100%; border-radius: var(--radius-sm); background: #000; max-height: 320px; }
.cv-note { margin: 14px 0 0; font-size: 0.86rem; color: #98a3ba; }

.cv-noscript {
  margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: rgba(251, 146, 60, 0.12); border: 1px solid rgba(251, 146, 60, 0.4); color: #fcd28a;
  font-size: 0.9rem;
}

/* The converter sits in the hero on the homepage and tool pages, where the marketing
   column is sticky; give it room to breathe on narrow screens. */
@media (max-width: 940px) {
  .hero__grid .cv { margin-top: 8px; }
}

/* ---------------------------------------------------------------- format matrix */

.matrix { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.matrix th, .matrix td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.matrix thead th { background: var(--cream-2); font-weight: 700; }
.matrix .yes { color: #0f7a52; font-weight: 700; }
.matrix .no { color: #9a3b3b; font-weight: 700; }

.pairs { display: flex; flex-wrap: wrap; gap: 8px; }
.pair-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 15px; font-size: 0.9rem; font-weight: 700; color: var(--ink);
}
.pair-chip:hover { border-color: var(--accent); color: var(--accent-dark); text-decoration: none; }

/* Layout hooks the converter attaches to its two chip rows, plus the shell that keeps the
   noscript notice with the widget it belongs to. */
.cv-shell { display: block; }
.cv-formats .cv-chips { gap: 8px; }
.cv-quality .cv-chips { gap: 8px; }
.cv-quality .cv-chip:first-child { flex: 1 1 100%; }
@media (min-width: 480px) {
  .cv-quality .cv-chip:first-child { flex: 0 0 auto; }
}

/* Windows High Contrast mode drops author colours, so the selected chip needs a shape cue. */
@media (forced-colors: active) {
  .cv-chip[aria-checked="true"] { outline: 2px solid; outline-offset: -4px; }
  .cv-progress-bar { background: Highlight; }
}
