/* zilelibere.com — shared stylesheet
   Semantic calendar colours live in :root. The day cells still carry the legacy
   bgcolor="..." attributes; the rules under "Calendar colour mapping" resolve
   those to the tokens, so a colour change here reaches all 15 year pages.

   Note on --holiday: #FF0000 is the site's original red and is kept on purpose.
   White on it measures 4.0:1, just under the 4.5:1 WCAG AA needs for text this
   size, so the day numbers inside holiday cells are the one knowing exception
   to the contrast rule the rest of this file follows. Everything that carries
   the same information in text — the holiday list, the legend row and each
   cell's title tooltip — clears AA, so nothing is reachable only through that
   cell. Don't "fix" it by darkening the red without asking. */

/* Roboto, self-hosted. Loading it from fonts.googleapis.com would send every
   visitor's IP to Google, which a German court found to breach GDPR in 2022;
   serving it from our own origin sidesteps that and is faster besides.
   v51 ships as a variable font, so one file covers every weight -- 400, 500 and
   700 all resolve from the same 43KB download. unicode-range means a visitor
   only fetches latin-ext if the page actually uses ă/ș/ț. */
@font-face{
	font-family:'Roboto';
	font-style:normal;
	font-weight:100 900;
	font-display:swap;
	src:url(../fonts/roboto-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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF
}
@font-face{
	font-family:'Roboto';
	font-style:normal;
	font-weight:100 900;
	font-display:swap;
	src:url(../fonts/roboto-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{
	--font:'Roboto',Verdana,Geneva,'DejaVu Sans',Arial,Helvetica,sans-serif;
	--month-gap:56px;         /* two calendar rows, between stacked months */
	--cell-line:#e4e8ee;      /* interior grid lines */
	--cell-edge:#cdd4dd;      /* outer frame */
	--arrow:#6b7684;          /* month -> bridge-day pointer */
	--ink:#1a1a1a;            /* calendar day numbers */
	--body-ink:#666666;       /* prose */
	--link:#4F7A00;           /* 5.1:1 on white */
	--heading:#0165B0;
	--brand-green:#4F7A16;
	--nav:#2B57D6;            /* 6.1:1 with white */
	--nav-hover:#1F4FBF;      /* 7.2:1 with white */
	--focus-ring:#FFCC00;
	--holiday:#FF0000;        /* the site's original red, kept deliberately */
	--weekend:#FFCC99;
	--bridge:#FFCC00;
	--adjacent:#FFCCCC;
	--easter:#66FFFF;
	--school:#D4EDDA;         /* soft mint; 14:1 with the day-number ink */
}

body{font-size:62.5%;font-family:var(--font);background:#666666;margin:0;padding:15px 0}
/* max-width rather than a hard width: on a phone the layout viewport is the
   800px set by the viewport meta, so the white panel fills the screen exactly;
   on a desktop it caps at 800 and centres as before. Using width:800px risked a
   one-pixel horizontal scroll wherever the viewport rounded below 800. */
#wrap{width:100%;max-width:800px;background:url(../img/bg.gif) top center repeat-y #FFFFFF;margin:0 auto;padding-top:10px}
#top_content{padding:0 10px}

/* Skip link */
.skip-link{position:absolute;left:-9999px;top:0;z-index:10;background:#FFFFFF;color:var(--link);padding:10px 16px;font-size:1.3em;font-weight:bold;text-decoration:underline}
.skip-link:focus{left:0}

/* Header */
#topheader{
	background-color:var(--brand-green);
	background-image:linear-gradient(rgba(0,0,0,0.45),rgba(0,0,0,0.45)),url(../img/pochivni_dni_header4.png);
	background-repeat:no-repeat,repeat-x;
	background-size:100% 100%,auto;
	background-position:left top,left top;
	min-height:100px;margin:0 auto;padding:25px 15px 15px 15px
}
#title{padding:0;margin:0;font-size:2.6em;font-weight:bold;color:#FFFFFF}
#title span{font-size:0.5em;font-style:italic}
#title a:link,#title a:visited{color:#FFFFFF;text-decoration:none}
#title a:hover{color:#FFDD55;text-decoration:underline}

/* Navigation */
#navigation{background:var(--nav);border-top:1px solid #ffffff;height:25px;clear:both}
#navigation ul{padding:0;margin:0;list-style:none;font-size:1.3em;height:25px}
#navigation ul li{display:inline}
#navigation ul li a{color:#FFFFFF;display:block;text-decoration:none;float:left;line-height:25px;padding:0 11px;border-right:1px solid #ffffff}
#navigation ul li a:hover{background:var(--nav-hover);text-decoration:underline}
#navigation ul li a[aria-current="page"]{background:var(--nav-hover);font-weight:bold}
/* "Punți" dropdown: a native <details>, so it opens by tap, click or keyboard
   without JavaScript, and screen readers announce expanded/collapsed. The
   summary is styled as one more nav link; the year list hangs below the bar. */
#navigation li.has-sub{float:left;position:relative}
#navigation li.has-sub summary{color:#FFFFFF;display:block;line-height:25px;padding:0 11px;border-right:1px solid #ffffff;cursor:pointer;list-style:none}
#navigation li.has-sub summary::-webkit-details-marker{display:none}
/* Drawn with borders, like the month arrow, so screen readers announce nothing. */
#navigation li.has-sub summary::after{content:"";display:inline-block;margin-left:7px;vertical-align:middle;border:4px solid transparent;border-top:5px solid #FFFFFF;border-bottom:0}
#navigation li.has-sub details[open] summary::after{border-top:0;border-bottom:5px solid #FFFFFF}
#navigation li.has-sub summary:hover,#navigation li.has-sub details[open] summary{background:var(--nav-hover);text-decoration:underline}
#navigation li.has-sub:has(a[aria-current="page"]) summary{background:var(--nav-hover);font-weight:bold}
#navigation li.has-sub ul{position:absolute;top:25px;left:0;z-index:20;height:auto;min-width:100%;font-size:1em;background:var(--nav);border:1px solid #ffffff;border-top:0;box-shadow:0 4px 10px rgba(0,0,0,0.25)}
#navigation li.has-sub ul li{display:block}
#navigation li.has-sub ul li a{float:none;white-space:nowrap;border-right:0;border-top:1px solid #ffffff;line-height:30px}
/* Year menus: the whole year first, then the twelve month pages in two columns. */
#navigation li.year ul{display:grid;grid-template-columns:repeat(2,minmax(7.5em,auto))}
#navigation li.year ul li.all{grid-column:1/-1}
#navigation li.year ul li:not(.all):nth-child(odd) a{border-left:1px solid #ffffff}

/* Focus: a yellow ring inside a dark ring, so it reads on the blue bar,
   the green header and the white content area alike. */
a:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid #111111;outline-offset:0;box-shadow:0 0 0 6px var(--focus-ring)}

/* Content */
#content{background:url(../img/content_bg.gif) repeat-x left top #ffffff;color:var(--body-ink);margin:0 auto;padding:0 15px}
#content p#whereami{padding:20px 0 15px 0;margin:0}
#content h1,#content h2,#content h3,#content h4,#content h5{color:var(--heading)}
#content h1{font-family:var(--font);padding:0;margin:0 0 15px 0;font-size:2em}
#content h2{font-family:var(--font);padding:0;margin:0 0 15px 0;font-size:1.8em}
/* Without these, h3-h5 fall back to the UA default, which against the 62.5%
   base renders a heading smaller than the body text it introduces. */
#content h3{font-family:var(--font);padding:0;margin:0 0 10px 0;font-size:1.6em}
#content h4{font-family:var(--font);padding:0;margin:0 0 10px 0;font-size:1.45em}
#content h5{font-family:var(--font);padding:0;margin:0 0 10px 0;font-size:1.4em}
/* Prose is capped for line length; the paragraphs that wrap an ad slot opt out
   via .has-ad so the responsive units keep the full column width. */
#content p{font-size:1.4em;margin:0;padding:0 0 15px 0;max-width:70ch;text-wrap:pretty}
#content p.has-ad,#content p#whereami,#content p#arhiva{max-width:none}
#content ul{font-size:1.4em;line-height:1.8em;margin:0 0 15px 0;padding:0 0 0 22px;list-style:disc outside}
#content ol{font-size:1.4em;line-height:1.8em;margin:0 0 15px 0;padding:0 0 0 25px}
/* 1em, not 1.1em: the size is set once on the list so nested items don't compound. */
#content ul li,#content ol li{font-size:1em}
#content li p{font-size:1em;max-width:70ch}
/* Data tables (punti pages). Scoped by class so the width="242" calendar grids
   and the legend tables are untouched. */
#content table.punti{width:100%;border-collapse:collapse;margin:0 0 20px 0;font-size:1.4em;color:var(--ink)}
#content table.punti caption{text-align:left;color:var(--body-ink);padding:0 0 6px 0}
#content table.punti th,#content table.punti td{border:1px solid var(--cell-edge);padding:6px 8px;text-align:left;vertical-align:top;line-height:1.4}
#content table.punti thead th{background:#F1F4F8;color:var(--heading)}
#content table.punti tbody td:first-child{white-space:nowrap}
#content a:link,#content a:visited{color:var(--link);text-decoration:underline}
#content a:hover{color:#3B5C00;text-decoration:underline}

/* Calendar grids.
   Absolute px, not em: these tables are nested inside table.layout and an em
   value would compound with the parent cell. */
/* line-height 1.35 with 2px padding keeps the cell wider than it is tall, the
   proportion the original grid had (33x23). A taller box reads as a spreadsheet. */
#content table[width="242"] td,#content table[width="242"] th{font-size:12px;line-height:1.35;color:var(--ink)}

/* Modern grid frame.
   The markup still carries border="1", which browsers render as a beveled
   outset/inset pair with 1.6px of spacing -- the 1997 3D table look. Overriding
   it here keeps the HTML untouched: one hairline between cells, a slightly
   darker outer frame, rounded corners clipped with overflow so the colour
   blocks don't poke past them, and enough padding for the numbers to breathe. */
#content table[width="242"]{
	border:1px solid var(--cell-edge);
	border-radius:8px;
	border-collapse:separate;
	border-spacing:0;
	overflow:hidden;
	background:#FFFFFF;
	/* Fixed layout, or the columns size to their content and the last one --
	   which has no right border -- comes out a pixel narrower than the rest. */
	table-layout:fixed
}
#content table[width="242"] col,
#content table[width="242"] tr>*{width:14.2857%}
#content table[width="242"] td,#content table[width="242"] th{
	border:0;
	border-right:1px solid var(--cell-line);
	border-bottom:1px solid var(--cell-line);
	padding:2px 0
}
/* Transparent, not removed: dropping the border would shrink the last cell's
   box by 1px and the column would no longer match its neighbours. Keeping the
   border and hiding the paint preserves the geometry exactly. */
#content table[width="242"] tr>td:last-child,#content table[width="242"] tr>th:last-child{border-right-color:transparent}
#content table[width="242"] tr:last-child>td,#content table[width="242"] tr:last-child>th{border-bottom-color:transparent}
/* No font-weight here: every th carries an inline style="font-weight: bold"
   that CSS cannot outrank, so setting one would be a declaration that lies. */
#content table[width="242"] th{border-bottom:1px solid var(--cell-edge)}

/* Calendar colour mapping — overrides the legacy bgcolor attributes.
   Selector weight deliberately matches the day-cell rule above (one id, one
   attribute, two types) and sits after it, so these win the tie.
   White ink is set here, not only inline: the 2016-2020 pages mark holidays
   with bgcolor alone and would otherwise inherit the dark day-number colour. */
#content table td[bgcolor="#FF0000"]{background-color:var(--holiday);color:#FFFFFF}
#content table td[bgcolor="#FFCC99"]{background-color:var(--weekend)}
#content table td[bgcolor="#FFCC00"]{background-color:var(--bridge)}
#content table td[bgcolor="#FFCCCC"]{background-color:var(--adjacent)}
#content table td[bgcolor="#66FFFF"]{background-color:var(--easter)}
#content table td[bgcolor="#00CC99"]{background-color:var(--school)}
#content table th[bgcolor="#FFCC99"]{background-color:var(--weekend)}
/* Cells that explain themselves on hover also get a help cursor. */
#content td[title]{cursor:help}

/* Months with five week-rows are shorter than those with six. Table cells
   default to vertical-align:middle, so a short month floated down inside its
   row and its title stopped lining up with the month beside it. Pin every
   layout cell to the top and all titles share one baseline. This also
   overrides the legacy valign="bottom" attributes in the markup.

   padding-bottom separates each month block from the heading of the one below.
   It is two calendar rows deep (--month-gap) so the gap is tied to the grid's
   own rhythm rather than an arbitrary number. Without it the grids sit ~3px
   from the next month's title and read as one run-on block. */
#content table.layout>tbody>tr>td{vertical-align:top;padding-bottom:var(--month-gap)}
/* The layout table carries width="758", but #content only offers 750px inside
   its padding, so it has always spilled 8px past the column. Harmless on a wide
   desktop; on a phone, where the viewport is exactly the panel width, those 8px
   become a horizontal scrollbar. Capping it lets the spacer columns absorb the
   difference -- the 242px month grids inside are unaffected. */
#content table.layout{max-width:100%}
/* Month titles share the h1's blue so the page has one heading colour, rather
   than headings in blue and sub-headings in body grey. .has-ad paragraphs are
   ad wrappers, not titles. */
#content table.layout>tbody>tr>td>p:not(.has-ad){color:var(--heading)}
/* Month titles link to their month page; keep the heading blue, the underline says "link". */
#content table.layout>tbody>tr>td>p:not(.has-ad)>a:link,#content table.layout>tbody>tr>td>p:not(.has-ad)>a:visited{color:inherit}

/* Arrow in the spacer column, pointing from a month to its bridge-day twin.
   Drawn with borders rather than a "→" character so no screen reader announces
   it -- it is decoration; the grids' own aria-labels already say what they are.
   :has() picks only the spacer that actually sits before an "Idei" grid, so the
   other spacer columns stay empty. */
#content table.layout>tbody>tr>td:has(+td table[aria-label*="Idei"]){
	position:relative
}
#content table.layout>tbody>tr>td:has(+td table[aria-label*="Idei"])::after{
	content:"";
	position:absolute;
	top:92px;
	left:50%;
	width:0;
	height:0;
	margin-left:-5px;
	border-left:11px solid var(--arrow);
	border-top:8px solid transparent;
	border-bottom:8px solid transparent
}

/* Footer strip and archive */
.archive{line-height:2.4em}
#arhiva a{display:inline-block;padding:6px 8px}
.other_links{background:#eeeeee;border-top:1px solid #cccccc;padding:10px 5px;margin:0 0 15px 0;text-align:center;font-size:1.3em;line-height:1.6}
#content .other_links h2{color:#6B6B6B;padding:0 0 0 3px;margin:0}
#content .other_links a,#content .other_links a:visited{color:var(--link);text-decoration:underline}

img{max-width:100%;height:auto}

/* Reserve space for the responsive ad units so filling one doesn't shove the
   calendar down. The fixed-size slots already declare width/height inline.

   Deliberately opt-in, gated on `.ads-ok`, which the loader sets from its own
   onload handler. Reserving unconditionally is the obvious move and it is
   wrong: AdSense collapses a slot it cannot fill, but only if its script ran.
   With the script blocked or JavaScript off, nothing collapses anything and the
   page carries ~1350px of blank space. Gating on onload means the reservation
   exists exactly when something might fill it, and a reader who never gets the
   script never pays for it. onload lands well before the ad iframes size
   themselves, so the shift is still prevented. */
.ads-ok #content ins.adsbygoogle[data-ad-format="auto"]{min-height:250px}
.ads-ok #content p#whereami ins.adsbygoogle[data-ad-format="auto"]{min-height:100px}

/* No mobile reflow by design.
   The viewport meta pins the layout to 800px, so phones render the desktop
   page and scale it to the screen rather than stacking the calendars into a
   very long single column. #wrap is exactly that 800px, so the white panel
   fills the screen edge to edge with no grey margin beside it.

   Trade-off, recorded deliberately: text is scaled down on a phone and the
   page no longer reflows at narrow widths (WCAG 1.4.10). Pinch-zoom is left
   enabled, so a reader can still magnify. Don't "restore" a stacked mobile
   block without asking -- this is the requested behaviour, not an oversight. */
#content ins.adsbygoogle{max-width:100%;overflow:hidden}

@media (prefers-reduced-motion:reduce){
*{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important}
}

/* Windows High Contrast / forced-colors.
   Forced colours normally override every author background, which would flatten
   all six calendar colours into one system colour and delete the entire meaning
   of the page. This is the case the spec carves out forced-color-adjust for:
   the colour IS the content. Applied only to the calendar cells and the legend
   swatches that decode them -- everything else keeps the user's chosen palette.
   Borders are restored explicitly so the grid stays readable. */
@media (forced-colors:active){
#content table[width="242"] td,#content table[width="242"] th,
#content table td[bgcolor],#content table th[bgcolor],
#content td[style*="background-color"]{
	forced-color-adjust:none;
	border:1px solid ButtonBorder
}
#content table[width="242"] td,#content table[width="242"] th{color:#1a1a1a}
#content table td[bgcolor="#FF0000"]{color:#FFFFFF}
a:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid Highlight;box-shadow:none}
}

/* Print: this is a calendar, so people print it.
   Browsers drop background colours when printing, which would strip the colour
   coding; print-color-adjust keeps it. Ads, nav and archive links are dropped --
   none of them mean anything on paper -- and the fixed 800px shell is released
   so the grids fit the sheet. */
@media print{
body{background:#FFFFFF;color:#000000;padding:0;font-size:62.5%}
#wrap{width:auto;max-width:100%;background:none;padding:0}
#top_content{padding:0}
#navigation,#arhiva,.skip-link,.other_links{display:none}
/* !important is load-bearing: every <ins> carries an inline style="display:block"
   from the AdSense snippet, which an author rule cannot otherwise beat. Without
   it the ad boxes print. */
ins.adsbygoogle{display:none !important}
#topheader{height:auto;padding:0 0 8pt 0;background:none;color:#000000;border-bottom:1pt solid #000000}
#title,#title a:link,#title a:visited{color:#000000;font-size:2em}
#topheader p{color:#000000 !important;font-size:1.2em}
/* #content sets its own colour with id specificity, so body{color} never reaches it. */
#content{padding:0;background:none;color:#000000}
#content h1,#content h2,#content h3{color:#000000}
#content a:link,#content a:visited{color:#000000;text-decoration:none}
#content table[width="242"] td,#content table[width="242"] th,
#content table td[bgcolor],#content td[style*="background-color"]{
	-webkit-print-color-adjust:exact;
	print-color-adjust:exact
}
/* The month grids are laid out three-up at a fixed 758px, which is wider than
   A4's printable width (~190mm) and would clip or force the browser to shrink
   the whole page. Letting the layout table and its grids go fluid keeps the
   familiar three-up arrangement and fits whatever paper is used. */
@page{margin:12mm}
/* Kept explicit so the three-up layout is guaranteed on paper regardless of
   sheet width, then sized to fit it. */
#content table.layout{display:table;width:100%}
#content table.layout>tbody{display:table-row-group}
#content table.layout>tbody>tr{display:table-row}
#content table.layout>tbody>tr>td{display:table-cell;padding:0 4pt 14pt 0}
#content table.layout table[width="242"]{width:100%;max-width:none}
#content table[width]{width:auto}
#content table[width="242"]{break-inside:avoid;page-break-inside:avoid}
#content table.layout>tbody>tr>td{break-inside:avoid;page-break-inside:avoid}
#content h1,#content h2{break-after:avoid;page-break-after:avoid}
}
