/* The pages' own look, ported from the old product (engine/public loader.css, wiki.css,
   experience.css, admin.css; ADR 0029). The shell (sidebar, header, Rozmowa) is styles.css.
   Values are the old product's, not re-derived. */

:root { --raised: #f1f0e9; --hover: #e9e8e0; --olive-ink: #505b37; --danger-soft: #f6e9e4; --control: #cbcdbd; --field: #fffef8; }

/* ---- Loading, progress and failure (loader.css, loading.js) ---- */
.q-spinner { display: inline-block; width: 1em; height: 1em; flex: none; vertical-align: -.15em; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--olive); animation: q-spin .8s linear infinite; }
.q-skeleton { display: block; min-height: .9em; margin: .35em 0; border-radius: 6px; color: transparent; background: linear-gradient(90deg, var(--raised) 25%, var(--sage) 50%, var(--raised) 75%) 0 0/200% 100%; animation: q-shimmer 1.4s ease-in-out infinite; }
.q-skeleton.title { height: 1.4em; width: 45%; }
.q-skeleton.line { height: .9em; }
.q-skeleton.line:last-child { width: 70%; }
.q-skeleton.line.q-skeleton-medium { width: 58%; }
.q-skeleton.line.q-skeleton-short { width: 30%; }
.q-loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 96px; padding: 24px; color: var(--muted); }
.q-loading .q-spinner { width: 22px; height: 22px; border-width: 3px; }
.q-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.q-busy { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: progress; }
.q-busy .q-spinner { border-color: currentColor; border-top-color: transparent; opacity: .8; }
.q-error { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin: 16px 0; padding: 12px 16px; border: 1px solid var(--line); border-left: 3px solid var(--danger); border-radius: 7px; background: var(--surface); color: var(--ink); }
.q-error p { margin: 0; font-size: 14px; line-height: 1.55; }
.q-error button { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; min-height: 34px; padding: 5px 13px; font: 600 13px/1.5 var(--sans); }
.q-error button:hover { background: var(--sage); border-color: var(--olive); }
.q-placeholder { width: 100%; padding-top: 4px; }
.q-placeholder-article { min-height: 360px; }
.q-skeleton-paragraph { margin: 18px 0 26px; }
.q-skeleton-feature { max-width: 720px; padding: 12px 0 14px; }
.q-skeleton-rows > div { padding: 12px 0; border-top: 1px solid var(--line); }
.q-skeleton-cards { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
.q-skeleton-cards > div { border: 1px solid var(--line); border-radius: 8px; background: var(--raised); padding: 24px; }
.q-enter { animation: q-enter 200ms var(--ease) both; }
.q-pop { animation: q-pop 180ms var(--ease) both; }
@keyframes q-spin { to { transform: rotate(360deg); } }
@keyframes q-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes q-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes q-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes q-reveal { from { opacity: .68; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 720px) { .q-skeleton-cards { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .q-spinner { animation-duration: 2.4s; } .q-skeleton { animation: none; } .q-enter, .q-pop, .wk-view { animation: none; } }

/* ---- Wiedza (wiki.css, its final cascade) ---- */
.wk { --wk-muted: #64695b; --wk-wide: 1200px; --wk-measure: 70ch; --wk-toc: 220px; font-family: var(--sans); color: var(--ink); font-size: 15px; line-height: 1.65; padding: 35px 42px 45px; }
/* One page frame with Firma (experience.css): the heading, its eyebrow and lede. */
.wk .page-heading { padding: 0; margin: 0 0 28px; }
.wk .page-heading .eyebrow { display: block; font: 600 11px/1.55 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--wk-muted); margin: 0 0 10px; }
.wk .page-heading h1 { font: 400 clamp(38px, 3.8vw, 54px)/1.05 var(--serif); letter-spacing: -1.2px; margin: 0; padding: 0; border: 0; color: var(--ink); }
.wk .page-heading p { font: 400 14px/1.7 var(--sans); color: var(--wk-muted); margin: 12px 0 0; }
.wk * { box-sizing: border-box; }
.wk-view { animation: q-reveal 190ms var(--ease); }
.wk a { color: var(--olive); text-decoration: none; text-underline-offset: 3px; }
.wk a:hover { text-decoration: underline; }
.wk a:focus-visible, .wk button:focus-visible, .wk input:focus-visible, .wk select:focus-visible, .wk summary:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }
.wk h1, .wk h2 { font-family: var(--serif); font-weight: 400; line-height: 1.3; color: var(--ink); }
.wk h1 { font-size: 42px; margin: 6px 0 10px; border-bottom: 1px solid var(--line); padding-bottom: 8px; letter-spacing: -.025em; }
.wk h2 { font-size: 28px; border-bottom: 1px solid var(--line); padding-bottom: 5px; margin: 28px 0 12px; letter-spacing: -.015em; }
.wk h3 { font: 600 16px/1.45 var(--sans); margin: 16px 0 7px; }
.wk p { margin: 10px 0 15px; }
.wk ul, .wk ol { padding-left: 26px; margin: 10px 0 18px; }
.wk li { margin: 6px 0; }
.wk strong { font-weight: 700; }
.wk sup { line-height: 0; font-size: 11px; white-space: nowrap; margin-left: 2px; }
.wk sup a { font-weight: 600; }
.wk button, .wk-button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 7px; min-height: 34px; padding: 5px 13px; font: 600 13px/1.5 var(--sans); cursor: pointer; }
.wk-button { display: inline-block; text-decoration: none !important; }
.wk button:hover, .wk-button:hover { background: var(--sage); border-color: var(--olive); }
.wk-tools { display: flex; align-items: center; gap: 24px; margin-bottom: 24px; }
.wk-tools-compact { margin-bottom: 18px; }
.wk-back { font-size: 12px; white-space: nowrap; }
#wk-search { display: flex; align-items: center; flex: 1; padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); gap: 10px; }
#wk-search input { flex: 1; min-width: 80px; border: 0; border-radius: 0; background: transparent; height: 32px; padding: 0; font: 13px var(--sans); color: var(--ink); }
#wk-search input:focus-visible { box-shadow: none; outline: 0; }
#wk-search input::-webkit-search-cancel-button { display: none; }
#wk-search:focus-within { border-color: #939f78; }
#wk-search .wk-clear { border: 0; background: transparent; color: var(--wk-muted); font-size: 20px; line-height: 1; padding: 0 4px; min-height: 28px; }
#wk-search .wk-clear:hover { color: var(--ink); background: transparent; }
.wk-new { font-size: 12px; white-space: nowrap; }
.wk-tabs { display: flex; flex-wrap: nowrap; gap: 24px; border-bottom: 1px solid var(--line); margin: 0 0 26px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.wk-tabs::-webkit-scrollbar { display: none; }
.wk .wk-tabs a { padding: 10px 0 12px; font: 500 13.5px/1.4 var(--sans); color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; transition: color 160ms ease, border-color 160ms ease; }
.wk .wk-tabs a:hover { color: var(--ink); text-decoration: none; }
.wk .wk-tabs a[aria-current] { color: var(--ink); border-color: var(--olive); font-weight: 600; }
.wk .wk-tabs a > span { display: inline-block; min-width: 20px; margin-left: 5px; padding: 0 6px; border-radius: 9px; font: 500 11px/18px var(--sans); text-align: center; background: var(--sage); color: var(--olive-ink); }
.wk-loading-search { height: 54px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); margin: 0 0 26px; }
.wk-page-heading > p { color: var(--wk-muted); }
.wk-collection .wk-page-heading h1 { font-size: clamp(30px, 3vw, 38px); }
.wk-cutoff { font-size: 13px; line-height: 1.6; padding: 11px 15px; border-left: 3px solid var(--olive); border-radius: 0 7px 7px 0; background: var(--surface); margin: 18px 0 24px; }
.wk-empty { padding: 40px 0; color: var(--wk-muted); }
.wk-date { font-size: 12px; color: var(--wk-muted); }
.wk-footer, .wk-article-footer { font-size: 11px; color: var(--wk-muted); border-top: 1px solid var(--line); padding-top: 17px; margin-top: 35px; clear: both; }
.wk-footer { margin-top: 45px; }
.wk-reading-layout + .wk-footer { border-top: 0; }

/* Portal */
.wk-portal-columns { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(230px, 1fr); gap: 42px; margin: 30px 0; }
.wk-feature h2 { margin: 6px 0 16px; border: 0; font-size: 29px; }
.wk-feature h2 a { color: var(--ink); }
.wk-small-heading { font-size: 12px; color: var(--wk-muted); letter-spacing: .7px; text-transform: uppercase; }
.wk-latest { border-left: 1px solid var(--line); padding-left: 27px; font-size: 14px; }
.wk-latest h2 { font: 600 15px var(--sans); border: 0; margin: 0 0 18px; }
.wk-latest h3 { margin-top: 8px; }
.wk-latest hr { border: 0; border-top: 1px solid var(--line); margin: 25px 0; }
.wk .wk-recent { list-style: none; padding: 0; margin: 8px 0 4px; display: grid; gap: 10px; }
.wk .wk-recent li { margin: 0; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.wk-recent small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.wk-directory ul { list-style: none; padding: 0; }
.wk-directory .wk-directory-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.wk-directory .wk-directory-heading h2 { flex: 1; border: 0; margin: 12px 0; }
.wk-directory-heading > a { font-size: 12px; }
.wk-directory h3 { font: 600 13px/1.4 var(--sans); letter-spacing: .6px; text-transform: uppercase; color: var(--wk-muted); margin: 0 0 14px; }
.wk-directory li { margin-bottom: 18px; }
.wk-directory li > a { font-size: 16px; }
.wk-directory li p { font-size: 13px; line-height: 1.6; color: var(--wk-muted); margin: 4px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wk-directory-groups { display: grid; gap: 30px; }
.wk-directory-group ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 36px; row-gap: 4px; margin: 0; }
.wk-count { font: 500 11px/18px var(--sans); letter-spacing: 0; padding: 0 6px; border-radius: 9px; background: var(--sage); color: var(--olive-ink); margin-left: 4px; }
.wk-directory-more { display: inline-block; font-size: 13px; margin-top: 2px; }

/* All articles */
.wk-filters { display: flex; gap: 15px; align-items: flex-end; margin: 26px 0 20px; flex-wrap: wrap; }
.wk-filters label { font-size: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 135px; }
.wk-filters input, .wk-filters select { height: 36px; padding: 6px 9px; border: 1px solid var(--line); background: var(--surface); border-radius: 7px; font: 14px var(--sans); color: var(--ink); }
.wk-filters > a { font-size: 12px; align-self: center; }
.wk-result-count { font-size: 12px; color: var(--wk-muted); }
.wk-article-index { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0 30px; list-style: none; padding: 0 !important; margin: 20px 0 !important; }
.wk-article-index li { min-width: 0; margin: 0; padding: 0; flex: 0 1 calc((100% - 60px) / 3); }
.wk-index-link { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; min-height: 118px; width: 100%; padding: 16px 12px; border-top: 1px solid var(--line); border-radius: 4px; text-decoration: none !important; transition: background-color 160ms ease, box-shadow 160ms ease; }
.wk-index-link:hover, .wk-index-link:focus-visible { background: var(--sage); box-shadow: inset 3px 0 var(--olive); }
.wk-index-link h2 { font: 500 16px/1.5 var(--sans); letter-spacing: 0; margin: 0; padding: 0; border: 0; color: var(--olive); }
.wk-index-link p { font-size: 13px; line-height: 1.65; margin: 6px 0 0; color: var(--wk-muted); }
.wk-index-link > span { font-size: 11px; color: var(--wk-muted); white-space: nowrap; }

/* An article: a reading column with its information box beside the text. */
.wk-reading-layout { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 28px; }
.wk-toc { position: sticky; top: 20px; align-self: start; font-size: 13px; line-height: 1.45; max-height: calc(100vh - 160px); overflow: auto; padding: 12px 0; }
.wk-toc strong { display: block; border-bottom: 1px solid var(--line); padding: 0 0 12px; margin-bottom: 8px; }
.wk-toc a { display: block; margin: 12px 0; }
.wk-toc a:hover { color: var(--ink); }
.wk-article { min-width: 0; font-size: 15px; }
.wk-reading-layout .wk-article { margin-inline: 0; max-width: none; width: 100%; }
.wk-article :is(p, li, blockquote):not(.wk-infobox *, .wk-references *) { max-width: var(--wk-measure); }
.wk-article p a:not(sup a), .wk-infobox dd a:not(sup a) { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--olive) 45%, transparent); }
.wk-breadcrumb { font-size: 12px; color: var(--wk-muted); margin-bottom: 8px; }
.wk-article-tabs { display: flex; gap: 20px; align-items: center; border-bottom: 1px solid var(--line); font-size: 12px; }
.wk-article-tabs > * { padding: 5px 0 9px; }
.wk-article-tabs span { border-bottom: 2px solid var(--olive); color: var(--olive); }
.wk-article-tabs a:hover { color: var(--ink); text-decoration: none; }
.wk-subtitle { font-size: 12px; color: var(--wk-muted); margin-bottom: 20px !important; }
.wk-subtitle:empty { display: none; }
.wk-infobox { float: right; width: 260px; margin: 6px 0 20px 28px; border: 1px solid var(--line); border-radius: 8px; padding: 15px; background: var(--raised); font-size: 12px; line-height: 1.6; }
.wk-infobox h2 { background: transparent; text-align: left; padding: 0 0 10px; margin: 0 0 13px; border-bottom: 1px solid var(--line); font-family: var(--serif); font-size: 25px; font-weight: 400; }
.wk-infobox dl { display: grid; grid-template-columns: 90px 1fr; gap: 10px; margin: 8px 4px; }
.wk-infobox dt { font-weight: 700; }
.wk-infobox dd { margin: 0; }
.wk-article h2[id], .wk-article h3[id], .wk-article section { scroll-margin-top: 15px; }
.wk-article blockquote { margin: 20px 24px; padding-left: 17px; border-left: 3px solid var(--line); }
.wk-mobile-toc { display: none; }
.wk-references { clear: both; }
.wk-references p { font-size: 13px; line-height: 1.6; margin: 8px 0; overflow-wrap: anywhere; }
.wk-references .wk-src-label { color: var(--ink); }
.wk-references p:target { background: color-mix(in srgb, var(--sage) 70%, transparent); border-radius: 4px; }
.wk-related ul { font-size: 15px; }
.wk-backlinks { clear: both; }
.wk-backlinks ul { columns: 2; column-gap: 32px; font-size: 14px; }
.wk-backlinks li { break-inside: avoid; margin-bottom: 8px; }
.wk-article .table-wrap, .wk-table-wrap { overflow: auto; }
.wk-article table { border-collapse: collapse; font-size: 13px; width: 100%; margin: 15px 0 24px; }
.wk-article td, .wk-article th { border: 1px solid var(--line); padding: 9px 12px; vertical-align: top; text-align: left; }
.wk-article th { background: var(--sage); }
.wk-article td { background: var(--surface); }

/* Sources: rows, one source's readable view. */
.wk-collection { max-width: none; margin-inline: 0; }
.wk-source-row { display: grid; grid-template-columns: 125px minmax(0, 1fr); gap: 20px; border-top: 1px solid var(--line); padding: 19px 12px; color: var(--ink) !important; text-decoration: none !important; transition: background-color 160ms ease, box-shadow 160ms ease; }
.wk-source-row:hover, .wk-source-row:focus-visible { background: color-mix(in srgb, var(--sage) 40%, transparent); box-shadow: inset 3px 0 var(--olive); }
.wk-source-type { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--wk-muted); padding-top: 3px; }
.wk-source-type span { font-size: 11px; font-weight: 400; letter-spacing: 0; text-transform: none; display: block; margin-top: 5px; }
.wk-source-row h3 { font-size: 17px; font-weight: 500; margin: 0 0 5px; color: var(--ink); }
.wk-source-row:hover h3 { color: var(--olive); }
.wk-source-row p { margin: 3px 0 5px; font-size: 13px; line-height: 1.55; }
.wk-source-heading h1 { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.2; border-bottom: 0; padding-bottom: 0; text-wrap: balance; overflow-wrap: anywhere; }
.wk-source-metadata { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 25px; border-block: 1px solid var(--line); padding: 20px 0; font-size: 13px; margin: 0; }
.wk-source-metadata dt { font-size: 11px; color: var(--wk-muted); margin-bottom: 4px; }
.wk-source-metadata dd { margin: 0; overflow-wrap: anywhere; }
.wk-source-actions { display: flex; gap: 22px; align-items: center; font-size: 13px; margin: 22px 0; }
.wk-source-prose { font-size: 14px; line-height: 1.75; overflow-wrap: anywhere; max-width: var(--wk-wide); }
.wk-source-prose > p { white-space: pre-wrap; max-width: var(--wk-measure); }
.wk-source-attachments { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 18px; font-size: 13px; }
.wk-source-attachments h3 { font-size: 11px; font-weight: 500; color: var(--wk-muted); margin: 0 0 10px; }
.wk-source-attachments ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wk-source-attachments li { display: flex; gap: 10px; align-items: baseline; overflow-wrap: anywhere; }
.wk-source-attachments small { color: var(--wk-muted); font-size: 11px; white-space: nowrap; }

/* Search */
.wk-search-result { display: block; border-bottom: 1px solid var(--line); padding: 18px 8px; color: var(--ink); overflow-wrap: anywhere; transition: background-color 160ms ease; }
.wk-search-result:hover { background: color-mix(in srgb, var(--sage) 40%, transparent); }
.wk-search-result h3 { font-weight: 400; font-size: 19px; color: var(--olive); margin: 0 0 6px; }
.wk-search-result small { font-size: 12px; color: var(--wk-muted); }
.wk-passage { font-size: 14px; }

/* History and differences */
.wk-history-list h2 { font-size: 21px; }
.wk-history-row { display: grid; grid-template-columns: 55px minmax(0, 1fr) auto; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.wk-history-list .wk-history-row:last-child { border-bottom: 0; }
.wk-history-row time { font-size: 12px; color: var(--wk-muted); padding-top: 5px; }
.wk-history-row h3 { font-size: 15px; margin: 0 0 6px; font-weight: 400; }
.wk-history-row p { font: 12.5px/1.6 var(--sans); color: var(--wk-muted); overflow-wrap: anywhere; margin: 5px 0; }
.wk-history-row small { font-size: 11px; color: var(--wk-muted); }
.wk-diff-link { font-size: 12px; align-self: start; padding-top: 4px; }
.wk-revisions .wk-history-row { grid-template-columns: 150px minmax(0, 1fr) auto; }
.wk-revisions .wk-history-row.current { background: color-mix(in srgb, var(--sage) 45%, transparent); }
.wk-diff { border: 1px solid var(--line); overflow: auto; font: 12px/1.65 ui-monospace, SFMono-Regular, monospace; max-width: var(--wk-wide); margin-top: 12px; }
.wk-diff-caption { font: 400 21px/1.3 var(--serif); margin: 28px 0 0; }
.wk-diff-row, .wk-diff-header { display: grid; grid-template-columns: 40px 40px minmax(0, 1fr); min-width: 500px; }
.wk-diff-header { background: var(--sage); padding-block: 7px; font-size: 11px; }
.wk-diff-row > span, .wk-diff-header > span { padding: 3px 6px; text-align: right; color: var(--wk-muted); border-right: 1px solid var(--sage); user-select: none; }
.wk-diff-header > span:last-child { text-align: left; padding-left: 15px; }
.wk-diff-row code { padding: 3px 12px; white-space: pre-wrap; overflow-wrap: anywhere; display: flex; gap: 12px; }
.wk-diff-row code b { font-weight: 400; flex-shrink: 0; }
.wk-diff-add { background: #e6ffed; }
.wk-diff-remove { background: #ffebe9; }
.wk-diff-collapsed { padding: 8px 15px 8px 90px; background: var(--sage); font-size: 11px; border-block: 1px solid var(--line); }

/* The editor follows the article's reading rhythm. */
.wk-editor { max-width: none; margin: 0; }
.wk-editor-row { display: flex; gap: 16px; flex-wrap: wrap; }
.wk-editor-row > .wk-field { flex: 1; min-width: 200px; }
.wk-field { display: grid; gap: 6px; margin: 10px 0; font-size: 13px; color: var(--muted); }
.wk-field input, .wk-field select, .wk-editor-body { width: 100%; min-width: 0; border: 1px solid var(--control); border-radius: 7px; padding: 10px 12px; background: var(--surface); color: var(--ink); font: 15px/1.6 var(--sans); }
.wk-editor-body { display: block; min-height: max(360px, calc(100vh - 380px)); resize: vertical; font: 13px/1.7 ui-monospace, SFMono-Regular, monospace; margin: 10px 0; }
.wk-editor-tabs { display: flex; gap: 10px; margin-top: 14px; }
.wk-editor-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); margin-top: 14px; }
.wk-editor-actions .primary { background: var(--olive); border-color: var(--olive); color: #fff; }
.wk-editor-actions .primary:hover { background: var(--ink); }
.wk-editor-actions .spacer { flex: 1; }
.wk-editor .danger { color: var(--danger); }
.wk-preview { max-width: var(--wk-measure); margin: 28px 0; }
.wk-draft, .wk-uncited { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 14px 0; padding: 10px 14px; border-left: 3px solid var(--olive); border-radius: 0 7px 7px 0; background: var(--sage); font-size: 14px; }
.wk-uncited { display: block; }
.wk-uncited ul { margin: 6px 0; }
.wk-uncited q { color: var(--ink); }
.wk-cite-pick button { min-height: 26px; padding: 1px 8px; font-size: 12px; margin: 2px 4px 2px 0; }
.wk .error-text { color: var(--danger); font-size: 13px; }

@media (min-width: 1151px) { .wk-reading-layout { grid-template-columns: var(--wk-toc) minmax(0, calc(var(--wk-measure) + 340px)); gap: 40px; } }
@media (min-width: 1500px) { .wk { padding: 45px 55px; } .wk-article { font-size: 16px; } .wk-infobox { width: 285px; } }
@media (max-width: 1200px) { .wk { padding: 32px 28px 40px; } }
@media (max-width: 1150px) {
  .wk-reading-layout { grid-template-columns: 1fr; }
  .wk-toc { display: none; }
  .wk-mobile-toc { display: block; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 20px 0; clear: both; font-size: 13px; max-width: 350px; }
  .wk-mobile-toc summary { cursor: pointer; font-weight: 600; }
  .wk-mobile-toc a { display: block; margin: 8px 0; }
  .wk-directory-group ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1050px) { .wk-article-index li { flex-basis: calc((100% - 30px) / 2); } }
@media (max-width: 760px) { .wk { padding: 26px 22px 36px; } .wk .page-heading h1 { font-size: 38px; letter-spacing: -.8px; } .wk .wk-tabs { gap: 20px; margin-bottom: 22px;  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); padding-right: 32px; } }
@media (max-width: 720px) {
  .wk h1 { font-size: 34px; }
  .wk h2 { font-size: 26px; }
  .wk-tools { flex-wrap: wrap; gap: 14px; }
  #wk-search { flex-basis: 100%; }
  .wk-portal-columns { grid-template-columns: 1fr; gap: 28px; }
  .wk-latest { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 24px; }
  .wk-directory li { margin-bottom: 17px; }
  .wk-directory-group ul { grid-template-columns: 1fr; }
  .wk-directory .wk-directory-heading { gap: 0; }
  .wk-directory .wk-directory-heading h2 { flex-basis: 100%; }
  .wk-article-index li { flex-basis: 100%; }
  .wk-infobox { float: none; width: 100%; margin: 20px 0; }
  .wk-infobox dl { grid-template-columns: 115px 1fr; }
  .wk-article { font-size: 15px; }
  .wk-article-tabs { gap: 16px; }
  .wk-backlinks ul { columns: 1; }
  .wk-source-row { grid-template-columns: 1fr; gap: 6px; }
  .wk-source-type { display: flex; gap: 12px; align-items: center; }
  .wk-source-type span { margin: 0; }
  .wk-filters { gap: 12px; }
  .wk-filters label:first-child { flex-basis: 100%; }
  .wk-source-metadata { grid-template-columns: 1fr; }
  .wk-source-actions { flex-wrap: wrap; gap: 15px; }
  .wk-history-row, .wk-revisions .wk-history-row { grid-template-columns: 45px 1fr; gap: 10px; }
  .wk-revisions .wk-history-row { grid-template-columns: 1fr; }
  .wk-diff-link { grid-column: 2; }
  .wk-diff-row, .wk-diff-header { grid-template-columns: 36px 36px minmax(0, 1fr); min-width: 0; font-size: 10px; }
  .wk-diff-row code { gap: 5px; padding: 3px 6px; }
  .wk-diff-collapsed { padding-left: 12px; }
  .wk-footer { line-height: 1.6; }
}
.wk-source-more { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 25px 0; }
.wk-source-more span { font-size: 12px; color: var(--wk-muted); }
.wk-source-more button { min-height: 40px; padding-inline: 20px; }

/* A Wiedza page in a drawer over Firma (experience.css): the article without its own navigation. */
dialog.wk-drawer-dialog { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(760px, 100vw); max-width: 100vw; padding: 0; border: 0; border-left: 1px solid var(--line); border-radius: 0; color: var(--ink); background: var(--paper); box-shadow: 0 20px 80px #252c1c26; overflow: hidden; animation: q-slide .3s var(--ease); }
dialog.wk-drawer-dialog[open] { display: flex; flex-direction: column; }
dialog.wk-drawer-dialog::backdrop { background: #29302138; backdrop-filter: blur(3px); }
.wk-drawer-dialog .dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 23px 26px 19px; border-bottom: 1px solid var(--line); background: var(--paper); }
.wk-drawer-dialog .dialog-header h2 { font: 400 25px/1.25 var(--serif); margin: 0; }
.wk-drawer-dialog .dialog-body { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; padding: 25px 27px 30px; }
.wk-drawer-dialog .dialog-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 26px; border-top: 1px solid var(--line); background: var(--paper); }
.wk-drawer-dialog .button { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 7px; font: 500 14px/1 var(--sans); }
.wk-drawer-dialog .button.dark { background: var(--ink); color: var(--surface); }
.wk-drawer-dialog .button.dark:hover { background: #454c37; }
.wk.wk-drawer { padding: 0; }
.wk-drawer .wk-tools, .wk-drawer .wk-tabs, .wk-drawer .wk-toc, .wk-drawer .wk-breadcrumb, .wk-drawer .wk-article > h1, .wk-drawer .wk-article-tabs, .wk-drawer .wk-mobile-toc, .wk-drawer .wk-infobox > h2, .wk-drawer .wk-source-heading h1 { display: none; }
.wk-drawer .wk-reading-layout { display: block; }
.wk-drawer .wk-infobox { float: none; width: auto; margin: 0 0 24px; }
.wk-drawer .wk-article { font-size: 15.5px; }
@keyframes q-slide { from { opacity: 0; transform: translateX(35px); } to { opacity: 1; transform: none; } }

/* Panel pages (Aplikacje AI, Twoje konto, administration): the old product's page frame
   (experience.css .page-heading, .section-card; admin.css widths), entering as its views did. */
.content { max-width: 1040px; padding: 35px 42px 45px; animation: q-reveal 190ms var(--ease); }
.content .page-title { font: 400 clamp(38px, 3.8vw, 54px)/1.05 var(--serif); letter-spacing: -1.2px; margin: 0; color: var(--ink); }
.content .page-lead, .content .ai-lead { font: 400 14px/1.7 var(--sans); color: #64695b; margin: 12px 0 28px; max-width: 70ch; }
.content > .page-title + :not(.page-lead):not(.ai-lead) { margin-top: 28px; }
.content .section-card { border: 1px solid var(--line); border-radius: 8px; padding: 20px; background: var(--raised); margin-bottom: 24px; }
.content .section-card h2 { font: 400 27px var(--serif); letter-spacing: -.3px; margin-bottom: 17px; }
.content .q-placeholder, .content .q-error { margin-bottom: 24px; }
@media (max-width: 1200px) { .content { padding: 32px 28px 40px; } }
@media (max-width: 760px) { .content { padding: 26px 22px 36px; } .content .page-title { font-size: 38px; letter-spacing: -.8px; } }
@media (prefers-reduced-motion: reduce) { .content { animation: none; } }
.content .settings-identity { display: flex; align-items: center; gap: 12px; margin: 22px 0 24px; }
.content .settings-identity .avatar { width: 40px; height: 40px; font-size: 14px; }
.content .settings-identity strong { display: block; font-size: 15px; font-weight: 550; }
.content .settings-identity small { font-size: 12.3px; color: #64695b; }
.wk-drawer-dialog .dialog-header .eyebrow { font: 600 11px/1.55 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #64695b; margin-bottom: 4px; }
