/*
 * The cut preview page (/tools/cricut-cut-preview), from the admin simulator's own styles. Everything is
 * nested under .cut-preview so none of it reaches the rest of the site; light only, like the site.
 */
.cut-preview {
    --bg: #f5f6fa;
    --surface: #ffffff;
    --ink: #171d24;
    --muted: #56606b;
    --line: #e3e6ee;
    --bench: #eceaf7;
    --radius: 18px;
    --shadow: 0 1px 2px rgb(23 29 36 / 0.04), 0 12px 32px -12px rgb(23 29 36 / 0.12);
    --accent: var(--primary, #5b3df5);
    --accent-fill: var(--primary, #5b3df5);
    --accent-ink: #ffffff;
    display: grid;
    gap: 20px;
    --easy-bg: #dff1e5;
    --easy-ink: #1f6b3f;
    --hook-bg: #fbe9c6;
    --hook-ink: #8a4b00;
    --hard-bg: #f8d9d5;
    --hard-ink: #a52c22;
    --focus: #1d4ed8;
    --display: var(--font-sans);
    --body: var(--font-sans);
    --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
    /* Layout: one tilted workbench scene up top, controls under it, then the cut check and the fine print. */

    .eyebrow {
        margin: 0 0 6px;
        font-family: var(--mono);
        font-size: 11.5px;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--muted);
    }

    .lede {
        margin: 0;
        max-width: 62ch;
        color: var(--muted);
        font-size: 16px;
    }

    .stage {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 14px;
        overflow: hidden;
    }
    .bench {
        background: var(--bench);
        padding: clamp(10px, 3vw, 28px) clamp(8px, 3vw, 28px) clamp(14px, 4vw, 34px);
        perspective: 1100px;
    }
    .tilt {
        transform: rotateX(13deg);
        transform-origin: 50% 100%;
        transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
    }
    .flat .tilt {
        transform: none;
    }
    canvas {
        display: block;
        width: 100%;
        aspect-ratio: 960 / 560;
        max-width: 100%;
    }

    .status {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px 22px;
        padding: 14px 18px 4px;
    }
    .steps {
        display: flex;
        gap: 8px;
        margin: 0;
        padding: 0;
        list-style: none;
        flex-wrap: wrap;
    }
    .steps li {
        cursor: pointer;
    }
    .steps li:hover {
        border-color: var(--ink);
    }
    .steps li:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }
    .steps li {
        font-family: var(--mono);
        font-size: 13px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding: 4px 16px;
        border-radius: 999px;
        border: 1px solid var(--line);
        color: var(--muted);
        transition:
            background 0.2s,
            color 0.2s,
            border-color 0.2s;
    }
    .steps li[data-state='active'] {
        background: var(--accent-fill);
        border-color: var(--accent-fill);
        color: var(--accent-ink);
    }
    .steps li[data-state='done'] {
        color: var(--ink);
        border-color: var(--ink);
    }
    .field[hidden] {
        display: none;
    }
    .caption {
        margin: 0;
        flex: 1 1 260px;
        min-width: 0;
        color: var(--muted);
        font-size: 14px;
    }

    .controls {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px 18px;
        padding: 12px 18px 18px;
    }
    .btn {
        font: 600 14px/1 var(--body);
        color: var(--accent-ink);
        background: var(--accent-fill);
        border: 0;
        border-radius: 8px;
        padding: 10px 16px;
        min-height: 44px;
        min-width: 84px;
        cursor: pointer;
    }
    .btn.quiet {
        background: transparent;
        color: var(--ink);
        border: 1px solid var(--line);
    }
    .btn:focus-visible,
    input:focus-visible,
    select:focus-visible {
        outline: 2px solid var(--focus);
        outline-offset: 2px;
    }
    .upload {
        cursor: pointer;
        display: inline-block;
    }
    .note {
        margin: 0;
        font-size: 12.5px;
        color: var(--hook-ink);
        flex-basis: 100%;
    }
    .scrub {
        flex: 1 1 220px;
        min-width: 0;
    }
    input[type='range'] {
        width: 100%;
        accent-color: var(--accent-fill);
    }
    .field {
        display: grid;
        gap: 6px;
        font-size: 12.5px;
        color: var(--muted);
        min-width: 0;
    }
    .field output {
        font-family: var(--mono);
        color: var(--ink);
        margin-left: 6px;
    }
    .field.size {
        flex: 1 1 200px;
    }
    .size-row {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .size-row input[type='range'] {
        flex: 1 1 auto;
        min-width: 0;
    }
    .size-row input[type='number'] {
        flex: 0 0 4.5em;
        font: 500 13.5px var(--body);
        color: var(--ink);
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 5px 8px;
    }
    select {
        font: 500 13.5px var(--body);
        color: var(--ink);
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 7px;
        padding: 6px 8px;
    }
    .outcome {
        margin: 12px 0 0;
        padding: 10px 12px;
        border-radius: 10px;
        background: var(--bg);
        border: 1px solid var(--line);
        font-size: 13.5px;
    }
    .outcome b {
        font-weight: 600;
    }
    .outcome span {
        color: var(--muted);
    }
    .check {
        display: flex;
        align-items: center;
        gap: 7px;
        font-size: 13.5px;
        color: var(--ink);
    }

    .credit {
        font-family: var(--mono);
        font-size: 11.5px;
        color: var(--muted);
        margin: 0;
    }

    @media (prefers-reduced-motion: reduce) {
        .tilt {
            transition: none;
        }
    }

    .checkpanel {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 16px 18px 10px;
    }
    .checkhead {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px 16px;
    }
    .checkhead h2 {
        margin: 0 0 2px;
        font: 600 13px var(--body);
        color: var(--muted);
    }
    .checkhead .sizes {
        margin: 0;
        font-size: 14px;
        color: var(--muted);
    }
    .checkhead .sizes b {
        color: var(--ink);
        font-family: var(--mono);
        font-weight: 500;
    }
    .chip {
        display: inline-block;
        font: 600 12px var(--body);
        padding: 3px 10px;
        border-radius: 999px;
        white-space: nowrap;
    }
    .chip[data-status='ok'] {
        background: var(--easy-bg);
        color: var(--easy-ink);
    }
    .chip[data-status='warn'] {
        background: var(--hook-bg);
        color: var(--hook-ink);
    }
    .chip[data-status='bad'] {
        background: var(--hard-bg);
        color: var(--hard-ink);
    }
    .chip[data-status='na'] {
        background: var(--bg);
        color: var(--muted);
    }
    .fit[data-status='warn'] {
        color: var(--hook-ink);
    }
    .fit[data-status='bad'] {
        color: var(--hard-ink);
        font-weight: 600;
    }
    .okchecks {
        margin-top: 10px;
        font-size: 13.5px;
    }
    .okchecks summary {
        cursor: pointer;
        color: var(--muted);
    }
    .okchecks[hidden] {
        display: none;
    }
    .rows {
        display: grid;
        gap: 0;
        margin: 12px 0 0;
        padding: 0;
        list-style: none;
    }
    .rows li {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 2px 12px;
        padding: 9px 0;
        border-top: 1px solid var(--line);
        align-items: center;
    }
    .rows .what {
        font-weight: 600;
        font-size: 14px;
    }
    .rows .detail {
        grid-column: 1 / -1;
        font-size: 12.5px;
        color: var(--muted);
        margin: 0;
    }
    .rows .value {
        font-family: var(--mono);
        font-size: 12.5px;
        color: var(--muted);
        margin-right: 8px;
    }
    .checkpanel .note a {
        color: var(--accent);
    }
    .check {
        display: flex;
        align-items: center;
        gap: 7px;
        font-size: 13.5px;
        color: var(--ink);
    }

    .reportpanel[hidden] {
        display: none;
    }
    .reportpanel {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 16px 18px 18px;
        display: grid;
        gap: 14px;
    }
    #packCanvas {
        width: 100%;
        height: auto;
        max-width: 100%;
        display: block;
    }
    .reportpanel h2 {
        margin: 0;
        font: 600 13px var(--body);
        color: var(--muted);
    }
    .reportpanel .lede {
        margin: 2px 0 0;
        font-size: 14px;
        color: var(--muted);
        max-width: 70ch;
    }
    .reportpanel select,
    .reportpanel input[type='text'],
    .reportpanel textarea {
        font: 500 14px var(--body);
        color: var(--ink);
        background: var(--bg);
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 8px 10px;
        width: 100%;
        min-width: 0;
    }
    .reportpanel textarea {
        min-height: 64px;
        resize: vertical;
    }
    .reportpanel fieldset {
        border: 1px solid var(--line);
        border-radius: 10px;
        margin: 0;
        padding: 10px 12px 12px;
        display: grid;
        gap: 8px;
    }
    .reportpanel legend {
        font-size: 12.5px;
        color: var(--muted);
        padding: 0 6px;
    }
    .reportpanel .choices {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 18px;
    }
    .reportpanel .saved {
        margin: 0;
        font-size: 13px;
        color: var(--easy-ink);
    }
    .reportpanel .btn.primary {
        background: var(--accent-fill);
        color: var(--accent-ink);
        border: 0;
        font-weight: 600;
    }
    .reportpanel .rowline {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
    }
    .reportlist {
        display: grid;
        gap: 0;
        margin: 0;
        padding: 0;
        list-style: none;
    }
    .reportlist li {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 2px 12px;
        padding: 9px 0;
        border-top: 1px solid var(--line);
        align-items: center;
        font-size: 13.5px;
    }
    .reportlist .meta {
        grid-column: 1 / -1;
        font-size: 12.5px;
        color: var(--muted);
        margin: 0;
    }
    .agreement {
        margin: 0;
        font-size: 13.5px;
    }
    .tokens {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin: 0;
        padding: 0;
        list-style: none;
    }
    .tokens li {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
        padding: 6px 6px 6px 12px;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: var(--bg);
    }
    .tokens .label {
        color: var(--muted);
        font-size: 12px;
    }
    .tokens .value {
        font: 600 13px var(--mono, ui-monospace, monospace);
        overflow-wrap: anywhere;
        min-width: 0;
    }
    .tokens button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 30px;
        height: 30px;
        padding: 0 6px;
        gap: 4px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--surface);
        color: var(--ink);
        cursor: pointer;
        font-size: 12px;
    }
    .tokens button:hover {
        border-color: var(--accent);
    }
    .tokens button:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }
    .tips {
        display: grid;
        gap: 8px;
        margin: 0;
        padding-left: 18px;
        font-size: 14px;
    }
    .tips li {
        max-width: 74ch;
    }
    .tips a,
    .reportpanel a {
        color: var(--accent);
    }
}

/* The font picker, the quick picks, the looks and the share row. */
.cut-preview .font-picker {
    position: relative;
}
.cut-preview .font-results {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    z-index: 20;
    margin: 4px 0 0;
    padding: 4px;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgb(0 0 0 / 0.14);
}
.cut-preview .font-results[hidden] {
    display: none;
}
.cut-preview .font-results button {
    display: block;
    width: 100%;
    padding: 8px 10px;
    text-align: start;
    background: none;
    border: 0;
    border-radius: 7px;
    font: inherit;
    color: var(--ink);
    cursor: pointer;
}
.cut-preview .font-results button:hover,
.cut-preview .font-results button:focus-visible {
    background: var(--hook-bg);
}
.cut-preview .presets,
.cut-preview .looks {
    align-items: center;
    gap: 8px 10px;
}
.cut-preview .presets-label {
    font-family: var(--mono);
    font-size: 12.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.cut-preview .chipbutton {
    min-height: 44px;
    padding: 6px 16px;
    font: inherit;
    font-size: 14px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
}
.cut-preview .chipbutton:hover {
    border-color: var(--accent);
}
.cut-preview .chipbutton[aria-pressed='true'] {
    background: var(--accent-fill);
    border-color: var(--accent-fill);
    color: var(--accent-ink);
    font-weight: 600;
}
.cut-preview .swatches {
    display: flex;
    align-items: center;
    gap: 7px;
}
.cut-preview .swatch {
    inline-size: 44px;
    block-size: 44px;
    padding: 9px;
    border: 0;
    border-radius: 50%;
    background: var(--swatch) content-box;
    box-shadow: inset 0 0 0 1px var(--line);
    background-clip: content-box;
    cursor: pointer;
}
.cut-preview .swatch[aria-pressed='true'] {
    box-shadow: inset 0 0 0 2px var(--ink);
}
.cut-preview .swatch:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
}
.cut-preview .swatches {
    gap: 0;
}
.cut-preview .shareline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-inline-start: auto;
}
/* While the letters are fetched: the canvas is dimmed and a line says so. */
.cut-preview[data-loading='true'] #scene {
    opacity: 0.5;
    transition: opacity 0.15s;
}
.cut-preview .loading-note {
    display: none;
    margin: 0;
    padding: 10px 14px 0;
    font-size: 13px;
    color: var(--muted);
}
.cut-preview[data-loading='true'] .loading-note {
    display: block;
}
.cut-preview .hint {
    display: block;
    font-size: 13px;
    color: var(--muted);
}
.cut-preview .note {
    font-size: 13px;
}

.cut-preview .swatches .presets-label {
    margin-inline-end: 8px;
}
.cut-preview .okchecks {
    margin-block-end: 8px;
}
.cut-preview .muted {
    color: var(--muted);
}
.cut-preview .red {
    color: #ff3b30;
}
@media (max-width: 575px) {
    .cut-preview .controls,
    .cut-preview .shareline {
        flex-direction: column;
        align-items: stretch;
        margin-inline-start: 0;
    }
    .cut-preview .field,
    .cut-preview .font-picker,
    .cut-preview input[type='text'],
    .cut-preview select {
        min-width: 0;
        max-width: 100%;
    }
    .cut-preview .btn {
        width: 100%;
    }
    .cut-preview canvas {
        max-width: 100%;
        height: auto;
    }
}

/* The answer first: one plain sentence a crafter can read at a glance (and a screen recording can show). */
.cut-preview .verdict-banner {
    display: grid;
    gap: 4px;
    margin: 12px 14px;
    padding: 14px 16px 14px 20px;
    border-radius: 12px;
    border-inline-start: 8px solid var(--line);
    background: var(--bg);
    color: var(--ink);
}
.cut-preview .verdict-banner {
    /* Its place is kept while it is empty, so the cutter below never moves when a verdict arrives. */
    min-height: 7rem;
    align-content: center;
}
.cut-preview .verdict-banner[hidden] {
    display: grid;
    visibility: hidden;
}
.cut-preview .verdict-banner strong {
    font-size: clamp(18px, 3.4vw, 24px);
    line-height: 1.2;
}
.cut-preview .verdict-banner span {
    font-size: 15px;
    color: var(--muted);
}
.cut-preview .verdict-banner[data-status='ok'] {
    background: var(--easy-bg);
    border-color: var(--easy-ink);
}
.cut-preview .verdict-banner[data-status='ok'] strong {
    color: var(--easy-ink);
}
.cut-preview .verdict-banner[data-status='warn'] {
    background: var(--hook-bg);
    border-color: var(--hook-ink);
}
.cut-preview .verdict-banner[data-status='warn'] strong {
    color: var(--hook-ink);
}
.cut-preview .verdict-banner[data-status='bad'] {
    background: var(--hard-bg);
    border-color: var(--hard-ink);
}
.cut-preview .verdict-banner[data-status='bad'] strong {
    color: var(--hard-ink);
}
.cut-preview .verdict-banner[data-status='bad'] strong::before {
    content: '\2715\00a0';
}
.cut-preview .verdict-banner[data-status='ok'] strong::before {
    content: '\2713\00a0';
}
.cut-preview .verdict-banner[data-status='warn'] strong::before {
    content: '\26A0\00a0';
}

.cut-preview .verdict-banner .fix {
    font-weight: 600;
    color: var(--ink);
}
.cut-preview .verdict-banner .fix[hidden] {
    display: none;
}
@keyframes verdict-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
}
@media (prefers-reduced-motion: reduce) {
    .cut-preview .verdict-banner.is-entering {
        animation: none;
    }
}

/* The payoff when a cut works (see celebrate() in cut-preview.js). Nothing here intercepts a click. */
.cut-preview .bench {
    position: relative;
    overflow: hidden;
}
.cut-preview .celebrate {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    pointer-events: none;
    z-index: 4;
}
.cut-preview .shine {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(
        105deg,
        transparent 38%,
        rgb(255 255 255 / 0.75) 50%,
        transparent 62%
    );
    background-size: 260% 100%;
    background-position: 130% 0;
    mix-blend-mode: soft-light;
}
.cut-preview .shine.is-shining {
    animation: shine-across 1s ease-out;
}
@keyframes shine-across {
    0% {
        opacity: 1;
        background-position: 130% 0;
    }
    100% {
        opacity: 1;
        background-position: -30% 0;
    }
}
.cut-preview .stamp {
    position: absolute;
    z-index: 5;
    translate: -50% -50%;
    inline-size: 104px;
    block-size: 104px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--easy-ink);
    color: #fff;
    font-family: var(--body);
    font-weight: 700;
    font-size: 64px;
    line-height: 1;
    box-shadow:
        0 0 0 6px rgb(255 255 255 / 0.85),
        0 12px 30px rgb(31 107 63 / 0.45);
    opacity: 0;
    scale: 0.2;
    pointer-events: none;
}
.cut-preview .stamp[data-status='bad'] {
    background: var(--hard-ink);
    box-shadow:
        0 0 0 6px rgb(255 255 255 / 0.85),
        0 12px 30px rgb(165 44 34 / 0.45);
}
.cut-preview .stamp.is-stamped {
    animation: stamp-pop 1.8s cubic-bezier(0.2, 0.9, 0.3, 1.4) forwards;
}
/* A failed verdict keeps its sad face on the vinyl for as long as it stands. */
.cut-preview .stamp[data-status='bad'].is-stamped {
    animation: stamp-sad 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.4) forwards;
}
@keyframes stamp-sad {
    0% {
        opacity: 0;
        scale: 2.4;
        rotate: -18deg;
    }
    60% {
        opacity: 1;
        scale: 1.08;
        rotate: 0deg;
    }
    100% {
        opacity: 1;
        scale: 1;
        rotate: 0deg;
    }
}
@keyframes stamp-pop {
    0% {
        opacity: 0;
        scale: 2.4;
        rotate: -18deg;
    }
    22% {
        opacity: 1;
        scale: 1;
        rotate: 0deg;
    }
    32% {
        scale: 1.12;
    }
    42% {
        scale: 1;
    }
    78% {
        opacity: 1;
        scale: 1;
    }
    100% {
        opacity: 0;
        scale: 0.85;
    }
}
.cut-preview .verdict-banner.is-popping {
    animation: banner-pop 0.8s ease-out;
}
@keyframes banner-pop {
    0% {
        scale: 1;
        box-shadow: 0 0 0 0 rgb(31 107 63 / 0.5);
    }
    30% {
        scale: 1.025;
        box-shadow: 0 0 0 10px rgb(31 107 63 / 0);
    }
    100% {
        scale: 1;
    }
}
.cut-preview .verdict-banner.is-shaking {
    animation: banner-shake 0.55s ease-in-out;
}
@keyframes banner-shake {
    15%,
    45%,
    75% {
        translate: -6px 0;
    }
    30%,
    60%,
    90% {
        translate: 6px 0;
    }
}
@media (prefers-reduced-motion: reduce) {
    .cut-preview .shine,
    .cut-preview .stamp,
    .cut-preview .celebrate {
        display: none;
    }
}

.cut-preview .verdict-banner.is-entering {
    animation: verdict-in 0.35s ease-out;
}

/* ?mode=clean: the tool without the site's navigation, logo and footer, for recording or embedding. */
body:has(.cut-preview.is-clean)
    :is(.site-header, .site-footer, .compare-tray, .analytics-band, [data-analytics-band]) {
    display: none;
}
.cut-preview.is-clean :is(.hero, noscript, .newsletter-card, .tool-bar) {
    display: none;
}

/* The buttons that act on the cut live in one row; Share is the last of them. */
.cut-preview .actions {
    align-items: end;
    padding-block-start: 4px;
}
.cut-preview .actions .share {
    margin-inline-start: auto;
}
.cut-preview .share-link {
    display: flex;
    gap: 8px;
}
.cut-preview .share-link input {
    flex: 1;
    min-width: 0;
}
.cut-preview .share-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
    padding: 0;
    list-style: none;
}
.cut-preview .share-targets :is(a, button) {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}
.cut-preview .share-targets :is(a, button):hover {
    background: var(--bg);
}
.cut-preview .share-files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cut-preview .share-dialog .saved {
    min-height: 1.4em;
    margin: 12px 0 0;
}

/* The stage's footer: playback and the buttons that act on the cut. */
.cut-preview .stage-footer {
    margin: 0;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
    background: var(--bg);
}
.cut-preview .btn.play {
    flex: none;
    inline-size: 52px;
    block-size: 44px;
    padding: 0;
    display: inline-grid;
    place-items: center;
}

/* The footer sits at the bottom of the page, so its menu opens upward. */
.cut-preview .options .dropdown-menu {
    top: auto;
    bottom: 100%;
    margin: 0 0 4px;
}
.cut-preview .options .dropdown-item[hidden] {
    display: none;
}

/* A quiet row of pill links to the site's other Cricut pages, under the tool. */
.cut-preview .cricut-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 10px;
    margin-block: 28px 8px;
    padding-block-start: 22px;
    border-block-start: 1px solid var(--line, rgb(0 0 0 / 0.08));
}
.cut-preview .cricut-links-kicker {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted-foreground, #64748b);
    margin-inline-end: 4px;
}
.cut-preview .cricut-links a {
    padding: 6px 14px;
    border: 1px solid var(--line, rgb(0 0 0 / 0.12));
    border-radius: 999px;
    background: #fff;
    font-size: 0.85rem;
    text-decoration: none;
    color: inherit;
    transition:
        border-color 0.15s ease,
        color 0.15s ease;
}
.cut-preview .cricut-links a:hover,
.cut-preview .cricut-links a:focus-visible {
    border-color: var(--primary, #5b3df5);
    color: var(--primary, #5b3df5);
}
.cut-preview.is-clean .cricut-links {
    display: none;
}

/*
 * The finish: a workspace card with the cutter and its playback on the left and the settings in a
 * side panel on the right (from 992px; stacked below it), then the cut check and the numbers for the cutting software.
 */
.cut-preview .hero {
    display: grid;
    gap: 10px;
}
.cut-preview .hero .eyebrow {
    justify-self: start;
    margin: 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 10%, white);
    color: var(--accent);
    font: 600 11.5px/1.2 var(--body);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
/* The page's own gap spaces the tool links from the heading, as on the other tools. */
.cut-preview > .tool-bar {
    margin-bottom: 0;
}
.cut-preview .hero .page-heading {
    margin: 0;
}
/* The description sits in the site's introduction card (site.css), like a listing's. */
.cut-preview .hero .sl-lede {
    margin: 0;
    max-width: 52rem;
}

.cut-preview .stage {
    display: grid;
    border-radius: var(--radius);
    border-color: var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: visible;
}
.cut-preview .stage-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.cut-preview .stage-main > .verdict-banner {
    margin: 16px 16px 0;
    min-height: 5.5rem;
    border-radius: 14px;
    border-inline-start-width: 6px;
}
.cut-preview .bench {
    margin: 16px 16px 0;
    border-radius: 14px;
    background:
        radial-gradient(120% 90% at 50% 0%, #f7f6fd 0%, transparent 60%),
        linear-gradient(180deg, #ecebf6, #e3e2f0);
    box-shadow: inset 0 0 0 1px rgb(23 29 36 / 0.05);
}
.cut-preview .loading-note {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-start: 50%;
    translate: -50% 0;
    z-index: 6;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.9);
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.08);
}

/* The three steps as one segmented control. */
.cut-preview .status {
    padding: 14px 16px 6px;
    gap: 10px 18px;
}
.cut-preview .steps {
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: var(--bg);
    box-shadow: inset 0 0 0 1px var(--line);
    counter-reset: step;
}
.cut-preview .steps li {
    counter-increment: step;
    gap: 8px;
    min-height: 40px;
    padding: 4px 16px 4px 6px;
    border: 0;
    font: 600 13px/1 var(--body);
}
.cut-preview .steps li::before {
    content: counter(step);
    display: inline-grid;
    place-items: center;
    inline-size: 26px;
    block-size: 26px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
    box-shadow: inset 0 0 0 1px var(--line);
}
.cut-preview .steps li:hover {
    color: var(--ink);
}
.cut-preview .steps li[data-state='done'] {
    color: var(--ink);
}
.cut-preview .steps li[data-state='done']::before {
    content: '\2713';
    background: var(--easy-bg);
    color: var(--easy-ink);
    box-shadow: none;
}
.cut-preview .steps li[data-state='active'] {
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 1px 3px rgb(23 29 36 / 0.12);
}
.cut-preview .steps li[data-state='active']::before {
    background: var(--accent-fill);
    color: var(--accent-ink);
    box-shadow: none;
}
.cut-preview .caption {
    font-size: 14.5px;
}

/* Playback and the buttons that act on the cut. */
.cut-preview .stage-footer {
    margin-block-start: auto;
    gap: 12px 14px;
    padding: 14px 16px 16px;
    background: transparent;
    border-top: 0;
}
.cut-preview .stage-footer .scrub .field span,
.cut-preview .stage-footer .speed label {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}
.cut-preview .btn {
    border-radius: 10px;
    transition:
        background 0.15s,
        border-color 0.15s,
        box-shadow 0.15s,
        transform 0.1s;
}
.cut-preview .btn:active {
    transform: translateY(1px);
}
.cut-preview .btn:not(.quiet):hover {
    box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent);
}
.cut-preview .btn.quiet {
    background: var(--surface);
}
.cut-preview .btn.quiet:hover {
    border-color: var(--ink);
}
.cut-preview .btn.play {
    inline-size: 44px;
    block-size: 44px;
    min-width: 44px;
    border-radius: 50%;
    box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 80%, transparent);
}
.cut-preview select {
    min-height: 44px;
    padding: 6px 10px;
    border-radius: 10px;
    background: var(--surface);
}

/* The settings panel. */
.cut-preview .stage-side {
    display: grid;
    align-content: start;
    min-width: 0;
    border-block-start: 1px solid var(--line);
    background: linear-gradient(180deg, var(--bg), var(--surface) 70%);
    border-end-start-radius: var(--radius);
    border-end-end-radius: var(--radius);
}
.cut-preview .group {
    display: grid;
    gap: 12px;
    padding: 18px 20px;
}
.cut-preview .group + .group {
    border-block-start: 1px solid var(--line);
}
.cut-preview .group-title {
    margin: 0;
    font: 600 11.5px/1.2 var(--body);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.cut-preview label.group-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}
.cut-preview .group-title output {
    font: 700 15px/1 var(--mono);
    letter-spacing: 0;
    text-transform: none;
    color: var(--accent);
}
.cut-preview .stage-side .field {
    font-size: 13px;
    font-weight: 500;
}
.cut-preview .stage-side input[type='text'],
.cut-preview .size-row input[type='number'],
.cut-preview .stage-side select {
    inline-size: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font: 500 16px var(--body);
    box-shadow: 0 1px 2px rgb(23 29 36 / 0.04);
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}
.cut-preview .size-row input[type='number'] {
    inline-size: auto;
    flex: 0 0 4.75em;
    padding-inline: 10px 4px;
    font: 600 15px var(--mono);
}
.cut-preview .stage-side select {
    font-size: 14px;
}
.cut-preview .stage-side :is(input[type='text'], input[type='number'], select):focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.cut-preview .stage-side .note {
    margin-block-start: -4px;
}
.cut-preview .presets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.cut-preview .presets .chipbutton {
    min-height: 36px;
    padding: 4px 12px;
    font-size: 13.5px;
}
.cut-preview .presets-label {
    margin-inline-end: 2px;
    font: 600 11px var(--body);
    letter-spacing: 0.08em;
}
.cut-preview .check {
    gap: 10px;
    min-height: 32px;
    font-size: 14px;
    cursor: pointer;
}
.cut-preview .check input {
    inline-size: 18px;
    block-size: 18px;
    accent-color: var(--accent-fill);
    margin: 0;
}
.cut-preview .looks .swatches {
    display: grid;
    gap: 6px;
}
.cut-preview .swatch-row {
    display: flex;
    flex-wrap: wrap;
    margin-inline: -8px;
}
.cut-preview .swatch {
    padding: 8px;
    box-shadow: none;
    transition: transform 0.12s;
}
.cut-preview .swatch::after {
    content: none;
}
.cut-preview .swatch {
    background:
        radial-gradient(circle, var(--swatch) 0 13px, transparent 13.5px),
        radial-gradient(circle, rgb(23 29 36 / 0.14) 0 14px, transparent 14.5px);
}
.cut-preview .swatch:hover {
    transform: scale(1.08);
}
.cut-preview .swatch[aria-pressed='true'] {
    box-shadow: none;
    background: radial-gradient(
        circle,
        var(--swatch) 0 11px,
        var(--surface) 11.5px 14px,
        var(--ink) 14.5px 16.5px,
        transparent 17px
    );
}

/* The cut check and the numbers for the cutting software. */
.cut-preview :is(.checkpanel, .reportpanel) {
    border-radius: var(--radius);
    padding: 20px 22px 14px;
    box-shadow: var(--shadow);
}
.cut-preview :is(.checkhead h2, .reportpanel h2) {
    margin-block-end: 6px;
    font: 600 11.5px/1.2 var(--body);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.cut-preview .checkhead {
    align-items: flex-start;
}
.cut-preview .checkhead .sizes {
    line-height: 1.6;
}
.cut-preview .chip#overall {
    padding: 6px 14px;
    font-size: 13px;
}
.cut-preview .reportpanel {
    padding-block-end: 20px;
}
.cut-preview .tokens li {
    border-radius: 12px;
    background: var(--bg);
}

@media (min-width: 992px) {
    .cut-preview .stage {
        grid-template-columns: minmax(0, 1fr) 330px;
    }
    .cut-preview .stage-side {
        border-block-start: 0;
        border-inline-start: 1px solid var(--line);
        border-end-start-radius: 0;
        border-start-end-radius: var(--radius);
    }
}
@media (max-width: 575px) {
    .cut-preview .stage-main > .verdict-banner,
    .cut-preview .bench {
        margin-inline: 10px;
    }
    .cut-preview .stage-footer {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: end;
    }
    .cut-preview .stage-footer .scrub {
        flex: 1 1 0;
    }
    .cut-preview .stage-footer .btn:not(.play) {
        flex: 1 1 auto;
        inline-size: auto;
    }
    .cut-preview .group {
        padding-inline: 16px;
    }
}
/* Eight swatches to a row in the side panel, and a tighter panel so the cutter sets its height. */
.cut-preview .stage-side .swatch {
    inline-size: 36px;
    block-size: 36px;
    min-width: 0;
    padding: 0;
    background:
        radial-gradient(circle, var(--swatch) 0 11px, transparent 11.5px),
        radial-gradient(circle, rgb(23 29 36 / 0.14) 0 12px, transparent 12.5px);
}
.cut-preview .stage-side .swatch[aria-pressed='true'] {
    background: radial-gradient(
        circle,
        var(--swatch) 0 9px,
        var(--surface) 9.5px 12px,
        var(--ink) 12.5px 14.5px,
        transparent 15px
    );
}
.cut-preview .swatch-row {
    margin-inline: -4px;
}
.cut-preview .stage-side .group {
    gap: 10px;
    padding-block: 16px;
}
.cut-preview .stage-side .check {
    min-height: 28px;
}
.cut-preview .stage-footer {
    border-block-start: 1px solid var(--line);
    margin-block-start: auto;
}
.cut-preview .status {
    padding-block-end: 14px;
}
@media (max-width: 575px) {
    /* The play button and the timeline get a row of their own; speed and the buttons share the next. */
    .cut-preview .stage-footer .scrub {
        flex: 1 1 calc(100% - 64px);
    }
    .cut-preview .stage-footer .speed {
        flex: none;
    }
    .cut-preview .stage-footer .share {
        margin-inline-start: 0;
    }
}

/*
 * Second pass. The verdict keeps one height whatever it says (so the cutter never moves), with its mark in a
 * disc; one label style in the settings panel; playback is one unlabelled row; the two result panels share a row.
 */
.cut-preview .stage-main > .verdict-banner {
    position: relative;
    min-height: 6.9rem;
    padding: 14px 18px 14px 66px;
    border-inline-start-width: 0;
    box-shadow: inset 0 0 0 1px rgb(23 29 36 / 0.06);
}
.cut-preview .verdict-banner strong {
    font-size: clamp(18px, 2.4vw, 22px);
    letter-spacing: -0.01em;
}
.cut-preview .verdict-banner strong::before {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: 18px;
    translate: 0 -50%;
    display: grid;
    place-items: center;
    inline-size: 34px;
    block-size: 34px;
    border-radius: 50%;
    background: var(--muted);
    color: #fff;
    font-size: 16px;
    line-height: 1;
}
.cut-preview .verdict-banner[data-status='ok'] strong::before {
    content: '\2713';
    background: var(--easy-ink);
}
.cut-preview .verdict-banner[data-status='warn'] strong::before {
    content: '!';
    background: var(--hook-ink);
    font-weight: 700;
}
.cut-preview .verdict-banner[data-status='bad'] strong::before {
    content: '\2715';
    background: var(--hard-ink);
}

/* The stamp follows the bench's size, so it never covers the word on a phone. */
.cut-preview .stamp {
    inline-size: clamp(56px, 13vw, 104px);
    block-size: clamp(56px, 13vw, 104px);
    box-shadow:
        0 0 0 4px rgb(255 255 255 / 0.85),
        0 12px 30px rgb(31 107 63 / 0.45);
}
.cut-preview .stamp svg {
    inline-size: 70%;
    block-size: 70%;
}

/* One label style: sentence case for a control's label, small capitals only for a group's title. */
.cut-preview .stage-side .presets-label {
    font: 500 13px/1.3 var(--body);
    letter-spacing: 0;
    text-transform: none;
    color: var(--muted);
}

/* Playback explains itself: the labels stay for screen readers only. */
.cut-preview .stage-footer {
    align-items: center;
}
.cut-preview .stage-footer .scrub label,
.cut-preview .stage-footer .speed label {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.cut-preview .stage-footer .scrub {
    display: flex;
    align-items: center;
}
.cut-preview .stage-footer .saved:empty {
    display: none;
}

/* The cut check: its verdict sits beside its title, and the headline sizes read first. */
.cut-preview .checkhead {
    justify-content: flex-start;
    align-items: center;
    gap: 4px 12px;
}
.cut-preview .checkhead > div {
    display: contents;
}
.cut-preview .checkhead h2 {
    order: 0;
    margin: 0;
}
.cut-preview .checkhead .chip {
    order: 1;
}
.cut-preview .checkhead .sizes {
    order: 2;
    flex-basis: 100%;
}
.cut-preview .checkhead #sizes {
    margin-block-start: 10px;
    font-size: 17px;
    color: var(--ink);
}
.cut-preview .checkhead #sizes b {
    font-weight: 600;
    color: var(--accent);
}
.cut-preview .rows li {
    padding-block: 12px;
}
.cut-preview .tokens li {
    align-items: baseline;
}
.cut-preview .tokens button {
    align-self: center;
}
.cut-preview .results {
    display: grid;
    gap: 20px;
}
@media (min-width: 992px) {
    .cut-preview .results {
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
        align-items: start;
    }
}
@media (max-width: 575px) {
    .cut-preview .stage-main > .verdict-banner {
        /* Room for the longest verdict's four wrapped lines, so the cutter keeps its place. */
        min-height: 9.25rem;
        padding-inline-start: 58px;
    }
    .cut-preview .verdict-banner strong::before {
        inset-inline-start: 14px;
        inline-size: 30px;
        block-size: 30px;
    }
}

/* Third pass: the font box as one search field, and the Cricut links beside the cut check. */
.cut-preview .stage-side .font-picker input[type='text'] {
    padding-inline-end: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    text-overflow: ellipsis;
}
[dir='rtl'] .cut-preview .stage-side .font-picker input[type='text'] {
    background-position: left 12px center;
}
.cut-preview .font-picker .font-results {
    max-height: min(22rem, 60vh);
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgb(15 23 42 / 0.16);
}
.cut-preview .font-hint {
    display: block;
    margin-block-start: -6px;
}
.cut-preview .font-results-title {
    padding: 8px 10px 4px;
    font: 600 11px var(--body);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.cut-preview .font-results button {
    min-height: 40px;
}
.cut-preview .font-results button[aria-selected='true'] {
    font-weight: 600;
    color: var(--accent);
}
.cut-preview .font-results button[aria-selected='true']::after {
    content: '\2713';
    float: inline-end;
}
.cut-preview .results-side {
    display: grid;
    gap: 20px;
    min-width: 0;
}
.cut-preview .results-side .cricut-links {
    justify-content: flex-start;
    margin: 0;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.cut-preview .results-side .cricut-links-kicker {
    flex-basis: 100%;
    margin: 0 0 4px;
    font: 600 11px var(--body);
    letter-spacing: 0.08em;
    color: var(--muted);
}

/* The one figure kept from the facts row: how much of the sheet is waste. */
.cut-preview .fact {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: 2px 14px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.cut-preview .fact h2 {
    grid-column: 1 / -1;
    margin: 0 0 4px;
    font: 600 11px var(--body);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.cut-preview .fact .value {
    font: 700 30px/1.1 var(--display);
    font-variant-numeric: tabular-nums;
}
.cut-preview .fact .unit {
    margin-inline-start: 3px;
    font: 400 13px var(--mono);
    color: var(--muted);
}
.cut-preview .fact .sub {
    margin: 0;
    font-size: 13.5px;
    color: var(--muted);
}

/* "What it checks": plain server-rendered text, so it reads without JavaScript. */
.cut-preview .weed-checks {
    display: grid;
    gap: 12px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.cut-preview .weed-checks h2 {
    margin: 0;
    font-size: 1.05rem;
}
.cut-preview .weed-checks ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.cut-preview .weed-checks li {
    display: grid;
    gap: 2px;
    padding: 12px 14px;
    background: var(--bench);
    border-left: 3px solid var(--hard-ink);
    border-radius: 10px;
}
.cut-preview .weed-checks li b {
    font-size: 0.95rem;
}
.cut-preview .weed-checks li span,
.cut-preview .weed-checks p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
}
.cut-preview.is-clean .weed-checks {
    display: none;
}

/* Download outlines: the mirror and weeding box choices above the button. */
.cut-preview .options .svg-export {
    display: grid;
    gap: 0.625rem;
    min-width: 17rem;
    padding: 0.875rem;
}
.cut-preview .svg-export-note {
    margin: 0;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}
