/* The free-start USPTO walkthrough's own layer
   (/products/uspto-research/walkthrough), over style.css and the EDGAR
   case study's session.css (loaded for the prompt composer and carousel,
   the same way the EDGAR walkthrough loads it).
   -------------------------------------------------------------------------
   Two jobs: the "Reading as" toggle, restated from the Bundle page's
   .up-tier in the site's own tokens so it follows the page's light and dark
   grounds, and the two figures of Prompt 2 (the reader's drawing beside the
   sheet it found, and the browser Drawing Search page). Nothing here mounts
   a scroll engine. */

/* ---- The tier toggle --------------------------------------------------
   Two native radios in a fieldset, keyboard operable with no script.
   Research is the default. Selecting USPTO Patent Search dims everything
   carrying data-up-tier="research" (Part B) to a greyed state: opacity and
   a desaturation only, nothing moves. The :has() rule on the first
   instance's radio works with no script; research-walkthrough.js mirrors
   the three instances and writes the state onto the root for a browser
   without :has(). */
.rw-tier {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 1.4rem 0 0;
    padding: 0;
    border: 0;
    min-inline-size: 0;
}
.rw-tier__legend {
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-muted);
    padding: 0;
    margin-bottom: 8px;
    flex-basis: 100%;
}
.rw-tier__opt {
    display: inline-grid;
    grid-template-columns: auto auto;
    grid-template-areas: "radio name" "radio price";
    column-gap: 10px;
    align-items: center;
    padding: 8px 14px 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    cursor: pointer;
    background: var(--color-surface);
}
.rw-tier__opt:has(input:checked) { border-color: var(--color-accent); }
.rw-tier__opt input {
    grid-area: radio;
    margin: 0;
    accent-color: var(--color-accent);
}
.rw-tier__name {
    grid-area: name;
    font-weight: 600;
    font-size: 0.98rem;
}
.rw-tier__price {
    grid-area: price;
    font-size: 0.84rem;
    color: var(--color-muted);
    font-variant-numeric: tabular-nums;
}
.rw-tier__note {
    flex-basis: 100%;
    margin: 4px 0 0;
    font-size: 0.88rem;
    color: var(--color-muted);
    max-width: 60ch;
}
.rw-tier--mirror { margin-top: 2rem; }

[data-up-tier="research"] { transition: opacity 260ms ease, filter 260ms ease; }

.rw:not(.rw--js):has(#rw-tier-free:checked) [data-up-tier="research"],
.rw[data-up-tier-state="free"] [data-up-tier="research"] {
    opacity: 0.38;
    filter: grayscale(1);
}
/* A dimmed part stays readable to a reader who scrolls into it anyway:
   hovering or focusing inside lifts it while the pointer is there. */
.rw:not(.rw--js):has(#rw-tier-free:checked) [data-up-tier="research"]:is(:hover, :focus-within),
.rw[data-up-tier-state="free"] [data-up-tier="research"]:is(:hover, :focus-within) {
    opacity: 0.7;
}
@media (prefers-reduced-motion: reduce) {
    [data-up-tier="research"] { transition: none; }
}

/* ---- Prompts ---------------------------------------------------------- */
/* Prompt 2 is two turns on one carousel card, and the Full walkthrough's
   prompts are numbered lists: the carousel keeps the line breaks. */
.cs-carousel__prompt { white-space: pre-wrap; }
/* The carousel keeps session.css's own look, the EDGAR walkthrough's: a white
   card inside the page's grey box (John, 18 October 2026: the restated
   version read grey on grey). Only the step prompts take the site's tokens,
   through style.css's .cs-composer.wt-prompt. The nine cards repeat three
   times; cards 6 to 9 carry data-up-tier="research" and dim with Part B. */
.rw .cs-carousel { margin-top: 0.75rem; }

/* ---- Figures ---------------------------------------------------------- */
/* The reader's drawing beside the sheet it found: two plates, one row. */
.rw-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 1rem 0 1.25rem;
}
.rw-pair figure {
    margin: 0;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #ffffff;
    padding: 10px;
}
.rw-pair img {
    display: block;
    width: 100%;
    height: auto;
}
.rw-pair figcaption,
.rw-shot figcaption {
    font-size: 0.86rem;
    color: var(--color-muted);
    margin-top: 8px;
    line-height: 1.5;
}
/* The blank Drawing Search panel beside the steps that fill it. */
.rw-panel {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(16rem, 2fr);
    gap: 20px;
    align-items: start;
    margin: 1rem 0 1.25rem;
}
.rw-panel figure { margin: 0; }
.rw-panel img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}
.rw-panel figcaption {
    font-size: 0.86rem;
    color: var(--color-muted);
    margin-top: 8px;
    line-height: 1.5;
}
.rw-panel ol {
    margin: 0;
    padding-left: 1.2em;
    font-size: 0.95rem;
}
.rw-panel ol li { margin-bottom: 0.5em; }
.rw-shot { margin: 1rem 0 1.25rem; }
.rw-shot img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}
.rw-download {
    font-size: 0.92rem;
    margin: 0.5rem 0 1rem;
}
.rw-part {
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}
.rw-calls {
    font-size: 0.86rem;
    color: var(--color-muted);
    margin: 0.5rem 0 1rem;
}
.rw-calls code { font-size: 0.95em; }

@media (max-width: 640px) {
    .rw-pair,
    .rw-panel { grid-template-columns: 1fr; }
}
