/* GPS Lighthouse v2: the Lighthouse page in the GPS newsroom-dark theme, with voice in the composer.
   Tokens match gps-voice-lighthouse/voice.css (the voice test page) and voice-home.css (the homepage
   popup) so the three read as one product: #0a0a0f ground, #050508 darker, #f3f4f6 text, #3b82f6 for
   action, the red #dc2626 only in the brand mark, hairlines rgba(255,255,255,0.08), fades not bounces.
   The big surfaces also carry a literal colour before the var(): the tablets' old browsers have no
   custom properties and must still get a readable dark page. */
:root {
    --gv-bg: #0a0a0f;
    --gv-bg-2: #050508;
    --gv-surface: #12121a;
    --gv-surface-2: #181824;
    --gv-line: rgba(255, 255, 255, 0.08);
    --gv-line-2: rgba(255, 255, 255, 0.14);
    --gv-text: #f3f4f6;
    --gv-body: #e5e7eb;
    --gv-muted: #9ca3af;
    --gv-dim: #6b7280;
    --gv-blue: #3b82f6;
    --gv-blue-2: #60a5fa;
    --gv-blue-soft: rgba(59, 130, 246, 0.16);
    --gv-red: #dc2626;
    --gv-serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;
    --gv-sans: "Inter", "Helvetica Neue", Arial, sans-serif;
    --gv-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --lh-accent: #60a5fa;           /* links written by the shared formatMessage */
    --lh2-side-w: 288px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { background: #0a0a0f; -webkit-text-size-adjust: 100%; }
body.lh2 {
    margin: 0;
    overflow: hidden;
    background: #0a0a0f;
    background: var(--gv-bg);
    color: #f3f4f6;
    color: var(--gv-text);
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    font-family: var(--gv-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.lh2 a { color: #60a5fa; color: var(--gv-blue-2); text-underline-offset: 2px; }
.lh2 a:hover { color: #93c5fd; }
.lh2 button { font: inherit; color: inherit; }
.lh2 :focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }
.lh2 [hidden] { display: none !important; }
.lh2 svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* thin dark scrollbars */
.lh2 * { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.16) transparent; }
.lh2 ::-webkit-scrollbar { width: 10px; height: 10px; }
.lh2 ::-webkit-scrollbar-track { background: transparent; }
.lh2 ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
.lh2 ::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.24); }

/* ---------- app frame ---------- */
.lh2-app { display: flex; flex-direction: column; width: 100%; height: 100vh; height: 100dvh; overflow: hidden; }
.lh2-body { flex: 1 1 auto; min-height: 0; display: flex; }
.lh2-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; min-height: 0; position: relative; }

/* ---------- sidebar ---------- */
.lh2-side {
    width: 288px; width: var(--lh2-side-w); flex: 0 0 auto;
    display: flex; flex-direction: column; min-height: 0;
    background: #050508; background: var(--gv-bg-2);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.lh2-side-head { display: none; align-items: center; justify-content: space-between; height: 60px; padding: 0 12px 0 20px; border-bottom: 1px solid var(--gv-line); flex: 0 0 auto; }
.lh2-side-title { font: 600 15px/1 var(--gv-sans); color: var(--gv-text); }

.lh2-new {
    display: flex; align-items: center; justify-content: center;
    margin: 16px 16px 8px; height: 44px; padding: 0 16px; flex: 0 0 auto;
    border-radius: 8px; border: 1px solid rgba(59, 130, 246, 0.5);
    background: rgba(59, 130, 246, 0.1); color: #f3f4f6; cursor: pointer;
    font-size: 15px; font-weight: 600; transition: background-color 150ms ease-out, border-color 150ms ease-out;
}
.lh2-new svg { width: 18px; height: 18px; margin-right: 8px; }
.lh2-new:hover { background: rgba(59, 130, 246, 0.2); border-color: #3b82f6; }
.lh2-new:active { transform: scale(0.98); }

.lh2-notes { padding: 4px 16px 0; flex: 0 0 auto; max-height: 220px; overflow-y: auto; }
.lh2-note { border: 1px solid var(--gv-line); border-radius: 8px; background: var(--gv-surface); margin-bottom: 8px; overflow: hidden; }
.lh2-note-head {
    display: flex; align-items: center; width: 100%; padding: 10px 12px; cursor: pointer;
    background: transparent; border: 0; text-align: left; font-size: 13px; font-weight: 600; color: var(--gv-text);
}
.lh2-note-head svg { width: 16px; height: 16px; flex: 0 0 auto; }
.lh2-note-head .lh2-note-bell { color: var(--gv-blue-2); margin-right: 8px; }
.lh2-note-head .lh2-note-chev { margin-left: auto; color: var(--gv-dim); transition: transform 200ms var(--gv-ease); }
.lh2-note.open .lh2-note-chev { transform: rotate(180deg); }
.lh2-note-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh2-note-body { padding: 0 12px 12px; font-size: 13px; line-height: 1.55; color: var(--gv-muted); }
.lh2-note-body p { margin: 0 0 8px; }

.lh2-label {
    padding: 14px 20px 6px; flex: 0 0 auto;
    font: 600 11px/1 var(--gv-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gv-dim);
}
.lh2-convs { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 8px 12px; }
.lh2-empty { padding: 16px 12px; color: var(--gv-dim); font-size: 14px; }
.lh2-conv {
    display: flex; align-items: center; width: 100%; margin: 2px 0; padding: 9px 8px 9px 12px;
    border-radius: 8px; cursor: pointer; color: #d1d5db; border: 0; background: transparent; text-align: left;
    transition: background-color 150ms ease-out;
}
.lh2-conv:hover { background: rgba(255, 255, 255, 0.05); }
.lh2-conv.active { background: rgba(59, 130, 246, 0.14); color: #fff; box-shadow: inset 2px 0 0 #3b82f6; }
.lh2-conv-info { flex: 1 1 auto; min-width: 0; }
.lh2-conv-title { display: block; font-size: 14px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lh2-conv-date { display: block; font-size: 12px; line-height: 1.3; color: var(--gv-dim); margin-top: 2px; }
.lh2-conv-del {
    flex: 0 0 auto; width: 30px; height: 30px; margin-left: 4px; border-radius: 6px; border: 0;
    background: transparent; color: var(--gv-dim); cursor: pointer; opacity: 0;
    display: flex; align-items: center; justify-content: center; transition: opacity 150ms ease-out, color 150ms ease-out;
}
.lh2-conv-del svg { width: 16px; height: 16px; }
.lh2-conv:hover .lh2-conv-del, .lh2-conv.active .lh2-conv-del, .lh2-conv-del:focus-visible { opacity: 1; }
.lh2-conv-del:hover { color: #fca5a5; background: rgba(255, 255, 255, 0.05); }

.lh2-side-foot {
    flex: 0 0 auto; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--gv-line); font-size: 13px;
    display: flex; flex-wrap: wrap;
}
.lh2-side-foot a { color: var(--gv-muted) !important; text-decoration: none; margin: 2px 14px 2px 0; }
.lh2-side-foot a:hover { color: var(--gv-text) !important; text-decoration: underline; }

/* ---------- top bar: conversations toggle (narrow) · GPS home · product · title · export · Menu ---------- */
.lh2-top {
    flex: 0 0 auto; height: 60px; display: flex; align-items: center; padding: 0 16px; position: relative; z-index: 45;
    background: #050508; background: var(--gv-bg-2); border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.lh2-home {
    flex: 0 0 auto; display: flex; align-items: center; height: 40px; padding: 0 4px; margin: 0 8px 0 -4px;
    border-radius: 6px; text-decoration: none; transition: opacity 150ms ease-out;
}
.lh2-home:hover { opacity: 0.85; }
.lh2-mark {
    font: 900 20px/1 var(--gv-serif); letter-spacing: -1px; color: #fff;
    padding-bottom: 3px; border-bottom: 3px solid #dc2626;
}
.lh2-product {
    flex: 0 0 auto; margin: 0 0 0 4px; white-space: nowrap;
    font: 600 16px/1.2 var(--gv-sans); color: var(--gv-text);
}
.lh2-product em { font-style: normal; color: var(--gv-muted); font-weight: 500; }
.lh2-title {
    flex: 1 1 auto; min-width: 0; margin: 0 0 0 14px; padding-left: 14px; border-left: 1px solid var(--gv-line-2);
    font: 500 15px/1.3 var(--gv-sans); color: var(--gv-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lh2-title:empty { visibility: hidden; }
.lh2-menu-btn {
    flex: 0 0 auto; display: flex; align-items: center; height: 36px; padding: 0 12px; margin-left: 8px;
    border-radius: 8px; border: 1px solid var(--gv-line-2); background: transparent; color: var(--gv-text);
    font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color 150ms ease-out, border-color 150ms ease-out;
}
.lh2-menu-btn svg { width: 18px; height: 18px; margin-right: 6px; }
.lh2-menu-btn:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(59, 130, 246, 0.5); }
.lh2-menu-btn .lh2-ico-close { display: none; }
.lh2-menu-btn[aria-expanded="true"] { background: var(--gv-surface-2); border-color: rgba(59, 130, 246, 0.6); }
.lh2-menu-btn[aria-expanded="true"] .lh2-ico-open { display: none; }
.lh2-menu-btn[aria-expanded="true"] .lh2-ico-close { display: block; }

/* the site menu: a sheet under the top bar (two columns on wide screens) */
.lh2-menu-scrim { position: fixed; top: 60px; right: 0; bottom: 0; left: 0; z-index: 46; background: rgba(0, 0, 0, 0.55); }
.lh2-sitemenu {
    position: fixed; top: 60px; right: 0; z-index: 47; width: 560px; max-width: 100%;
    max-height: calc(100vh - 60px); max-height: calc(100dvh - 60px); overflow-y: auto; overscroll-behavior: contain;
    padding: 6px 0 14px; background: #050508; background: var(--gv-bg-2);
    border: 1px solid var(--gv-line); border-top: 0; border-right: 0; border-radius: 0 0 0 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.lh2-sitemenu-head {
    margin: 0; padding: 12px 20px 8px;
    font: 600 11px/1 var(--gv-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gv-dim);
}
.lh2-sitemenu ul { list-style: none; margin: 0; padding: 0 8px; -webkit-columns: 2; columns: 2; -webkit-column-gap: 4px; column-gap: 4px; }
.lh2-sitemenu li { margin: 0; min-width: 0; -webkit-column-break-inside: avoid; break-inside: avoid; }
.lh2-sitemenu a {
    display: block; padding: 9px 12px; border-radius: 8px; text-decoration: none;
    color: #e5e7eb !important; font-size: 15px; line-height: 1.35; transition: background-color 150ms ease-out, color 150ms ease-out;
}
.lh2-sitemenu a:hover { background: rgba(255, 255, 255, 0.05); color: #fff !important; }
.lh2-sitemenu a[aria-current="page"] { background: rgba(59, 130, 246, 0.14); box-shadow: inset 2px 0 0 #3b82f6; color: #fff !important; }
.lh2-sitemenu li.is-child a { padding-left: 26px; font-size: 14px; color: var(--gv-muted) !important; }
.lh2-icon-btn {
    width: 40px; height: 40px; border-radius: 8px; border: 1px solid transparent; background: transparent;
    color: var(--gv-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
    transition: background-color 150ms ease-out, color 150ms ease-out;
}
.lh2-icon-btn:hover { background: rgba(255, 255, 255, 0.06); color: var(--gv-text); }
.lh2-convs-btn { display: none; margin-right: 4px; margin-left: -8px; }
.lh2-ghost {
    flex: 0 0 auto; display: flex; align-items: center; height: 36px; padding: 0 12px; margin-left: 12px;
    border-radius: 8px; border: 1px solid var(--gv-line-2); background: transparent; color: var(--gv-text);
    font-size: 14px; cursor: pointer; transition: background-color 150ms ease-out, border-color 150ms ease-out;
}
.lh2-ghost svg { width: 16px; height: 16px; margin-right: 6px; }
.lh2-ghost:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(59, 130, 246, 0.5); }

/* ---------- thread ---------- */
.lh2-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.lh2-thread { max-width: 780px; margin: 0 auto; padding: 28px 24px 36px; display: flex; flex-direction: column; }
.lh2-thread > * + * { margin-top: 20px; }

.lh2-welcome { padding: 6vh 0 8px; }
.lh2-eyebrow { margin: 0 0 12px; font: 600 12px/1 var(--gv-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gv-blue-2); }
.lh2-welcome-title { margin: 0 0 12px; font: 700 40px/1.15 var(--gv-serif); font-size: clamp(28px, 5vw, 40px); letter-spacing: -0.01em; color: #fff; }
.lh2-lede { margin: 0; color: var(--gv-muted); max-width: 600px; font-size: 17px; }
.lh2-voice-tip { display: flex; align-items: center; margin: 16px 0 0; color: var(--gv-text); font-size: 15px; }
.lh2-tip-mic {
    width: 30px; height: 30px; border-radius: 50%; margin-right: 10px; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center; background: rgba(59, 130, 246, 0.16); color: var(--gv-blue-2);
}
.lh2-tip-mic svg { width: 16px; height: 16px; }
.lh2-tip-mic svg path { fill: currentColor; }
.lh2-tip-mic svg path[fill="none"] { fill: none; }
.lh2-prompts { display: flex; flex-wrap: wrap; margin: 24px -4px 0; }
.lh2-prompt {
    margin: 4px; padding: 10px 14px; border-radius: 8px; cursor: pointer; text-align: left;
    background: #12121a; background: var(--gv-surface); border: 1px solid rgba(255, 255, 255, 0.08); color: #e5e7eb;
    font-size: 14px; line-height: 1.4; max-width: 100%;
    transition: border-color 150ms ease-out, background-color 150ms ease-out;
}
.lh2-prompt:hover { border-color: rgba(59, 130, 246, 0.5); background: var(--gv-surface-2); }

/* question bubbles: typed and spoken alike */
.lh2 .gv-q {
    align-self: flex-end; max-width: 85%; margin-left: auto;
    background: rgba(59, 130, 246, 0.16); border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px 12px 4px 12px; padding: 10px 14px;
    font: 500 16px/1.5 var(--gv-sans); color: #f3f4f6; white-space: pre-wrap; overflow-wrap: anywhere; word-wrap: break-word;
}
.lh2 .gv-q .gv-partial { color: var(--gv-muted); }
.lh2 .gv-q.gv-listening { border-color: var(--gv-blue); }
.lh2 .gv-q-empty { color: var(--gv-dim); font-style: italic; }

/* answer cards: Lighthouse's typed answers and the voice engine's cards */
.lh2 .gv-a {
    align-self: stretch; min-width: 0;
    background: #12121a; background: var(--gv-surface); border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px; padding: 16px 18px 14px; color: #e5e7eb; color: var(--gv-body);
}
.lh2 .gv-a-head {
    display: flex; align-items: center; margin-bottom: 10px;
    font: 600 12px/1 var(--gv-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gv-muted);
}
.lh2 .gv-a-head > * + * { margin-left: 10px; }
.lh2 .gv-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gv-dim); flex: 0 0 auto; }
.lh2 .gv-a.gv-thinking .gv-dot { background: var(--gv-blue); animation: lh2-breathe 1.6s ease-in-out infinite; }
.lh2 .gv-a.gv-speaking .gv-dot { background: var(--gv-blue); }
.lh2 .gv-thinking-line { color: var(--gv-muted); font-size: 15px; margin: 2px 0 0; }
.lh2 .gv-thinking-line .gv-elapsed { font-variant-numeric: tabular-nums; color: var(--gv-dim); margin-left: 6px; }
.lh2 .gv-note { color: var(--gv-dim); font-size: 13px; margin: 8px 0 0; }
.lh2 .gv-err { color: #fca5a5; font-size: 15px; margin: 8px 0 0; }

/* Markdown bodies: the shared formatMessage (typed answers) and the engine's renderer (full lookups) */
.lh2-md { font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; word-wrap: break-word; min-width: 0; }
.lh2-md strong, .lh2 .gv-body strong, .lh2 .gv-full strong { color: #fff; font-weight: 650; }
.lh2-md pre {
    margin: 8px 0; padding: 12px 14px; border-radius: 8px; overflow-x: auto; white-space: pre;
    background: #050508; border: 1px solid var(--gv-line); font-size: 14px; line-height: 1.5;
}
.lh2-md pre code { background: none !important; padding: 0 !important; }
.lh2 code { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #f3f4f6; }
.lh2-md p { margin: 0 0 12px; }
.lh2-cursor {
    display: inline-block; width: 8px; height: 1.05em; margin-left: 2px; vertical-align: text-bottom;
    background: var(--gv-blue); border-radius: 1px; animation: lh2-breathe 1.2s ease-in-out infinite;
}
/* tables (shared formatMessage writes inline styles for light pages; tone them for dark) */
.lh2 .lh-table-wrap { border: 1px solid var(--gv-line); border-radius: 8px; margin: 10px 0 !important; }
.lh2 .lh-table { font-size: 15px !important; }
.lh2 .lh-table th, .lh2 .lh-table td { border: 0 !important; border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important; padding: 8px 12px !important; }
.lh2 .lh-table th { background: #181824; color: #fff; }
.lh2 .lh-table tbody tr:last-child td { border-bottom: 0 !important; }
.lh2 .lh-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }

/* the engine's blocks (voice.css) */
.lh2 .gv-body p, .lh2 .gv-body h3, .lh2 .gv-body li { margin: 0 0 12px; }
.lh2 .gv-body h3 { font: 700 20px/1.3 var(--gv-serif); margin-top: 16px; color: #fff; }
.lh2 .gv-body ul { margin: 0 0 12px; padding-left: 22px; }
.lh2 .gv-body li::marker { color: var(--gv-dim); }
.lh2 .gv-block { display: none; }
.lh2 .gv-block.gv-shown { display: block; }
.lh2 li.gv-block.gv-shown { display: list-item; }
.lh2 .w { opacity: 0; transition: opacity 150ms ease-out, background-color 150ms ease-out; border-radius: 3px; }
.lh2 .w.on { opacity: 1; }
.lh2 .w.now { background: var(--gv-blue-soft); box-shadow: 0 0 0 2px var(--gv-blue-soft); }
.lh2 .gv-table-wrap { overflow-x: auto; margin: 4px 0 16px; border: 1px solid var(--gv-line); border-radius: 8px; }
.lh2 .gv-table-wrap table { border-collapse: collapse; width: 100%; font-size: 15px; }
.lh2 .gv-table-wrap th, .lh2 .gv-table-wrap td { padding: 8px 12px; border-bottom: 1px solid var(--gv-line); text-align: left; vertical-align: top; }
.lh2 .gv-table-wrap th { background: var(--gv-surface-2); font-weight: 600; color: #fff; }
.lh2 .gv-table-wrap tr:last-child td { border-bottom: 0; }
.lh2 .gv-table-wrap.gv-block { opacity: 0; transition: opacity 400ms var(--gv-ease); }
.lh2 .gv-table-wrap.gv-block.gv-shown { opacity: 1; }
.lh2 .gv-spoken { margin: 0; font-size: 18px; line-height: 1.6; color: var(--gv-text); }
.lh2 .gv-spoken:empty { display: none; }
.lh2 .gv-label {
    margin: 14px 0 6px; font: 600 12px/1 var(--gv-sans); letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--gv-muted);
}
.lh2 .gv-full { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--gv-line); }
.lh2 .gv-full p, .lh2 .gv-full h3, .lh2 .gv-full li { margin: 0 0 12px; }
.lh2 .gv-full h3 { font: 700 20px/1.3 var(--gv-serif); margin-top: 16px; color: #fff; }

.lh2 .gv-sources { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--gv-line); font-size: 14px; }
.lh2 .gv-sources h4 { margin: 0 0 6px; font: 600 12px/1 var(--gv-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gv-muted); }
.lh2 .gv-sources ol { margin: 0; padding-left: 20px; }
.lh2 .gv-sources li { margin: 2px 0; overflow-wrap: anywhere; }

/* actions under an answer: Full lookup (engine) and Copy (this page) */
.lh2 .gv-actions { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; }
.lh2 .gv-actions > * { margin: 0 8px 0 0; }
.lh2 .gv-fullbtn {
    height: 36px; padding: 0 16px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 600;
    background: transparent; border: 1px solid rgba(59, 130, 246, 0.5); color: var(--gv-text);
    transition: background-color 150ms ease-out;
}
.lh2 .gv-fullbtn:hover { background: var(--gv-blue-soft); }
.lh2 .gv-fullbtn.gv-primary { background: var(--gv-blue); border-color: var(--gv-blue); color: #fff; }
.lh2-copy {
    display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; cursor: pointer;
    background: transparent; border: 1px solid var(--gv-line-2); color: var(--gv-muted); font-size: 13px; font-weight: 500;
    transition: color 150ms ease-out, border-color 150ms ease-out, background-color 150ms ease-out;
}
.lh2-copy svg { width: 14px; height: 14px; margin-right: 6px; }
.lh2-copy:hover { color: var(--gv-text); border-color: rgba(59, 130, 246, 0.5); }
.lh2-copy.is-done { color: #86efac; border-color: rgba(134, 239, 172, 0.4); }

/* ---------- dock (composer) ---------- */
.lh2-dock {
    flex: 0 0 auto; padding: 10px 24px 12px; padding-bottom: calc(10px + env(safe-area-inset-bottom));
    background: #050508; background: var(--gv-bg-2); border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.lh2-dock > * { max-width: 732px; margin-left: auto; margin-right: auto; }
.lh2-status {
    text-align: center; color: var(--gv-muted); font-size: 14px; min-height: 20px; margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}
.lh2-composer {
    display: flex; align-items: flex-end;
    background: #12121a; background: var(--gv-surface); border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px; padding: 6px 6px 6px 14px; transition: border-color 150ms ease-out;
}
.lh2-composer:focus-within { border-color: rgba(59, 130, 246, 0.6); }
.lh2-input {
    flex: 1 1 auto; min-width: 0; display: block; margin: 0; padding: 8px 0; max-height: 200px;
    background: transparent; border: 0; outline: 0; resize: none; overflow-y: auto;
    color: #f3f4f6; font-family: inherit; font-size: 16px; line-height: 1.5;
}
.lh2-input::placeholder { color: #6b7280; }
.lh2 .lh2-input:focus, .lh2 .lh2-input:focus-visible { outline: none; }   /* the composer border shows focus */
.lh2-composer > button { margin-left: 6px; flex: 0 0 auto; }
.lh2-send, .lh2-stop {
    width: 40px; height: 40px; border-radius: 8px; border: 0; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background-color 150ms ease-out, opacity 150ms ease-out;
}
.lh2-send { background: #3b82f6; color: #fff; }
.lh2-send:hover { background: #4f8ff7; box-shadow: 0 0 24px rgba(59, 130, 246, 0.2); }
.lh2-send:disabled { opacity: 0.4; cursor: default; box-shadow: none; }
.lh2-stop { background: var(--gv-surface-2); color: var(--gv-text); border: 1px solid var(--gv-line-2); }
.lh2-stop:hover { background: #222232; }
.lh2-stop svg { fill: currentColor; stroke: none; width: 18px; height: 18px; }
.lh2-mic {
    position: relative; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
    background: transparent; border: 1px solid rgba(59, 130, 246, 0.55); color: #f3f4f6;
    display: flex; align-items: center; justify-content: center;
    transition: background-color 150ms ease-out, border-color 150ms ease-out, transform 100ms ease-out;
}
.lh2-mic:hover { background: var(--gv-blue-soft); border-color: var(--gv-blue); }
.lh2-mic:active { transform: scale(0.96); }
.lh2-mic:disabled { opacity: 0.4; cursor: default; }
.lh2-mic svg { position: relative; z-index: 1; width: 20px; height: 20px; }
.lh2-mic svg path { fill: currentColor; stroke: currentColor; stroke-width: 1.8; }
.lh2-mic svg path[fill="none"] { fill: none; }
.lh2-ring {
    position: absolute; top: -5px; right: -5px; bottom: -5px; left: -5px; border-radius: 50%;
    border: 2px solid var(--gv-blue); opacity: 0; transform: scale(1);
    transition: transform 90ms linear, opacity 150ms ease-out; pointer-events: none;
}
body.lh2-listening .lh2-mic { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
body.lh2-listening .lh2-ring { opacity: 0.9; }
body.lh2-thinking .lh2-mic, body.lh2-speaking .lh2-mic { background: var(--gv-blue-soft); border-color: var(--gv-blue); }
.lh2-hint { margin: 8px auto 0; text-align: center; font-size: 12px; color: var(--gv-dim); }

/* ---------- export modal ---------- */
.lh2-modal-overlay {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 50;
    display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(0, 0, 0, 0.7);
}
.lh2-modal {
    width: 100%; max-width: 380px; padding: 22px; border-radius: 12px;
    background: #12121a; background: var(--gv-surface); border: 1px solid var(--gv-line-2); color: var(--gv-text);
}
.lh2-modal-title { margin: 0 0 14px; font: 700 20px/1.3 var(--gv-serif); }
.lh2-export {
    display: block; width: 100%; margin: 0 0 8px; padding: 12px 14px; border-radius: 8px; cursor: pointer; text-align: left;
    background: var(--gv-bg); border: 1px solid var(--gv-line); color: var(--gv-text); font-size: 15px;
    transition: border-color 150ms ease-out, background-color 150ms ease-out;
}
.lh2-export:hover { border-color: rgba(59, 130, 246, 0.5); background: var(--gv-surface-2); }
.lh2-modal-close {
    display: block; width: 100%; margin-top: 6px; height: 40px; border-radius: 8px; cursor: pointer;
    background: transparent; border: 1px solid var(--gv-line-2); color: var(--gv-muted);
}
.lh2-modal-close:hover { color: var(--gv-text); }

@keyframes lh2-breathe { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

/* ---------- narrow screens: the sidebar slides over ---------- */
@media (max-width: 900px) {
    .lh2-side {
        position: fixed; top: 0; bottom: 0; left: 0; z-index: 60;
        width: 300px; max-width: 86vw;
        -webkit-transform: translateX(-100%); transform: translateX(-100%);
        transition: transform 200ms var(--gv-ease); visibility: hidden;
    }
    .lh2-side.open { -webkit-transform: none; transform: none; visibility: visible; }
    .lh2-side-head { display: flex; }
    .lh2-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 55; background: rgba(0, 0, 0, 0.6); }
    .lh2-convs-btn { display: flex; }
    .lh2-conv-del { opacity: 1; }
}
@media (max-width: 600px) {
    .lh2-top { padding: 0 12px 0 16px; }
    .lh2-product { display: none; }
    .lh2-title { margin-left: 4px; padding-left: 0; border-left: 0; color: var(--gv-text); }
    .lh2-title:empty { display: none; }
    .lh2-top.no-conv .lh2-product { display: block; flex: 1 1 auto; }
    .lh2-sitemenu { width: 100%; border-left: 0; border-radius: 0; }
    .lh2-sitemenu ul { -webkit-columns: 1; columns: 1; }
    .lh2-sitemenu a { padding: 11px 12px; }
    .lh2-thread { padding: 20px 16px 28px; }
    .lh2-dock { padding-left: 16px; padding-right: 16px; }
    .lh2-welcome { padding-top: 3vh; }
    .lh2-lede { font-size: 16px; }
    .lh2 .gv-a { padding: 14px 14px 12px; }
    .lh2 .gv-q { max-width: 90%; }
    .lh2 .gv-spoken { font-size: 17px; }
    .lh2-hint { display: none; }
    .lh2-ghost span { display: none; }
    .lh2-ghost svg { margin-right: 0; }
    .lh2-ghost { padding: 0 10px; }
    .lh2-prompt { font-size: 14px; }
}
@media (hover: none) {
    .lh2-conv-del { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .lh2 .w, .lh2-ring, .lh2 .gv-table-wrap.gv-block, .lh2-side { transition: none; }
    .lh2 .gv-a.gv-thinking .gv-dot, .lh2-cursor { animation: none; }
}
