/* File Converter hub (/convert), v3: animated hero + upload card (images AND data conversions), then the converter list and the text below.
   Prefix: cvh-
   The hero is dark in BOTH site themes (it is a stage), so everything inside it reads hero-scoped tokens (--cvh-*) and never the
   site's light/dark tokens; the only site token it uses is the action colour (--btn-primary-bg), so the one primary button keeps the
   brand colour. Indigo and violet are decoration only (glow, ring, floating tags). Below the hero the page follows the site theme. */

/* display:flex/grid rules below would otherwise beat the [hidden] attribute. */
.cvh-hero [hidden],
.cvh-browse [hidden],
.cvh-content [hidden] { display: none !important; }

.cvh-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; }

/* ================================================================ hero shell */
.cvh-hero {
    --cvh-bg: #0b0b1e;
    --cvh-ink: #ffffff;
    --cvh-ink-2: #d6daf2;
    --cvh-ink-3: #b7bddf;
    --cvh-accent: #c7d2fe;
    --cvh-line: rgba(255, 255, 255, .16);
    --cvh-line-strong: #8a92c9;
    --cvh-field: rgba(255, 255, 255, .08);
    --cvh-action: var(--btn-primary-bg, #0066cc);
    --cvh-action-fg: var(--btn-primary-fg, #ffffff);
    --cvh-ease: cubic-bezier(.4, 0, .2, 1);

    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: var(--cvh-ink);
    color-scheme: dark;
    background-color: var(--cvh-bg);
    background-image: linear-gradient(180deg, #0b0b1e 0%, #14143a 55%, #0b0b1e 100%);
    padding: clamp(1.75rem, 4.5vw, 4rem) 0 clamp(2.25rem, 5vw, 4.25rem);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

/* the slow-moving glow */
.cvh-hero::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 20% 22%, rgba(99, 102, 241, .22) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 76%, rgba(139, 92, 246, .20) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, .10) 0%, transparent 70%);
    animation: cvh-glow 16s ease-in-out infinite;
    pointer-events: none;
}

/* extension tags drifting in the background (decoration only: aria-hidden in the markup) */
.cvh-floaters { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.cvh-floaters span {
    position: absolute;
    padding: .3rem .75rem;
    border: 1px solid rgba(199, 210, 254, .4);
    border-radius: 999px;
    color: #c7d2fe;
    font: 700 1rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    opacity: .2;
    animation: cvh-drift 18s ease-in-out infinite;
}
.cvh-floaters span:nth-child(1) { left: 53%;  top: 7%;     animation-duration: 17s; }
.cvh-floaters span:nth-child(2) { right: 20%; top: 4%;     animation-duration: 21s; animation-delay: -4s; }
.cvh-floaters span:nth-child(3) { right: 3%;  top: 14%;    animation-duration: 19s; animation-delay: -8s; }
.cvh-floaters span:nth-child(4) { left: 51%;  top: 47%;    animation-duration: 23s; animation-delay: -2s; }
.cvh-floaters span:nth-child(5) { right: 2%;  top: 50%;    animation-duration: 18s; animation-delay: -11s; }
.cvh-floaters span:nth-child(6) { left: 56%;  bottom: 6%;  animation-duration: 20s; animation-delay: -6s; }
.cvh-floaters span:nth-child(7) { right: 24%; bottom: 3%;  animation-duration: 22s; animation-delay: -13s; }
.cvh-floaters span:nth-child(8) { right: 4%;  bottom: 9%;  animation-duration: 19s; animation-delay: -9s; }

/* ============================================================== hero layout */
.cvh-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
    grid-template-areas: "head stage" "extra stage";
    column-gap: clamp(2rem, 4.5vw, 4.5rem);
    row-gap: 1.75rem;
    align-items: start;
}
.cvh-hero-head  { grid-area: head;  align-self: end; min-width: 0; }
.cvh-hero-extra { grid-area: extra; align-self: start; min-width: 0; }
.cvh-stage      { grid-area: stage; align-self: center; min-width: 0; }

.cvh-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 1.25rem; font-size: .9375rem; color: var(--cvh-ink-3); }
.cvh-crumbs a { color: var(--cvh-ink-2); text-decoration: underline; text-underline-offset: 3px; }
.cvh-crumbs a:hover { color: #fff; }
.cvh-crumbs [aria-current] { color: #fff; font-weight: 600; }

.cvh-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 1rem;
    padding: .375rem .875rem;
    border: 1px solid rgba(165, 180, 252, .5);
    border-radius: 999px;
    background: rgba(99, 102, 241, .22);
    color: #e0e7ff;
    font-size: .9375rem;
    font-weight: 600;
}

.cvh-title {
    margin: 0 0 1rem;
    color: #fff;
    font-size: clamp(2.125rem, 4.4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.02em;
}
/* every stop of the gradient is light on the dark hero (>= 11:1); the solid colour is the fallback */
.cvh-grad {
    color: #c7d2fe;
    background-image: linear-gradient(100deg, #c7d2fe 0%, #ddd6fe 50%, #bae6fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.cvh-lead-hero { margin: 0; max-width: 36rem; color: var(--cvh-ink-2); font-size: 1.125rem; line-height: 1.6; }

.cvh-trust { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.cvh-trust li { display: flex; align-items: center; gap: .625rem; color: var(--cvh-ink-2); font-size: 1rem; line-height: 1.5; }
.cvh-trust i { flex: 0 0 1.25rem; color: var(--cvh-accent); text-align: center; }

/* the format stream: a source file, a spark travelling along a pipe, a result file; the labels cycle through four conversions */
.cvh-flow { display: flex; align-items: center; max-width: 30rem; margin: 0 0 1.5rem; }
.cvh-doc {
    flex: 0 0 auto;
    width: 6.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    padding: 1rem .5rem .75rem;
    border: 1px solid var(--cvh-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .06);
    animation: cvh-float 5s ease-in-out infinite;
}
.cvh-doc-dst { animation-delay: -2.5s; }
.cvh-doc i { color: var(--cvh-accent); font-size: 2.25rem; }
.cvh-doc-dst i { color: #a7f3d0; }
.cvh-doc-ext { position: relative; display: block; width: 100%; height: 1.5rem; font-size: .9375rem; letter-spacing: .06em; }
.cvh-doc-ext b { position: absolute; inset: 0; text-align: center; font-weight: 800; opacity: 0; animation: cvh-cycle 12s infinite; }
.cvh-doc-ext b:nth-child(1) { animation-delay: 0s; }
.cvh-doc-ext b:nth-child(2) { animation-delay: 2s; }
.cvh-doc-ext b:nth-child(3) { animation-delay: 4s; }
.cvh-doc-ext b:nth-child(4) { animation-delay: 6s; }
.cvh-doc-ext b:nth-child(5) { animation-delay: 8s; }
.cvh-doc-ext b:nth-child(6) { animation-delay: 10s; }
.cvh-pipe {
    position: relative;
    flex: 1 1 auto;
    height: 2px;
    margin: 0 .875rem;
    background: repeating-linear-gradient(90deg, rgba(199, 210, 254, .6) 0 8px, transparent 8px 14px);
}
.cvh-spark {
    position: absolute;
    top: 50%;
    left: 0;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    border-radius: 50%;
    background: #c7d2fe;
    box-shadow: 0 0 12px 3px rgba(165, 180, 252, .8);
    animation: cvh-spark 2.4s ease-in-out infinite;
}

.cvh-popular { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .625rem; }
.cvh-popular-label { margin-right: .25rem; color: var(--cvh-ink-3); font-size: .9375rem; }
.cvh-pop {
    min-height: 44px;
    padding: .5rem 1rem;
    border: 1px solid var(--cvh-line-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    color: #fff;
    font: inherit;
    font-size: .9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .25s ease, border-color .25s ease, transform .25s ease;
}
.cvh-pop:hover { border-color: #c7d2fe; background: rgba(255, 255, 255, .12); transform: translateY(-1px); }
.cvh-pop[aria-pressed="true"] { border-color: #fff; background: var(--cvh-action); color: var(--cvh-action-fg); box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }

/* ============================================================== the card */
.cvh-glass {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 26rem;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 20px;
    background-color: rgba(23, 23, 58, .62);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025));
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .65);
    transition: border-color .4s var(--cvh-ease), box-shadow .4s var(--cvh-ease);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .cvh-glass { background-color: rgba(23, 23, 58, .94); }
}
.cvh-hero.is-dragging .cvh-glass { border-color: #c7d2fe; box-shadow: 0 0 0 2px rgba(255, 255, 255, .4), 0 24px 60px -20px rgba(0, 0, 0, .65); }

/* each step fades in from below when it appears (display:none -> block restarts the animation) */
.cvh-step { flex: 1 0 auto; width: 100%; display: flex; flex-direction: column; justify-content: center; padding: 1rem; animation: cvh-fade-in .4s ease-out; }
.cvh-step-upload { padding: 8px; }
.cvh-step-title { margin: 0; color: #fff; font-size: 1.375rem; font-weight: 700; line-height: 1.25; text-align: center; }
.cvh-step-title-sm { font-size: 1.0625rem; text-align: left; }
.cvh-step-sub { margin: .375rem 0 0; color: var(--cvh-ink-2); font-size: 1rem; line-height: 1.5; text-align: center; }
.cvh-step [data-cvh-focus]:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

/* ------------------------------------------------------------ 1 · upload */
.cvh-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    gap: .375rem;
    width: 100%;
    padding: 2.5rem 1.5rem;
    border: 2px dashed var(--cvh-line-strong);
    border-radius: 16px;
    color: var(--cvh-ink);
    text-align: center;
    cursor: pointer;
    transition: border-color .3s ease, background-color .3s ease, transform .3s ease;
}
.cvh-drop:hover { border-color: #c7d2fe; background-color: rgba(99, 102, 241, .12); }
.cvh-hero.is-dragging .cvh-drop,
.cvh-drop.is-over { border-style: solid; border-color: #c7d2fe; background-color: rgba(99, 102, 241, .2); transform: scale(1.01); }
.cvh-drop:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.cvh-drop-icon-wrap { position: relative; width: 80px; height: 80px; margin-bottom: 1rem; }
.cvh-drop-icon { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #c7d2fe; font-size: 2.5rem; animation: cvh-float 4s ease-in-out infinite; }
.cvh-ring { position: absolute; top: 50%; left: 50%; width: 70px; height: 70px; border: 2px solid rgba(165, 180, 252, .6); border-radius: 50%; transform: translate(-50%, -50%); animation: cvh-pulse-ring 2.5s ease-out infinite; }
.cvh-ring-2 { animation-delay: .8s; }
.cvh-drop-title { color: #fff; font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.cvh-drop-sub { color: var(--cvh-ink-2); font-size: 1rem; line-height: 1.5; }
.cvh-browse-link { color: #c7d2fe; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.cvh-drop-hint { margin-top: .5rem; color: var(--cvh-ink-3); font-size: .9375rem; line-height: 1.45; }

.cvh-pre {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: .875rem 0 0;
    padding: .25rem .25rem .25rem 1rem;
    border: 1px solid var(--cvh-line-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 1rem;
}
.cvh-pre-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--cvh-ink-2);
    font: inherit;
    cursor: pointer;
}
.cvh-pre-clear:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.cvh-note { margin: .75rem 0 0; color: var(--cvh-ink-2); font-size: .9375rem; line-height: 1.5; text-align: center; }

/* ------------------------------------------------------ 2 · pick the extension */
.cvh-step-select { justify-content: flex-start; gap: 1rem; }
.cvh-files { display: flex; flex-direction: column; gap: .75rem; }
.cvh-list, .cvh-resultlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; max-height: 14rem; overflow-y: auto; }
.cvh-file {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: center;
    padding: .5rem .75rem;
    border: 1px solid var(--cvh-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, .05);
}
.cvh-file.is-error { border-color: #f87171; }
.cvh-file.is-warn { border-color: var(--cvh-line-strong); }
.cvh-thumb {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    color: #1e1b4b;
    background-color: #fff;
    background-image:
        linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%),
        linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%);
    background-size: 12px 12px;
    background-position: 0 0, 6px 6px;
}
.cvh-thumb.is-plain { color: #fff; background-image: linear-gradient(135deg, #4f46e5, #7c3aed); background-color: #4f46e5; font-size: 1.25rem; }
.cvh-thumb img { display: block; max-width: 100%; max-height: 100%; }
.cvh-file-main { min-width: 0; display: flex; flex-direction: column; gap: .125rem; }
.cvh-file-name { margin: 0; color: #fff; font-size: 1rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.cvh-file-meta { margin: 0; color: var(--cvh-ink-3); font-size: .9375rem; overflow-wrap: anywhere; }
.cvh-file-msg { margin: 0; color: var(--cvh-ink-2); font-size: .9375rem; line-height: 1.4; overflow-wrap: anywhere; }
.cvh-file.is-error .cvh-file-msg { color: #fecaca; }
.cvh-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--cvh-ink-2);
    font: inherit;
    cursor: pointer;
}
.cvh-remove:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.cvh-filebar { display: flex; flex-wrap: wrap; gap: .5rem; }

.cvh-loading { display: flex; flex-direction: column; align-items: center; gap: .75rem; padding: 1.25rem 1rem; color: var(--cvh-ink-2); }
.cvh-loading p { margin: 0; font-size: 1rem; }
.cvh-spinner { width: 40px; height: 40px; border: 3px solid rgba(255, 255, 255, .2); border-top-color: #c7d2fe; border-radius: 50%; animation: cvh-spin 1s linear infinite; }

.cvh-image, .cvh-group-card { display: flex; flex-direction: column; gap: .875rem; }
.cvh-targets { margin: 0; padding: 0; border: 0; min-width: 0; }
.cvh-formats { display: flex; flex-wrap: wrap; gap: .5rem; }
.cvh-format { position: relative; display: block; cursor: pointer; }
.cvh-format-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cvh-format-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .375rem;
    min-width: 4.5rem;
    min-height: 44px;
    padding: .5rem 1.125rem;
    border: 1px solid var(--cvh-line-strong);
    border-radius: 10px;
    background: rgba(255, 255, 255, .06);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .02em;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.cvh-format:hover .cvh-format-box { border-color: #c7d2fe; background: rgba(255, 255, 255, .12); }
/* the selected state is NOT colour alone: a filled button, a white ring and a tick */
.cvh-format-input:checked + .cvh-format-box { border-color: #fff; background: var(--cvh-action); color: var(--cvh-action-fg); box-shadow: 0 0 0 2px rgba(255, 255, 255, .4); }
.cvh-format-input:checked + .cvh-format-box::before { content: "\2713"; font-weight: 800; }
.cvh-format-input:focus-visible + .cvh-format-box { outline: 3px solid #fff; outline-offset: 2px; }
.cvh-format-input:disabled { cursor: not-allowed; }
.cvh-format-input:disabled + .cvh-format-box { opacity: .5; }
.cvh-format-note { margin: 0; min-height: 1.5em; color: var(--cvh-ink-2); font-size: .9375rem; line-height: 1.5; }
.cvh-hint { margin: 0; color: var(--cvh-ink-3); font-size: .9375rem; line-height: 1.5; }
.cvh-hint-center { text-align: center; }
.cvh-hint a, .cvh-more a { color: #c7d2fe; text-decoration: underline; text-underline-offset: 3px; }

.cvh-more { border: 1px solid var(--cvh-line); border-radius: 10px; background: rgba(255, 255, 255, .04); }
.cvh-more summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 1rem;
    color: #fff;
    font-size: .9375rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}
.cvh-more summary::-webkit-details-marker { display: none; }
.cvh-opt-flag { flex: 1 1 auto; margin: 0 .75rem; color: var(--cvh-ink-2); font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.cvh-more summary::after { content: "\25BE"; color: var(--cvh-ink-2); transition: transform .25s ease; }
.cvh-more[open] summary::after { transform: rotate(180deg); }
.cvh-more-body { display: flex; flex-direction: column; gap: 1rem; padding: .25rem 1rem 1rem; }
.cvh-opt { display: flex; flex-direction: column; gap: .375rem; min-width: 0; }
.cvh-label { color: #fff; font-size: .9375rem; font-weight: 600; }
.cvh-fieldset { margin: 0; padding: 0; border: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.cvh-fieldset legend { float: left; width: 100%; margin-bottom: .375rem; padding: 0; }
.cvh-fieldset .cvh-hint, .cvh-fieldset .cvh-size { flex: 1 1 100%; }
.cvh-check { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; color: #fff; font-size: .9375rem; cursor: pointer; }
.cvh-check input { width: 20px; height: 20px; margin: 0; accent-color: #a5b4fc; }
.cvh-range { width: 100%; max-width: 22rem; min-height: 44px; margin: 0; accent-color: #a5b4fc; }
.cvh-color { width: 44px; height: 44px; padding: 2px; border: 1px solid var(--cvh-line-strong); border-radius: 10px; background: var(--cvh-field); cursor: pointer; }
.cvh-size { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; color: #fff; }
.cvh-num input {
    width: 6.5rem;
    min-height: 44px;
    padding: 0 .75rem;
    border: 1px solid var(--cvh-line-strong);
    border-radius: 10px;
    background: var(--cvh-field);
    color: #fff;
    font: inherit;
    font-size: 1rem;
}
.cvh-num input::placeholder { color: var(--cvh-ink-3); opacity: 1; }
.cvh-presets { display: flex; flex-wrap: wrap; gap: .5rem; flex: 1 1 100%; }
.cvh-chip {
    min-width: 44px;
    min-height: 44px;
    padding: .5rem 1rem;
    border: 1px solid var(--cvh-line-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    color: #fff;
    font: inherit;
    font-size: .9375rem;
    cursor: pointer;
}
.cvh-chip:hover { border-color: #c7d2fe; background: rgba(255, 255, 255, .12); }

.cvh-convert-action { display: flex; justify-content: center; padding-top: .25rem; }

/* ----------------------------- data conversions: JSON, CSV, SQL, HTML and text are converted in the card, like images */
.cvh-data { display: flex; flex-direction: column; }
.cvh-groups { display: flex; flex-direction: column; gap: 1.25rem; }
.cvh-group-card + .cvh-group-card { padding-top: 1.25rem; border-top: 1px solid var(--cvh-line); }
.cvh-step-select.is-mixed .cvh-data { padding-top: 1.25rem; border-top: 1px solid var(--cvh-line); }
.cvh-input, .cvh-select {
    width: 100%;
    max-width: 24rem;
    min-height: 44px;
    padding: 0 .75rem;
    border: 1px solid var(--cvh-line-strong);
    border-radius: 10px;
    background-color: var(--cvh-field);
    color: #fff;
    font: inherit;
    font-size: 1rem;
}
.cvh-select { padding-right: 2rem; }
.cvh-input::placeholder { color: var(--cvh-ink-3); opacity: 1; }
.cvh-input:focus-visible, .cvh-select:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* the converted text, before it is copied or downloaded */
.cvh-preview { width: 100%; overflow: hidden; border: 1px solid var(--cvh-line); border-radius: 10px; background: rgba(0, 0, 0, .28); text-align: left; }
.cvh-preview-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem .75rem; padding: .625rem .875rem; border-bottom: 1px solid var(--cvh-line); }
.cvh-preview-head strong { color: #fff; font-size: 1rem; overflow-wrap: anywhere; }
.cvh-preview-head span { color: var(--cvh-ink-3); font-size: .9375rem; }
.cvh-notes { display: flex; flex-direction: column; gap: .25rem; margin: 0; padding: .5rem .875rem; border-bottom: 1px solid var(--cvh-line); list-style: none; color: var(--cvh-ink-2); font-size: .9375rem; line-height: 1.45; }
.cvh-preview-body { max-height: 11rem; margin: 0; padding: .75rem .875rem; overflow: auto; color: #e0e7ff; font: .9375rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; tab-size: 2; }
.cvh-preview-body:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
.cvh-file-note { margin: 0; color: var(--cvh-ink-2); font-size: .9375rem; line-height: 1.4; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- buttons */
.cvh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 48px;
    padding: .625rem 1.75rem;
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .3s ease, filter .2s ease, background-color .2s ease, border-color .2s ease;
}
.cvh-btn:disabled, .cvh-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.cvh-btn-primary { min-height: 52px; padding: .625rem 2.5rem; background: var(--cvh-action); color: var(--cvh-action-fg); box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .55); }
.cvh-btn-primary:hover:not(:disabled):not([aria-disabled="true"]) { transform: translateY(-2px); filter: brightness(1.05); }
.cvh-btn-success { min-height: 52px; padding: .625rem 2.5rem; border-color: #34d399; background-image: linear-gradient(135deg, #047857, #065f46); background-color: #047857; color: #fff; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .55); }
.cvh-btn-success:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.1); }
.cvh-btn-quiet { background: transparent; color: #fff; border-color: var(--cvh-line-strong); }
.cvh-btn-quiet:hover:not(:disabled) { background: rgba(255, 255, 255, .1); border-color: #c7d2fe; }
.cvh-btn-sm { min-height: 44px; padding: .5rem 1rem; font-size: .9375rem; }

.cvh-pop:focus-visible,
.cvh-btn:focus-visible,
.cvh-remove:focus-visible,
.cvh-pre-clear:focus-visible,
.cvh-chip:focus-visible,
.cvh-more summary:focus-visible,
.cvh-check input:focus-visible,
.cvh-range:focus-visible,
.cvh-color:focus-visible,
.cvh-num input:focus-visible,
.cvh-hint a:focus-visible,
.cvh-more a:focus-visible,
.cvh-crumbs a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* -------------------------------------------------------------- 3 · working */
.cvh-step-work { align-items: center; text-align: center; gap: .25rem; }
.cvh-progress { position: relative; width: 140px; height: 140px; margin: 0 auto 1.5rem; }
.cvh-ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cvh-ring-bg { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 6; }
.cvh-ring-fill { fill: none; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 440; stroke-dashoffset: 440; transition: stroke-dashoffset .3s ease; }
.cvh-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 2rem; font-weight: 800; }
.cvh-pct small { margin-left: .125rem; color: var(--cvh-ink-3); font-size: 1rem; font-weight: 500; }
.cvh-pair { display: inline-flex; align-items: center; gap: .625rem; margin: 1rem 0 0; padding: .5rem 1.125rem; border-radius: 999px; background: rgba(255, 255, 255, .08); color: #fff; font-size: 1rem; font-weight: 700; }
.cvh-pair i { color: var(--cvh-accent); }
.cvh-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.cvh-step-work .cvh-actions, .cvh-actions-quiet { margin-top: 1rem; }

/* ----------------------------------------------------------------- 4 · done */
.cvh-step-done { align-items: center; justify-content: flex-start; gap: .5rem; text-align: center; }
.cvh-success, .cvh-failure { width: 96px; height: 96px; margin: 0 auto .5rem; }
.cvh-success-circle, .cvh-failure-circle { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; border-radius: 50%; animation: cvh-scale-in .5s ease-out; }
.cvh-success-circle { background-image: linear-gradient(135deg, #10b981, #059669); background-color: #059669; box-shadow: 0 8px 30px rgba(16, 185, 129, .4); }
.cvh-failure-circle { background-image: linear-gradient(135deg, #ef4444, #dc2626); background-color: #dc2626; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .55); }
.cvh-success-circle i { color: #fff; font-size: 2.75rem; }
.cvh-failure-circle i { color: #fff; font-size: 2.5rem; }
.cvh-stats { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin: .5rem 0 .25rem; }
.cvh-stats > i { color: var(--cvh-accent); }
.cvh-stats > div { display: flex; flex-direction: column; align-items: center; gap: .125rem; }
.cvh-stat-k { color: var(--cvh-ink-3); font-size: .9375rem; }
.cvh-stat-v { color: #fff; font-size: 1.25rem; font-weight: 700; }
.cvh-stat-ok { color: #6ee7b7; }
.cvh-resultlist { width: 100%; margin-top: .5rem; text-align: left; }
.cvh-result .cvh-btn { white-space: nowrap; }
.cvh-step-error { align-items: center; text-align: center; gap: .5rem; }

/* ------------------------------------------------------- status and footnote */
.cvh-status { margin: 0 1rem .75rem; color: var(--cvh-ink-2); font-size: .9375rem; line-height: 1.5; text-align: center; }
.cvh-status-error { padding: .5rem .75rem; border: 1px solid #f87171; border-radius: 10px; background: rgba(248, 113, 113, .12); color: #fee2e2; }
.cvh-glass { flex-direction: column; }
.cvh-foot { margin: .875rem 0 0; color: var(--cvh-ink-3); font-size: .9375rem; line-height: 1.5; text-align: center; }
.cvh-foot i { margin-right: .35rem; color: #6ee7b7; }

/* =============================================== below the hero: site theme */
.cvh-browse { max-width: 1100px; margin: clamp(2rem, 4vw, 3.5rem) auto 2.5rem; color: var(--text-primary, #1e293b); }
.cvh-browse h2 { margin: 0 0 .5rem; font-size: 1.5rem; }
.cvh-lead { margin: 0 0 1.25rem; color: var(--text-secondary, #475569); font-size: 1rem; line-height: 1.65; }
.cvh-group { margin: 0 0 1.75rem; }
.cvh-group-title { margin: 0 0 .25rem; font-size: 1.125rem; }
.cvh-group-title i { margin-right: .35rem; color: var(--text-secondary, #475569); }
.cvh-group-blurb { margin: 0 0 .75rem; color: var(--text-secondary, #475569); font-size: .9375rem; }

.cvh-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; }
.cvh-card-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "icon body" "badge badge";
    gap: .5rem .75rem;
    align-items: start;
    height: 100%;
    padding: .875rem 1rem;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--border-radius, 8px);
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #1e293b);
    text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease;
}
.cvh-card-link:hover { border-color: var(--primary-color, #0066cc); background: var(--bg-secondary, #f8fafc); }
.cvh-card-link:focus-visible { outline: 3px solid var(--primary-color, #0066cc); outline-offset: 2px; }
.cvh-card-icon { grid-area: icon; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--border-radius, 8px); background: var(--bg-tertiary, #eef2f7); color: var(--text-primary, #1e293b); }
.cvh-card-body { grid-area: body; display: flex; flex-direction: column; gap: .125rem; min-width: 0; }
.cvh-card-name { font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.cvh-card-route { color: var(--text-secondary, #475569); font-size: .9375rem; font-weight: 600; }
.cvh-card-desc { color: var(--text-secondary, #475569); font-size: .9375rem; line-height: 1.45; }
.cvh-badge {
    grid-area: badge;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .25rem .625rem;
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 999px;
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #1e293b);
    font-size: .875rem;
    font-weight: 600;
    white-space: nowrap;
}
.cvh-badge-local { border-color: var(--success-color, #059669); }
.cvh-badge-local i { color: var(--success-color, #059669); }
.cvh-badge-server { border-color: var(--text-secondary, #475569); }
.cvh-badge-server i { color: var(--text-secondary, #475569); }

.cvh-content { max-width: 760px; margin: 0 auto 3rem; color: var(--text-primary, #1e293b); }
.cvh-content h2 { margin: 2rem 0 .75rem; font-size: 1.375rem; }
.cvh-content h3 { margin: 0 0 .25rem; font-size: 1.0625rem; }
.cvh-content p, .cvh-content li { color: var(--text-primary, #1e293b); font-size: 1rem; line-height: 1.65; }
.cvh-content p { margin: 0 0 1rem; }
.cvh-content a { color: var(--primary-color, #0066cc); }
.cvh-content code { padding: .1rem .4rem; border-radius: var(--border-radius, 8px); background: var(--bg-tertiary, #eef2f7); font-size: .9em; }
.cvh-content .faq-item { margin: 0 0 1rem; }
.cvh-table-wrap { overflow-x: auto; margin: 0 0 1rem; }
.cvh-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.cvh-table th, .cvh-table td { padding: .625rem .75rem; border-bottom: 1px solid var(--border-color, #e2e8f0); text-align: left; vertical-align: top; }
.cvh-table th { color: var(--text-secondary, #475569); font-size: .9375rem; }
.cvh-table td:first-child { font-weight: 600; white-space: nowrap; }

/* ================================================================ animations */
@keyframes cvh-glow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33%      { transform: translate(2%, 2%) rotate(1deg); }
    66%      { transform: translate(-1%, -1%) rotate(-1deg); }
}
@keyframes cvh-drift {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(14px, -22px); }
}
@keyframes cvh-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
@keyframes cvh-pulse-ring {
    0%   { transform: translate(-50%, -50%) scale(.8); opacity: .8; }
    100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
}
@keyframes cvh-fade-in {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes cvh-scale-in {
    0%   { transform: scale(0); }
    50%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}
@keyframes cvh-spin { to { transform: rotate(360deg); } }
@keyframes cvh-cycle {
    0%        { opacity: 0; transform: translateY(8px); }
    2%, 14%   { opacity: 1; transform: translateY(0); }
    16%, 100% { opacity: 0; transform: translateY(-8px); }
}
@keyframes cvh-spark {
    0%   { left: 0; opacity: 0; }
    15%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { left: calc(100% - 10px); opacity: 0; }
}

/* off-screen or in a background tab: stop spending frames on it (the script toggles .is-paused) */
.cvh-hero.is-paused::before,
.cvh-hero.is-paused *,
.cvh-hero.is-paused *::before,
.cvh-hero.is-paused *::after { animation-play-state: paused !important; }

/* ================================================================ responsive */
@media (max-width: 991px) {
    .cvh-hero-inner { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "stage" "extra"; row-gap: 1.5rem; }
    .cvh-hero-head, .cvh-hero-extra, .cvh-stage { align-self: stretch; }
    .cvh-flow { max-width: 26rem; }
    .cvh-glass { min-height: 22rem; }
    /* one column: the tags would sit over the copy */
    .cvh-floaters { display: none; }
}

@media (max-width: 600px) {
    .cvh-hero { padding-top: 1.25rem; }
    .cvh-crumbs { margin-bottom: .75rem; }
    .cvh-lead-hero { font-size: 1rem; }
    .cvh-flow { display: none; }
    .cvh-drop { padding: 2rem 1rem; }
    .cvh-drop-icon-wrap { width: 64px; height: 64px; margin-bottom: .75rem; }
    .cvh-drop-icon { font-size: 2rem; }
    .cvh-ring { width: 56px; height: 56px; }
    .cvh-step { padding: .75rem; }
    .cvh-step-upload { padding: 6px; }
    .cvh-glass { min-height: 0; padding: 6px; }
    .cvh-btn-primary, .cvh-btn-success { width: 100%; padding-left: 1rem; padding-right: 1rem; }
    .cvh-convert-action { display: block; }
    .cvh-btn-sm { width: auto; }
    .cvh-file { grid-template-columns: 44px minmax(0, 1fr) auto; gap: .5rem; padding: .5rem; }
    .cvh-thumb { width: 44px; height: 44px; }
    /* result rows: the Download button drops below the text so file names are not chopped mid-word */
    .cvh-result { grid-template-columns: 44px minmax(0, 1fr); }
    .cvh-result .cvh-btn { grid-column: 1 / -1; width: 100%; }
    .cvh-result > span:last-child:empty { display: none; }
    .cvh-cards { grid-template-columns: 1fr; }
    .cvh-progress { width: 120px; height: 120px; }
    .cvh-pct { font-size: 1.75rem; }
    .cvh-preview-body { max-height: 9rem; }
    .cvh-input, .cvh-select { max-width: none; }
}

/* ============================================================ accessibility */
@media (prefers-reduced-motion: reduce) {
    .cvh-hero::before,
    .cvh-hero *,
    .cvh-hero *::before,
    .cvh-hero *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    /* the cycling labels stand still on the first conversion */
    .cvh-doc-ext b:first-child { opacity: 1; }
    .cvh-spark { left: 50%; opacity: 1; }
}

@media (forced-colors: active) {
    .cvh-grad { -webkit-text-fill-color: currentColor; background: none; color: inherit; }
    .cvh-format-input:checked + .cvh-format-box { outline: 3px solid Highlight; }
    .cvh-drop { border-color: CanvasText; }
}
