/* lane-ask.css: the Ask lane (desktop/pages/Home.php + pages/js/Home.js;
   docs/plans/desktop/slice.md unit A). Prefix lf-ask. Loaded after kit.css.

   One DOM, two forms, chosen by the lane's own width state, which the stage
   writes on the lane (lanes.css: .lane[data-w]):

     HERO  the lane is the Stage (the Home route). The phone's Home hero given
           room, and nothing else: the greeting, Hoku's line, ONE ask box and
           the three doors, on a wave as tall as the lane. The search controls
           wait behind one quiet "Narrow it down" that opens in place. This is
           also what the page looks like before the stage adopts it, so it is
           the BASE of this sheet.
     LIST  the lane is a List beside the results (or a Spine: the body keeps its
           List form and is clipped). The same parts re-laid as the search form:
           a lane header with the count, the SAME field as the query, then every
           control open, stacked. All of it is section 7, under ONE prefix.

   WHY data-w AND NOT A WIDTH QUERY: a Stage lane may be as narrow as 26rem (a
   900px window, the shelves a List beside it) and a List lane as wide as 28rem,
   so width alone cannot tell the Home hero from the search form. WITHIN each
   form everything is fluid: clamp() over the lane's cqi, flex wrap, container
   queries on `lane`. No viewport media query; prefers-reduced-motion and
   (hover: hover) are the only media blocks.

   Parts the kit did not have (listed in the unit's report):
     .lf-ask-ghost / -caret the typed ghost line inside the ask box
     .lf-ask-suggest        suggestions in the flow under the field
     .lf-ask-more           the hero's one quiet way to the controls
     .lf-ask-cal            RT.Calendar's inline card, sized for a filter column

   Soehne has no weight axis: every rule names a family and pins font-weight
   normal. Nothing under 13px. No overlays: suggestions, Hoku's reply, the
   controls and the calendar all open in the flow and push what follows. */


/* ─── 1. HOME GIVES THE SHELVES HALF THE STAGE ────────────────────────────── */
/* Moved out of this sheet (2026-11-11, integration): the Home route's Browse
   companion asks for it in routes.js ("share": "half"), the stage stamps
   data-share on that lane while Ask holds the Stage beside it as the only List,
   and the width rule lives in lanes.css. Nothing here reaches outside the lane. */


/* ─── 2. THE PAGE ─────────────────────────────────────────────────────────── */
/* As tall as the lane, so the hero can take all of it. */

.desktop-surface .lf-ask {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    min-width: 0;
    min-height: 100%;
    max-width: none;   /* the old home.css still centres .page-home at 1480px */
    margin: 0;
}

.desktop-surface .lf-ask [hidden] { display: none; }


/* ─── 3. THE HERO ─────────────────────────────────────────────────────────── */
/* One column, centred in the lane's height: the say, the box, the doors. Every
   size is the lane's (cqi), so a 26rem lane sets it like the phone and a 75rem
   lane sets it like a poster, with the same proportions. */

.desktop-surface .lf-ask-hero {
    position: relative;
    flex: 0 0 auto;
    /* The first screen, less a peek: the next section's title and the top of its row show
       above the fold and say "scroll" (home-full-hero.md). The one viewport length here. */
    --lf-peek: clamp(10rem, 23vh, 16rem);   /* the feed's title, the first band's head and the top of its row */
    min-height: calc(100dvh - var(--lf-peek));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: clamp(1.1rem, 0.1rem + 4cqi, 4.25rem);
    min-width: 0;
    padding: clamp(1.5rem, 5cqi, 6rem) clamp(1.25rem, 6.5cqi, 8.5rem) clamp(2rem, 6.5cqi, 7.5rem);
}

/* Narrow windows: the stage starts under the shell's top bar (lanes.css has the same number). */
.desktop-surface .desktop-stage[data-rail="off"] .lf-ask-hero { min-height: calc(100dvh - (44px + 1.2rem) - var(--lf-peek)); }

/* "Narrow it down" is open (Home.js sets data-ask-more): the hero stops filling the lane and
   stacks from the top, so the greeting stays on screen with the controls under the doors. */
.desktop-surface .lf-ask[data-ask-more] .lf-ask-hero {
    flex: 0 0 auto;
    min-height: 0;
    justify-content: flex-start;
    gap: clamp(0.9rem, 0.2rem + 2cqi, 2rem);
    padding-block: clamp(1.25rem, 2.6cqi, 3rem) clamp(1.5rem, 3.5cqi, 4rem);
}

.desktop-surface .lf-ask-say {
    display: grid;
    gap: clamp(0.4rem, 1.4cqi, 1.5rem);
    min-width: 0;
}

.desktop-surface .lf-ask-greeting {
    font-family: var(--font-mark);   /* the Home hero: with the prompt below, the one headline set in fett */
    font-size: var(--type-display);
    line-height: 1;
    white-space: nowrap;   /* the options are short on purpose (HomeHero::GREETING_BUDGET) */
}

.desktop-surface .lf-ask-prompt {
    max-width: 22em;
    margin: 0;
    color: var(--text-soft);   /* the data room's lede under its ink title: no wave behind the hero (Joel 2026-11-11) */
    font-family: var(--font-mark);
    font-weight: normal;
    font-size: var(--type-title);
    line-height: 1.12;
    letter-spacing: var(--track-tight);
    text-wrap: balance;
}

.desktop-surface .lf-ask-p2 { opacity: 0.78; }   /* the second beat rests softer (mobile's dimmed half) */

/* The intro's letters: each rides up out of its word's mask */
.desktop-surface .lf-ask-ch { display: inline-block; will-change: transform; }

/* Until the script has drawn this load's lines nothing of the hero paints (no
   wrong-line flash). If the script never runs, the server's own pair shows. */
.desktop-surface .lf-ask[data-ask-intro="pending"] :is(.lf-ask-say, .lf-ask-ask) {
    visibility: hidden;
    animation: lf-ask-show 0s linear 3s forwards;
}

@keyframes lf-ask-show {
    to { visibility: visible; }
}

.desktop-surface .lf-ask-head { display: none; }   /* the lane header belongs to the List form */

.desktop-surface .lf-ask-ask {
    display: grid;
    gap: var(--space-md);
    min-width: 0;
}

/* The say and the ask keep a reading measure: a wide lane gives the hero air, not wider parts. */
.desktop-surface .lf-ask-say { max-width: 56rem; justify-items: center; }
.desktop-surface .lf-ask-ask { width: 100%; max-width: 46rem; justify-items: center; }
.desktop-surface .lf-ask-ask > .lf-ask-box { width: 100%; }
.desktop-surface .lf-ask-box > textarea.k-input { text-align: left; }
.desktop-surface .lf-ask-ghost { text-align: left; }


/* ─── 4. THE ASK BOX ──────────────────────────────────────────────────────── */
/* The kit's .k-ask pill, opened up for the hero. One field in both forms. */

/* The phone's box (pages/Home.php #Text-Input: .rbox.h5.btn-ghost-brand, radius 2rem): the
   ghost-brand glass from the app's button system, a full pill at one line of text. */
.desktop-surface .lf-ask-box > textarea.k-input {
    min-height: 3.625rem;
    padding: 1rem 3.75rem 1rem 3.1rem;
    border-radius: 2rem;
    background: var(--ghost-brand);
    box-shadow: var(--shadow-cont);
    font-size: var(--type-lead);
    line-height: 1.3;
    cursor: text;
}

.desktop-surface .lf-ask-box > .k-input::placeholder { color: transparent; }   /* the hero speaks through the ghost line */

.desktop-surface .lf-ask-box > .k-ask-icon {
    left: 1.1rem;
    font-size: var(--type-lead);
}

/* The phone's send (#Text-Input .mv-comp-send): 2.25rem, the brand's light-to-base fill. */
.desktop-surface .lf-ask-box > .lf-ask-go {
    right: 0.7rem;
    bottom: 50%;
    width: 2.25rem;
    height: 2.25rem;
    min-height: 0;
    background: linear-gradient(160deg, var(--brand-color-lt), var(--brand-color));
    box-shadow: 0 .375rem .875rem rgba(235, 93, 143, .32);
    outline: var(--default-outline);
    color: #fff;
    font-size: 1rem;
    translate: 0 50%;
    transition: transform var(--dur-base) var(--ease-spring), opacity var(--dur-fast) var(--ease-out), scale var(--dur-base) var(--ease-spring);
}

/* Nothing typed yet: no send button, as on the phone (it pops in with the first character). */
.desktop-surface .lf-ask-box > .lf-ask-go.is-resting { opacity: 0; scale: 0.5; pointer-events: none; }

.desktop-surface .lf-ask-icon-list { display: none; }

/* The ghost line: rotating phrases typed where the words will go. Real text
   over the field, never the placeholder attribute (it animates). One line,
   cut with an ellipsis: a long phrase never wraps or drops out of the box. */
.desktop-surface .lf-ask-ghost {
    position: absolute;
    z-index: 1;
    left: calc(3.1rem + 2px);
    right: 3.75rem;
    top: 50%;
    translate: 0 -50%;
    overflow: hidden;
    color: var(--text-soft);
    font-family: var(--font-head);
    font-weight: normal;
    font-size: var(--type-lead);
    line-height: 1.3;
    white-space: nowrap;
    text-overflow: ellipsis;
    pointer-events: none;
}

.desktop-surface .lf-ask-caret {
    display: inline-block;
    width: 2px;
    height: 1.05em;
    margin-left: 2px;
    vertical-align: text-bottom;
    background: var(--rt-pink);
    animation: lf-ask-blink 1.1s steps(1) infinite;
}

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

/* Suggestions: in the flow, under the field (List form only: the script builds
   none at the hero). Rows as plain as the phone's. */
.desktop-surface .lf-ask-suggest {
    display: grid;
    margin: 0;
    padding: 0.3rem;
    border-radius: var(--r-ctl);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-ctl);
    list-style: none;
}

.desktop-surface .lf-ask-suggest > li {
    min-width: 0;
    padding: 0.55rem 0.8rem;
    border-radius: 0.6rem;
    overflow: hidden;
    color: var(--text);
    font-family: var(--font-text);
    font-size: var(--type-body);
    line-height: 1.25;
    text-transform: capitalize;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: pointer;
}

.desktop-surface .lf-ask-suggest > li[aria-selected="true"] { background: var(--rt-blue-slt); color: var(--rt-blue-bl); }

.desktop-surface .lf-ask-note { color: var(--text-soft); }

/* Hoku's answer in place */
.desktop-surface .lf-ask-reply { white-space: pre-line; }
.desktop-surface .lf-ask-reply > div { display: grid; gap: var(--space-sm); justify-items: start; min-width: 0; }
.desktop-surface .lf-ask-reply p { margin: 0; }


/* ─── 5. THE DOORS, AND THE QUIET WAY TO THE CONTROLS ─────────────────────── */
/* Stacked like the phone's while the lane is a column; three across when it
   has the room. Dealt in one after another by the intro. */

.desktop-surface .lf-ask-doors {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    min-width: 0;
}

/* The phone's button, whole: .btn.btn-rounded.j-button + theme word (paint from the app's
   BUTTON SYSTEM in brand.css). Only the size is set here: a button, not a banner. */
.desktop-surface .lf-ask-door {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55em;
    flex: 0 1 auto;
    margin: 0;
    padding: 0.65rem 1.25rem;
    font-size: var(--type-body);
    line-height: 1.2;
    white-space: nowrap;
    transition: transform 500ms var(--ease-house), opacity 450ms var(--ease-house), filter var(--dur-fast) var(--ease-out);
}

.desktop-surface .lf-ask-door > i { font-size: 1.05em; color: #fff; }

/* Too narrow for three in a row: the phone's stack, at a button's width (never the lane's). */
@container lane (width < 44rem) {
    .desktop-surface .lf-ask-doors { flex-direction: column; align-items: stretch; width: 100%; max-width: 21rem; }
}

.desktop-surface .lf-ask-door.is-waiting {
    opacity: 0;
    transform: translateY(1.25rem);
}

.desktop-surface .lf-ask-chips > .k-chip { min-height: 2.5rem; }

.desktop-surface .lf-ask-more {
    justify-self: center;
    color: var(--text);
}

.desktop-surface .lf-ask-more-mark {
    font-size: 0.75em;
    transition: rotate var(--dur-base) var(--ease-spring);
}

.desktop-surface .lf-ask-more[aria-expanded="true"] > .lf-ask-more-mark { rotate: 180deg; }


/* ─── 6. THE CONTROLS ─────────────────────────────────────────────────────── */
/* One column of groups (a List lane, a hero column). At the hero they are a
   glass tray under the doors that is closed until asked for; a wide hero lays
   the groups two across. */

.desktop-surface .lf-ask-form {
    flex: none;
    display: grid;
    gap: var(--space-md);
    min-width: 0;
    padding: var(--pad-panel) clamp(1rem, 0.6rem + 1.4cqi, 2.25rem);
    border-radius: var(--r-feature);
    background: rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78), 0 18px 48px -28px rgba(30, 40, 53, 0.28);
}

.desktop-surface .lf-ask-form:not([data-ask-open]) { display: none; }

.desktop-surface .lf-ask-filters {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-lg);
}

@container lane (width >= 44rem) {
    .desktop-surface .lane[data-w="stage"] > .lane-body .lf-ask .lf-ask-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-md) var(--space-lg);
    }

    .desktop-surface .lane[data-w="stage"] > .lane-body .lf-ask [data-ask-group="show"] { grid-column: 1 / -1; }
}

.desktop-surface .lf-ask-field {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
    margin: 0;
}

.desktop-surface .lf-ask-field > .k-meta { color: var(--text-soft); }
.desktop-surface .lf-ask-gps-error { margin: 0; }

/* Show all sits apart from the eight flags it clears */
.desktop-surface .lf-ask-flags > .lf-ask-showall { margin-right: var(--space-sm); }

/* The calendar, in place. RT.Calendar's inline mode mounts its card here
   (assets/js/rt-calendar.js) and the kit dresses it (kit.css section 18: one
   calendar for every lane). This only gives the card the height of a whole
   month in a filter column as narrow as 320px: the months scroll inside it, the
   first one is complete, and Continue sits under it, never over a row. */
.desktop-surface .lf-ask-cal .rtcal-card { max-height: none; }
.desktop-surface .lf-ask-cal .rtcal-months { flex: none; max-height: 21.5rem; }


/* ─── 7. THE LIST FORM ────────────────────────────────────────────────────── */
/* The lane is not the Stage: the search form beside the results. The lane's own
   glass is the surface (lanes.css), so nothing here draws a card, and the one
   primary control is the search button on the field. */

.desktop-surface .lane:not([data-w="stage"]) > .lane-body .lf-ask {
    gap: var(--space-md);
    min-height: 0;
}

.desktop-surface .lane:not([data-w="stage"]) > .lane-body .lf-ask .lf-home-below { display: none; }

.desktop-surface .lane:not([data-w="stage"]) > .lane-body .lf-ask .lf-ask-hero {
    flex: none;
    min-height: 0;
    align-items: stretch;
    text-align: start;
    gap: var(--space-sm);
    margin: 0;
    padding: 0;
}

.desktop-surface .lane:not([data-w="stage"]) > .lane-body .lf-ask :is(.lf-ask-say, .lf-ask-doors, .lf-ask-chips, .lf-ask-ghost, .lf-ask-more, .lf-ask-icon-hero) {
    display: none;
}

.desktop-surface .lane:not([data-w="stage"]) > .lane-body .lf-ask .lf-ask-icon-list { display: revert; }

.desktop-surface .lane:not([data-w="stage"]) > .lane-body .lf-ask .lf-ask-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs) var(--space-sm);
    min-height: 2.25rem;
}

.desktop-surface .lf-ask-head > .lf-ask-reset { margin-left: auto; }
.desktop-surface .lf-ask-count[aria-busy="true"] { opacity: 0.55; }

.desktop-surface .lane:not([data-w="stage"]) > .lane-body .lf-ask .lf-ask-ask { gap: var(--space-sm); }

/* The query: the kit's pill at its own size, a real placeholder */
.desktop-surface .lane:not([data-w="stage"]) > .lane-body .lf-ask .lf-ask-box > .k-input {
    min-height: 3.25rem;
    padding: 0.85em 3.6rem 0.85em 3.1rem;
    border-radius: 1.75rem;
    border-color: rgba(30, 40, 53, 0.14);
    font-size: var(--type-lead);
}

.desktop-surface .lane:not([data-w="stage"]) > .lane-body .lf-ask .lf-ask-box > .k-input::placeholder { color: var(--text-faint); }
.desktop-surface .lane:not([data-w="stage"]) > .lane-body .lf-ask .lf-ask-box > .k-ask-icon { left: 1.1rem; font-size: 1.15rem; }

.desktop-surface .lane:not([data-w="stage"]) > .lane-body .lf-ask .lf-ask-box > .lf-ask-go {
    right: 0.4rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
    opacity: 1;
    filter: none;
}

.desktop-surface .lane:not([data-w="stage"]) > .lane-body .lf-ask .lf-ask-note { color: var(--text-soft); }

/* Every control open, whatever the hero's "Narrow it down" was left at */
.desktop-surface .lane:not([data-w="stage"]) > .lane-body .lf-ask .lf-ask-form {
    display: grid;
    gap: var(--space-md);
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}


/* ─── 8. POINTER AND MOTION ───────────────────────────────────────────────── */

@media (hover: hover) and (pointer: fine) {
    .desktop-surface .lf-ask-suggest > li:hover { background: var(--rt-blue-slt); }
}

@media (prefers-reduced-motion: reduce) {
    .desktop-surface .lf-ask-caret { animation: none; }
    .desktop-surface .lf-ask-door { transition: none; }
    .desktop-surface .lf-ask-door.is-waiting { opacity: 1; transform: none; }
    .desktop-surface .lf-ask-box > .lf-ask-go,
    .desktop-surface .lf-ask-more-mark { transition: none; }
}
