/*
 * Home page: "Why YT2Conv" features (.ycf, components/main-content.blade.php) and "How it works" steps
 * (.ycs, components/info-boxes.blade.php). Loaded by components/layouts/app.blade.php.
 *
 * Plain CSS like hero.css: the site ships a prebuilt Tailwind bundle, so new utility classes would not
 * exist. Light is the default; [data-theme="dark"] on <html> switches the tokens. Layout responds to each
 * section's own width through container queries. One accent only: the site's teal.
 */

/* ---------- Tokens ---------- */

.ycf,
.ycs {
    --yc-teal: #2d8bad;
    --yc-teal-strong: #1f7898;
    --yc-teal-light: #6ccbe8;
    --yc-c1: #3cc4e6;
    --yc-c2: #1a7192;
    --yc-bg: #f3f6f9;
    --yc-ink: #0f172a;
    --yc-text: #44546a;
    --yc-card: #ffffff;
    --yc-line: rgba(15, 23, 42, 0.08);
    --yc-chip: #f2f6f9;
    --yc-chip-fg: #44546a;
    --yc-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --yc-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    position: relative;
    container-type: inline-size;
    background: var(--yc-bg);
    color: var(--yc-text);
}

[data-theme="dark"] .ycf,
[data-theme="dark"] .ycs {
    --yc-bg: #121a22;
    --yc-ink: #eef3f8;
    --yc-text: #a8b5c3;
    --yc-card: #18212b;
    --yc-line: rgba(255, 255, 255, 0.08);
    --yc-chip: rgba(255, 255, 255, 0.05);
    --yc-chip-fg: #b9c5d2;
}

.ycf *,
.ycs * {
    box-sizing: border-box;
}

/* ---------- Shared: eyebrow pill ---------- */

.yc-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 16px;
    padding: 6px 14px 6px 11px;
    border: 1px solid rgba(45, 139, 173, 0.24);
    border-radius: 999px;
    background: rgba(45, 139, 173, 0.08);
    color: var(--yc-teal-strong);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.yc-eyebrow i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    animation: yc-pulse 2.4s ease-in-out infinite;
}

[data-theme="dark"] .yc-eyebrow {
    border-color: rgba(108, 203, 232, 0.28);
    background: rgba(108, 203, 232, 0.08);
    color: #9fe0f3;
}

@keyframes yc-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(108, 203, 232, 0.2), 0 0 8px rgba(45, 139, 173, 0.55); }
    50% { box-shadow: 0 0 0 6px rgba(108, 203, 232, 0.06), 0 0 16px rgba(45, 139, 173, 0.95); }
}

/* ---------- Features ---------- */

.ycf {
    isolation: isolate;
    overflow: hidden;
}

/* Two soft teal light fields drifting behind the heading */
.ycf::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -160px;
    left: -10%;
    right: -10%;
    height: 900px;
    background:
        radial-gradient(40% 48% at 22% 30%, rgba(45, 139, 173, 0.16), transparent 70%),
        radial-gradient(36% 44% at 78% 22%, rgba(108, 203, 232, 0.18), transparent 70%);
    animation: yc-drift 26s ease-in-out infinite alternate;
    pointer-events: none;
}

[data-theme="dark"] .ycf::before {
    background:
        radial-gradient(40% 48% at 22% 30%, rgba(45, 139, 173, 0.28), transparent 70%),
        radial-gradient(36% 44% at 78% 22%, rgba(108, 203, 232, 0.12), transparent 70%);
}

@keyframes yc-drift {
    from { transform: translate3d(-2%, 0, 0) scale(1); }
    to { transform: translate3d(2%, 4%, 0) scale(1.08); }
}

.ycf-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 96px 20px 80px;
}

.ycf-head {
    max-width: 780px;
    margin: 0 auto 52px;
    text-align: center;
}

.ycf-title {
    margin: 0;
    color: var(--yc-ink);
    font-size: clamp(27px, 3.6cqi, 40px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.12;
    text-wrap: balance;
}

.yc-grad {
    background: linear-gradient(92deg, #1a7192 0%, #2d8bad 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

[data-theme="dark"] .yc-grad {
    background-image: linear-gradient(92deg, #6ccbe8 0%, #9adcf0 100%);
}

.ycf-lead {
    max-width: 720px;
    margin: 16px auto 0;
    font-size: 16.5px;
    line-height: 1.7;
    text-wrap: pretty;
}

.ycf-lead + .ycf-lead {
    margin-top: 12px;
}

.ycf-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Card. --mx/--my/--rx/--ry come from the pointer script. */
.ycf-card {
    --c1: var(--yc-c1);
    --c2: var(--yc-c2);
    --tag-on: var(--yc-c2);

    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 28px 26px 24px;
    border: 1px solid var(--yc-line);
    border-radius: 24px;
    background: var(--yc-card);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 14px 34px -20px rgba(15, 23, 42, 0.22);
    transition: transform 0.5s var(--yc-ease), box-shadow 0.5s var(--yc-ease), border-color 0.3s ease;
}

[data-theme="dark"] .ycf-card {
    --tag-on: var(--yc-teal-light);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 40px -26px rgba(0, 0, 0, 0.9);
}

/* Gradient ring, shown on hover */
.ycf-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    padding: 1.5px;
    border-radius: inherit;
    background: linear-gradient(140deg, var(--c1), rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0) 60%, var(--c2));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

/* Spotlight that follows the pointer */
.ycf-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--c1) 16%, transparent), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.ycf-card > * {
    position: relative;
    z-index: 1;
}

/* 3D icon tile: glossy face, rim light, a slab underneath, a teal glow and a sheen band */
.ycf-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background:
        linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.6) 50%, transparent 62%) no-repeat,
        radial-gradient(120% 90% at 25% 8%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 52%),
        linear-gradient(150deg, var(--c1) 0%, var(--c2) 100%);
    background-size: 260% 100%, 100% 100%, 100% 100%;
    background-position: 112% 0, 0 0, 0 0;
    box-shadow:
        inset 0 1.5px 0 rgba(255, 255, 255, 0.6),
        inset 0 -4px 7px rgba(0, 0, 0, 0.18),
        0 4px 0 -1px color-mix(in srgb, var(--c2) 72%, #000),
        0 16px 26px -10px color-mix(in srgb, var(--c2) 80%, transparent);
    transform: perspective(520px) rotateX(0deg) rotateY(0deg);
    transform-style: preserve-3d;
    transition: transform 0.6s var(--yc-ease), box-shadow 0.5s ease, background-position 0.9s var(--yc-ease);
}

/* Glow pooled under the tile */
.ycf-icon::before {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: -18px;
    height: 16px;
    border-radius: 50%;
    background: var(--c1);
    filter: blur(10px);
    opacity: 0.35;
    transform: translateZ(-30px);
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.ycf-icon svg {
    display: block;
    width: 36px;
    height: 36px;
    overflow: visible;
    color: var(--c2);
    filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.2)) drop-shadow(0 6px 7px rgba(0, 0, 0, 0.16));
    transform: translateZ(16px);
    transition: transform 0.6s var(--yc-spring);
}

/* Glyph parts: white face, translucent back layer, deep-teal details, strokes */
.ycf-icon .g { fill: #ffffff; }
.ycf-icon .g2 { fill: #ffffff; fill-opacity: 0.42; }
.ycf-icon .g7 { fill: #ffffff; fill-opacity: 0.78; }
.ycf-icon .cc { fill: currentColor; }
.ycf-icon .cc4 { fill: currentColor; fill-opacity: 0.45; }
.ycf-icon .ln,
.ycf-icon .lnc {
    fill: none;
    stroke: #ffffff;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3.4;
}
.ycf-icon .lnc { stroke: currentColor; stroke-width: 2.6; }
.ycf-icon .lnb { stroke-width: 4.6; }
.ycf-icon .rj { stroke: #ffffff; stroke-width: 2; stroke-linejoin: round; }
.ycf-icon .sel { fill: #ffffff; fill-opacity: 0.16; stroke: #ffffff; stroke-width: 2.2; }
.ycf-icon .groove { fill: none; stroke: #ffffff; stroke-opacity: 0.55; stroke-width: 1.1; }

.ycf-eq rect {
    transform-box: fill-box;
    transform-origin: 50% 100%;
}

.ycf-run {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-dasharray: 16 84;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ycf-card h3 {
    margin: 24px 0 8px;
    color: var(--yc-ink);
    font-size: 18.5px;
    font-weight: 800;
    letter-spacing: -0.012em;
    line-height: 1.3;
    text-wrap: balance;
}

.ycf-card p {
    margin: 0;
    font-size: 15px;
    line-height: 1.66;
}

.ycf-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: auto 0 0;
    padding: 18px 0 0;
    list-style: none;
}

.ycf-tags li {
    padding: 4px 10px;
    border: 1px solid var(--yc-line);
    border-radius: 999px;
    background: var(--yc-chip);
    color: var(--yc-chip-fg);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.ycf-tags li.is-top {
    border-color: color-mix(in srgb, var(--c1) 40%, transparent);
    background: color-mix(in srgb, var(--c1) 12%, transparent);
    color: var(--tag-on);
}

@media (hover: hover) {
    .ycf-card:hover {
        transform: translateY(-6px);
        border-color: transparent;
        box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04), 0 30px 56px -28px color-mix(in srgb, var(--c2) 60%, transparent);
    }

    [data-theme="dark"] .ycf-card:hover {
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 64px -30px color-mix(in srgb, var(--c1) 55%, transparent);
    }

    .ycf-card:hover::before,
    .ycf-card:hover::after {
        opacity: 1;
    }

    .ycf-card:hover .ycf-icon {
        transform: perspective(520px) rotateX(var(--rx, -10deg)) rotateY(var(--ry, 12deg)) translateY(-3px);
        background-position: -12% 0, 0 0, 0 0;
        box-shadow:
            inset 0 1.5px 0 rgba(255, 255, 255, 0.65),
            inset 0 -4px 7px rgba(0, 0, 0, 0.18),
            0 4px 0 -1px color-mix(in srgb, var(--c2) 72%, #000),
            0 20px 32px -10px color-mix(in srgb, var(--c2) 85%, transparent),
            0 0 34px -2px color-mix(in srgb, var(--c1) 65%, transparent);
    }

    .ycf-card:hover .ycf-icon::before {
        opacity: 0.75;
    }

    .ycf-card:hover .ycf-icon svg {
        transform: translateZ(34px) scale(1.07);
    }

    .ycf-card:hover .ycf-tags li {
        border-color: color-mix(in srgb, var(--c1) 40%, transparent);
        background: color-mix(in srgb, var(--c1) 12%, transparent);
        color: var(--tag-on);
    }

    .ycf-card:hover .ycf-eq rect {
        animation: ycf-eq 0.9s ease-in-out infinite alternate;
    }

    .ycf-card:hover .ycf-eq rect:nth-child(2) { animation-delay: -0.3s; }
    .ycf-card:hover .ycf-eq rect:nth-child(3) { animation-delay: -0.6s; }

    .ycf-card:hover .ycf-run {
        opacity: 1;
        animation: ycf-run 1.8s linear infinite;
    }
}

@keyframes ycf-eq {
    from { transform: scaleY(0.45); }
    to { transform: scaleY(1.1); }
}

@keyframes ycf-run {
    to { stroke-dashoffset: -100; }
}

/* ---------- How it works ---------- */

.ycs {
    --ycs-card: #f6f9fb;
    --ycs-card-hover: #ffffff;
    --ycs-screen: #ffffff;

    border-top: 1px solid var(--yc-line);
    background: #ffffff;
}

[data-theme="dark"] .ycs {
    --ycs-card: #151e27;
    --ycs-card-hover: #18222c;
    --ycs-screen: #0b1117;

    background: #0f161d;
}

.ycs-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 88px 20px 96px;
}

.ycs-head {
    max-width: 640px;
    margin: 0 auto 52px;
    text-align: center;
}

.ycs-title {
    margin: 0;
    color: var(--yc-ink);
    font-size: clamp(26px, 3.4cqi, 38px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    text-wrap: balance;
}

.ycs-sub {
    margin: 12px 0 0;
    font-size: 16.5px;
    line-height: 1.6;
    text-wrap: pretty;
}

.ycs-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Each step: its number centred on top, the card below */
.ycs-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

/* Rail from one number to the next, with a light running along it */
.ycs-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 27px;
    left: calc(50% + 40px);
    right: calc(-50% + 16px);
    height: 2px;
    border-radius: 2px;
    background:
        linear-gradient(90deg, transparent, var(--yc-teal), transparent) no-repeat,
        repeating-linear-gradient(90deg, rgba(45, 139, 173, 0.35) 0 7px, transparent 7px 13px);
    background-size: 36% 100%, auto;
    background-position: -70% 0, 0 0;
    animation: ycs-flow 3.2s var(--yc-ease) infinite;
    pointer-events: none;
}

.ycs-step:nth-child(2)::after {
    animation-delay: 1.6s;
}

[data-theme="dark"] .ycs-step:not(:last-child)::after {
    background-image:
        linear-gradient(90deg, transparent, #9be3f5, transparent),
        repeating-linear-gradient(90deg, rgba(108, 203, 232, 0.3) 0 7px, transparent 7px 13px);
}

@keyframes ycs-flow {
    0% { background-position: -70% 0, 0 0; }
    70%, 100% { background-position: 170% 0, 0 0; }
}

@keyframes ycs-flow-y {
    0% { background-position: 0 -110%, 0 0; }
    70%, 100% { background-position: 0 210%, 0 0; }
}

/* Number: a glossy teal pearl, same finish as the icon tiles */
.ycs-num {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
    background:
        radial-gradient(120% 90% at 30% 12%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 52%),
        linear-gradient(150deg, var(--yc-c1) 0%, var(--yc-c2) 100%);
    box-shadow:
        inset 0 1.5px 0 rgba(255, 255, 255, 0.6),
        inset 0 -4px 7px rgba(0, 0, 0, 0.18),
        0 10px 22px -8px rgba(26, 113, 146, 0.75),
        0 0 0 6px rgba(45, 139, 173, 0.08);
    transition: transform 0.5s var(--yc-spring);
}

.ycs-num::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0 55%, rgba(45, 139, 173, 0.45) 80%, var(--yc-teal) 100%);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: ycs-spin 2.2s linear infinite paused;
}

[data-theme="dark"] .ycs-num {
    box-shadow:
        inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
        inset 0 -4px 7px rgba(0, 0, 0, 0.25),
        0 10px 24px -8px rgba(0, 0, 0, 0.7),
        0 0 0 6px rgba(108, 203, 232, 0.07),
        0 0 26px rgba(45, 139, 173, 0.45);
}

[data-theme="dark"] .ycs-num::before {
    background: conic-gradient(from 0deg, transparent 0 55%, rgba(108, 203, 232, 0.5) 80%, var(--yc-teal-light) 100%);
}

@keyframes ycs-spin {
    to { transform: rotate(360deg); }
}

.ycs-card {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-self: stretch;
    margin-top: 22px;
    padding: 16px 16px 26px;
    border: 1px solid var(--yc-line);
    border-radius: 24px;
    background: var(--ycs-card);
    text-align: center;
    transition: transform 0.5s var(--yc-ease), border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.5s var(--yc-ease);
}

.ycs-card h3 {
    margin: 22px 8px 8px;
    color: var(--yc-ink);
    font-size: 18.5px;
    font-weight: 800;
    letter-spacing: -0.012em;
    line-height: 1.3;
    text-wrap: balance;
}

.ycs-card p {
    margin: 0 8px;
    font-size: 15px;
    line-height: 1.66;
    text-wrap: pretty;
}

/* Mini screens: a small picture of the real controls for each step */
.ycs-mock {
    display: grid;
    align-content: center;
    gap: 10px;
    min-height: 136px;
    padding: 14px;
    border-radius: 16px;
    background: var(--ycs-screen);
    color: var(--yc-ink);
    font-size: 13px;
    line-height: 1.3;
    text-align: left;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 14px 28px -18px rgba(15, 23, 42, 0.3), inset 0 0 0 1px rgba(15, 23, 42, 0.07);
    transition: transform 0.5s var(--yc-ease);
}

[data-theme="dark"] .ycs-mock {
    box-shadow: 0 14px 28px -18px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.ycs-mock svg {
    display: block;
    flex: none;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Step 1: search field */
.ycs-field {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 6px 0 7px;
    border: 1.5px solid var(--yc-teal);
    border-radius: 12px;
    box-shadow: 0 0 0 4px rgba(45, 139, 173, 0.14);
}

.ycs-field-ic {
    display: grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--yc-teal-strong);
    color: #ffffff;
}

.ycs-url {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ycs-caret {
    display: inline-block;
    width: 2px;
    height: 15px;
    margin-left: 2px;
    vertical-align: -3px;
    background: var(--yc-teal);
    animation: ycs-blink 1.1s steps(1) infinite;
}

.ycs-chip {
    flex: none;
    padding: 5px 9px;
    border-radius: 8px;
    background: #eef4f8;
    color: var(--yc-teal-strong);
    font-size: 12px;
    font-weight: 700;
}

.ycs-sugg {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    color: #94a3b8;
}

.ycs-sugg i {
    display: block;
    height: 8px;
    border-radius: 4px;
    background: #e6edf2;
}

[data-theme="dark"] .ycs-field {
    border-color: var(--yc-teal-light);
    box-shadow: 0 0 0 4px rgba(108, 203, 232, 0.12);
}

[data-theme="dark"] .ycs-chip {
    background: rgba(255, 255, 255, 0.06);
    color: #9fe0f3;
}

[data-theme="dark"] .ycs-sugg {
    color: #64748b;
}

[data-theme="dark"] .ycs-sugg i {
    background: rgba(255, 255, 255, 0.08);
}

@keyframes ycs-blink {
    50% { opacity: 0; }
}

/* Step 2: Audio / Video switch and a quality row */
.ycs-seg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 4px;
    border-radius: 12px;
    background: #eef3f7;
    font-weight: 700;
    text-align: center;
}

.ycs-seg span {
    padding: 7px 0;
    border-radius: 9px;
    color: #64748b;
}

.ycs-seg .is-on {
    background: #ffffff;
    color: var(--yc-ink);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.ycs-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 7px 7px 12px;
    border: 1px solid #e3e8ee;
    border-radius: 12px;
}

.ycs-q {
    color: #475569;
    white-space: nowrap;
}

.ycs-q b {
    color: var(--yc-ink);
    font-size: 15px;
}

.ycs-meter {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
    margin-right: auto;
}

.ycs-meter i {
    display: block;
    width: 4px;
    border-radius: 1px;
    background: var(--yc-teal);
}

.ycs-meter i:nth-child(1) { height: 5px; }
.ycs-meter i:nth-child(2) { height: 8px; }
.ycs-meter i:nth-child(3) { height: 11px; }
.ycs-meter i:nth-child(4) { height: 14px; }

.ycs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2f9fc4 0%, #1f7898 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 16px -8px rgba(31, 120, 152, 0.9);
}

[data-theme="dark"] .ycs-seg {
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .ycs-seg span {
    color: #8f9bab;
}

[data-theme="dark"] .ycs-seg .is-on {
    background: #1f2a36;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .ycs-row {
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .ycs-q {
    color: #8f9bab;
}

[data-theme="dark"] .ycs-meter i {
    background: var(--yc-teal-light);
}

/* Step 3: finished file and the Download button */
.ycs-file {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ycs-file-ic {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(150deg, var(--yc-c1), var(--yc-c2));
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 6px 12px -6px var(--yc-c2);
}

.ycs-file-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ycs-ok {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: none;
    padding: 3px 8px 3px 6px;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    font-size: 12px;
    font-weight: 700;
}

.ycs-mock .ycs-ok svg {
    width: 13px;
    height: 13px;
    stroke-width: 3;
}

.ycs-bar {
    height: 6px;
    overflow: hidden;
    border-radius: 3px;
    background: #e6edf2;
}

.ycs-bar i {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2d8bad, #6ccbe8, #2d8bad);
    background-size: 200% 100%;
    animation: ycs-shimmer 2.4s linear infinite;
}

.ycs-btn-dl {
    padding: 10px 14px;
    animation: ycs-glow 2.6s ease-in-out infinite;
}

[data-theme="dark"] .ycs-ok {
    background: rgba(34, 197, 94, 0.14);
    color: #4ade80;
}

[data-theme="dark"] .ycs-bar {
    background: rgba(255, 255, 255, 0.08);
}

@keyframes ycs-shimmer {
    to { background-position: -200% 0; }
}

@keyframes ycs-glow {
    50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 22px -6px rgba(45, 139, 173, 0.95), 0 0 0 4px rgba(45, 139, 173, 0.16); }
}

@media (hover: hover) {
    .ycs-step:hover .ycs-num {
        transform: scale(1.08);
    }

    .ycs-step:hover .ycs-num::before {
        opacity: 1;
        animation-play-state: running;
    }

    .ycs-step:hover .ycs-card {
        transform: translateY(-6px);
        border-color: rgba(45, 139, 173, 0.35);
        background: var(--ycs-card-hover);
        box-shadow: 0 28px 50px -30px rgba(26, 113, 146, 0.5);
    }

    [data-theme="dark"] .ycs-step:hover .ycs-card {
        border-color: rgba(108, 203, 232, 0.35);
        box-shadow: 0 28px 54px -30px rgba(45, 139, 173, 0.55);
    }

    .ycs-step:hover .ycs-mock {
        transform: translateY(-2px) scale(1.015);
    }
}

/* ---------- Widths ---------- */

@container (min-width: 620px) and (max-width: 959px) {
    .ycf-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Nine cards in two columns: the last one spans the row */
    .ycf-card:last-child {
        display: grid;
        grid-column: 1 / -1;
        grid-template-columns: 64px minmax(0, 1fr);
        column-gap: 22px;
    }

    .ycf-card:last-child .ycf-icon {
        grid-row: 1 / span 3;
    }

    .ycf-card:last-child h3 {
        margin-top: 2px;
    }
}

@container (max-width: 619px) {
    .ycf-inner {
        padding: 60px 16px 48px;
    }

    .ycf-head {
        margin-bottom: 30px;
    }

    .ycf-lead {
        font-size: 15.5px;
        line-height: 1.65;
    }

    .ycf-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .ycf-card {
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr);
        column-gap: 16px;
        padding: 20px 18px 18px;
        border-radius: 20px;
    }

    .ycf-icon {
        grid-row: 1 / span 3;
        width: 52px;
        height: 52px;
        border-radius: 16px;
    }

    .ycf-icon svg {
        width: 30px;
        height: 30px;
    }

    .ycf-card h3 {
        margin: 1px 0 6px;
        font-size: 17px;
    }

    .ycf-card p {
        font-size: 14.5px;
        line-height: 1.62;
    }

    .ycf-tags {
        padding-top: 12px;
    }
}

@container (max-width: 879px) {
    .ycs-inner {
        padding: 60px 16px 64px;
    }

    .ycs-head {
        margin-bottom: 34px;
    }

    .ycs-sub {
        font-size: 15.5px;
    }

    .ycs-steps {
        grid-template-columns: minmax(0, 1fr);
        gap: 44px;
        max-width: 520px;
        margin: 0 auto;
    }

    .ycs-num {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .ycs-num::before {
        inset: -6px;
    }

    .ycs-card {
        margin-top: 16px;
        padding: 14px 14px 22px;
        border-radius: 20px;
    }

    .ycs-card h3 {
        margin-top: 18px;
        font-size: 17px;
    }

    .ycs-card p {
        font-size: 14.5px;
    }

    /* Stacked: a short vertical rail from each card down to the next number */
    .ycs-step:not(:last-child)::after {
        top: calc(100% + 10px);
        left: calc(50% - 1px);
        right: auto;
        width: 2px;
        height: 24px;
        background-image:
            linear-gradient(180deg, transparent, var(--yc-teal), transparent),
            repeating-linear-gradient(180deg, rgba(45, 139, 173, 0.35) 0 5px, transparent 5px 9px);
        background-size: 100% 50%, auto;
        background-position: 0 -110%, 0 0;
        animation-name: ycs-flow-y;
    }

    [data-theme="dark"] .ycs-step:not(:last-child)::after {
        background-image:
            linear-gradient(180deg, transparent, #9be3f5, transparent),
            repeating-linear-gradient(180deg, rgba(108, 203, 232, 0.3) 0 5px, transparent 5px 9px);
    }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .ycf::before,
    .yc-eyebrow i,
    .ycs-step::after,
    .ycs-num::before,
    .ycs-caret,
    .ycs-bar i,
    .ycs-btn-dl,
    .ycf-card .ycf-eq rect,
    .ycf-card .ycf-run {
        animation: none !important;
    }

    .ycf-card,
    .ycf-icon,
    .ycf-icon svg,
    .ycs-card,
    .ycs-mock,
    .ycs-num {
        transition: none !important;
    }

    .ycf-card:hover,
    .ycf-card:hover .ycf-icon,
    .ycf-card:hover .ycf-icon svg,
    .ycs-step:hover .ycs-card,
    .ycs-step:hover .ycs-mock,
    .ycs-step:hover .ycs-num {
        transform: none !important;
    }
}
