/* ---------- cs-tender: a softer skin for one case study -----------------
   Loaded by work/ai-native-ux-workflow.html (and the two embeds under
   work/media/ai-native-ux/), after approach-mocks.css and cs-timeline.css.

   The site's case studies frame their mocks the hard way: a 1.5px ink border
   and a zero-blur offset shadow. Here the same mocks sit on the page the way
   a window sits on a desk: a hairline edge, a larger radius, a shadow with
   real blur. Colour stays where it was; only edges, depth and motion change.

   It also styles two of the closing sections, which each get their own form:
     .cs-was        What changed: each outcome under the old way, struck
     .cs-hold       Challenges: heading and answer in two columns
   Learnings use the shared assets/css/cs-takeaways.css. */

:root {
    --tender-line: color-mix(in srgb, var(--frgd) 12%, transparent);
    --tender-line-strong: color-mix(in srgb, var(--frgd) 20%, transparent);
    --tender-tint: color-mix(in srgb, var(--caseAccent, #7de39a) 13%, var(--bkgd));
    --tender-tint-strong: color-mix(in srgb, var(--caseAccent, #7de39a) 30%, var(--bkgd));
    --tender-radius: 14px;
    --tender-shadow:
        0 1px 2px color-mix(in srgb, var(--frgd) 6%, transparent),
        0 14px 32px -18px color-mix(in srgb, var(--frgd) 30%, transparent);
    --tender-shadow-lift:
        0 1px 2px color-mix(in srgb, var(--frgd) 6%, transparent),
        0 20px 40px -20px color-mix(in srgb, var(--frgd) 38%, transparent);
    --tender-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- mock windows -------------------------------------------------------- */
.ax-win {
    border: 1px solid var(--tender-line-strong);
    border-radius: 12px;
    box-shadow: var(--tender-shadow);
}
.ax-win.ax-cursor {
    border-color: #2c2c30;
}
.ax-bar {
    background: color-mix(in srgb, var(--ax-soft) 70%, #fff);
}
.ax-cursor .ax-bar {
    background: var(--ax-soft);
}
.ax-code,
.ax-banner,
.ax-shell,
.ax-opt {
    border-radius: 9px;
}
.ax-list li.you {
    border-color: color-mix(in srgb, var(--frgd) 22%, transparent);
    border-radius: 9px;
    box-shadow: 0 6px 16px -10px color-mix(in srgb, #b58a00 55%, transparent);
}
.ax-opt.picked {
    border: 1px solid var(--tender-tint-strong);
    background: var(--tender-tint);
    box-shadow: var(--tender-shadow);
}
.ax-pill.on {
    border-color: color-mix(in srgb, var(--frgd) 25%, transparent);
}
.ax-shell i.hl {
    outline: 0;
    background: color-mix(in srgb, #f2b84b 70%, #fff);
}
.ax-board__canvas {
    background: #fcfcfb;
}

/* The workflow diagram embed draws its request path in the same skin. */
.wf-node {
    border: 1px solid var(--tender-line-strong);
    border-radius: 11px;
    box-shadow: var(--tender-shadow);
}
.wf-out,
.wf-src {
    border-radius: 10px;
}

/* --- quotes, lists and the timeline ------------------------------------- */
.main .quoteText {
    border-color: var(--tender-line);
    border-radius: 18px 18px 18px 6px;
    box-shadow: var(--tender-shadow);
}

/* Problem: the failures keep their spine; the stops are filled, not ringed. */
.main .cs-faults > li::after {
    border: 0;
    background: var(--tender-tint-strong);
    color: var(--frgd);
}
.main .cs-faults > li::before {
    background: color-mix(in srgb, var(--caseAccent) 32%, transparent);
}

.cs-timeline__goIn,
.cs-timeline__backIn {
    border: 1px solid var(--tender-line-strong);
    border-radius: 12px;
    box-shadow: var(--tender-shadow);
    transition:
        transform 220ms var(--tender-ease),
        box-shadow 220ms var(--tender-ease),
        background-color 160ms ease;
}
:is(.cs-timeline__go, .cs-timeline__back):not(:disabled):hover > span {
    box-shadow: var(--tender-shadow-lift);
    transform: translateY(-2px);
}
:is(.cs-timeline__go, .cs-timeline__back):not(:disabled):active > span {
    box-shadow: var(--tender-shadow);
    transform: translateY(0);
}
.cs-timeline .cs-timeline__stage > h3 {
    border-top: 1px solid var(--tender-line-strong);
}
@media only screen and (max-width: 768px) {
    .cs-timeline__rail {
        border: 1px solid var(--tender-line-strong);
        border-radius: var(--tender-radius);
        box-shadow: var(--tender-shadow);
    }
}

/* --- the two closing sections: shared column --------------------------- */
.main > :is(ul.cs-was, ul.cs-hold) {
    box-sizing: border-box;
    width: calc(var(--content-col) - var(--gap) / 2);
    max-width: none;
    margin-top: var(--space-5);
    margin-right: 0;
    margin-bottom: var(--space-5);
    margin-left: calc(var(--heading-col) + var(--gap) / 2);
    padding: 0;
    list-style: none;
    text-align: left;
}
.main :is(.cs-was, .cs-hold) > li {
    margin: 0;
    padding: 0;
    list-style: none;
}
.main :is(.cs-was, .cs-hold) p {
    margin: 0;
    text-align: left;
    hyphens: manual;
}
@media only screen and (max-width: 768px) {
    .main > :is(ul.cs-was, ul.cs-hold) {
        width: 100%;
        margin-left: 0;
    }
}

/* --- What changed: the old way, struck, above what replaced it ----------
   No panel and no arrow: hairlines between rows, and the struck line in a
   quiet size and tone so the outcome carries the row. */
.main .cs-was > li {
    padding: 18px 0 20px;
    border-top: 1px solid var(--tender-line);
}
.main .cs-was > li:last-child {
    border-bottom: 1px solid var(--tender-line);
}
.main .cs-was__before {
    margin-bottom: 4px;
    font-size: var(--text-functional);
    line-height: 1.35;
    color: color-mix(in srgb, var(--frgd) 55%, var(--bkgd));
}
/* the strike is drawn as a background so it can be drawn in */
.cs-was__struck {
    background: linear-gradient(currentColor, currentColor) no-repeat 0 56% / 100% 1px;
}
.main .cs-was__now {
    margin-bottom: 4px;
    font-size: var(--text-lead);
    font-weight: var(--weight-label);
    line-height: 1.32;
    color: var(--frgd);
    text-wrap: balance;
}
.main .cs-was > li > p:last-child {
    line-height: var(--leading-body);
}

/* --- Challenges: two columns of heading and answer, no boxes -------------- */
.main > ul.cs-hold {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 32px;
}
.main .cs-hold > li {
    padding: 18px 0 22px;
    border-top: 1px solid var(--tender-line);
}
.main .cs-hold h4.caseStudyLabel {
    margin: 0 0 6px;
    padding: 0;
    width: auto;
    max-width: none;
    font-size: var(--text-h4);
    line-height: 1.3;
    text-align: left;
    text-wrap: pretty;
}
.main .cs-hold > li > p {
    line-height: var(--leading-body);
}
@media only screen and (max-width: 560px) {
    .main > ul.cs-hold {
        grid-template-columns: 1fr;
    }
}

/* --- arrival -------------------------------------------------------------
   Tied to scroll where the browser can (as the page's highlighter already
   is), so each row settles as it is read, and simply present where it
   cannot. What changed draws its strike through the old way first. */
@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .cs-was__struck {
            animation: tender-strike linear both;
            animation-timeline: view();
            animation-range: entry 40% cover 38%;
        }
        .main .cs-was__now {
            animation: tender-settle linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 70%;
        }
    }
}
@keyframes tender-strike {
    from { background-size: 0% 1px; }
    to { background-size: 100% 1px; }
}
@keyframes tender-settle {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
