/* Inskryptor AI - colours and type of Inskryptor Akty (frontend/src/styles/tokens.css),
   injected by nginx into LibreChat's index.html, so the stock image stays untouched. */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Instrument+Sans:wght@400;500;600;700&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&display=swap');

html:not(.dark) {
  --white: #FFFFFF !important;
  --surface-primary: #FFFFFF !important;
  --surface-primary-alt: #F4F5F7 !important;
  --surface-primary-contrast: #EDEFF2 !important;
  --surface-secondary: #F4F5F7 !important;
  --surface-secondary-alt: #EDEFF2 !important;
  --surface-tertiary: #EDEFF2 !important;
  --surface-tertiary-alt: #EDEFF2 !important;
  --surface-chat: #F4F5F7 !important;
  --surface-dialog: #FFFFFF !important;
  --surface-hover: #EDEFF2 !important;
  --surface-hover-alt: #E3E6EA !important;
  --surface-active: #E3E6EA !important;
  --surface-active-alt: #E3E6EA !important;
  --surface-submit: #B08A4A !important;
  --surface-submit-hover: #96743C !important;
  --text-primary: #1B1F26 !important;
  --text-secondary: #5C6470 !important;
  --text-secondary-alt: #5C6470 !important;
  --text-tertiary: #5C6470 !important;
  --border-light: #D5D9DF !important;
  --border-medium: #D5D9DF !important;
  --border-medium-alt: #D5D9DF !important;
  --border-heavy: #B0B8C2 !important;
  --ring-primary: #B08A4A !important;
}

html, body, button, input, textarea, select { font-family: 'Instrument Sans', system-ui, sans-serif !important; }

/* answers and headings in Newsreader, like the act text in Akty */
.markdown, .markdown p, .markdown li, .prose, .prose p, .prose li { font-family: 'Newsreader', Georgia, serif !important; font-size: 1.075rem; line-height: 1.6; }
h1, h2, h3, .markdown h1, .markdown h2, .markdown h3 { font-family: 'Newsreader', Georgia, serif !important; font-weight: 500 !important; }
.markdown a, .prose a { color: var(--ins-zloto-tekst) !important; text-decoration: underline; text-underline-offset: 2px; }
.markdown code, pre, code { font-family: 'IBM Plex Mono', ui-monospace, monospace !important; }

/* left panel (icon rail + chat list) = "płyta" (dark plate) with gold accents. On a phone LibreChat builds it as a
   plain fixed div, not <aside>: inskryptor.js marks that div [data-ins-szyna], so every rule here holds on both */
:is(aside, [data-ins-szyna]), :is(aside, [data-ins-szyna]) nav, :is(aside, [data-ins-szyna]) .bg-surface-primary-alt, :is(aside, [data-ins-szyna]) .bg-surface-secondary, :is(aside, [data-ins-szyna]) .bg-surface-primary {
  background-color: #1B1E23 !important; color: #E9EBEE !important;
}
:is(aside, [data-ins-szyna]) * { border-color: #2C3139 !important; }
:is(aside, [data-ins-szyna]) a, :is(aside, [data-ins-szyna]) button, :is(aside, [data-ins-szyna]) span, :is(aside, [data-ins-szyna]) div, :is(aside, [data-ins-szyna]) p, :is(aside, [data-ins-szyna]) h2 { color: #D9DCE1 !important; }
:is(aside, [data-ins-szyna]) svg { color: #A6ADB8 !important; }   /* quiet icons; gold on the plate is the brand mark only */
:is(aside, [data-ins-szyna]) a:hover, :is(aside, [data-ins-szyna]) button:hover, :is(aside, [data-ins-szyna]) [aria-current="page"], :is(aside, [data-ins-szyna]) .bg-surface-active-alt,
:is(aside, [data-ins-szyna]) .bg-surface-hover, :is(aside, [data-ins-szyna]) .bg-surface-active { background-color: #262A31 !important; }
:is(aside, [data-ins-szyna]) input { background-color: #262A31 !important; color: #E9EBEE !important; }

/* LibreChat green accents -> gold; whole-token match, so "peer-focus:text-green-600" on the login field
   labels does not paint them gold at rest */
[class~="text-green-500"], [class~="text-green-600"], [class~="text-green-700"] { color: #8C6A30 !important; }
[class*="bg-green-"] { background-color: #B08A4A !important; }
/* login screen: wide wordmark instead of the square logo */
img[src$="assets/logo.svg"] { width: auto !important; height: 30px !important; max-width: 300px; object-fit: contain; }
html.dark img[src$="assets/logo.svg"] { content: url(/inskryptor/logo-jasny.svg); }
/* AI notice under the composer (CUSTOM_FOOTER): one quiet line, tekst-2. The AI sentence stays (provider
   terms); the links get short labels in jezyk.js, so the line fits beside an open side thread too */
[role="contentinfo"], [role="contentinfo"] * { color: #5C6470 !important; font-size: 12px !important; white-space: nowrap; }
[role="contentinfo"] { gap: 7px !important; padding-left: 12px !important; padding-right: 12px !important; }
/* beside a side thread or the law panel (przepisy.js), and under 1480 px, the column is narrow: the AI sentence breaks
   into two balanced lines with the links beside it. On a row of its own the notice grew to 64 px and lay on the
   composer, which leaves it 40 px; no orphan word, no lone "|" at a line start */
html.ins-panel-otwarty [role="contentinfo"], html.ins-z-panelem [role="contentinfo"] { padding-top: 4px !important; padding-bottom: 4px !important; }
html.ins-panel-otwarty [role="contentinfo"] > span, html.ins-z-panelem [role="contentinfo"] > span { flex: 0 1 auto; max-width: 80ch; white-space: normal !important; text-wrap: balance; text-align: center; line-height: 14px; }
@media (min-width: 1001px) and (max-width: 1480px) {
  [role="contentinfo"] { padding-top: 4px !important; padding-bottom: 4px !important; }
  [role="contentinfo"] > span { flex: 0 1 auto; max-width: 80ch; white-space: normal !important; text-wrap: balance; text-align: center; line-height: 14px; }
}
@media (max-width: 1000px) {
  [role="contentinfo"] { flex-wrap: wrap !important; row-gap: 0 !important; justify-content: center !important; }
  [role="contentinfo"] > span { flex-basis: 100%; text-align: center; white-space: normal !important; }
  [role="contentinfo"] > span + div { display: none; }
}
/* model reasoning ("Przemyślenia", English) is not for the user; Opus 5.5 cannot switch it off */
[class~="group/reasoning"] { display: none !important; }

/* ---------- dark theme (LibreChat puts class "dark" on <html>); dark tokens of the Akty mock-up ---------- */
html.dark {
  --presentation: #121418 !important;
  --header-primary: #1B1E23 !important;
  --header-hover: #24282F !important;
  --header-button-hover: #24282F !important;
  --surface-primary: #1B1E23 !important;
  --surface-primary-alt: #121418 !important;
  --surface-primary-contrast: #24282F !important;
  --surface-secondary: #121418 !important;
  --surface-secondary-alt: #24282F !important;
  --surface-tertiary: #24282F !important;
  --surface-tertiary-alt: #24282F !important;
  --surface-chat: #121418 !important;
  --surface-dialog: #1B1E23 !important;
  --surface-hover: #24282F !important;
  --surface-hover-alt: #2B3038 !important;
  --surface-active: #2B3038 !important;
  --surface-active-alt: #2B3038 !important;
  --surface-submit: #C9A35F !important;
  --surface-submit-hover: #D6B06C !important;
  --text-primary: #ECEEF1 !important;
  --text-secondary: #A6ADB8 !important;
  --text-secondary-alt: #A6ADB8 !important;
  --text-tertiary: #A6ADB8 !important;
  --border-light: #2E333B !important;
  --border-medium: #2E333B !important;
  --border-medium-alt: #2E333B !important;
  --border-heavy: #3A4049 !important;
  --ring-primary: #C9A35F !important;
}
html.dark :is(aside, [data-ins-szyna]), html.dark :is(aside, [data-ins-szyna]) nav, html.dark :is(aside, [data-ins-szyna]) .bg-surface-primary-alt, html.dark :is(aside, [data-ins-szyna]) .bg-surface-secondary,
html.dark :is(aside, [data-ins-szyna]) .bg-surface-primary { background-color: #0B0C0F !important; }
html.dark :is(aside, [data-ins-szyna]) a:hover, html.dark :is(aside, [data-ins-szyna]) button:hover, html.dark :is(aside, [data-ins-szyna]) [aria-current="page"], html.dark :is(aside, [data-ins-szyna]) .bg-surface-active-alt,
html.dark :is(aside, [data-ins-szyna]) .bg-surface-hover, html.dark :is(aside, [data-ins-szyna]) .bg-surface-active { background-color: #1F2228 !important; }
html.dark [role="contentinfo"], html.dark [role="contentinfo"] * { color: #A6ADB8 !important; }

/* ---------- tokens for the Inskryptor layer (inskryptor.js) ---------- */
:root {
  --ins-tlo: #F4F5F7; --ins-karta: #FFFFFF; --ins-wglebienie: #EDEFF2; --ins-plyta: #1B1E23;
  --ins-tekst: #1B1F26; --ins-tekst-2: #5C6470; --ins-linia: #D5D9DF; --ins-linia-mocna: #A9B0BA;
  --ins-zloto: #B08A4A; --ins-zloto-tekst: #7F6230; --ins-zloto-na-plycie: #D6B06C; --ins-na-plycie: #F2F3F5;
  --ins-cien: 0 2px 4px rgb(20 26 34 / .08), 0 14px 32px -8px rgb(20 26 34 / .22);
  --ins-sprezyna: cubic-bezier(.32,.72,0,1);
}
html.dark {
  --ins-tlo: #121418; --ins-karta: #1B1E23; --ins-wglebienie: #24282F; --ins-plyta: #0B0C0F;
  --ins-tekst: #ECEEF1; --ins-tekst-2: #A6ADB8; --ins-linia: #2E333B; --ins-linia-mocna: #4A515C;
  --ins-zloto: #C9A35F; --ins-zloto-tekst: #D6B06C;
  --ins-cien: 0 2px 4px rgb(0 0 0 / .3), 0 14px 32px -8px rgb(0 0 0 / .6);
}

/* tool calls: one quiet line "Przeczytane przepisy: N" (jezyk.js); names, arguments and raw results stay hidden */
button:has(> .tool-status-text) { pointer-events: none; cursor: default; }
button:has(> .tool-status-text) > span.text-xs, button:has(> .tool-status-text) > svg:last-child,
button:has(> .tool-status-text) + div { display: none !important; }
div.h-5.shrink-0:has(.progress-text-content) button { pointer-events: none; }
div.h-5.shrink-0:has(.progress-text-content) button span.text-text-secondary,
div.h-5.shrink-0:has(.progress-text-content) button > svg:last-child,
div.h-5.shrink-0:has(.progress-text-content) + div { display: none !important; }


/* ---------- F5 "Możesz dopytać" ---------- */
.ins-ukryte { display: none !important; }
.ins-dopytaj { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 8px 0 4px; }
/* one surface per question; ↳ (ask in a side thread) is a small icon inside its top-right corner, no divider */
.ins-dopytaj-el { position: relative; display: flex; background: var(--ins-karta); border: 1px solid var(--ins-linia); border-radius: 9px; overflow: hidden; transition: border-color .2s, box-shadow .2s, background .2s; }
.ins-dopytaj-el:hover { border-color: var(--ins-linia-mocna); background: var(--ins-wglebienie); box-shadow: 0 1px 2px rgb(20 26 34 / .10); }
.ins-dopytaj-pyt { flex: 1; text-align: left; padding: 9px 34px 9px 12px; font: 400 14px/1.4 'Instrument Sans', system-ui, sans-serif !important; color: var(--ins-tekst); cursor: pointer; background: none; border: 0; }
.ins-dopytaj-boczny { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px;
  background: none; color: var(--ins-tekst-2); font-size: 13px; line-height: 1; cursor: pointer; transition: background .2s, color .2s; }
.ins-dopytaj-boczny:hover { background: var(--ins-karta); color: var(--ins-zloto-tekst); }
.ins-dopytaj-boczny[hidden] { display: none; }
.ins-dopytaj button:focus-visible { outline: 2px solid var(--ins-zloto); outline-offset: -2px; }
@media (max-width: 760px) { .ins-dopytaj { grid-template-columns: 1fr; } }

/* ---------- F6 side thread ---------- */
.ins-dymek-zazn { position: fixed; z-index: 60; display: none; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 9px; border: 0;
  background: var(--ins-plyta); color: var(--ins-na-plycie); font: 500 13px 'Instrument Sans', system-ui, sans-serif; box-shadow: var(--ins-cien); cursor: pointer; }
.ins-dymek-zazn.ins-widoczny { display: inline-flex; animation: ins-wjazd .18s var(--ins-sprezyna); }
.ins-dymek-zazn b { color: var(--ins-zloto-na-plycie); font-weight: 600; }
::highlight(ins-kotwica) { text-decoration: underline; text-decoration-color: var(--ins-zloto); text-decoration-thickness: 2px; text-underline-offset: 3px; }
html.ins-nad-kotwica .agent-turn { cursor: pointer; }

.ins-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 42vw; z-index: 50; display: none; flex-direction: column;
  background: var(--ins-tlo); border-left: 1px solid var(--ins-linia); box-shadow: -14px 0 32px -18px rgb(20 26 34 / .28); }
html.ins-panel-otwarty .ins-panel { display: flex; animation: ins-wjazd-bok .3s var(--ins-sprezyna); }
html.ins-panel-otwarty #root { width: 58vw !important; }
.ins-panel-glowa { display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px 18px; background: var(--ins-karta); border-bottom: 1px solid var(--ins-linia); }
.ins-panel-tytul { font: 500 18px 'Newsreader', Georgia, serif; color: var(--ins-tekst); }
.ins-panel-guziki { margin-left: auto; display: flex; gap: 8px; }
.ins-guzik { display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 8px; border: 0; background: var(--ins-wglebienie); color: var(--ins-tekst);
  font: 500 14px 'Instrument Sans', system-ui, sans-serif; cursor: pointer; transition: background .2s; }
.ins-guzik:hover { background: color-mix(in oklab, var(--ins-wglebienie) 85%, var(--ins-tekst)); }
.ins-guzik-glowny { background: var(--ins-plyta); color: var(--ins-zloto-na-plycie); font-weight: 600; }
.ins-guzik-glowny:hover { background: color-mix(in oklab, var(--ins-plyta) 88%, #F4F5F7); }
html.dark .ins-guzik-glowny { background: var(--ins-zloto-na-plycie); color: #1B1E23; }
.ins-guzik:focus-visible { outline: 2px solid var(--ins-zloto); outline-offset: 2px; }
.ins-panel-cytat:empty { display: none; }
/* fragment attached to a side thread: read-only card above the field and in the sent question */
.ins-zalacznik { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 8px; padding: 8px 10px; border: 1px solid var(--ins-linia, rgba(0,0,0,.12));
  border-left: 3px solid var(--ins-zloto); border-radius: 10px; background: var(--ins-wglebienie); color: var(--ins-tekst); font-size: 13px; line-height: 1.4;
  white-space: normal; text-align: left; user-select: none; animation: ins-zalacznik-wejscie .2s ease-out; }
form:has(> .ins-zalacznik-pole) { flex-wrap: wrap; }
.ins-zalacznik-pole { flex: 0 0 100%; width: 100%; box-sizing: border-box; }
.ins-zalacznik-znak { color: var(--ins-zloto); font-weight: 600; }
.ins-zalacznik-tekst { flex: 1; min-width: 0; white-space: pre-line; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.ins-zalacznik-usun { flex: none; width: 24px; height: 24px; margin: -3px -4px 0 0; border-radius: 6px; font-size: 16px; line-height: 1; color: var(--ins-tekst); opacity: .6; }
.ins-zalacznik-usun:hover { opacity: 1; background: rgba(0,0,0,.06); }
.ins-zalacznik-usun:focus-visible { outline: 2px solid var(--ins-zloto); }
/* a sent question: its "> " quote is the same card, and Edit would expose the raw lines */
html.ins-podwatek .message-render:not(:has(.agent-turn)) blockquote { margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--ins-linia, rgba(0,0,0,.12));
  border-left: 3px solid var(--ins-zloto); border-radius: 10px; background: var(--ins-tlo, #fff); color: var(--ins-tekst); font-size: 13px; line-height: 1.4; font-style: normal; font-weight: 400; quotes: none; }
html.ins-podwatek .message-render:not(:has(.agent-turn)) blockquote { max-height: 180px; overflow-y: auto; }
html.ins-podwatek .message-render:not(:has(.agent-turn)) blockquote p { margin: 0 0 6px; }
html.ins-podwatek .message-render:not(:has(.agent-turn)) blockquote p:last-child { margin-bottom: 0; }
html.ins-podwatek .message-render:not(:has(.agent-turn)) blockquote p::before, html.ins-podwatek .message-render:not(:has(.agent-turn)) blockquote p::after { content: none; }
html.ins-podwatek .message-render:not(:has(.agent-turn)):has(blockquote) button:is([title="Edit"], [aria-label*="Edit" i], [title="Edytuj"], [aria-label*="Edytuj" i]) { display: none !important; }
@keyframes ins-zalacznik-wejscie { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .ins-zalacznik { animation: none; } }
.ins-panel-cytat { padding: 10px 18px; background: var(--ins-wglebienie); border-left: 3px solid var(--ins-zloto); color: var(--ins-tekst);
  font: 400 15px/1.5 'Newsreader', Georgia, serif; max-height: 7.5em; overflow: auto; }
.ins-panel-info { padding: 0 18px; font-size: 12.5px; color: var(--ins-tekst-2); }
.ins-panel-info:not(:empty) { padding: 6px 18px; }
.ins-panel-ramka { flex: 1; width: 100%; border: 0; background: var(--ins-tlo); }

/* inside the side-thread iframe: only the conversation and the composer */
html.ins-podwatek :is(aside, [data-ins-szyna]), html.ins-podwatek nav[aria-label], html.ins-podwatek [data-testid="nav"],
html.ins-podwatek [class*="via-presentation"]:has([data-testid="model-selector-button"]),
html.ins-podwatek [role="contentinfo"] { display: none !important; }
html.ins-podwatek main { width: 100% !important; }

/* ---------- F10 law preview ---------- */
.ins-przepis { position: fixed; z-index: 70; display: none; width: min(460px, 92vw); padding: 12px 14px 10px; border-radius: 10px;
  background: var(--ins-karta); border: 1px solid var(--ins-linia); box-shadow: var(--ins-cien); color: var(--ins-tekst); }
.ins-przepis.ins-widoczny { display: block; animation: ins-wjazd .16s var(--ins-sprezyna); }
.ins-przepis-glowa { font: 600 13px 'Instrument Sans', system-ui, sans-serif; color: var(--ins-zloto-tekst); margin-bottom: 6px; padding-right: 36px; }
.ins-przepis-zamknij { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: none;
  color: var(--ins-tekst-2); font: 400 24px/1 'Instrument Sans', system-ui, sans-serif; cursor: pointer; }
.ins-przepis-tekst { font: 400 15px/1.5 'Newsreader', Georgia, serif; max-height: 15em; overflow: auto; white-space: pre-line; }
.ins-przepis-stopka { display: flex; align-items: center; gap: 12px; margin-top: 8px; font: 400 12px 'Instrument Sans', system-ui, sans-serif; color: var(--ins-tekst-2); }
.ins-przepis-stopka a { margin-left: auto; color: var(--ins-zloto-tekst) !important; font-weight: 500; text-decoration: none; }
.ins-przepis-stopka a:hover { text-decoration: underline; }
.ins-przepis.ins-ladowanie .ins-przepis-stopka a { opacity: .6; }

@keyframes ins-wjazd { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes ins-wjazd-bok { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ins-panel, .ins-dymek-zazn, .ins-przepis { animation: none !important; transition: none !important; } }

/* chat list on the dark rail: LibreChat fades long titles with a gradient in the light surface colour
   (a white block at the end of the title); on the plate an ellipsis replaces it, in every row state */
:is(aside, [data-ins-szyna]) [class*="bg-gradient-to-l"][aria-hidden="true"] { display: none !important; }
:is(aside, [data-ins-szyna]) div[aria-label]:has(> [class*="bg-gradient-to-l"]) { text-overflow: ellipsis !important; overflow: hidden !important; white-space: nowrap !important; }

/* ======================= polish after the screen critic (05.11) ======================= */
/* rail: one plate. The icon strip and the chat list share the colour without a seam; LibreChat tools that
   mean nothing here (prompts, bookmarks, files, MCP, temporary chat, marketplace) are hidden, projects in inskryptor.js */
:is(aside, [data-ins-szyna]) div.border-r { border-right-color: transparent !important; }
:is(aside, [data-ins-szyna]) [aria-label="Prompty"], :is(aside, [data-ins-szyna]) [aria-label="Prompts"], :is(aside, [data-ins-szyna]) [aria-label="Zakładki"], :is(aside, [data-ins-szyna]) [aria-label="Bookmarks"],
:is(aside, [data-ins-szyna]) [aria-label="Załącz Pliki"], :is(aside, [data-ins-szyna]) [aria-label="Attach Files"], :is(aside, [data-ins-szyna]) [aria-label="Ustawienia MCP"], :is(aside, [data-ins-szyna]) [aria-label="MCP Settings"],
[aria-label="Marketplace"], [aria-label="Agent Marketplace"], #bookmark-nav-menu-button, [data-testid="bookmark-menu"],
button[aria-label="Dodaj zakładki"], button[aria-label="Add Bookmarks"], button[aria-label="Czat tymczasowy"], button[aria-label="Temporary Chat"] { display: none !important; }
/* our brand where LibreChat had the bookmark button, at the top of the chat list */
/* centred in the list column, on the axis of the first rail icon */
:is(aside, [data-ins-szyna]) div.items-center.px-3:has(> #bookmark-nav-menu-button) { min-height: 36px; padding-top: 0; justify-content: center; }
:is(aside, [data-ins-szyna]) div.items-center.px-3:has(> #bookmark-nav-menu-button)::before { content: ""; width: 128px; height: 18px; margin: 0 7px 0 0;
  background: url(/inskryptor/logotyp-bialy.svg) left center / contain no-repeat; }
/* "AI" is drawn on the wordmark's canvas (same height, same cap line), so the two sit on one line without nudging */
:is(aside, [data-ins-szyna]) div.items-center.px-3:has(> #bookmark-nav-menu-button)::after { content: ""; width: 21px; height: 18px;
  background: url(/inskryptor/znak-ai.svg) left center / contain no-repeat; }
/* chat rows: LibreChat's hover is the class "hover:bg-surface-active-alt" (light grey in the light theme under
   light text, ~1.3:1); on the plate hover and the selected row are one step lighter, text #E9EBEE (11:1) */
:is(aside, [data-ins-szyna]) div[role="button"].group:hover, :is(aside, [data-ins-szyna]) div[role="button"].group:focus-visible { background-color: #262A31 !important; }
html.dark :is(aside, [data-ins-szyna]) div[role="button"].group:hover, html.dark :is(aside, [data-ins-szyna]) div[role="button"].group:focus-visible { background-color: #1F2228 !important; }
:is(aside, [data-ins-szyna]) div[role="button"].group, :is(aside, [data-ins-szyna]) div[role="button"].group div[aria-label] { color: #E9EBEE !important; }
:is(aside, [data-ins-szyna]) div[role="button"].group::before { background-color: #F2F3F5 !important; }

/* under an answer: copy, rating, regenerate only (no edit of the answer, no LibreChat fork - the side thread
   does that - and no read-aloud) */
.message-render:has(.agent-turn) button.hover-button[title="Edytuj"], .message-render:has(.agent-turn) button.hover-button[title="Edit"],
button[title="Otwórz menu rozgałęzienia"], button[aria-label="Otwórz menu rozgałęzienia"], button[title="Open Fork Menu"], button[aria-label="Open Fork Menu"],
button[title="Przeczytaj na głos"], button[title="Read aloud"], [data-testid="read-aloud-button"] { display: none !important; }

/* message mini-map off; "scroll to bottom" moves to the right margin of the chat, outside the text column,
   and stays hidden where there is no margin (narrow window, side thread open, inside the side thread) */
nav[aria-keyshortcuts="Shift+Alt+M"], nav[aria-label="Message navigation"], nav[aria-label="Nawigacja wiadomości"] { display: none !important; }
div:has(> .premium-scroll-button) { max-width: none !important; padding-right: 20px; container-type: inline-size; }
@container (max-width: 1060px) { .premium-scroll-button { display: none !important; } }

/* greeting: stands still (no letter-by-letter entrance), Newsreader like the mock-up heading */
.split-parent span.inline-block { opacity: 1 !important; transform: none !important; will-change: auto !important; }
.split-parent { font-family: 'Newsreader', Georgia, serif !important; font-weight: 500 !important; }

/* example questions: 2 x 2 under the composer width, left-aligned, card + line, hover = wgłębienie */
div.flex-wrap.items-stretch.justify-center:has(> button[class*="max-w-[16rem]"]) { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px !important;
  width: min(46rem, 100%); margin-left: auto; margin-right: auto; }
div.flex-wrap.items-stretch.justify-center > button[class*="max-w-[16rem]"] { max-width: none !important; justify-content: flex-start !important; text-align: left !important;
  padding: 10px 14px !important; border-radius: 9px !important; border: 1px solid var(--ins-linia) !important; background: var(--ins-karta) !important;
  color: var(--ins-tekst) !important; box-shadow: none !important; font-size: 14px !important; }
div.flex-wrap.items-stretch.justify-center > button[class*="max-w-[16rem]"]:hover { background: var(--ins-wglebienie) !important; border-color: var(--ins-linia-mocna) !important; }
div.flex-wrap.items-stretch.justify-center > button[class*="max-w-[16rem]"] span { text-align: left; text-wrap: pretty; }

/* side thread: messages copied from the main conversation fold into one quiet line (inskryptor.js) */
html:not(.ins-kontekst-otwarty) .ins-kontekst-ukryty { display: none !important; }
.ins-kontekst { display: flex; align-items: center; gap: 8px; width: calc(100% - 32px); max-width: 48rem; margin: 10px auto 4px; padding: 7px 12px;
  border: 0; border-left: 3px solid var(--ins-zloto); border-radius: 0 8px 8px 0; background: var(--ins-wglebienie); color: var(--ins-tekst-2);
  font: 400 13px/1.4 'Instrument Sans', system-ui, sans-serif; text-align: left; cursor: pointer; }
.ins-kontekst:hover { color: var(--ins-tekst); }
.ins-kontekst::after { content: "▸"; margin-left: auto; font-size: 11px; transition: transform .2s; }
html.ins-kontekst-otwarty .ins-kontekst::after { transform: rotate(90deg); }
.ins-kontekst:focus-visible { outline: 2px solid var(--ins-zloto); outline-offset: 2px; }

/* user avatar: plate with a white letter (inskryptor.js marks it), not LibreChat's red initials */
.ins-awatar { position: relative; border-radius: 999px; background: #1B1E23; }
.ins-awatar > img { opacity: 0 !important; }
.ins-awatar::after { content: attr(data-ins-litera); position: absolute; inset: 0; display: grid; place-items: center; color: #FFFFFF;
  font: 600 11px/1 'Instrument Sans', system-ui, sans-serif; pointer-events: none; }
html.dark .ins-awatar { background: #2B3038; }
:is(aside, [data-ins-szyna]) .ins-awatar { background: #2B3038; }   /* on the plate a plate-coloured circle would vanish */
::selection { background: rgb(176 138 74 / .25); }
html.dark ::selection { background: rgb(201 163 95 / .30); }

/* login and registration: page #F4F5F7, the form on a white card with a line, logo 24 px from the edge,
   field labels tekst-2 (the gold came from "peer-focus:text-green-600"), no unlabelled theme icon */
div.relative.flex.min-h-screen.flex-col.bg-white { background-color: #F4F5F7 !important; }
html.dark div.relative.flex.min-h-screen.flex-col.bg-white { background-color: #121418 !important; }
div.min-h-screen > div.mt-6.h-10 { padding: 0 24px; }
div.min-h-screen > div.absolute.bottom-0.left-0 { display: none !important; }
div.min-h-screen main > div.w-authPageWidth { background: #FFFFFF !important; border: 1px solid #D5D9DF; border-radius: 12px; padding: 28px 32px !important;
  box-shadow: 0 1px 2px rgb(20 26 34 / .06); }
html.dark div.min-h-screen main > div.w-authPageWidth { background: #1B1E23 !important; border-color: #2E333B; }
div.min-h-screen main label { color: var(--text-secondary) !important; }

/* dialogs (terms, settings): light veil #1B1E23 at 40 %, white card with a line; the terms text sits
   on the card (its focus ring drew a black frame), one title */
div.fixed.inset-0[class*="bg-black/80"] { background-color: rgb(27 30 35 / .4) !important; }
[role="dialog"] { border: 1px solid var(--border-light) !important; }
[role="dialog"] section[tabindex="0"] { outline: none !important; box-shadow: none !important; border: 0 !important; }
[role="dialog"] section[tabindex="0"] h1 { display: none; }   /* the dialog title already says it */
/* LibreChat's flat projects section gives way to our folder tree (inskryptor.js) */
:is(aside, [data-ins-szyna]) div[aria-label].flex-col.overflow-hidden > div:has([aria-label="Nowy projekt"], [aria-label="New project"]) { display: none !important; }

/* ======================= brand and polish, 05.11 (Piotr: real Inskryptor mark, a product people pay for) ======================= */
/* welcome: the Inskryptor seal above the greeting instead of the selected profile's letter (the picker at the top
   shows the profile); light page = white seal, dark page = black seal, both with the gold ring */
div.transform-gpu .icon-xl img[src^="/inskryptor/ikony/"] { content: url(/inskryptor/sygnet-bialy.svg); }
html.dark div.transform-gpu .icon-xl img[src^="/inskryptor/ikony/"] { content: url(/inskryptor/sygnet-czarny.svg); }
div.transform-gpu div:has(> .split-parent) { flex-direction: column !important; gap: 14px !important; }
div.transform-gpu div.relative.size-10:has(img[src^="/inskryptor/ikony/"]) { width: 64px !important; height: 64px !important; }
div.transform-gpu .icon-xl:has(img[src^="/inskryptor/ikony/"]) { border-radius: 999px; box-shadow: 0 6px 18px -8px rgb(20 26 34 / .35); }
.split-parent { font-size: 25px !important; line-height: 1.25 !important; letter-spacing: -.005em; }
@media (max-width: 1100px), (max-height: 900px) { .split-parent { font-size: 22px !important; }
  div.transform-gpu div.relative.size-10:has(img[src^="/inskryptor/ikony/"]) { width: 52px !important; height: 52px !important; } }
/* the answer's author is Inskryptor AI: its seal next to the name (the profile stays in the pill above) */
.message-render img[src^="/inskryptor/ikony/"] { content: url(/inskryptor/sygnet-bialy.svg); }
html.dark .message-render img[src^="/inskryptor/ikony/"] { content: url(/inskryptor/sygnet-czarny.svg); }

/* answers: the profiles write section titles as a bold first line ("**Teza**", "**Pewność**"); inskryptor.js marks
   such paragraphs .ins-sekcja: a hairline above, the title one clear step above the text */
.agent-turn .markdown > p.ins-sekcja { border-top: 1px solid var(--ins-linia); padding-top: .95em; margin-top: 1.35em; }
.agent-turn .markdown > p.ins-sekcja > strong:first-child { display: block; font-size: 1.2rem; font-weight: 600; letter-spacing: -.005em; margin-bottom: .2em; }
.agent-turn .markdown > p.ins-sekcja > strong:first-child + br { display: none; }
/* real markdown headings get the same look */
.agent-turn .markdown h1, .agent-turn .markdown h2, .agent-turn .markdown h3 { font-size: 1.2rem !important; font-weight: 600 !important; line-height: 1.3;
  letter-spacing: -.005em; margin: 1.5em 0 .45em !important; padding-top: 1em; border-top: 1px solid var(--ins-linia); }
.agent-turn .markdown > :is(h1, h2, h3):first-child { border-top: 0; padding-top: 0; margin-top: .2em !important; }
.agent-turn .markdown ul > li::marker, .agent-turn .markdown ol > li::marker { color: var(--ins-zloto); }
.agent-turn .markdown strong { font-weight: 600; }
.agent-turn .markdown blockquote { border-left: 3px solid var(--ins-zloto); background: var(--ins-wglebienie); border-radius: 0 8px 8px 0;
  padding: .55em 1em; margin: .9em 0; font-style: normal; color: var(--ins-tekst); }
.agent-turn .markdown a { text-decoration-thickness: 1px !important; text-decoration-color: color-mix(in oklab, var(--ins-zloto-tekst) 45%, transparent) !important; }
.agent-turn .markdown a:hover { text-decoration-color: var(--ins-zloto-tekst) !important; }

/* composer: a quiet card on the page, a clear focus ring in the brand colour */
form:has(#prompt-textarea) > div > div.rounded-3xl, form:has(#prompt-textarea) div[class*="rounded-t-3xl"] { transition: border-color .2s; }
form:has(#prompt-textarea:focus) div.rounded-3xl { border-color: var(--ins-linia-mocna) !important; box-shadow: 0 0 0 3px rgb(176 138 74 / .16), 0 8px 24px -14px rgb(20 26 34 / .35) !important; }

/* law library: one row under the brand in the chat list, one icon in the rail (inskryptor.js) */
.ins-biblioteka { display: flex; align-items: center; gap: 10px; margin: 2px 8px 6px; padding: 8px 10px; border-radius: 9px; color: #E9EBEE !important;
  font: 500 14px/1.2 'Instrument Sans', system-ui, sans-serif; text-decoration: none !important; transition: background-color .2s, transform .2s var(--ins-sprezyna); }
.ins-biblioteka:hover { background: #262A31; }
.ins-biblioteka:active { transform: scale(.985); }
.ins-biblioteka svg { width: 18px; height: 18px; flex: none; color: #D6B06C !important; }
.ins-biblioteka:focus-visible { outline: 2px solid #D6B06C; outline-offset: 1px; }
html.dark .ins-biblioteka:hover { background: #1F2228; }
html.ins-podwatek .ins-biblioteka { display: none !important; }

/* login and registration: the card a touch more generous, the main button in the plate colour with gold text
   (one gold accent: the wordmark's §), the title in Newsreader */
div.min-h-screen main > div.w-authPageWidth { box-shadow: 0 1px 2px rgb(20 26 34 / .05), 0 18px 40px -24px rgb(20 26 34 / .28) !important; }
div.min-h-screen main h1 { font-family: 'Newsreader', Georgia, serif !important; font-weight: 500 !important; letter-spacing: -.01em; }
div.min-h-screen main button[type="submit"] { background: #1B1E23 !important; color: #F2F3F5 !important; transition: background-color .2s, transform .15s var(--ins-sprezyna); }
div.min-h-screen main button[type="submit"]:hover { background: #2B3038 !important; }
div.min-h-screen main button[type="submit"]:active { transform: scale(.985); }
/* floating labels sit on the card colour; LibreChat paints the field with an inset shadow (.webkit-dark-styles,
   #0D0D0D), not the background, so the shadow has to change too */
html.dark div.min-h-screen main input { background-color: #1B1E23 !important; box-shadow: 0 0 0 50vh #1B1E23 inset !important; }
/* focus ring in the brand gold, not LibreChat's green (focus:border-green-500) */
div.min-h-screen main input:focus, div.min-h-screen main input:focus-visible { border-color: #B08A45 !important; }
html.dark div.min-h-screen main input:focus, html.dark div.min-h-screen main input:focus-visible { border-color: #D6B06C !important; }
html.dark div.min-h-screen main button[type="submit"] { background: #D6B06C !important; color: #1B1E23 !important; }
html.dark div.min-h-screen main button[type="submit"]:hover { background: #E0BE80 !important; }

/* ======================= phone (05.11): the composer belongs on the first screen ======================= */
@media (max-width: 760px) {
  /* side thread: a full screen of its own, half of a phone would fit nothing */
  .ins-panel { width: 100vw; border-left: 0; }
  html.ins-panel-otwarty #root { width: 100vw !important; }
}
@media (max-width: 640px) {
  /* greeting keeps its size to the text; it was a full-height block pushing the composer 116 px off the screen */
  div.transform-gpu:has(.split-parent) { height: auto !important; padding-top: 52px; padding-bottom: 0 !important; margin-bottom: 0 !important; }
  div.transform-gpu .animate-fadeIn { margin-top: 8px; }
  .split-parent { font-size: 20px !important; }
  div.transform-gpu:has(.split-parent) { padding-left: 12px; padding-right: 12px; }
  /* law preview: a sheet at the bottom, wide enough to read, away from the finger on the link */
  .ins-przepis { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; padding: 14px 16px calc(6px + env(safe-area-inset-bottom));
    border-width: 1px 0 0; border-radius: 14px 14px 0 0; box-shadow: 0 0 0 100vmax rgb(10 11 13 / .35); }
  .ins-przepis-stopka a { display: inline-flex; align-items: center; min-height: 44px; }
  /* example questions: one column, whole sentences */
  div.flex-wrap.items-stretch.justify-center:has(> button[class*="max-w-[16rem]"]) { grid-template-columns: minmax(0, 1fr); }
  /* the AI notice is hidden on phones by LibreChat (hidden sm:flex); it stays, quietly, under the composer */
  [role="contentinfo"] { display: flex !important; position: static !important; padding: 2px 16px 8px !important; }
}
/* a short phone (browser bars open) shows two example questions, the composer stays on screen */
@media (max-width: 640px) and (max-height: 760px) {
  div.flex-wrap.items-stretch.justify-center > button[class*="max-w-[16rem]"]:nth-child(n+3) { display: none; }
  div.transform-gpu div.relative.size-10:has(img[src^="/inskryptor/ikony/"]) { display: none; }
}

/* empty screen, 05.11 (Piotr: more professional, profiles only in the picker at the top left): one column,
   seal, sentence, the example questions as a quiet list, composer at the bottom */
@media (min-width: 641px) {
  /* composer at the bottom, where it stays during the conversation; questions right above it (Piotr 05.11) */
  div.flex-1.items-center.justify-end:has(form):has(.split-parent) { justify-content: flex-end !important; padding-bottom: 8px; }
  div:has(> form) > div.flex-wrap.items-stretch.justify-center:has(> button[class*="max-w-[16rem]"]) { width: 100%; margin: 0 auto 12px !important; padding: 0 8px !important; }
  /* seal and sentence in the middle of the chat area, whatever the questions and composer take at the bottom */
  div.flex-1.items-center.justify-end:has(form):has(.split-parent) { position: relative; }
  div.transform-gpu:has(.split-parent) { position: absolute !important; inset: 0; height: auto !important; max-height: none !important; margin: 0 !important; padding: 0 !important; justify-content: center !important; pointer-events: none; }
}
/* one line on the empty screen (Piotr 05.11); LibreChat's second line under the greeting stays off */
div.transform-gpu:has(.split-parent) .animate-fadeIn { display: none !important; }
div.flex-wrap.items-stretch.justify-center > button[class*="max-w-[16rem]"] { background: transparent !important; color: var(--ins-tekst-2) !important; font-size: 13.5px !important; transition: background-color .15s, color .15s, border-color .15s; }
div.flex-wrap.items-stretch.justify-center > button[class*="max-w-[16rem]"]:hover { color: var(--ins-tekst) !important; }

/* five profiles need no search box in the picker (Piotr 05.11) */
div:has(> input[placeholder^="Szukaj profil"]), div:has(> input[placeholder^="Search"][placeholder*="odel"]) { display: none !important; }

/* ONE menu, 05.11 (Piotr: no icon strip, everything on one level, styled like the Akty menu). LibreChat keeps two
   columns; its strip stays in the DOM, so the real buttons keep working, but stops being a column: each control is
   placed inside the panel. Closed, only the open button stays, floating at the top left. */
:is(aside, [data-ins-szyna]) div.flex-col:has(> [data-testid="new-chat-button"]) { position: absolute !important; inset: 0; z-index: 3; width: 100% !important; padding: 0 !important; border: 0 !important; background: transparent !important; pointer-events: none; }
:is(aside, [data-ins-szyna]) div.flex-col:has(> [data-testid="new-chat-button"]) > * { pointer-events: auto; }
:is(aside, [data-ins-szyna]) div.flex-col:has(> [data-testid="new-chat-button"]) > :is(div.border-b, div.overflow-y-auto) { display: none !important; }
:is(aside, [data-ins-szyna]) > div:first-child, [data-ins-szyna] div:has(> div.flex-col > [data-testid="new-chat-button"]) { position: relative; }
[data-testid="close-sidebar-button"] { position: absolute !important; top: 10px; right: 10px; width: 32px !important; height: 32px !important; }
:is(aside, [data-ins-szyna]) a[data-testid="new-chat-button"] { position: absolute; top: 56px; left: 12px; right: 12px; width: auto !important; height: 44px !important; gap: 8px; border-radius: 11px;
  background: #D6B06C !important; color: #1B1E23 !important; font: 600 15px/1 'Instrument Sans', system-ui, sans-serif; transition: background-color .15s, transform .12s; }
:is(aside, [data-ins-szyna]) a[data-testid="new-chat-button"]::after { content: "Nowa rozmowa"; color: #1B1E23; }
:is(aside, [data-ins-szyna]) a[data-testid="new-chat-button"] svg { width: 17px; height: 17px; color: #1B1E23 !important; }
:is(aside, [data-ins-szyna]) a[data-testid="new-chat-button"]:hover { background: #E2C07F !important; }
:is(aside, [data-ins-szyna]) a[data-testid="new-chat-button"]:active { transform: scale(.985); }
:is(aside, [data-ins-szyna]) div.mt-auto:has(> [data-testid="nav-user"]) { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 8px; border-top: 1px solid #2C3139; background: #1B1E23; }
html.dark :is(aside, [data-ins-szyna]) div.mt-auto:has(> [data-testid="nav-user"]) { background: #0B0C0F; }
[data-testid="nav-user"] { width: 100% !important; height: 48px !important; justify-content: flex-start !important; gap: 10px; padding: 0 8px; border-radius: 9px; }
[data-testid="nav-user"]::after { content: attr(data-ins-nazwa); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 15px/1.2 'Newsreader', Georgia, serif; color: #E9EBEE; }
/* the list under the fixed controls */
:is(aside, [data-ins-szyna]) nav { width: 100% !important; }
/* brand, gold button and library hold fixed places: the list starts below them even before LibreChat has drawn its
   rows (05.11: while loading "Czaty" slid under the gold button) */
:is(aside, [data-ins-szyna]) nav div[aria-label].flex-col.overflow-hidden { padding-top: 164px !important; padding-bottom: 68px !important; }
:is(aside, [data-ins-szyna]) div.items-center.px-3:has(> #bookmark-nav-menu-button) { display: none !important; }
:is(aside, [data-ins-szyna]) div.flex-col:has(> [data-testid="new-chat-button"])::before { content: ""; position: absolute; top: 17px; left: 50%; width: 156px; height: 18px; transform: translateX(-50%);
  background: url(/inskryptor/logotyp-bialy.svg) left center / 128px 18px no-repeat, url(/inskryptor/znak-ai.svg) right center / 21px 18px no-repeat; }
.ins-biblioteka { position: absolute; top: 108px; left: 12px; right: 12px; z-index: 2; height: 44px; margin: 0; padding: 0 12px; justify-content: center; gap: 8px; border: 1px solid #D6B06C !important; border-radius: 11px;
  font: 600 15px/1 'Instrument Sans', system-ui, sans-serif; color: #E9C98C !important; }
.ins-biblioteka span { color: #E9C98C !important; }
/* desktop: a floating rounded panel on the page, as in Akty */
@media (min-width: 768px) {
  aside:has([data-testid="close-sidebar-button"]) { width: 284px !important; min-width: 284px !important; max-width: 284px !important; padding: 12px 0 12px 12px; background: transparent !important; }
  html.dark aside:has([data-testid="close-sidebar-button"]) { background: transparent !important; }
  aside:has([data-testid="close-sidebar-button"]) > div:first-child { border-radius: 18px; overflow: hidden; background: #1B1E23; }
  html.dark aside:has([data-testid="close-sidebar-button"]) > div:first-child { background: #0B0C0F; box-shadow: 0 0 0 1px #2C3139; }
  aside [aria-label="Resize sidebar"] { display: none !important; }
  /* closed: no strip at all, one quiet button beside the profile picker */
  /* z-index: the chat header sits later in the page and would take the click from the button */
  aside:has([data-testid="open-sidebar-button"]) { position: relative; z-index: 30; width: 0 !important; min-width: 0 !important; max-width: 0 !important; overflow: visible !important; background: transparent !important; }
  aside:has([data-testid="open-sidebar-button"]) > div:first-child { overflow: visible !important; }
  aside:has([data-testid="open-sidebar-button"]) div.flex-col:has(> [data-testid="new-chat-button"])::before { display: none; }
  aside:has([data-testid="open-sidebar-button"]) nav, aside:has([data-testid="open-sidebar-button"]) div.flex-col:has(> [data-testid="new-chat-button"]) > :not([data-testid="open-sidebar-button"]) { display: none !important; }
  [data-testid="open-sidebar-button"] { position: fixed !important; top: 8px; left: 12px; z-index: 20; border: 1px solid var(--ins-linia) !important; border-radius: 10px; background: var(--ins-karta) !important; }
  [data-testid="open-sidebar-button"] svg { color: var(--ins-tekst) !important; }
  html:has([data-testid="open-sidebar-button"]) div:has(> div > [data-testid="model-selector-button"]) { padding-left: 44px; }
}
/* the gold button is the one way to a new chat; section label in the small capitals of the Akty menu */
:is(aside, [data-ins-szyna]) nav button[aria-label="Nowa rozmowa"], :is(aside, [data-ins-szyna]) nav button[aria-label="New chat"] { display: none !important; }
:is(aside, [data-ins-szyna]) nav button.group.flex-1.text-xs { font-size: 11.5px !important; letter-spacing: .08em; text-transform: uppercase; }
:is(aside, [data-ins-szyna]) nav button.group.flex-1.text-xs span { color: #A6ADB8 !important; }
/* the account row while its menu is open: LibreChat's light state under light text, on the plate it stays dark */
:is(aside, [data-ins-szyna]) [data-testid="nav-user"]:is(:hover, :active, [aria-expanded="true"], [data-state="open"], [data-active-item], [data-focus-visible]) { background-color: #262A31 !important; }
html.dark :is(aside, [data-ins-szyna]) [data-testid="nav-user"]:is(:hover, :active, [aria-expanded="true"], [data-state="open"], [data-active-item], [data-focus-visible]) { background-color: #1F2228 !important; }
/* a side thread sits under its conversation: indented, smaller, with a thin line */
.ins-wiersz-pod { padding-left: 38px !important; }
/* an elbow: from under the parent straight into this row */
.ins-wiersz-pod::before { content: ""; position: absolute; left: 24px; top: -6px; width: 14px; height: 24px; border-left: 1px solid #59616D; border-bottom: 1px solid #59616D; border-bottom-left-radius: 7px; pointer-events: none; }
.ins-wiersz-pod [data-testid="convo-item"] img, .ins-wiersz-pod [data-testid="convo-item"] .icon-md, .ins-wiersz-pod [data-testid="convo-item"] div:has(> img) { display: none !important; }
.ins-wiersz-pod [data-testid="convo-item"] div[aria-label] { font-size: 13px; color: #A6ADB8 !important; }

/* folders: same rhythm as the chat rows, the tree scrolls on its own so the chats stay reachable */
.ins-foldery { flex: none; padding: 0 12px 6px; font-family: 'Instrument Sans', system-ui, sans-serif; }
.ins-foldery-glowa { display: flex; align-items: center; justify-content: space-between; height: 32px; padding: 0 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #A6ADB8 !important; }
.ins-foldery-glowa span { color: #A6ADB8 !important; }
.ins-foldery-dodaj { width: 28px; height: 28px; border-radius: 7px; font-size: 18px; line-height: 1; letter-spacing: 0; color: #A6ADB8 !important; }
.ins-foldery-drzewo { max-height: 34vh; overflow-y: auto; }
.ins-folder { display: flex; align-items: center; min-height: 36px; border-radius: 8px; }
.ins-folder:hover { background: #262A31; }
html.dark .ins-folder:hover { background: #1F2228; }
.ins-folder-glowny { display: flex; flex: 1; min-width: 0; align-items: center; gap: 6px; height: 36px; font-size: 14px; color: #E9EBEE !important; background: transparent !important; text-align: left; }
.ins-folder-strzalka { width: 12px; flex: none; color: #A6ADB8 !important; transition: transform .15s; text-align: center; }
.ins-folder-strzalka.ins-otwarta { transform: rotate(90deg); }
.ins-folder-ikona { display: inline-flex; flex: none; }
:is(aside, [data-ins-szyna]) .ins-folder-ikona svg { width: 16px; height: 16px; color: #D6B06C !important; }
.ins-folder-ikona svg { width: 16px; height: 16px; }
.ins-folder-nazwa { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-folder-wiecej { flex: none; width: 32px; height: 32px; border-radius: 7px; color: #A6ADB8 !important; }
.ins-folder-akcje { display: flex; flex-direction: column; align-items: stretch; gap: 1px; padding-top: 2px; padding-bottom: 6px; }
/* the folder's actions are a list under it, one row each, delete set apart in red (not five chips wrapping) */
.ins-folder-akcje .ins-folder-akcja { height: 32px; padding: 0 10px; border: 0; text-align: left; font-size: 13px; transition: background-color .15s; }
.ins-folder-akcje .ins-folder-akcja:hover { background: #262A31; }
.ins-folder-akcje .ins-oddziel { margin-top: 4px; border-top: 1px solid #2F343C; border-radius: 0 0 7px 7px; }
:is(aside, [data-ins-szyna]) .ins-folder-akcje .ins-grozna { color: #F0B1A8 !important; }
.ins-folder-akcje .ins-folder-pytanie { padding: 4px 10px; }
.ins-folder-pytanie { width: 100%; font-size: 12.5px; color: #A6ADB8 !important; }
.ins-folder-akcja { height: 30px; padding: 0 9px; border: 1px solid #3A4049; border-radius: 7px; font-size: 12.5px; color: #E9EBEE !important; background: transparent; }
.ins-grozna { border-color: #C96A5E; color: #F0B1A8 !important; }
.ins-folder-pole { padding: 3px 0; }
.ins-folder-pole input { width: 100%; height: 32px; padding: 0 8px; border: 1px solid #D6B06C !important; border-radius: 7px; font-size: 14px; outline: 0; }
.ins-folder-rozmowa { display: flex; align-items: center; height: 32px; border-radius: 7px; font-size: 13px; }
.ins-folder-rozmowa a { flex: 1; min-width: 0; overflow: hidden; line-height: 32px; color: #C9CED6 !important; text-overflow: ellipsis; white-space: nowrap; }
.ins-folder-rozmowa:hover, .ins-folder-rozmowa.ins-biezaca { background: #262A31; color: #FFFFFF !important; }
html.dark .ins-folder-rozmowa:hover, html.dark .ins-folder-rozmowa.ins-biezaca { background: #1F2228; }
.ins-folder-pusty { padding-top: 4px; padding-bottom: 6px; font-size: 12.5px; line-height: 1.35; color: #A6ADB8 !important; }
.ins-okno-tlo { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgb(10 11 13 / .45); }
.ins-okno { width: min(420px, 100%); max-height: min(560px, 90vh); display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 1px solid var(--ins-linia); border-radius: 14px; background: var(--ins-karta); color: var(--ins-tekst); box-shadow: var(--ins-cien); font-family: 'Instrument Sans', system-ui, sans-serif; }
.ins-okno h2 { margin: 0; font: 500 20px/1.25 'Newsreader', Georgia, serif; }
.ins-okno-lista { min-height: 44px; overflow-y: auto; }
.ins-okno-wiersz { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 12px; border-radius: 8px; font-size: 14.5px; text-align: left; color: var(--ins-tekst); }
.ins-okno-wiersz:hover { background: var(--ins-wglebienie); }
.ins-okno .ins-folder-ikona svg { color: var(--ins-zloto-tekst) !important; }
.ins-okno-nowy { display: flex; gap: 8px; }
.ins-okno-nowy input { flex: 1; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--ins-linia); border-radius: 8px; background: transparent; color: var(--ins-tekst); font-size: 14px; }
.ins-okno-nowy .ins-folder-akcja { height: 38px; border-color: var(--ins-linia); color: var(--ins-tekst) !important; }
.ins-okno-blad { font-size: 13px; color: #B3261E; }
.ins-okno-blad:empty { display: none; }
html.dark .ins-okno-blad { color: #F2B8B5; }
.ins-okno-anuluj { align-self: flex-end; height: 38px; padding: 0 12px; border-radius: 8px; font-size: 14px; color: var(--ins-tekst-2); }
/* a folder as a project: instruction, documents, memory (inskryptor.js oknoProjektu) */
.ins-okno-projekt { width: min(600px, 100%); max-height: min(760px, 92vh); animation: ins-wjazd .18s var(--ins-sprezyna); }
.ins-okno-opis { margin: -4px 0 2px; font-size: 13.5px; color: var(--ins-tekst-2); }
.ins-projekt-tresc { display: flex; flex-direction: column; gap: 16px; min-height: 0; overflow-y: auto; margin: 0 -18px; padding: 0 18px 2px; }
.ins-projekt-pole { display: flex; flex-direction: column; gap: 6px; }
.ins-projekt-etykieta { font-size: 13px; font-weight: 600; color: var(--ins-tekst); }
.ins-okno-projekt textarea, .ins-okno-projekt input:not([type=file]) { width: 100%; padding: 9px 12px; border: 1px solid transparent; border-radius: 8px; background: var(--ins-wglebienie);
  color: var(--ins-tekst); font-size: 14px; line-height: 1.45; resize: none; overflow-y: auto; transition: border-color .2s, box-shadow .2s; }
.ins-okno-projekt input:not([type=file]) { height: 38px; }
.ins-okno-projekt textarea:focus, .ins-okno-projekt input:focus { outline: 0; border-color: var(--ins-zloto); box-shadow: 0 0 0 3px rgb(176 138 74 / .16); }
.ins-projekt-rzad { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ins-guzik-cichy { background: transparent; color: var(--ins-tekst-2); }
.ins-guzik:disabled { opacity: .55; cursor: progress; }
.ins-projekt-stan { font-size: 13px; color: var(--ins-tekst-2); }
.ins-projekt-stan:empty { display: none; }
.ins-projekt-doki { display: flex; flex-direction: column; gap: 4px; }
.ins-projekt-dok { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 6px 0 12px; border-radius: 8px; background: var(--ins-wglebienie);
  font-size: 14px; animation: ins-wjazd .18s var(--ins-sprezyna); }
.ins-projekt-dok-nazwa { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-projekt-dok-ile { flex: none; font-size: 12.5px; color: var(--ins-tekst-2); font-variant-numeric: tabular-nums; }
.ins-projekt-dok .ins-zalacznik-usun { margin: 0; width: 30px; height: 30px; }
.ins-projekt-pusto { font-size: 13px; color: var(--ins-tekst-2); }
.ins-projekt-notatka { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; background: var(--ins-wglebienie); animation: ins-wjazd .18s var(--ins-sprezyna); }
.ins-projekt-notatka[hidden], .ins-guzik[hidden] { display: none; }
.ins-projekt-stopka { display: flex; align-items: center; gap: 8px; padding-top: 4px; border-top: 1px solid var(--ins-linia); }
.ins-projekt-licznik { flex: 1; padding-top: 8px; font-size: 12.5px; color: var(--ins-tekst-2); font-variant-numeric: tabular-nums; }
.ins-projekt-stopka .ins-okno-anuluj, .ins-projekt-stopka .ins-guzik { margin-top: 8px; height: 38px; }
/* a new chat in a folder: the stock suggestions are general law, not the case */
[data-ins-projekt] div.flex-wrap.items-stretch.justify-center:has(> button[class*="max-w-[16rem]"]) { display: none !important; }
@media (prefers-reduced-motion: reduce) { .ins-okno-projekt, .ins-projekt-dok, .ins-projekt-notatka { animation: none; } }
/* answer settings (inskryptor.js oknoUstawien): the label on the left, only the choice has a track, on the right;
   every segment has the same width, so the four tracks start and end on one line */
.ins-okno-ustawienia { width: min(600px, 100%); gap: 12px; animation: ins-wjazd .18s var(--ins-sprezyna); }
.ins-okno-ustawienia:focus { outline: 0; }
.ins-ustawienia-lista { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.ins-ustawienia-wiersz { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ins-ustawienia-etykieta { min-width: 0; padding-top: 10px; font-size: 14.5px; font-weight: 500; line-height: 1.3; color: var(--ins-tekst); }
.ins-ustawienia-wybor { flex: none; width: 366px; }
.ins-segment { position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); padding: 3px; border-radius: 11px; background: var(--ins-wglebienie); }
.ins-segment::before { content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n)); border-radius: 8px; background: var(--ins-karta);
  box-shadow: 0 1px 2px rgb(20 26 34 / .16), 0 0 0 .5px rgb(20 26 34 / .08); transform: translateX(calc(100% * var(--i, 0))); transition: transform .32s var(--ins-sprezyna); }
.ins-segment[aria-disabled="true"]::before { opacity: 0; }
.ins-segment-opcja { position: relative; display: grid; place-items: center; height: 34px; padding: 0 6px; border-radius: 8px; font-size: 14px; color: var(--ins-tekst-2); white-space: nowrap; cursor: pointer; transition: color .2s; }
.ins-segment-opcja input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.ins-segment-opcja:not(:has(input:checked)):hover { background: color-mix(in oklab, var(--ins-karta) 55%, transparent); }
.ins-segment-opcja:has(input:checked) { color: var(--ins-tekst); font-weight: 600; }
.ins-segment-opcja:has(input:focus-visible) { outline: 2px solid var(--ins-zloto); outline-offset: -1px; }
.ins-segment[aria-disabled="true"] { opacity: .5; }
.ins-segment[aria-disabled="true"] .ins-segment-opcja { color: var(--ins-tekst-2); cursor: default; }
.ins-segment-podpis { display: grid; grid-template-columns: repeat(var(--n), 1fr); margin-top: 5px; font-size: 12.5px; line-height: 1.3; text-align: center; color: var(--ins-tekst-2); white-space: nowrap; }
html.dark .ins-segment::before { background: #3A4049; box-shadow: 0 1px 2px rgb(0 0 0 / .4); }
.ins-okno-ustawienia .ins-projekt-stopka { margin-top: 4px; }
@media (max-width: 640px) {
  .ins-ustawienia-wiersz { flex-direction: column; gap: 6px; }
  .ins-ustawienia-etykieta { padding-top: 0; }
  .ins-ustawienia-wybor { width: 100%; }
  .ins-segment-opcja { padding: 0 2px; font-size: 13px; }
}
/* the added menu row is not one of the native menu's own items, so it lights up by itself, in the same colour */
.ins-menu-ustawienia:is(:hover, :focus) { outline: 0; background-color: var(--surface-hover); }
@media (prefers-reduced-motion: reduce) { .ins-okno-ustawienia { animation: none; } .ins-segment::before { transition: none; } }

/* the reader sees the answer, not its working (Piotr 05.11): no tool line, no law date */
.mb-2.mt-1:has(.tool-status-text) { display: none !important; }
.markdown > p.ins-ukryte { display: none !important; }
/* the user's messages on the right, as a quiet bubble without name and avatar (the answers stay full width on the left) */
div.group:has(> .user-turn) { justify-content: flex-end; }
div.group:has(> .user-turn) > div:first-child:not(.user-turn) { display: none; }
.user-turn { width: auto !important; max-width: min(75%, 40rem); align-items: flex-end; }
.user-turn > h2 { display: none; }
.user-turn .text-message { width: fit-content; margin-left: auto; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: var(--ins-wglebienie); }
.user-turn > div > div:last-child:not(:first-child) { justify-content: flex-end; }
.user-turn:has(textarea) { width: 100% !important; max-width: 100%; }
.user-turn:has(textarea) .text-message { width: 100%; }
@media (max-width: 640px) { .user-turn { max-width: 88%; } }
/* with the date gone the first section opens the answer: no rule and no gap above it */
.agent-turn .markdown > p.ins-ukryte + p.ins-sekcja { border-top: 0; padding-top: 0; margin-top: 0; }

/* rename in the list: full row, readable on the plate */
:is(aside, [data-ins-szyna]) [data-testid="convo-item"] input, :is(aside, [data-ins-szyna]) div.px-3 input[type="text"] { width: 100%; min-width: 0; height: 30px; padding: 0 6px; border: 1px solid #D6B06C !important; border-radius: 6px; background: #262A31 !important; color: #E9EBEE !important; font-size: 14px; outline: 0; }
:is(aside, [data-ins-szyna]) input::selection { background: #D6B06C; color: #1B1E23; }
/* name of the open chat in the top bar */
.ins-tytul { min-width: 0; max-width: min(42vw, 560px); margin-left: 6px; pointer-events: auto; }
.ins-tytul[hidden] { display: none; }
.ins-tytul-przycisk { display: flex; align-items: center; gap: 6px; max-width: 100%; height: 36px; padding: 0 10px; border-radius: 9px; color: var(--ins-tekst); font: 500 16px/1.2 'Newsreader', Georgia, serif; background: transparent; transition: background-color .15s; }
.ins-tytul-przycisk:hover { background: var(--ins-wglebienie); }
.ins-tytul-napis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-tytul-olowek { display: inline-flex; flex: none; color: var(--ins-tekst-2); }
.ins-tytul-olowek svg { width: 14px; height: 14px; }
.ins-tytul-pole { width: min(42vw, 560px); height: 36px; padding: 0 10px; border: 1px solid var(--ins-zloto); border-radius: 9px; background: var(--ins-karta); color: var(--ins-tekst); font: 500 16px/1.2 'Newsreader', Georgia, serif; outline: 0; }
@media (max-width: 640px) { .ins-tytul { max-width: 30vw; margin-left: 0; } .ins-tytul-przycisk { font-size: 14px; padding: 0 4px; } .ins-tytul-pole { width: 30vw; } }
html.ins-podwatek .ins-tytul { display: none; }
/* the picker keeps its own width, the name takes what is left of the bar */
div:has(> [data-testid="model-selector-button"]) { flex: none !important; width: auto !important; min-width: 0 !important; max-width: none !important; }
div:has(> .ins-tytul) { flex: 1 1 auto; min-width: 0; }
.ins-tytul-napis { font-family: 'Newsreader', Georgia, serif !important; }

/* drag and drop */
[data-testid="convo-item"], .ins-folder, .ins-folder-rozmowa { -webkit-user-select: none; user-select: none; }
.ins-cel { outline: 2px solid #D6B06C; outline-offset: -2px; border-radius: 8px; }
/* chat search at the top of the list; while searching only the results show */
.ins-szukaj { width: 100%; height: 36px; margin-bottom: 6px; padding: 0 10px; border: 1px solid #2C3139 !important; border-radius: 9px; font-size: 14px; outline: 0; }
.ins-szukaj:focus { border-color: #D6B06C !important; }
.ins-szukaj::placeholder { color: #A6ADB8; }
.ins-wyniki { max-height: 60vh; overflow-y: auto; }
.ins-wynik { display: block; padding: 7px 10px; border-radius: 7px; }
.ins-wynik-tytul, .ins-wynik-cytat { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-wynik-tytul { font-size: 14px; color: #E9EBEE !important; }
.ins-wynik-cytat { margin-top: 2px; font-size: 12.5px; color: #A6ADB8 !important; }
.ins-wynik:hover { background: #262A31; }
html.ins-szuka .ins-foldery-glowa, html.ins-szuka .ins-foldery-drzewo, html.ins-szuka :is(aside, [data-ins-szyna]) nav div.flex-grow { display: none !important; }
/* the top bar lies over the scrolling chat: a solid strip, or the text runs under the chat name */
[class*="via-presentation"]:has([data-testid="model-selector-button"]) { background: #FFFFFF !important; background-image: none !important; opacity: 1 !important; }
html.dark [class*="via-presentation"]:has([data-testid="model-selector-button"]) { background: #121418 !important; }
/* LibreChat's top row of the list (its own search box, bookmarks): ours replaces it in every state of the page */
:is(aside, [data-ins-szyna]) nav div[aria-label].flex-col.overflow-hidden > div.items-center.px-3 { display: none !important; }
.ins-szukaj::-webkit-search-cancel-button { filter: grayscale(1) brightness(1.8); }
/* what follows the cursor while dragging: the chat's name on a small plate */
.ins-ciagniety { position: fixed; top: -100px; left: -400px; max-width: 280px; padding: 8px 12px; border: 1px solid #D6B06C; border-radius: 9px; background: #1B1E23; color: #E9EBEE; font: 500 14px/1.2 'Instrument Sans', system-ui, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* only our selection bubble: LibreChat's own "Add to chat" opened in the same place */
button[aria-label="Add to chat"], button[aria-label="Dodaj do czatu"] { display: none !important; }
/* the reader never sees tools at work, also while the answer is being written */
.agent-turn div.relative.shrink-0:has(.progress-text-wrapper) { display: none !important; }
/* the bot's name stands apart from the answer: a hairline with a small gold paragraph sign */
.agent-turn > h2 { position: relative; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--ins-linia); }
.agent-turn > h2::after { content: "§"; position: absolute; left: 0; bottom: -10px; padding-right: 8px; background: #FFFFFF; color: var(--ins-zloto-tekst); font: 500 13px/18px 'Newsreader', Georgia, serif; }
html.dark .agent-turn > h2::after { background: #121418; }
.agent-turn .markdown > p.ins-sekcja:first-child, .agent-turn .markdown > p.ins-ukryte + p.ins-sekcja { border-top: 0; padding-top: 0; margin-top: 0; }
/* waiting: three gold dots in a slow wave, the seal breathes */
.agent-turn.ins-czeka > div { height: 0; overflow: hidden; visibility: hidden; }
.agent-turn.ins-czeka::after { content: ""; display: block; width: 40px; height: 18px; margin: 2px 0 8px; --kropka: no-repeat radial-gradient(circle closest-side, #C9A25E 92%, #0000);
  background: var(--kropka) 0% 50%, var(--kropka) 50% 50%, var(--kropka) 100% 50%; background-size: 8px 8px; animation: ins-fala 1.25s ease-in-out infinite; }
@keyframes ins-fala { 0%, 100% { background-position: 0% 50%, 50% 50%, 100% 50%; } 20% { background-position: 0% 10%, 50% 50%, 100% 50%; } 40% { background-position: 0% 70%, 50% 10%, 100% 50%; }
  60% { background-position: 0% 50%, 50% 70%, 100% 10%; } 80% { background-position: 0% 50%, 50% 50%, 100% 70%; } }
div.group:has(> .agent-turn.ins-czeka) > div:first-child img { animation: ins-oddech 1.8s ease-in-out infinite; }
@keyframes ins-oddech { 50% { transform: scale(1.1); opacity: .72; } }
@media (prefers-reduced-motion: reduce) { .agent-turn.ins-czeka::after, div.group:has(> .agent-turn.ins-czeka) > div:first-child img { animation: none; } }

/* Scrollbars: Windows draws wide grey bars with arrows by default. The ::-webkit rules give a thin rounded thumb without
   arrows; setting scrollbar-width as well would switch them off in Chrome, so it stays for Firefox only. */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-thumb { background: var(--ins-linia-mocna); background-clip: padding-box; border: 2px solid transparent; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--ins-tekst-2); background-clip: padding-box; border: 2px solid transparent; }
:is(aside, [data-ins-szyna]) ::-webkit-scrollbar-thumb, :is(aside, [data-ins-szyna])::-webkit-scrollbar-thumb { background: #3A3F47; background-clip: padding-box; }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: var(--ins-linia-mocna) transparent; } }
/* Footer notice and Privacy/Terms links off while only our testers use it (Piotr 05.11) */
[role="contentinfo"] { display: none !important; }
/* the page behind the floating sidebar panel: LibreChat's #212121 showed as a grey strip beside it in dark mode */
html.dark body { background-color: #121418 !important; }
/* Help submenu off for now (Piotr 05.11): the FAQ link and the shortcut list are not ours */
[role="menu"]:has([data-testid="nav-settings"]) > [role="menuitem"][aria-haspopup="menu"] { display: none !important; }
/* Settings: only what our chat uses (Piotr 05.11). Hidden: options for features switched off in librechat.yaml
   (endpoints, memories, shared links, user API keys, badges), developer switches and read-aloud. A row is the
   section's grandchild holding the option's label; a whole section goes when nothing in it is ours */
[role="tabpanel"] section > div > :is(:has(#chat-direction-label), :has(#centerFormOnLanding-label), :has(#showBadges-label),
  :has(#atCommand-label), :has(#latexParsing-label), :has(#autoExpandTools-label), :has(#newChatSwitchToHistory-label),
  :has(#modularChat-label), :has(#remember-default-fork-label), :has(#split-at-target-label), :has(#alwaysMakeProd-label),
  :has(#engine-stt-dropdown-label), :has(#decibel-selector-label), :has(#shared-links-label), :has(#delete-cache-label)),
[role="tabpanel"] section:is(:has(#keepScreenAwake-label), :has(#TextToSpeech-label), :has(#reference-saved-memories-label),
  :has(#revoke-info-label), :has(#delete-account-label)) { display: none !important; }
/* the profile row: name centred and given the whole width, the picture beside it */
[data-testid="nav-user"] { justify-content: center !important; }
[data-testid="nav-user"]::after { font-size: 16px; letter-spacing: .01em; }
