﻿@charset "UTF-8";
/* ############################################################################
   QLYNIC ASSISTANT  ·  Content/assistant.css              (Phase 3 — 29 Aug 2026)
   ----------------------------------------------------------------------------
   THE WIDGET. A launcher and a panel, mounted once from Default.Master by
   Controls/QlynicAssistant.ascx, driven by Scripts/assistant.js.

   PREFIX ....... qc-  classes,  --qc-  tokens. Nothing unprefixed. The root
                  is .qc and every rule is scoped under it, so this sheet can
                  load on any page — marketing today, the dashboard later —
                  without touching a host style.
   THEME ........ NOCTURNE tokens (the dashboard kit) for the material, so
                  the same widget can sit on the dark marketing shell and,
                  with data-qc-theme="light", in the daylight dashboard. The
                  typeface is INHERITED from the host: Geist on the marketing
                  pages, Hanken Grotesk under Site.Master, the system stack
                  anywhere else — the widget speaks in the page's voice.
   LAWS OBEYED .. MERIDIAN 1: glass defined by light — a 1px hairline, a top
                  edge light, ambient darkness below. No shadow soup.
                  MERIDIAN 2: one accent on screen — the "Take me there" card.
                  Cyan marks live things only: the status node while the
                  model is writing, focus rings, the caret.
                  MERIDIAN 3: sans says, mono measures — the status readout,
                  the counter, the eyebrows and the fine print are mono.
                  NOCTURNE 8: the filament gradient belongs to AI features —
                  it is the launcher's ring, the panel's top edge, the caret.
   MOTION ....... one performer per moment. The panel unfolds with a shallow
                  3D lift (420 ms) while the filament sweeps once along its
                  top edge; messages rise 220 ms; the launcher ring breathes.
                  prefers-reduced-motion: everything becomes a 120 ms fade.
   LAYERS ....... launcher 1010, panel 1011 — above the header (1000), below
                  the board (1020), so the menu can still open over the chat.
   ############################################################################ */

/* ============================================================================
   1 · TOKENS
   ============================================================================ */
.qc {
    /* the page's own voice, or the kit's, or the system's */
    --qc-font: var(--qm-font-sans, var(--qd-font, -apple-system, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif));
    --qc-mono: var(--qm-font-mono, var(--qd-mono, ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace));

    /* material — dark (default) */
    --qc-panel: rgba(14, 19, 25, 0.94);
    --qc-panel-solid: #0E1319;
    --qc-panel-2: #141A21;
    --qc-well: #0A0E13;
    --qc-hair: rgba(148, 180, 214, 0.13);
    --qc-hair-2: rgba(148, 180, 214, 0.22);
    --qc-hair-3: rgba(148, 180, 214, 0.34);
    --qc-edge: rgba(216, 230, 255, 0.09);
    --qc-hov: rgba(148, 180, 214, 0.07);
    --qc-press: rgba(148, 180, 214, 0.12);

    /* ink */
    --qc-ink: #E9EFF7;
    --qc-ink-2: #B7C3D2;
    --qc-ink-3: #8A97A8;
    --qc-faint: #69768A;

    /* the filament and the actors */
    --qc-filament: linear-gradient(90deg, #2BD9EC 0%, #4D8DFF 52%, #8A7CFF 100%);
    --qc-act: #22D3EE;
    --qc-act-ink: #5FE3F5;
    --qc-act-soft: rgba(34, 211, 238, 0.11);
    --qc-accent: #4D8DFF;
    --qc-accent-ink: #7FAEFF;
    --qc-accent-soft: rgba(77, 141, 255, 0.12);
    --qc-accent-line: rgba(77, 141, 255, 0.34);
    --qc-ai: #8A7CFF;
    --qc-ai-ink: #A99DFF;
    --qc-ai-soft: rgba(138, 124, 255, 0.12);

    /* the one chrome button */
    --qc-btn: #E9EFF7;
    --qc-btn-hover: #FFFFFF;
    --qc-on-btn: #080B0F;

    /* semantics */
    --qc-warn: #FBBF24;
    --qc-warn-tint: rgba(251, 191, 36, 0.12);
    --qc-warn-line: rgba(251, 191, 36, 0.30);
    --qc-bad: #FF5E7A;
    --qc-bad-tint: rgba(255, 94, 122, 0.12);
    --qc-bad-line: rgba(255, 94, 122, 0.30);

    /* depth — ambient darkness, one line of light */
    --qc-lift: 0 1px 0 var(--qc-edge) inset, 0 28px 70px -28px rgba(2, 4, 10, 0.92), 0 6px 22px -8px rgba(2, 4, 10, 0.75);
    --qc-lift-sm: 0 1px 0 var(--qc-edge) inset, 0 10px 30px -14px rgba(2, 4, 10, 0.8);
    --qc-ring: 0 0 0 2px var(--qc-panel-solid), 0 0 0 4px var(--qc-act);

    /* geometry + motion */
    --qc-r: 18px;
    --qc-r-md: 12px;
    --qc-r-sm: 9px;
    --qc-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --qc-t: 140ms;
    --qc-w: min(400px, calc(100vw - 32px));
    --qc-h: min(680px, calc(var(--qc-vh, 100dvh) - 32px));
    --qc-gap: 24px;
    --qc-z: 1010;

    color-scheme: dark;
    font-family: var(--qc-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ── the same instrument in daylight ─────────────────────────────────────── */
.qc[data-qc-theme="light"] {
    --qc-panel: rgba(255, 255, 255, 0.94);
    --qc-panel-solid: #FFFFFF;
    --qc-panel-2: #F5F7FA;
    --qc-well: #EEF2F6;
    --qc-hair: #E5EAF0;
    --qc-hair-2: #D5DCE4;
    --qc-hair-3: #B9C3CF;
    --qc-edge: rgba(255, 255, 255, 0.9);
    --qc-hov: #F1F4F8;
    --qc-press: #E7ECF2;
    --qc-ink: #0B1017;
    --qc-ink-2: #39424F;
    --qc-ink-3: #5C6675;
    --qc-faint: #8792A3;
    --qc-act: #0E7490;
    --qc-act-ink: #0B5E75;
    --qc-act-soft: #E0F4F8;
    --qc-accent: #2E6FE8;
    --qc-accent-ink: #1F5FD6;
    --qc-accent-soft: rgba(46, 111, 232, 0.10);
    --qc-accent-line: rgba(46, 111, 232, 0.32);
    --qc-ai: #6D5BD0;
    --qc-ai-ink: #4F3FB0;
    --qc-ai-soft: #EEEAFB;
    --qc-btn: #12181F;
    --qc-btn-hover: #05090D;
    --qc-on-btn: #FFFFFF;
    --qc-warn: #9A6207;
    --qc-warn-tint: #FCF1DC;
    --qc-warn-line: #E6CFA0;
    --qc-bad: #C0304C;
    --qc-bad-tint: #FBE7EB;
    --qc-bad-line: #EEBCC6;
    --qc-lift: 0 1px 0 var(--qc-edge) inset, 0 24px 56px -24px rgba(11, 18, 32, 0.30), 0 4px 16px -6px rgba(11, 18, 32, 0.14);
    --qc-lift-sm: 0 1px 0 var(--qc-edge) inset, 0 8px 24px -12px rgba(11, 18, 32, 0.22);
    --qc-ring: 0 0 0 2px var(--qc-panel-solid), 0 0 0 4px var(--qc-act);
    color-scheme: light;
}

/* ============================================================================
   2 · BASE
   ============================================================================ */
.qc, .qc *, .qc *::before, .qc *::after {
    box-sizing: border-box;
}

.qc button {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
}

.qc svg {
    display: block;
}

.qc [hidden] {
    display: none !important;
}

.qc :focus-visible {
    outline: none;
    box-shadow: var(--qc-ring);
    border-radius: var(--qc-r-sm);
}

.qc-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================================
   3 · THE LAUNCHER
   A disc of glass with the filament as its ring. It carries the mark — two
   answer lines and a node — and unfolds a label on hover. Present before any
   script runs; the script only wires it.
   ============================================================================ */
.qc-launch {
    position: fixed;
    right: max(var(--qc-gap), env(safe-area-inset-right));
    bottom: max(var(--qc-gap), env(safe-area-inset-bottom));
    z-index: var(--qc-z);
    display: inline-flex;
    align-items: center;
    gap: 0;
    height: 52px;
    padding: 0 14px;
    border: 1px solid var(--qc-hair-2);
    border-radius: 999px;
    background: var(--qc-panel);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    color: var(--qc-ink);
    cursor: pointer;
    box-shadow: var(--qc-lift-sm);
    transition: transform 220ms var(--qc-ease), border-color var(--qc-t), background-color var(--qc-t), opacity 200ms var(--qc-ease);
    -webkit-tap-highlight-color: transparent;
}

    .qc-launch:hover {
        border-color: var(--qc-hair-3);
        transform: translateY(-1px);
    }

    .qc-launch:active {
        transform: translateY(0) scale(0.98);
    }

/* the filament ring — the only glow the widget spends at rest, and it breathes */
.qc-launch-ring {
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1.5px;
    background: var(--qc-filament);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.55;
    pointer-events: none;
    animation: qc-breathe 4.2s ease-in-out infinite;
}

@keyframes qc-breathe {
    0%, 100% {
        opacity: 0.42;
    }

    50% {
        opacity: 0.9;
    }
}

.qc-launch-mark {
    position: relative;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}

    .qc-launch-mark svg {
        width: 22px;
        height: 22px;
    }

.qc-mark-node {
    transform-origin: 17.5px 15px;
    animation: qc-node 2.6s ease-in-out infinite;
}

@keyframes qc-node {
    0%, 100% {
        opacity: 0.55;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

.qc-launch-t {
    display: inline-block;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: max-width 320ms var(--qc-ease), opacity 200ms var(--qc-ease), margin 320ms var(--qc-ease);
}

.qc-launch:hover .qc-launch-t,
.qc-launch:focus-visible .qc-launch-t,
.qc-launch.is-nudge .qc-launch-t {
    max-width: 120px;
    margin-left: 10px;
    opacity: 1;
}

/* a returning visitor: a small live node tells them the thread is still here */
.qc.is-known .qc-launch::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--qc-act);
    box-shadow: 0 0 0 2px var(--qc-panel-solid);
}

.qc.is-open .qc-launch::after {
    display: none;
}

.qc-launch-x {
    display: none;
    width: 22px;
    height: 22px;
}

    .qc-launch-x svg {
        width: 22px;
        height: 22px;
    }

/* open: the disc becomes the way back down */
.qc.is-open .qc-launch-mark,
.qc.is-open .qc-launch-t {
    display: none;
}

.qc.is-open .qc-launch-x {
    display: block;
}

.qc.is-open .qc-launch-ring {
    animation: none;
    opacity: 0.3;
}

/* ============================================================================
   4 · THE PANEL
   ============================================================================ */
.qc-panel {
    position: fixed;
    right: max(var(--qc-gap), env(safe-area-inset-right));
    bottom: calc(max(var(--qc-gap), env(safe-area-inset-bottom)) + 64px);
    z-index: calc(var(--qc-z) + 1);
    display: flex;
    flex-direction: column;
    width: var(--qc-w);
    height: var(--qc-h);
    max-height: calc(var(--qc-vh, 100dvh) - 32px - 64px);
    border: 1px solid var(--qc-hair-2);
    border-radius: var(--qc-r);
    background: var(--qc-panel);
    -webkit-backdrop-filter: blur(26px) saturate(1.5);
    backdrop-filter: blur(26px) saturate(1.5);
    color: var(--qc-ink);
    box-shadow: var(--qc-lift);
    overflow: hidden;
    opacity: 0;
    transform: perspective(1400px) translateY(18px) rotateX(-7deg) scale(0.965);
    transform-origin: 88% 100%;
    transition: opacity 240ms var(--qc-ease), transform 420ms var(--qc-ease);
    will-change: transform, opacity;
    font-size: 15px;
    line-height: 1.55;
}

    .qc-panel.is-open {
        opacity: 1;
        transform: none;
    }

/* the filament along the top edge: sweeps once on open, then rests, dimmed */
.qc-panel-edge {
    position: absolute;
    top: 0;
    left: 14px;
    right: 14px;
    height: 1px;
    border-radius: 1px;
    background: var(--qc-filament);
    background-size: 240% 100%;
    background-position: 0% 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    opacity: 0.55;
    pointer-events: none;
}

.qc-panel.is-open .qc-panel-edge {
    animation: qc-sweep 1100ms var(--qc-ease) 1;
}

@keyframes qc-sweep {
    0% {
        background-position: 140% 0;
        opacity: 1;
    }

    100% {
        background-position: -40% 0;
        opacity: 0.55;
    }
}

/* the model is writing: the edge travels */
.qc-panel.is-live .qc-panel-edge {
    animation: qc-travel 4s var(--qc-ease) infinite;
    opacity: 0.9;
}

@keyframes qc-travel {
    0%, 100% {
        background-position: 0% 0;
    }

    50% {
        background-position: 100% 0;
    }
}

.qc-grab {
    display: none;
}

/* ── header ─────────────────────────────────────────────────────────────── */
.qc-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 12px 12px 16px;
    border-bottom: 1px solid var(--qc-hair);
    flex: 0 0 auto;
}

.qc-head-mark {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--qc-ai-soft);
    color: var(--qc-ai-ink);
    flex: 0 0 auto;
}

    .qc-head-mark svg {
        width: 18px;
        height: 18px;
    }

.qc-head-t {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1 1 auto;
}

.qc-head-name {
    font-family: var(--qc-font);
    font-size: 14.5px;
    font-weight: 650;
    letter-spacing: -0.012em;
    text-transform: none;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* the telemetry readout: mono, a node that only lights while something is live */
.qc-head-status {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    font-family: var(--qc-mono);
    font-size: 10.5px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--qc-ink-3);
    line-height: 1.2;
}

    .qc-head-status > span {
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.qc-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--qc-faint);
    flex: 0 0 auto;
    transition: background-color var(--qc-t), box-shadow var(--qc-t);
}

.qc-panel.is-live .qc-dot {
    background: var(--qc-act);
    box-shadow: 0 0 0 3px var(--qc-act-soft);
    animation: qc-pulse 1.4s ease-in-out infinite;
}

@keyframes qc-pulse {
    0%, 100% {
        box-shadow: 0 0 0 2px var(--qc-act-soft);
    }

    50% {
        box-shadow: 0 0 0 5px var(--qc-act-soft);
    }
}

.qc-head-act {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
}

.qc-ib {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--qc-r-sm);
    background: transparent;
    color: var(--qc-ink-3);
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--qc-t), color var(--qc-t);
}

    .qc-ib:hover {
        background: var(--qc-hov);
        color: var(--qc-ink);
    }

    .qc-ib:active {
        background: var(--qc-press);
    }

    .qc-ib svg {
        width: 17px;
        height: 17px;
    }

/* ── the thread ─────────────────────────────────────────────────────────── */
.qc-thread {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px 16px 8px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--qc-hair-3) transparent;
}

    .qc-thread::-webkit-scrollbar {
        width: 8px;
    }

    .qc-thread::-webkit-scrollbar-thumb {
        background: var(--qc-hair-2);
        border-radius: 4px;
        border: 2px solid transparent;
        background-clip: padding-box;
    }

    .qc-thread:focus-visible {
        box-shadow: inset var(--qc-ring);
        border-radius: 0;
    }

/* the empty state — quiet, one line of type and three chips below */
.qc-hello {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 18px 4px 22px;
    animation: qc-rise 360ms var(--qc-ease) both;
}

.qc-hello-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--qc-ai-soft);
    color: var(--qc-ai-ink);
    position: relative;
    margin-bottom: 6px;
}

    .qc-hello-mark::after {
        content: "";
        position: absolute;
        inset: -1px;
        border-radius: inherit;
        padding: 1px;
        background: var(--qc-filament);
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        opacity: 0.6;
        animation: qc-breathe 4.2s ease-in-out infinite;
    }

    .qc-hello-mark svg {
        width: 22px;
        height: 22px;
    }

.qc-hello-h {
    margin: 0;
    font-family: var(--qc-font);
    text-transform: none;
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -0.028em;
    line-height: 1.12;
    color: var(--qc-ink);
    text-wrap: balance;
}

.qc-hello-p {
    margin: 0;
    font-family: var(--qc-font);
    text-transform: none;
    letter-spacing: normal;
    font-size: 14px;
    line-height: 1.55;
    color: var(--qc-ink-2);
    max-width: 34ch;
}

.qc-msgs {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.qc-m {
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: qc-rise 220ms var(--qc-ease) both;
}

@keyframes qc-rise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* the visitor: a quiet glass bubble, right */
.qc-m--u {
    align-items: flex-end;
}

.qc-m--u .qc-bub {
    max-width: 86%;
    padding: 9px 13px;
    border: 1px solid var(--qc-hair);
    border-radius: 16px 16px 4px 16px;
    background: var(--qc-panel-2);
    color: var(--qc-ink);
    font-family: var(--qc-font);
    font-size: 14.5px;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* the assistant: type on the pane, a mark at the shoulder, no bubble */
.qc-m--a {
    align-items: stretch;
}

.qc-m--a .qc-body {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 10px;
    align-items: start;
}

.qc-m-mark {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    color: var(--qc-ai-ink);
    opacity: 0.9;
}

    .qc-m-mark svg {
        width: 18px;
        height: 18px;
    }

.qc-text {
    min-width: 0;
    font-family: var(--qc-font);
    font-size: 14.75px;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    line-height: 1.6;
    color: var(--qc-ink);
    overflow-wrap: anywhere;
}

    .qc-text p, .qc-text li {
        font: inherit;
        letter-spacing: inherit;
        text-transform: none;
        color: inherit;
    }

    .qc-text pre {
        margin: 0.3em 0 0.8em;
        padding: 8px 10px;
        border: 1px solid var(--qc-hair);
        border-radius: var(--qc-r-sm);
        background: var(--qc-well);
        overflow-x: auto;
        font-family: var(--qc-mono);
        font-size: 12.5px;
        line-height: 1.5;
    }

        .qc-text pre code {
            padding: 0;
            border: 0;
            background: transparent;
            font-size: inherit;
        }

    .qc-text > :first-child {
        margin-top: 0;
    }

    .qc-text > :last-child {
        margin-bottom: 0;
    }

    .qc-text p {
        margin: 0 0 0.7em;
    }

    .qc-text ul, .qc-text ol {
        margin: 0.3em 0 0.8em;
        padding-left: 1.25em;
    }

    .qc-text li {
        margin: 0.22em 0;
    }

    .qc-text li::marker {
        color: var(--qc-ink-3);
    }

    .qc-text strong {
        font-weight: 650;
        color: var(--qc-ink);
    }

    .qc-text a {
        color: var(--qc-accent-ink);
        text-decoration: underline;
        text-decoration-color: var(--qc-accent-line);
        text-underline-offset: 2px;
        text-decoration-thickness: 1px;
    }

        .qc-text a:hover {
            color: var(--qc-accent-ink);
            text-decoration-color: currentColor;
        }

    .qc-text code {
        font-family: var(--qc-mono);
        font-size: 0.86em;
        padding: 0.1em 0.4em;
        border-radius: 5px;
        background: var(--qc-well);
        border: 1px solid var(--qc-hair);
    }

    .qc-text .qc-tbl {
        overflow-x: auto;
        margin: 0.4em 0 0.8em;
        border: 1px solid var(--qc-hair);
        border-radius: var(--qc-r-sm);
    }

    .qc-text table {
        border-collapse: collapse;
        width: 100%;
        font-size: 13px;
    }

    .qc-text th, .qc-text td {
        padding: 6px 9px;
        border-bottom: 1px solid var(--qc-hair);
        text-align: left;
        vertical-align: top;
    }

    .qc-text th {
        font-family: var(--qc-mono);
        font-size: 10.5px;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--qc-ink-3);
        font-weight: 500;
        background: var(--qc-well);
    }

    .qc-text tr:last-child td {
        border-bottom: 0;
    }

/* the caret: a sliver of filament while words are arriving */
.qc-caret {
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 2px;
    vertical-align: -0.15em;
    background: var(--qc-filament);
    border-radius: 1px;
    animation: qc-blink 1s steps(2, start) infinite;
}

@keyframes qc-blink {
    to {
        visibility: hidden;
    }
}

/* the typing dots, between "sent" and the first word */
.qc-typing {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 0 6px 28px;
}

    .qc-typing i {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--qc-ink-3);
        animation: qc-wave 1.1s ease-in-out infinite;
    }

        .qc-typing i:nth-child(2) {
            animation-delay: 0.15s;
        }

        .qc-typing i:nth-child(3) {
            animation-delay: 0.3s;
        }

@keyframes qc-wave {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.45;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

/* a system line: refusal notes, limits, the arrival note */
.qc-m--n .qc-note {
    font-family: var(--qc-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--qc-ink-3);
    padding: 4px 0 0 28px;
}

/* ── cards ──────────────────────────────────────────────────────────────── */
.qc-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 28px;
}

.qc-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--qc-hair);
    border-radius: var(--qc-r-md);
    background: var(--qc-panel-2);
    color: var(--qc-ink);
    text-decoration: none;
    transition: border-color var(--qc-t), background-color var(--qc-t), transform var(--qc-t);
    box-shadow: 0 1px 0 var(--qc-edge) inset;
}

    .qc-card:hover {
        border-color: var(--qc-hair-3);
        color: var(--qc-ink);
        transform: translateY(-1px);
    }

    .qc-card:active {
        transform: translateY(0);
    }

.qc-card-t {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.qc-card-e {
    font-family: var(--qc-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--qc-ink-3);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qc-card-n {
    font-family: var(--qc-font);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.008em;
    text-transform: none;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qc-card-go {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: var(--qc-ink-3);
    transition: transform var(--qc-t), color var(--qc-t);
}

.qc-card:hover .qc-card-go {
    transform: translateX(2px);
}

/* "Take me there" — the one accent the screen spends */
.qc-card--nav {
    border-color: var(--qc-accent-line);
    background: var(--qc-accent-soft);
}

    .qc-card--nav .qc-card-e,
    .qc-card--nav .qc-card-go {
        color: var(--qc-accent-ink);
    }

    .qc-card--nav:hover {
        border-color: var(--qc-accent);
    }

.qc-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 999px;
    border: 1px solid var(--qc-hair-2);
    color: var(--qc-ink-3);
    font-family: var(--qc-mono);
    font-size: 9.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

    .qc-badge.is-soon {
        border-color: var(--qc-warn-line);
        color: var(--qc-warn);
        background: var(--qc-warn-tint);
    }

.qc-related {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-left: 28px;
}

    .qc-related a {
        font-family: var(--qc-font);
        font-size: 12.5px;
        font-weight: 500;
        text-transform: none;
        letter-spacing: normal;
        color: var(--qc-ink-2);
        text-decoration: none;
        padding: 4px 9px;
        border: 1px solid var(--qc-hair);
        border-radius: 999px;
        transition: border-color var(--qc-t), color var(--qc-t);
    }

        .qc-related a:hover {
            border-color: var(--qc-hair-3);
            color: var(--qc-ink);
        }

/* ── feedback, under an answer, on the row's own hover ──────────────────── */
.qc-fb {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-left: 24px;
    opacity: 0;
    transition: opacity var(--qc-t);
}

.qc-m--a:hover .qc-fb,
.qc-m--a:focus-within .qc-fb,
.qc-fb.is-done {
    opacity: 1;
}

.qc-fb button {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--qc-faint);
    cursor: pointer;
    transition: color var(--qc-t), background-color var(--qc-t);
}

    .qc-fb button:hover {
        color: var(--qc-ink);
        background: var(--qc-hov);
    }

    .qc-fb button.is-on {
        color: var(--qc-act-ink);
    }

    .qc-fb button svg {
        width: 14px;
        height: 14px;
    }

.qc-fb-ta {
    display: flex;
    gap: 6px;
    margin-left: 24px;
}

    .qc-fb-ta input {
        flex: 1 1 auto;
        min-width: 0;
        height: 30px;
        padding: 0 10px;
        border: 1px solid var(--qc-hair-2);
        border-radius: var(--qc-r-sm);
        background: var(--qc-well);
        color: var(--qc-ink);
        font: inherit;
        font-size: 13px;
    }

    .qc-fb-ta button {
        height: 30px;
        padding: 0 10px;
        border: 1px solid var(--qc-hair-2);
        border-radius: var(--qc-r-sm);
        background: transparent;
        color: var(--qc-ink-2);
        font-size: 12.5px;
        cursor: pointer;
    }

.qc-fb-thanks {
    font-family: var(--qc-mono);
    font-size: 10.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--qc-ink-3);
    padding-left: 6px;
}

/* ── the foot: chips, notice, composer, fine print ───────────────────────── */
.qc-foot {
    flex: 0 0 auto;
    padding: 8px 12px calc(10px + env(safe-area-inset-bottom)) 12px;
    border-top: 1px solid var(--qc-hair);
    background: linear-gradient(180deg, transparent, var(--qc-panel-solid) 30%);
}

.qc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 2px 2px 8px;
}

    .qc-chips:empty {
        display: none;
    }

.qc-chip {
    padding: 6px 11px;
    border: 1px solid var(--qc-hair-2);
    border-radius: 999px;
    background: transparent;
    color: var(--qc-ink-2);
    font-family: var(--qc-font);
    font-weight: 500;
    text-transform: none;
    font-size: 12.75px;
    line-height: 1.25;
    letter-spacing: -0.005em;
    cursor: pointer;
    text-align: left;
    transition: border-color var(--qc-t), color var(--qc-t), background-color var(--qc-t), transform var(--qc-t);
    animation: qc-rise 260ms var(--qc-ease) both;
}

    .qc-chip:hover {
        border-color: var(--qc-hair-3);
        color: var(--qc-ink);
        background: var(--qc-hov);
    }

    .qc-chip:active {
        transform: scale(0.98);
    }

.qc-notice {
    margin: 0 0 8px;
    padding: 8px 11px;
    border: 1px solid var(--qc-warn-line);
    border-radius: var(--qc-r-sm);
    background: var(--qc-warn-tint);
    color: var(--qc-ink);
    font-family: var(--qc-font);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    line-height: 1.45;
}

    .qc-notice.is-bad {
        border-color: var(--qc-bad-line);
        background: var(--qc-bad-tint);
    }

    .qc-notice button {
        margin-left: 8px;
        padding: 2px 8px;
        border: 1px solid var(--qc-hair-2);
        border-radius: 999px;
        background: transparent;
        color: var(--qc-ink);
        font-size: 12px;
        cursor: pointer;
    }

.qc-composer {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 6px 6px 6px 12px;
    border: 1px solid var(--qc-hair-2);
    border-radius: 14px;
    background: var(--qc-well);
    transition: border-color var(--qc-t), box-shadow var(--qc-t);
}

    .qc-composer:focus-within {
        border-color: var(--qc-act);
        box-shadow: 0 0 0 3px var(--qc-act-soft);
    }

.qc-input {
    flex: 1 1 auto;
    min-width: 0;
    max-height: 132px;
    padding: 7px 0;
    border: 0;
    background: transparent;
    color: var(--qc-ink);
    font: inherit;
    font-size: 14.5px;
    line-height: 1.45;
    resize: none;
    outline: none;
    caret-color: var(--qc-act);
}

    .qc-input::placeholder {
        color: var(--qc-faint);
    }

    .qc-input:focus-visible {
        box-shadow: none;
    }

.qc-count {
    position: absolute;
    right: 50px;
    bottom: 12px;
    font-family: var(--qc-mono);
    font-size: 10.5px;
    color: var(--qc-faint);
    pointer-events: none;
}

    .qc-count.is-near {
        color: var(--qc-warn);
    }

.qc-send {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--qc-btn);
    color: var(--qc-on-btn);
    cursor: pointer;
    transition: background-color var(--qc-t), opacity var(--qc-t), transform var(--qc-t);
}

    .qc-send:hover {
        background: var(--qc-btn-hover);
    }

    .qc-send:active {
        transform: scale(0.94);
    }

    .qc-send:disabled {
        opacity: 0.28;
        cursor: default;
        transform: none;
    }

    .qc-send svg {
        width: 18px;
        height: 18px;
    }

.qc-send-stop {
    display: none;
}

.qc-panel.is-live .qc-send-go {
    display: none;
}

.qc-panel.is-live .qc-send-stop {
    display: block;
}

.qc-panel.is-live .qc-send {
    opacity: 1;
    background: var(--qc-panel-2);
    color: var(--qc-ink);
    border: 1px solid var(--qc-hair-2);
}

.qc-fine {
    margin: 8px 4px 0;
    font-family: var(--qc-font);
    text-transform: none;
    letter-spacing: normal;
    font-size: 11px;
    line-height: 1.4;
    color: var(--qc-faint);
    text-align: center;
}

/* ============================================================================
   5 · THE SHEET — phones and narrow windows
   ============================================================================ */
@media (max-width: 640px) {
    .qc-panel {
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: calc(var(--qc-vh, 100dvh) - max(10px, env(safe-area-inset-top)));
        max-height: none;
        border-radius: 18px 18px 0 0;
        border-bottom: 0;
        transform: translateY(24px);
        transform-origin: 50% 100%;
    }

    .qc-grab {
        display: block;
        width: 40px;
        height: 4px;
        margin: 8px auto 0;
        border-radius: 2px;
        background: var(--qc-hair-3);
    }

    .qc-head {
        padding-top: 8px;
    }

    .qc.is-open .qc-launch {
        opacity: 0;
        pointer-events: none;
        transform: translateY(12px);
    }

    .qc-m--u .qc-bub {
        max-width: 92%;
    }

    .qc-fb {
        opacity: 1;
    }
}

/* the host page must not scroll behind the sheet */
html.qc-locked {
    overflow: hidden;
}

/* ============================================================================
   6 · MOTION OFF
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
    .qc-panel {
        transform: none;
        transition: opacity 120ms linear;
    }

    .qc-launch-ring,
    .qc-hello-mark::after,
    .qc-mark-node,
    .qc-panel-edge,
    .qc-dot,
    .qc-typing i,
    .qc-caret {
        animation: none !important;
    }

    .qc-hello, .qc-m, .qc-chip {
        animation: none;
    }

    .qc-launch, .qc-card, .qc-chip, .qc-send {
        transition: none;
    }
}

/* ============================================================================
   7 · PRINT
   ============================================================================ */
@media print {
    .qc {
        display: none !important;
    }
}
