/* WolneDni.com – site stylesheet (design "Zdzierak + planer"). Plain CSS, no build step.
   Tokens: wall-calendar paper, navy ink, flag red for holidays, navy for leave days. */

/* Archivo variable font (wdth 62–125, wght 400–900), self-hosted from Google Fonts v25; SIL OFL 1.1, see assets/fonts/OFL.txt.
   Polish letters (ą ć ę ł ń ś ź ż) are in the latin-ext subset. */
@font-face {
	font-family: "Archivo";
	font-style: normal;
	font-weight: 400 900;
	font-stretch: 62% 125%;
	font-display: swap;
	src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Archivo";
	font-style: normal;
	font-weight: 400 900;
	font-stretch: 62% 125%;
	font-display: swap;
	src: url("../fonts/archivo-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--paper: #ffffff;
	--wall: #eceef2;
	--panel: #f6f7f9;
	--ink: #1b1f3b;
	--muted: #565b78;
	--faint: #a3a7bd;
	--line: #d8dbe3;
	--board: #2a2f55;
	--red: #c8102e;
	--red-dark: #a00d25;
	--red-soft: #fbe3e7;
	--stretch: #dde1ef;
	--green: #2e7d32;
	--green-soft: #e8f5e9;
	--radius: 3px;
	--wrap: 1200px;
	--header-h: 68px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
	margin: 0; background: var(--wall); color: var(--ink);
	font-family: Archivo, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 1.0625rem; line-height: 1.6;
	font-variation-settings: "wdth" 100; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
p, ul, ol, dl, table, figure, blockquote { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; }
li { margin: 0.2em 0; }
strong, b { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
small { font-size: 0.85em; }
h1, h2, h3, h4 { color: var(--ink); margin: 0 0 0.5em; line-height: 1.12; }
h1 { font-weight: 900; font-variation-settings: "wdth" 66; font-size: clamp(2.1rem, 4.4vw, 3.3rem); letter-spacing: -0.01em; line-height: 1; }
h2 { font-weight: 900; font-variation-settings: "wdth" 72; font-size: clamp(1.55rem, 2.7vw, 2.05rem); margin-top: 1.6em; }
h3 { font-weight: 800; font-variation-settings: "wdth" 82; font-size: 1.22rem; margin-top: 1.4em; }
h4 { font-weight: 700; font-size: 1.05rem; margin-top: 1.2em; }
blockquote { border-left: 3px solid var(--red); margin-left: 0; padding: 0.2em 0 0.2em 1em; color: var(--muted); }
code { font-size: 0.9em; background: var(--panel); padding: 0 0.3em; border-radius: var(--radius); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons and forms ---------- */
.button, button.button, input[type="submit"], input[type="button"] {
	display: inline-block; font: inherit; font-weight: 700; font-size: 0.95rem; line-height: 1.3;
	border: 2px solid var(--ink); background: var(--ink); color: #fff; padding: 9px 16px; border-radius: var(--radius);
	cursor: pointer; text-decoration: none; text-align: center;
}
.button:hover, button.button:hover, input[type="submit"]:hover { background: var(--red); border-color: var(--red); color: #fff; }
.button.alt, .button.ghost { background: transparent; color: var(--ink); }
.button.alt:hover, .button.ghost:hover { background: var(--red); border-color: var(--red); color: #fff; }
.button.small { font-size: 0.85rem; padding: 4px 11px; }
.button[disabled], button[disabled] { opacity: 0.35; cursor: default; pointer-events: none; }
.actions { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.actions li { margin: 0; }
input[type="text"], input[type="number"], input[type="date"], input[type="email"], select, textarea {
	font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper);
	border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 10px; max-width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); }
label { font-weight: 600; }

/* ---------- header ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.35rem; letter-spacing: -0.01em; font-variation-settings: "wdth" 75; color: var(--ink); white-space: nowrap; }
.logo:hover { color: var(--ink); }
.logo-mark { flex: none; width: 24px; height: 28px; border: 2px solid var(--ink); border-top: 7px solid var(--red); border-radius: 2px; background: var(--paper); }
.nav-toggle { display: none; font: inherit; font-weight: 700; background: transparent; color: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius); padding: 6px 14px; cursor: pointer; }
#nav > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
#nav li { margin: 0; position: relative; }
#nav > ul > li > a, #nav .nav-group {
	display: block; font: inherit; font-size: 0.97rem; font-weight: 600; color: var(--muted); text-decoration: none;
	background: none; border: 0; padding: 10px 12px; cursor: pointer; line-height: 1.3;
}
#nav .nav-group::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
#nav > ul > li > a:hover, #nav .nav-group:hover { color: var(--ink); }
#nav > ul > li.current > a, #nav > ul > li.current > .nav-group { color: var(--ink); box-shadow: inset 0 -3px 0 var(--red); }
#nav li ul {
	display: none; position: absolute; top: 100%; left: 0; min-width: 270px; list-style: none; margin: 0; padding: 8px 0;
	background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--board); box-shadow: 0 14px 30px -12px rgba(27,31,59,.35);
}
#nav > ul > li:last-child ul, #nav > ul > li:nth-last-child(2) ul, #nav > ul > li:nth-last-child(3) ul { left: auto; right: 0; }
#nav li:hover > ul, #nav li:focus-within > ul, #nav li.open > ul { display: block; }
#nav li ul a { display: block; padding: 7px 18px; color: var(--ink); text-decoration: none; font-size: 0.95rem; white-space: nowrap; }
#nav li ul a:hover { background: var(--wall); color: var(--red); }
#nav li ul li.current > a { color: var(--red); font-weight: 700; }

/* breadcrumbs */
.breadcrumb-wrapper { background: var(--paper); border-bottom: 1px solid var(--line); }
.breadcrumb { list-style: none; margin: 0; padding: 9px 0; display: flex; flex-wrap: wrap; gap: 2px 0; font-size: 0.86rem; color: var(--muted); }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin: 0 8px; color: var(--faint); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--red); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 600; }

/* ---------- layout ---------- */
#main-wrapper { padding: 40px 0 72px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.layout.no-sidebar { grid-template-columns: minmax(0, 1fr); }
.layout.no-sidebar #content { max-width: 920px; }
#content > article { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 44px 44px; }
#content > article > *:first-child, #content > article > section:first-child > *:first-child { margin-top: 0; }
#content article section { margin: 0; }
#content article > header { margin-bottom: 1.2em; }
#content article h1 + p, .names-lead, .lead { font-size: 1.12rem; color: var(--muted); }
.sidebar #sidebar { display: grid; gap: 20px; }
#sidebar > section, #sidebar > div, #sidebar > nav, #sidebar > ul, #sidebar > p, #sidebar > h2, #sidebar > h3 { margin: 0; }
#sidebar > section { background: var(--paper); border: 1px solid var(--line); border-top: 5px solid var(--board); border-radius: var(--radius); padding: 20px 22px; }
#sidebar h2 { font-size: 1.35rem; margin: 1.2em 0 0.5em; }
#sidebar h2:first-child, #sidebar h3:first-child, #sidebar section > h2:first-child, #sidebar section > h3:first-child { margin-top: 0; }
#sidebar h3 { font-size: 1.1rem; }
#sidebar section section { margin-top: 1em; }
#sidebar footer { margin-top: 1em; }
#sidebar table { font-size: 0.92rem; }
#sidebar ul { padding-left: 0; list-style: none; }
#sidebar li { padding: 7px 0; border-bottom: 1px solid var(--line); margin: 0; font-size: 0.95rem; line-height: 1.4; }
#sidebar li:last-child { border-bottom: 0; }
#sidebar .holiday-date { display: block; font-weight: 800; font-variation-settings: "wdth" 72; color: var(--red); font-size: 1.05rem; }
#sidebar .holiday-description { color: var(--ink); }
#sidebar .holiday-description::first-letter { }

/* ---------- generic content ---------- */
.style2 { list-style: none; padding-left: 0; }
.style2 li { padding: 6px 0; border-bottom: 1px solid var(--line); margin: 0; }
.table-wrapper { overflow-x: auto; margin: 0 0 1.4em; -webkit-overflow-scrolling: touch; }
.table-wrapper table { margin: 0; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.97rem; }
caption { text-align: left; font-weight: 800; font-variation-settings: "wdth" 85; padding-bottom: 8px; color: var(--ink); }
th, td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 0.84rem; color: var(--muted); font-weight: 600; border-bottom: 2px solid var(--ink); }
tbody th { font-weight: 600; }
tfoot td, tfoot th { font-weight: 800; border-top: 2px solid var(--ink); border-bottom: 0; }
td:last-child, th:last-child { padding-right: 0; }
details { border-bottom: 1px solid var(--line); }
details > summary { cursor: pointer; font-weight: 700; padding: 10px 0; }

.box, .days-off-summary, .tool-panel, .cal-tools { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 1.4em 0; }
.box > *:last-child, .days-off-summary > *:last-child { margin-bottom: 0; }
.box h2, .box h3, .days-off-summary h3 { margin-top: 0; }
.wigilia-box, .quick-answer, #dzis, #imieniny-dzis, .rekomendacja-box {
	border-left: 4px solid var(--red); background: var(--red-soft); padding: 16px 20px; margin: 1.6em 0; border-radius: 0 var(--radius) var(--radius) 0;
}
.wigilia-box h2 { margin-top: 0; font-size: 1.45rem; }
.wigilia-box > *:last-child { margin-bottom: 0; }
.quick-answer { border-left-color: var(--board); background: var(--panel); margin-top: 0; }
.quick-answer p { margin: 0; }
.quick-answer .quick-answer-label { font-size: 0.85rem; font-weight: 700; color: var(--board); margin-bottom: 4px; }
#dzis, #imieniny-dzis { border-left-color: var(--green); background: var(--green-soft); }
.legal-note, .legal-basis { font-size: 0.88rem; color: var(--muted); }
.legal-basis { border-top: 1px solid var(--line); padding-top: 1em; margin-top: 2em; }
.headline { font-size: 1.15rem; font-weight: 600; }
.note, .cal-note { font-size: 0.9rem; color: var(--muted); }
.separator { height: 0; }
.see-also, .related-holidays, .planning { margin-top: 2.2em; }
.see-also ul, .holiday-links, .planning ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.see-also li, .holiday-links li, #content .planning li { margin: 0; padding: 0; border: 0; }
.see-also a, .holiday-links a, #content .planning a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.see-also a:hover, .holiday-links a:hover, #content .planning a:hover { border-color: var(--red); color: var(--red); }
#sidebar .planning a { display: inline; padding: 0; border: 0; background: none; font-weight: 600; }

/* FAQ (macro: dl; faq.html: faq-item blocks) */
.faq { margin-top: 2.4em; }
.faq dl { margin: 0; border-top: 2px solid var(--ink); }
.faq dt { font-weight: 800; font-size: 1.07rem; padding: 16px 0 4px; }
.faq dd { margin: 0; padding: 0 0 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.faq-category h2 { margin-top: 1.6em; }
.faq-section { border-top: 2px solid var(--ink); margin-bottom: 1.6em; }
.faq-item { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq-question { font-weight: 800; font-size: 1.07rem; margin-bottom: 6px; }
.faq-answer > *:last-child { margin-bottom: 0; }
.guide-list dt { font-weight: 700; margin-top: 1em; }
.guide-list dd { margin: 0 0 0.6em; color: var(--muted); }

/* year switchers */
.year-switcher { margin: 0 0 1.6em; }
.year-switch { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 1.6em; }
.year-switch a, .year-switch strong, .year-switch span { padding: 4px 11px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-weight: 700; font-size: 0.92rem; background: var(--paper); }
.year-switch strong { background: var(--red); border-color: var(--red); color: #fff; }
.year-switcher .button.small:not(.alt) { background: var(--red); border-color: var(--red); }

/* ---------- holiday tables and lists ---------- */
.holiday-table td:first-child, .church-table td:first-child, .month-years td:first-child, .observances td:first-child, .nameday-month td:first-child { white-space: nowrap; }
.holiday-table td:first-child { font-weight: 700; }
.church-table tr.day-off td { background: var(--red-soft); }
.church-table tr.day-off td:last-child { color: var(--red); font-weight: 700; }
.church-table td:first-child { padding-left: 8px; }
.long-weekends { list-style: none; padding: 0; }
.long-weekends li { padding: 9px 0; border-bottom: 1px solid var(--line); margin: 0; }
.trading-sundays { columns: 2; column-gap: 32px; }
.leave-plan, .leave-ranking, .leave-summary, .part-time, .work-totals, .calc-result, .school-table { margin-bottom: 1.4em; }
.work-totals td:last-child, .calc-result td { text-align: right; font-weight: 700; }
.calc-result td { white-space: nowrap; }
.calc-result th { font-weight: 400; color: var(--ink); }
.month-years { font-size: 0.95rem; }

/* name days */
.names-lead { margin-bottom: 1.4em; }
.nameday-around { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.nameday-around li { margin: 0; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.nameday-month tr.today td { background: var(--green-soft); font-weight: 700; }
.month-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 1em 0; }
.month-links a { padding: 3px 10px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-weight: 600; font-size: 0.92rem; background: var(--paper); }
.month-links a:hover { border-color: var(--red); color: var(--red); }

/* nietypowe święta */
.month-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15em, 1fr)); gap: 16px; margin: 1.5em 0 2em; }
.month-cards section { background: var(--paper); border: 1px solid var(--line); border-top: 5px solid var(--board); border-radius: var(--radius); padding: 14px 16px; }
.month-cards h2 { font-size: 1.15rem; margin: 0 0 0.4em; }
.month-cards ul { font-size: 0.92rem; margin: 0 0 0.6em; padding-left: 1em; }
.month-cards p { margin: 0; font-size: 0.92rem; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { margin: 0; padding: 0; }
.chip { display: inline-block; font-size: 0.76rem; font-weight: 600; line-height: 1.6; padding: 0 8px; border-radius: 99px; background: var(--wall); color: var(--muted); white-space: nowrap; }
.chip-panstwowe { background: var(--red-soft); color: var(--red-dark); }
.chip-tradycje { background: #fff1e0; color: #9a4a00; }
.chip-rodzina { background: #fce4ec; color: #9c1650; }
.chip-zdrowie { background: #e3f0fb; color: #1554a0; }
.chip-ekologia, .chip-zwierzeta { background: var(--green-soft); color: #23652a; }
.chip-kulinarne { background: #fff6d6; color: #7a5c00; }
.chip-kultura { background: #ece7f6; color: #4a2c96; }
.chip-spoleczne, .chip-zawodowe, .chip-rozrywkowe { background: var(--stretch); color: var(--board); }
.cat-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 1em 0 1.4em; }
.cat-filter button { font: inherit; font-size: 0.85rem; font-weight: 600; padding: 4px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; }
.cat-filter button:hover { border-color: var(--ink); }
.cat-filter button.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.observances .about { display: block; font-size: 0.88rem; color: var(--muted); }
.observances tr.today td { background: var(--green-soft); }
.day-observances li { margin-bottom: 0.5em; }

/* ---------- calendar month grids (overlays.month_blocks) ---------- */
.month-nav { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 1.6em; padding: 10px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); z-index: 5; }
.month-nav a { padding: 3px 8px; text-decoration: none; font-weight: 600; font-size: 0.9rem; border-radius: var(--radius); color: var(--muted); }
.month-nav a.has-holiday { color: var(--red); }
.month-nav a:hover { background: var(--wall); color: var(--ink); }
.calendar-wrapper { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin: 1.4em 0 2em; }
.calendar-wrapper .separator { display: none; }
.calendar { background: var(--paper); border: 1px solid var(--line); border-top: 5px solid var(--board); border-radius: var(--radius); padding: 12px 12px 10px; font-size: 0.92rem; }
.calendar h2, .calendar h3 { margin: 0 0 8px; font-size: 1.15rem; font-weight: 800; font-variation-settings: "wdth" 75; scroll-margin-top: 70px; }
.calendar table { margin: 0; table-layout: fixed; font-size: 0.86rem; }
.calendar th, .calendar td { text-align: center; padding: 4px 0; border: 0; border-radius: 2px; }
.calendar th { font-size: 0.7rem; color: var(--muted); font-weight: 600; border: 0; }
.calendar th.weekend { color: var(--red); }
.calendar td.weekend { color: var(--red); background: var(--wall); }
.calendar td.holiday { background: var(--red); color: #fff; font-weight: 800; }
.calendar td.holiday.weekend, .calendar td.sat-holiday { background: var(--paper); color: var(--red); box-shadow: inset 0 0 0 1.5px var(--red); }
.calendar td.tip { background: var(--board); color: #fff; font-weight: 700; }
.calendar td[title] { cursor: help; }
.calendar td.ferie { box-shadow: inset 0 -4px 0 #7b1fa2; }
.calendar td.holiday.ferie { box-shadow: inset 0 -4px 0 #7b1fa2; }
.calendar td.today { box-shadow: inset 0 0 0 2px var(--ink); }
.calendar td.moon, .calendar td.has-names { position: relative; }
.calendar td.has-names::before { content: "\25CF"; position: absolute; top: 0; left: 3px; font-size: 9px; line-height: 1; color: #2E7D32; }
.calendar td.holiday.has-names::before, .calendar td.tip.has-names::before { color: #fff; }
.calendar td.moon::after { content: "\25CF"; position: absolute; top: 0; right: 3px; font-size: 9px; line-height: 1; color: #1565c0; }
.calendar td.holiday.moon::after, .calendar td.tip.moon::after { color: #fff; }
.calendar td[tabindex]:focus { outline: 2px solid var(--ink); outline-offset: -2px; }
.calendar td.trading { background: #c8e6c9; color: #1b5e20; font-weight: 800; }
.calendar th.wk { width: 26px; font-size: 0.62rem; font-weight: 500; color: var(--faint); font-variant-numeric: tabular-nums; }
.calendar th.wk abbr { text-decoration: none; cursor: help; }
.calendar .cal-detail { margin: 8px 0 0; padding: 6px 10px; background: var(--panel); border-left: 3px solid var(--board); font-size: 0.86rem; line-height: 1.4; }
.calendar .month-hours { color: var(--muted); font-size: 0.8rem; margin: 6px 0 0; border-top: 1px solid var(--line); padding-top: 6px; }
.calendar p { margin: 6px 0 0; font-size: 0.86rem; line-height: 1.4; }
.calendar .rekomendacja { padding: 6px 8px; background: var(--stretch); border-left: 3px solid var(--board); }
.calendar .month-page { font-size: 0.84rem; }
.month-single .calendar { max-width: 26em; }
.cal-tools .cal-switches { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; }
.cal-tools label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; margin: 0; font-weight: 600; }
.cal-tools input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--red); margin: 0; }
.cal-tools label:has(input:disabled) { color: var(--faint); cursor: not-allowed; }
.cal-tools .cal-note { margin: 6px 0 0; }
.legend .hd { background: var(--red); }
.legend .we { background: var(--wall); }
.legend .lv { background: var(--board); }
.legend .st { background: var(--stretch); }
.legend .off { box-shadow: inset 0 0 0 2px var(--red); }
.month-pager { display: flex; justify-content: space-between; gap: 1em; flex-wrap: wrap; margin: 2em 0 0; padding-top: 1em; border-top: 1px solid var(--line); font-weight: 600; }

/* ---------- tools: planner, request form, calculator ---------- */
.tool-panel .controls { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: end; margin-bottom: 1em; }
.tool-panel .controls label { display: block; margin: 0 0 4px; }
.tool-panel .totals { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 1.05rem; margin: 0.8em 0; }
.tool-panel .totals strong { color: var(--red); }
.tool-error { color: var(--red); font-weight: 600; }
.range-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.wniosek-doc { background: #fff; color: #000; border: 1px solid var(--line); padding: 2em; margin: 1em 0; font-family: Georgia, "Times New Roman", serif; line-height: 1.6; font-variation-settings: normal; }
.wniosek-doc .right { text-align: right; }
.wniosek-doc h3 { text-align: center; margin: 1.5em 0; font-family: inherit; font-variation-settings: normal; }
.wniosek-doc .sign { margin-top: 3em; text-align: right; }
.wniosek-doc .dots { color: #777; }

/* ---------- year hub: hero (tear-off sheet) ---------- */
.hero { padding: 48px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: minmax(290px, 400px) 1fr; gap: 64px; align-items: start; }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.7rem); line-height: 0.95; margin: 0 0 20px; }
.hero h1 .h1-sub { display: block; margin-top: 14px; font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.2; font-weight: 700; font-variation-settings: "wdth" 90; color: var(--muted); }
.hero-intro > p { margin: 0 0 26px; color: var(--muted); font-size: 1.14rem; max-width: 36em; }
.hero-intro > p strong { color: var(--ink); }
.years { display: flex; gap: 4px; margin: 0 0 18px; flex-wrap: wrap; padding: 0; list-style: none; }
.years li { margin: 0; }
.years a, .years strong { display: block; font-size: 0.9rem; font-weight: 700; padding: 3px 10px; text-decoration: none; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); font-variation-settings: "wdth" 80; }
.years strong { background: var(--red); color: #fff; border-color: var(--red); }
.facts { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 0 30px; margin: 0 0 30px; }
.facts div { border-left: 3px solid var(--red); padding-left: 12px; }
.facts dt { font-size: 0.86rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 900; font-variation-settings: "wdth" 70; font-size: 2.4rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.next-days h2 { font-size: 1rem; margin: 0 0 6px; font-weight: 700; font-variation-settings: "wdth" 100; }
.next-days ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.next-days li { display: grid; grid-template-columns: 8.5em 1fr auto; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: baseline; margin: 0; }
.next-days time { font-weight: 700; }
.next-days a { text-decoration: none; } .next-days a:hover { text-decoration: underline; }
.next-days .wd { color: var(--muted); font-size: 0.9rem; }
.next-days .in { font-size: 0.92rem; font-weight: 700; color: var(--red); white-space: nowrap; }
.next-days .in.far { color: var(--muted); font-weight: 400; }
.downloads { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 24px 0 0; padding: 0; list-style: none; font-size: 0.92rem; }
.downloads li { margin: 0; }
.downloads li:first-child { font-weight: 700; margin-right: 4px; }
.downloads a { display: inline-block; padding: 4px 10px; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); text-decoration: none; font-weight: 600; }
.downloads a:hover { border-color: var(--red); color: var(--red); }

.pad { perspective: 1400px; }
.pad-board { background: var(--board); color: #fff; border-radius: 6px 6px 0 0; padding: 12px 18px 16px; display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; font-variation-settings: "wdth" 72; letter-spacing: 0.02em; }
.pad-board b { font-size: 1.4rem; }
.pad-stack { position: relative; }
.pad-stack::before, .pad-stack::after { content: ""; position: absolute; height: 100%; background: #f7f7f9; border: 1px solid var(--line); }
.pad-stack::before { left: 6px; right: 6px; bottom: -6px; z-index: 0; }
.pad-stack::after { left: 12px; right: 12px; bottom: -12px; background: #f0f1f4; z-index: -1; }
.sheet { position: relative; z-index: 1; background: var(--paper); border: 1px solid var(--line); border-top: 0; padding: 18px 26px 24px; text-align: center; transform-origin: top center; }
.sheet::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: repeating-linear-gradient(90deg, var(--line) 0 2px, transparent 2px 7px); }
.sheet-top { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--muted); padding-top: 6px; }
.sheet-day { display: block; font-weight: 900; font-variation-settings: "wdth" 62; color: var(--red); font-size: clamp(8.5rem, 24vw, 14rem); line-height: 0.82; letter-spacing: -0.03em; margin: 16px 0 6px; }
.sheet-month { display: block; font-weight: 800; font-variation-settings: "wdth" 80; font-size: 1.6rem; line-height: 1.1; }
.sheet-wd { display: block; font-size: 1.12rem; color: var(--muted); margin-bottom: 16px; }
.sheet-name { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); padding: 12px 0; font-weight: 700; font-size: 1.15rem; line-height: 1.3; margin: 0; }
.sheet-name a { text-decoration: none; } .sheet-name a:hover { text-decoration: underline; }
.sheet-note { display: block; font-weight: 600; font-size: 0.86rem; color: var(--red); margin-top: 2px; }
.sheet-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left; font-size: 0.85rem; color: var(--muted); padding-top: 12px; }
.sheet-foot > span:last-child { text-align: right; }
.sheet-foot strong { display: block; color: var(--ink); font-size: 0.95rem; }
.sheet.tearing { animation: tear .7s cubic-bezier(.55,.05,.7,.4) forwards; }
@keyframes tear { 0% { transform: none; } 30% { transform: rotateX(-18deg) rotateZ(-2deg); } 100% { transform: translateY(140%) rotateZ(-14deg) rotateX(-40deg); opacity: 0; } }
.pad-actions { display: flex; gap: 8px; margin-top: 28px; flex-wrap: wrap; }
.no-js .pad-actions { display: none; }

/* ---------- year hub: leave planner ---------- */
.tool-head { padding: 44px 0 0; }
.tool-head h1 { max-width: 18em; }
.tool-head p { color: var(--muted); font-size: 1.1rem; max-width: 42em; }
.year-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 26px 0 0; }
.year-tabs a { padding: 10px 22px; border: 2px solid var(--ink); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; background: #fff; color: var(--ink); text-decoration: none; font-weight: 900; font-variation-settings: "wdth" 72; font-size: 1.25rem; }
.year-tabs a:hover { color: var(--red); }
.year-tabs a[aria-selected=true] { background: var(--board); border-color: var(--board); color: #fff; }
.no-js .year-tabs a[aria-selected=true] { background: #fff; border-color: var(--ink); color: var(--ink); }  /* without JS all years are shown in turn */
.planner-tab { border-top: 0; }
.planner-tab + .planner-tab { border-top: 1px solid var(--line); }
.js .planner-tab + .planner-tab { border-top: 0; }
.planner { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 56px 0 40px; }
.planner h2 { margin-top: 0; font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.planner .sec-lead { color: var(--muted); margin: 0 0 24px; max-width: 46em; }
.control { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; padding: 14px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(255,255,255,.97); z-index: 6; }
.no-js .control { display: none; }
.control label { white-space: nowrap; }
.stepper { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; }
.stepper button { width: 32px; height: 32px; border: 2px solid var(--ink); background: #fff; font: inherit; font-weight: 800; cursor: pointer; line-height: 1; border-radius: var(--radius); color: var(--ink); }
.stepper button:hover { background: var(--red); border-color: var(--red); color: #fff; }
.stepper output { min-width: 2ch; text-align: center; font-weight: 900; font-variation-settings: "wdth" 62; font-size: 2rem; line-height: 1; color: var(--red); }
.control input[type=range] { width: 100%; accent-color: var(--red); height: 28px; }
.result { text-align: right; font-size: 0.9rem; color: var(--muted); line-height: 1.3; margin: 0; }
.result strong { display: block; font-size: 1.6rem; color: var(--ink); font-weight: 900; font-variation-settings: "wdth" 72; }
.result strong em { font-style: normal; color: var(--red); }
.matrix-wrap { overflow-x: auto; padding: 22px 0 4px; }
.matrix { display: grid; grid-template-columns: 7.5rem repeat(31, minmax(24px, 1fr)); gap: 3px; min-width: 920px; }
.matrix .mh { font-size: 0.7rem; color: var(--muted); text-align: center; }
.matrix .ml { font-weight: 800; font-variation-settings: "wdth" 78; font-size: 0.95rem; display: flex; align-items: center; text-decoration: none; }
.matrix .ml:hover { color: var(--red); text-decoration: underline; }
.c { aspect-ratio: 1; border-radius: 2px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 0.66rem; display: grid; place-items: center; color: var(--faint); position: relative; font-variant-numeric: tabular-nums; }
.c.we { background: var(--wall); box-shadow: none; }
.c.st { background: var(--stretch); box-shadow: none; color: var(--ink); }
.c.hd { background: var(--red); color: #fff; box-shadow: none; font-weight: 800; }
.c.hd.off { background: #fff; color: var(--red); box-shadow: inset 0 0 0 2px var(--red); }
.c.st.hd.off { background: var(--stretch); }
.c.lv { background: var(--board); color: #fff; box-shadow: none; font-weight: 800; }
.c.x { background: transparent; box-shadow: none; }
.c.past { opacity: .4; }
.c.today::after { content: ""; position: absolute; inset: -3px; border: 2px solid var(--ink); }
.c:hover { outline: 2px solid var(--ink); outline-offset: 1px; z-index: 1; }
.caption { min-height: 1.6em; font-size: 0.95rem; margin: 10px 0 0; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.86rem; color: var(--muted); padding: 8px 0 0; margin: 0; list-style: none; }
.legend li { margin: 0; }
.legend i { display: inline-block; width: 15px; height: 15px; vertical-align: -3px; margin-right: 6px; border-radius: 2px; }
.plan { margin: 26px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 0 24px; border-top: 1px solid var(--line); }
.plan li { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; margin: 0; }
.plan li.past { opacity: .5; }
.plan b { font-weight: 800; font-variation-settings: "wdth" 80; font-size: 1.2rem; }
.plan .ratio { color: var(--red); font-weight: 700; }
.plan .lvd { color: var(--muted); font-size: 0.9rem; }
.plan a { font-size: 0.9rem; font-weight: 700; }

/* ---------- footer ---------- */
#footer-wrapper { background: var(--board); color: #c9cce0; padding: 52px 0 40px; font-size: 0.93rem; }
#footer { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr 1.2fr; gap: 32px; }
#footer h2 { color: #fff; font-size: 1.1rem; margin: 0 0 10px; font-variation-settings: "wdth" 80; }
#footer ul { list-style: none; padding: 0; margin: 0; }
#footer li { margin: 0 0 5px; }
#footer a { color: #fff; text-decoration: none; }
#footer a:hover { text-decoration: underline; color: #fff; }
#copyright { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.15); padding-top: 18px; margin: 8px 0 0; color: #9da1bf; font-size: 0.85rem; }

.scroll-to-top { position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--red); color: #fff; font: inherit; font-size: 1.2rem; font-weight: 800; cursor: pointer; opacity: 0; visibility: hidden; transition: opacity .2s; z-index: 30; box-shadow: 0 6px 16px -6px rgba(0,0,0,.4); }
.scroll-to-top.show { opacity: 1; visibility: visible; }
.scroll-to-top:hover { background: var(--board); }

/* ---------- responsive ---------- */
/* ---------- answer boxes, quick links, calculators (Nov 2026) ---------- */
.answer-box { border-left: 4px solid var(--red); }
.next-date { font-weight: 700; margin-bottom: 0.6em; min-height: 1.6em; }
.next-date .next-in { font-weight: 400; color: var(--muted); }
.trading-sundays li.is-next, tr.is-picked td { background: var(--red-soft); }
.trading-sundays li.is-next { font-weight: 700; }
.trading-months { list-style: none; padding: 0; columns: 2 16em; column-gap: 24px; }
.trading-months li { break-inside: avoid; }
.quick-links { margin: 0 0 1.4em; }
.quick-links ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.quick-links li { margin: 0; }
.quick-links a { display: inline-block; padding: 6px 12px; border: 1px solid var(--board); border-radius: var(--radius); background: var(--paper); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.quick-links a:hover { background: var(--board); color: var(--paper); }
.ferie-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ferie-pick[hidden] { display: none; }
.ferie-pick output { font-weight: 700; }
.verdict { font-size: 1.05rem; }
.toc ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.toc li { margin: 0; }
.updated { font-size: 0.88rem; color: var(--muted); }
.month-answer ul { margin: 6px 0 0; padding-left: 1.1em; }
.tool-panel .result { text-align: left; margin: 0.4em 0 0.8em; }
.tool-panel .result strong { font-size: 1.3rem; }
.tool-panel .steps { margin: 0; font-size: 0.95rem; }
.inline-pair { display: flex; gap: 8px; }
.tool-panel .controls > div { min-width: 0; max-width: 100%; }
.tool-panel .controls select { max-width: 100%; }
.tool-links { font-size: 0.95rem; }
.next-year { margin-top: 1.6em; }

@media (max-width: 1100px) {
	.layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
	#content > article { padding: 32px; }
}
@media (max-width: 980px) {
	.nav-toggle { display: inline-block; }
	.js #nav { display: none; }
	.site-header .wrap { flex-wrap: wrap; }
	#nav { flex-basis: 100%; padding-bottom: 12px; }
	.js .nav-open #nav { display: block; }
	#nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
	#nav > ul > li { border-top: 1px solid var(--line); }
	#nav > ul > li > a, #nav .nav-group { padding: 12px 0; width: 100%; text-align: left; }
	#nav > ul > li.current > a, #nav > ul > li.current > .nav-group { box-shadow: none; color: var(--red); }
	#nav li ul { position: static; box-shadow: none; border: 0; padding: 0 0 8px 12px; min-width: 0; }
	#nav li:hover > ul { display: none; }
	#nav li.open > ul, #nav li:focus-within > ul { display: block; }
	.no-js #nav li ul { display: block; }
	#nav li ul a { white-space: normal; padding: 6px 0; }
	.layout { grid-template-columns: minmax(0, 1fr); }
	.hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 44px; }
	.pad { max-width: 420px; }
	.hero-intro { order: -1; }  /* H1 and the facts first on narrow screens, the pad below */
	.control { grid-template-columns: 1fr; gap: 6px; }
	.result { text-align: left; }
	#footer { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
	.year-tabs { flex-wrap: nowrap; gap: 4px; }
	.year-tabs a { flex: 1 1 0; text-align: center; padding: 9px 0; font-size: 1.05rem; }
	body { font-size: 1rem; }
	.wrap { padding: 0 16px; }
	#main-wrapper { padding: 20px 0 48px; }
	#content > article { padding: 22px 18px 26px; border-left: 0; border-right: 0; border-radius: 0; margin: 0 -16px; }
	#sidebar > section { margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
	.hero { padding: 28px 0 40px; }
	.facts { grid-template-columns: repeat(2, auto); gap: 14px 24px; }
	.facts dd { font-size: 1.9rem; }
	.next-days li { grid-template-columns: 6.5em 1fr; }
	.next-days .in { grid-column: 2; }
	.calendar-wrapper { grid-template-columns: minmax(0, 1fr); }
	th, td { padding: 8px 8px 8px 0; }
	.holiday-table th:nth-child(2), .holiday-table td:nth-child(2),
	.church-table th:nth-child(2), .church-table td:nth-child(2),
	.observances th:nth-child(4), .observances td:nth-child(4),
	.month-years th:nth-child(3), .month-years td:nth-child(3) { display: none; }
	.trading-sundays { columns: 1; }
	#footer { grid-template-columns: 1fr; gap: 24px; }
}
@media (prefers-reduced-motion: reduce) { .sheet.tearing { animation: none; } }

@media print {
	.site-header, .breadcrumb-wrapper, #footer-wrapper, .sidebar, .scroll-to-top, .pad-actions, .control, .month-nav { display: none !important; }
	body, #content > article { background: #fff; border: 0; padding: 0; }
	.layout { display: block; }
	/* wniosek.js marks #wniosek's ancestors with .print-path; everything else is removed from the printout */
	body.print-wniosek *:not(.print-path):not(#wniosek):not(#wniosek *) { display: none !important; }
	body.print-wniosek .print-path { margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; width: auto !important; max-width: none !important; float: none !important; background: none !important; }
	body.print-wniosek #wniosek { border: 0; margin: 0; padding: 0; }
}
