/* zawodyprzyszlosci.pl: kartoteka poradni zawodowej. Blat w kolorze teczki
   (manila), karton kart, atrament granatowy, czerwona linia nagłówka karty
   i niebieskie liniowanie. Roboto Slab na nagłówki, Source Sans 3 na tekst,
   Roboto Mono tylko na liczby. */
@font-face { font-family: "Roboto Slab"; src: url("/fonts/roboto-slab-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Roboto Slab"; src: url("/fonts/roboto-slab-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+1E00-1E9F, U+2020, U+20A0-20AB, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/source-sans-3-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0100-02BA, U+1E00-1E9F, U+2020, U+20A0-20AB, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Roboto Mono"; src: url("/fonts/roboto-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Roboto Mono"; src: url("/fonts/roboto-mono-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 700; font-display: swap; unicode-range: U+0100-02BA, U+1E00-1E9F, U+2020, U+20A0-20AB, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --desk: #d9b877;
  --desk-2: #c9a45e;
  --tab: #ecd9ae;
  --card: #fbf7ec;
  --slip: #dfe8ee;
  --ink: #1a2440;
  --ink-2: #414a61;
  --ink-3: #5d6578;
  --on-desk: #2a2210;
  --on-desk-2: #4a3c1c;
  --red: #b2281f;
  --rule: #a9bdd2;
  --edge: rgba(26, 36, 64, 0.26);
  --hair: rgba(26, 36, 64, 0.12);
  --slab: "Roboto Slab", Rockwell, Georgia, serif;
  --body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Roboto Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --lift: 0 1px 0 rgba(74, 52, 8, 0.28), 0 10px 18px -14px rgba(58, 40, 4, 0.7);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--desk); -webkit-text-size-adjust: 100%; scrollbar-color: #8a6a2c var(--desk-2); scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.58;
  overflow-wrap: break-word;
  caret-color: var(--red);
}
::selection { background: var(--ink); color: var(--card); }
a { color: var(--ink); text-decoration-color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 0.2em; transition: color 140ms var(--ease), background-color 140ms var(--ease); }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 2px; }
p, ul, ol, figure, h1, h2, h3 { margin: 0; }
ul, ol { padding: 0; }

.sr, .skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip-path: none; padding: 8px 12px; background: var(--card); z-index: 5; }

.wrap { max-width: 1216px; margin: 0 auto; padding: 0 12px; }

/* Nagłówek: tabliczka szuflady i zakładki kart przewodnich */
.top { padding-top: 20px; }
.plate { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 0 4px 20px; }
.name { display: inline-block; padding: 6px 16px 7px; background: var(--card); border: 2px solid #6e5320; border-radius: 3px; box-shadow: inset 0 0 0 3px var(--card), inset 0 0 0 4px var(--hair); font-family: var(--slab); font-weight: 600; font-size: 24px; line-height: 1.2; color: var(--ink); text-decoration: none; }
.name:hover { color: var(--red); }
.by { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--on-desk); }
.by a { color: inherit; text-decoration: none; }
.by a:hover { text-decoration: underline; color: inherit; }
.by span { display: inline-flex; }
.tabs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 3px; }
.tabs a { flex: 1 1 auto; padding: 9px 14px 8px; background: var(--tab); border: 1px solid var(--edge); border-bottom: 0; border-radius: 7px 7px 0 0; font-family: var(--slab); font-weight: 500; font-size: 14.5px; line-height: 1.3; color: var(--on-desk); text-decoration: none; white-space: nowrap; }
.tabs a:hover { background: var(--card); color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: inset 0 3px 0 var(--red); }

/* Arkusz: karta przewodnia, na której leży tekst */
main.wrap { padding-bottom: 56px; }
.sheet { background: var(--card); border-radius: 3px; padding: 28px 20px 36px; box-shadow: var(--lift); }
.sheet.first { border-top-left-radius: 0; border-top-right-radius: 0; }
.sheet + .ulsa, .index + .sheet { margin-top: 40px; }

h1 { font-family: var(--slab); font-weight: 600; font-size: clamp(29px, 6.4vw, 46px); line-height: 1.12; max-width: 780px; text-wrap: balance; }
.intro .lead { margin-top: 20px; font-size: 19px; line-height: 1.52; }
.intro .side { margin-top: 16px; color: var(--ink-2); }
.stamp { margin-top: 16px; font-size: 14.5px; color: var(--ink-3); }
.back { margin-top: 16px; }

/* Otwarcie sekcji: tytuł stoi na czerwonej linii, jak na karcie */
h2 { font-family: var(--slab); font-weight: 600; font-size: 23px; line-height: 1.24; margin-top: 56px; padding-bottom: 9px; border-bottom: 1px solid var(--red); text-wrap: balance; }
h3 { font-family: var(--slab); font-weight: 600; font-size: 18px; line-height: 1.32; }
.cols { margin-top: 8px; }
.col > p, .col > ul.plain, .col > aside.note, .faq > p { margin-top: 16px; }
.col > h2:first-child { margin-top: 32px; }
ul.plain { padding-left: 20px; }
ul.plain li + li { margin-top: 8px; }
ul.plain li::marker { color: var(--red); }
.note { padding: 14px 18px; background: var(--slip); border-radius: 2px; font-size: 16px; line-height: 1.55; box-shadow: 0 1px 0 rgba(26, 36, 64, 0.18); }
.srcline, figcaption { font-size: 14.5px; line-height: 1.5; color: var(--ink-3); overflow-wrap: anywhere; }
.srcline a, figcaption a { color: var(--ink-2); }
.srcline a:hover, figcaption a:hover { color: var(--red); }

/* Znacznik źródła */
.tag { display: inline-flex; align-items: baseline; gap: 7px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); text-decoration: none; }
.tag::before { content: ""; flex: none; width: 6px; height: 6px; border: 1px solid var(--ink-2); border-radius: 50%; transform: translateY(-1px); }
.tag:hover { color: var(--red); text-decoration: underline; }

/* Szuflada: krawędzie 17 kart, zakładka w miejscu liczby powiatów */
.drawer { margin-top: 36px; }
.dhead { display: none; }
.rows { list-style: none; position: relative; border-left: 1px solid var(--edge); border-right: 1px solid var(--edge); border-bottom: 2px solid var(--ink); }
.rows li { position: relative; min-height: 56px; padding: 6px 10px 28px; border-bottom: 1px solid var(--edge); }
.rows li:last-child { border-bottom: 0; }
.rows .nm { display: block; font-size: 15px; font-weight: 500; line-height: 1.3; color: var(--ink); text-decoration: none; }
.rows .nm::after { content: ""; position: absolute; inset: 0; }
.rows .nm:hover { color: var(--red); }
.rows .at { position: absolute; bottom: 0; width: 0; pointer-events: none; }
.rows .tab, .rows .ghost i { display: block; width: 46px; height: 21px; margin-left: -23px; border-radius: 5px 5px 0 0; }
.rows .tab { background: var(--ink); color: var(--card); font-family: var(--mono); font-weight: 500; font-size: 12.5px; line-height: 21px; text-align: center; font-variant-numeric: tabular-nums; transition: background-color 140ms var(--ease); }
.rows .ghost i { border: 1px dashed var(--ink-3); border-bottom: 0; }
.rows li:hover .tab, .rows li:focus-within .tab { background: var(--red); }
.rows .chg { display: none; }
.axis { display: flex; justify-content: space-between; padding-top: 4px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); }
.drawer figcaption { margin-top: 8px; max-width: 760px; }
.key:first-of-type { margin-left: 10px; }
.key { display: inline-flex; align-items: baseline; gap: 6px; margin-right: 12px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.sw { display: inline-block; width: 18px; height: 9px; border-radius: 3px 3px 0 0; background: var(--ink); }
.sw.ghost { background: none; border: 1px dashed var(--ink-3); border-bottom: 0; }

/* Kartoteka: karty w kolejności szuflady, obok spis */
.index { margin-top: 8px; padding: 0 4px; }
.index h2 { color: var(--on-desk); border-bottom-color: var(--on-desk); margin-top: 48px; }
.opener p, .index > .srcline { margin-top: 16px; max-width: 720px; color: var(--on-desk); }
.opener a, .index > .srcline a { color: inherit; text-decoration-color: currentColor; }
.opener a:hover, .index > .srcline a:hover { color: #000; }
.index > .srcline { color: var(--on-desk-2); margin-top: 20px; }
.stack { margin-top: 28px; }
.cards { list-style: none; }
.card { background: var(--card); border-radius: 3px; padding: 18px 20px 16px; box-shadow: var(--lift); scroll-margin-top: 16px; }
.card + .card { margin-top: 10px; }
.card:target { outline: 2px solid var(--ink); outline-offset: 2px; }
.chead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 24px; padding-bottom: 10px; border-bottom: 1px solid var(--red); }
.chead h3 { flex: 1 1 260px; font-size: 20px; }
.count { flex: 1 1 100%; font-variant-numeric: tabular-nums; }
.count .n { font-size: 13px; color: var(--ink-2); }
.count .n b { font-family: var(--mono); font-weight: 500; font-size: 24px; line-height: 1; color: var(--ink); margin-right: 2px; }
.prev { font-size: 12.5px; color: var(--ink-3); }
.stampline { margin: 14px 0 4px; }
.stampline span { display: inline-block; padding: 3px 10px 4px; border: 1.5px solid var(--red); border-radius: 3px; color: var(--red); font-family: var(--slab); font-weight: 500; font-size: 13.5px; line-height: 1.35; transform: rotate(-0.8deg); }
.facts { list-style: none; }
.facts li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.facts p { max-width: 68ch; font-size: 16px; line-height: 1.52; }
.facts .tag { margin-top: 4px; }
.csrc { margin-top: 10px; }
.spis { display: none; }
.railh { font-family: var(--slab); font-weight: 600; font-size: 15px; }

/* Tabele: liniowanie karty */
.tbl { margin-top: 24px; }
.scroll { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--ink-3) transparent; }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.42; }
caption span { display: inline-block; max-width: calc(100vw - 64px); }
table:has(th:nth-child(3)) { min-width: 460px; }
caption { caption-side: top; text-align: left; padding: 0 0 10px; font-family: var(--slab); font-weight: 500; font-size: 15.5px; line-height: 1.4; color: var(--ink); }
th, td { padding: 9px 16px 9px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
th:last-child, td:last-child { padding-right: 0; }
thead th { font-weight: 600; font-size: 14px; color: var(--ink-2); white-space: nowrap; vertical-align: bottom; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--red); }
tbody th { font-weight: 500; min-width: 144px; }
tbody tr:hover th, tbody tr:hover td { background: rgba(169, 189, 210, 0.2); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl figcaption { margin-top: 10px; }

/* Dwie karty obok siebie: dwie prognozy, dwa obrazy */
.duo { display: grid; grid-template-columns: 1fr; margin-top: 24px; }
.duo section { min-width: 0; padding: 0 0 20px; }
.duo h3 { padding: 10px 0 8px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--red); }
.duo .big { margin-top: 12px; color: var(--ink-2); font-size: 15px; line-height: 1.4; }
.duo .big b { display: block; font-family: var(--mono); font-weight: 500; font-size: 30px; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; }
.duo ul { list-style: none; margin-top: 4px; }
.duo li { padding: 9px 0; font-size: 16px; line-height: 1.52; overflow-wrap: anywhere; border-bottom: 1px solid var(--rule); }

/* Pytania */
.faq h3 { margin-top: 28px; }
.faq h2 + h3 { margin-top: 20px; }
.faq h3 + p { margin-top: 6px; }

/* Spis strony */
.toc { display: none; }

/* Ulsa: jedno wezwanie na stronę, osobna karta na blacie */
.ulsa { display: grid; gap: 16px 40px; align-items: end; padding: 24px 20px; background: var(--ink); color: var(--card); border-radius: 3px; box-shadow: var(--lift); }
.ulsa ::selection { background: var(--card); color: var(--ink); }
.ulsa h2 { margin-top: 0; padding-bottom: 0; border: 0; font-size: 22px; }
.ulsa p { margin-top: 10px; max-width: 680px; }
.ulsa .fact { font-size: 15.5px; color: #c9d1e2; }
.ulsa .go { margin-top: 0; }
.btn { display: inline-block; padding: 11px 22px; border-radius: 6px; background: var(--card); color: var(--ink); font-family: var(--slab); font-weight: 600; font-size: 16px; text-decoration: none; }
.btn:hover { background: var(--tab); color: var(--ink); }
.ulsa :focus-visible { outline-color: var(--card); }

/* Stopka */
.foot { border-top: 1px solid rgba(42, 34, 16, 0.35); padding: 24px 4px 40px; font-size: 15px; color: var(--on-desk); }
.foot p { max-width: 760px; }
.foot .pub { margin-top: 12px; }
.foot a { margin-left: 12px; color: inherit; text-decoration-color: currentColor; }
.foot a:hover { color: #000; }
.top :focus-visible, .foot :focus-visible, .index :focus-visible { outline-color: var(--on-desk); }

@media (min-width: 720px) {
  .wrap { padding: 0 24px; }
  .top { padding-top: 28px; }
  .name { font-size: 28px; padding: 8px 20px 9px; }
  .tabs { gap: 0 4px; }
  .tabs a { flex: none; padding: 10px 18px 9px; font-size: 15px; }
  .tabs a[aria-current="page"] { padding-top: 14px; }
  .sheet { padding: 44px 48px 52px; }
  .intro .lead { font-size: 20px; }

  .dhead { display: flex; justify-content: space-between; padding: 0 10px 0; font-size: 13.5px; color: var(--ink-3); }
  .rows li { min-height: 34px; padding: 7px 10px; }
  .rows .nm { max-width: 43%; font-size: 15px; }
  .rows .tab, .rows .ghost i { width: 52px; margin-left: -26px; font-size: 13px; }
  .rows .chg { display: block; position: absolute; right: 10px; bottom: 6px; font-family: var(--mono); font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

  caption span { max-width: none; }
  .card { padding: 20px 28px 18px; }
  .count { flex: none; text-align: right; }
  .duo { grid-template-columns: 1fr 1fr; gap: 0 32px; }
  .ulsa { grid-template-columns: 1fr auto; padding: 32px 48px; }
}

@media (min-width: 1040px) {
  .intro { display: grid; grid-template-columns: minmax(0, 700px) minmax(0, 1fr); grid-template-rows: auto auto 1fr; gap: 0 64px; }
  .intro h1 { grid-column: 1 / -1; }
  .intro .lead { grid-column: 1; }
  .intro .stamp { grid-column: 1; }
  .intro .side { grid-column: 2; grid-row: 2 / span 2; margin-top: 26px; padding-top: 12px; border-top: 1px solid var(--red); font-size: 16px; line-height: 1.55; }
  .cols { display: grid; grid-template-columns: minmax(0, 700px) minmax(0, 1fr); gap: 0 64px; align-items: start; }
  .toc { display: block; position: sticky; top: 24px; margin-top: 32px; padding-top: 10px; border-top: 2px solid var(--ink); }
  .toc ol { list-style: none; margin-top: 8px; }
  .toc li { border-bottom: 1px solid var(--rule); }
  .toc a { display: block; padding: 7px 0; font-size: 15px; line-height: 1.35; text-decoration: none; }
  .toc a:hover { text-decoration: underline; }
  .col > h2:first-child { margin-top: 32px; }

  .stack { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0 32px; align-items: start; }
  .spis { display: block; position: sticky; top: 16px; padding: 14px 16px 10px; background: var(--tab); border: 1px solid var(--edge); border-radius: 3px; color: var(--on-desk); }
  .spis ol { list-style: none; margin-top: 8px; border-top: 1px solid var(--on-desk); }
  .spis li { border-bottom: 1px solid rgba(42, 34, 16, 0.2); }
  .spis li:last-child { border-bottom: 0; }
  .spis a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; font-size: 13.5px; line-height: 1.3; color: inherit; text-decoration: none; }
  .spis a:hover { color: #000; text-decoration: underline; }
  .spis b { font-family: var(--mono); font-weight: 500; font-size: 12.5px; font-variant-numeric: tabular-nums; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media print {
  .tabs, .ulsa, .skip, .spis, .toc { display: none; }
  html, body { background: #fff; }
  .sheet, .card { box-shadow: none; }
}
