/* ══════════════════════════════════════════════════════════════════════════
   Ask Kestrel: the line under the panel's title (owner, 14 Nov 2026: "in
   smaller but in crisp and clear white text succinctly have her say she can
   help edit your book or provide website support").

   One file for every surface (header-dashboard.php, templates/v3/frame-open.php,
   header-public.php). The text is KestrelGuide::askLines (dock, wizards,
   Publish, account pages), artifact-mode.js on Write (it names the chapter),
   and the desk chat's status line on public pages.

   The line is the head's last row, under the face, the title and the
   buttons. Beside three to five icon buttons the title column is about 160px:
   the sentence was cut to "I can help you write your books, or with
   anything…" and on Write the title itself to "Ask Kes…". Its own row is the
   panel's full width, so it reads in one or two lines, never more.

   In the et-v3-write layer: Write's and the account pages' theme puts its
   !important rules there (v3-finish bundle), and a layered !important beats
   every unlayered one whatever its selector, so out here this file lost to
   "color: var(--v3-sec) !important" on those pages. Inside the same layer the
   stacked ids below win; where the layer is not loaded yet, naming it here
   creates it, and it still beats the unlayered type-scale.css / kestrel-dock.css
   / kestrel-popup.css rules. et-hidden (the first layer) still hides [hidden].
   ══════════════════════════════════════════════════════════════════════════ */
@layer et-v3-write {
    /* The head wraps, so the line can take a row of its own, and grows to hold
       it: kestrel-popup.css fixes it at 3.5rem (overflow hidden on Write, so the
       line vanished; on the account pages it hung over the conversation). */
    html body #etKestrelDock#etKestrelDock#etKestrelDock > .et-kdock__head:has(> #etKDockStep),
    html body #etKestrelSidebar#etKestrelSidebar#etKestrelSidebar > .et-kestrel-sidebar__head:has(> #etKestrelChapterMeta) {
        flex-wrap: wrap !important;
        align-content: flex-start !important;
        row-gap: 0 !important;
        height: auto !important;
        min-height: 3.5rem !important;
        max-height: none !important;
        overflow: visible !important;
        padding-bottom: 10px !important;
        /* Under the title: where it starts, less the head's padding (measured 14 Nov 2026). */
        --et-ask-indent: 30px;
    }
    /* The account pages' column pins the head at 64px (flex: 0 0 64px): it has to grow. */
    html body #etKestrelDock#etKestrelDock#etKestrelDock > .et-kdock__head:has(> #etKDockStep) {
        flex-basis: auto !important;
    }

    /* Write: her face goes down beside her line. Her head carries five
       buttons (Recent edits, Clear, sound, layout, minimize, 182px) and at
       its usual 334px the face, "Ask Kestrel" and the buttons need 368: the
       minimize button fell to a row of its own, or the title was cut to
       "Ask Kes…". So row one is the title and the buttons, and row two is her
       face with what she says, like her messages below it. ::after is the
       row break (nothing else draws one on this head). */
    html body #etKestrelSidebar#etKestrelSidebar#etKestrelSidebar > .et-kestrel-sidebar__head:has(> #etKestrelChapterMeta) > .et-kestrel-sidebar__titles {
        display: contents !important;
    }
    html body #etKestrelSidebar#etKestrelSidebar#etKestrelSidebar > .et-kestrel-sidebar__head:has(> #etKestrelChapterMeta) .et-kestrel-sidebar__copy {
        order: -1 !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    html body #etKestrelSidebar#etKestrelSidebar#etKestrelSidebar > .et-kestrel-sidebar__head:has(> #etKestrelChapterMeta)::after {
        content: '' !important;
        order: 1 !important;
        flex: 0 0 100% !important;
        height: 6px !important;
    }
    html body #etKestrelSidebar#etKestrelSidebar#etKestrelSidebar > .et-kestrel-sidebar__head:has(> #etKestrelChapterMeta) .et-kestrel-sidebar__face {
        order: 2 !important;
        align-self: flex-start !important;
        flex: 0 0 auto !important;
        width: 24px !important;
        height: 24px !important;
        margin: 0 10px 0 0 !important;
    }
    /* The title is a name: it keeps its whole width now the line has gone. */
    html body #etKestrelDock#etKestrelDock#etKestrelDock .et-kdock__title,
    html body #etKestrelSidebar#etKestrelSidebar#etKestrelSidebar .et-kestrel-sidebar__title {
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: nowrap !important;
    }

    html body #etKestrelDock#etKestrelDock#etKestrelDock #etKDockStep#etKDockStep#etKDockStep,
    html body #etKestrelSidebar#etKestrelSidebar#etKestrelSidebar #etKestrelChapterMeta#etKestrelChapterMeta#etKestrelChapterMeta,
    html body #v3Kestrel#v3Kestrel#v3Kestrel .v3-k__where:not(#et-q_):not(#et-q_):not(#et-q_),
    html body #etSupportChat#etSupportChat#etSupportChat[data-role="user"] #etSupportChatStatus#etSupportChatStatus#etSupportChatStatus,
    html body #etSupportChat#etSupportChat#etSupportChat[data-role="guest"] #etSupportChatStatus#etSupportChatStatus#etSupportChatStatus {
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        margin: 2px 0 0 !important;
        overflow: hidden !important;
        white-space: normal !important;
        text-overflow: clip !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        line-height: 1.35 !important;
        letter-spacing: 0 !important;
        color: #fff !important;
        opacity: 1 !important;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    /* Its own row, lined up under the title (the face is 32px, then the head's gap). */
    html body #etKestrelDock#etKestrelDock#etKestrelDock #etKDockStep#etKDockStep#etKDockStep,
    html body #etKestrelSidebar#etKestrelSidebar#etKestrelSidebar #etKestrelChapterMeta#etKestrelChapterMeta#etKestrelChapterMeta {
        order: 99 !important;
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        padding: 0 0 0 var(--et-ask-indent, 42px) !important;
        box-sizing: border-box !important;
    }
    /* On Write it shares row two with her face. */
    html body #etKestrelSidebar#etKestrelSidebar#etKestrelSidebar #etKestrelChapterMeta#etKestrelChapterMeta#etKestrelChapterMeta {
        order: 3 !important;
        flex: 1 1 0 !important;
        width: auto !important;
        margin: 0 !important;
        padding: 1px 0 0 !important;
    }

    /* Collapsed to its head, the line goes as it always did (seam-tone.css). */
    html body #etKestrelDock#etKestrelDock#etKestrelDock.is-collapsed #etKDockStep#etKDockStep#etKDockStep,
    html body.et-ws-kestrel-collapsed #etKestrelSidebar#etKestrelSidebar#etKestrelSidebar #etKestrelChapterMeta#etKestrelChapterMeta#etKestrelChapterMeta {
        display: none !important;
    }
}
