/* idzan.hr — public site styles.
   The four brand colors come from /theme.css (CMS → Settings → Colors):
   --primary page/header/footer · --secondary cards/bands · --text · --accent buttons/links.
   Everything else is derived from them, so changing a color there re-themes the whole site. */
:root {
  color-scheme: dark;
  --primary: #1F2022; --secondary: #2B2B2B; --text: #FDFBFB; --accent: #FFB900;
  --muted: color-mix(in srgb, var(--text) 68%, var(--primary));
  --line: color-mix(in srgb, var(--text) 13%, transparent);
  --raise: color-mix(in srgb, var(--secondary) 82%, var(--text) 4%);
  --on-accent: var(--primary);
  --accent-fill: var(--accent);   /* backgrounds (buttons, bars); --accent is for text, links and borders */
  --radius: 12px;
  /* Brand fonts (self-hosted, set in CMS → Settings → Fonts); system fonts are only the fallback. */
  --font: "Roboto Self Hosted", Roboto, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-head: var(--font);
  --step: 1rem;
  --wrap: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-bottom: 88px; font-size: var(--step); background: var(--primary); }
body { margin: 0; background: var(--primary); color: var(--text); font: 400 1.0625rem/1.65 var(--font); text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--text); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
::selection { background: var(--accent-fill); color: var(--on-accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--accent-fill); color: var(--on-accent); padding: 10px 16px; border-radius: 6px; z-index: 100; font-weight: 700; }
.skip:focus { top: 12px; color: var(--on-accent); }
main:focus { outline: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }
.wrap.narrow { max-width: 780px; }
.wrap.mid { max-width: 1000px; }
.center { text-align: center; }
.section { padding-block: 8px 64px; }
.band { background: var(--secondary); padding-block: 56px; margin-block: 24px; }
.page-head { padding-block: 56px 16px; }
.page-head h1::after, .band h2::after, .section > h2::after { content: ""; display: block; width: 48px; height: 4px; background: var(--accent-fill); border-radius: 2px; margin-top: 14px; }

/* header */
.site-header { background: color-mix(in srgb, var(--primary) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; }
.bar { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; color: var(--text); text-decoration: none; margin-right: auto; letter-spacing: -.01em; }
.brand:hover { color: var(--accent); }
.mainnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.mainnav a { display: block; padding: 8px 14px; color: var(--text); text-decoration: none; font-weight: 500; border-radius: 8px; }
.mainnav a:hover { color: var(--accent); }
.mainnav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.theme-btn { order: 6; display: inline-grid; place-items: center; width: 44px; height: 44px; background: none; border: 1px solid var(--line);
  border-radius: 8px; color: var(--text); cursor: pointer; }
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }
.theme-btn svg { width: 20px; height: 20px; }
.theme-btn .i-sun { display: none; }
html[data-theme="light"] .theme-btn .i-sun { display: block; }
html[data-theme="light"] .theme-btn .i-moon { display: none; }
.lang { position: relative; order: 5; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; background: none; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); font: 600 .9rem/1 var(--font); cursor: pointer; }
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; list-style: none; margin: 0; padding: 6px; background: var(--secondary);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.5); z-index: 60; }
.lang-menu[hidden] { display: none; }
.lang-menu a { display: block; padding: 9px 12px; border-radius: 6px; color: var(--text); text-decoration: none; }
.lang-menu a:hover, .lang-menu a:focus-visible { background: var(--primary); color: var(--accent); }
.lang-menu a[aria-current] { color: var(--accent); font-weight: 700; }
.tr-note { margin: 14px auto 0; font-size: .88rem; color: var(--muted); }
.tr-note a { color: var(--accent); }
.menu-btn { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; order: 3; }
.burger, .burger::before, .burger::after { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; position: relative; transition: transform .2s; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -7px; } .burger::after { top: 7px; }
.menu-btn[aria-expanded="true"] .burger { background: transparent; }
.menu-btn[aria-expanded="true"] .burger::before { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .burger::after { transform: translateY(-7px) rotate(-45deg); }

/* buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border-radius: 8px; background: var(--accent-fill); color: var(--on-accent);
  text-decoration: none; border: 2px solid var(--accent-fill); cursor: pointer; font: inherit; font-weight: 500; transition: background .15s, color .15s, border-color .15s; }
.btn:hover { background: transparent; color: var(--accent); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

/* hero */
.hero { padding-block: 80px; background: radial-gradient(120% 90% at 85% 40%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%), var(--primary); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6.5vw, 4.4rem); margin-bottom: .15em; }
.tagline { font-size: clamp(1.15rem, 2.2vw, 1.5rem); color: var(--muted); margin: 0; font-weight: 500; }
.tagline::before { content: ""; display: inline-block; width: 28px; height: 3px; background: var(--accent-fill); vertical-align: middle; margin-right: 12px; border-radius: 2px; }
.hero-img img, .hero-img .img-ph { width: 100%; max-width: 440px; margin-left: auto; border-radius: 50%; aspect-ratio: 1; object-fit: cover; border: 4px solid var(--accent); box-shadow: 0 24px 60px -24px rgba(0,0,0,.7); }
.hero-img .img-ph { font-size: clamp(3rem, 9vw, 6rem); }

/* about */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 48px; align-items: start; padding-bottom: 40px; }
.about-img img, .about-img .img-ph { border-radius: var(--radius); position: sticky; top: 96px; }
.about-img .img-ph { aspect-ratio: 4 / 5; font-size: 4rem; }

/* cards */
.grid { display: grid; gap: 24px; }
.cards3 { grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); }
.card { background: var(--secondary); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 6px; min-width: 0; transition: border-color .15s, transform .15s; }
.band .card { background: var(--primary); }
.card:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.card h3 { margin: 0; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card p { margin: 0; }
.card .role { color: var(--accent); font-weight: 600; }
.card .meta, .meta { color: var(--muted); font-size: .92rem; }
.card .more { margin-top: auto; padding-top: 10px; font-weight: 700; text-decoration: none; }
.card .more:hover { text-decoration: underline; color: var(--accent); }
.card.post, .card.proj { padding: 0 0 22px; overflow: hidden; }
.card.post > *:not(.thumb), .card.proj > *:not(.thumb) { margin-left: 22px; margin-right: 22px; }
.thumb { display: block; text-decoration: none; aspect-ratio: 3 / 2; max-width: 100%; overflow: hidden; background: var(--raise); margin-bottom: 12px; }
.thumb img, .thumb .img-ph { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .thumb img { transform: scale(1.03); }
.card.cert img { max-height: 170px; width: auto; margin: 0 auto 10px; border-radius: 6px; }
.card.cert .img-ph { height: 140px; margin-bottom: 10px; border-radius: 6px; font-size: 1.6rem; }

/* image placeholder (shown when an image can't load) */
.img-ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--raise), var(--secondary)); color: var(--accent); font-weight: 700; letter-spacing: .04em; font-size: 2.2rem; text-align: center; padding: 12px; overflow: hidden; }
.img-ph small { display: block; font-size: .8rem; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 6px; line-height: 1.3; }
.feature.img-ph { aspect-ratio: 16 / 7; }

.facts { margin: 8px 0 0; display: grid; gap: 4px; }
.facts div { display: flex; gap: 8px; flex-wrap: wrap; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dt::after { content: ":"; }
.facts dd { margin: 0; font-weight: 500; }
.now { color: var(--on-accent); background: var(--accent-fill); font-weight: 700; padding: 0 8px; border-radius: 99px; font-size: .85rem; }
.inline-facts { display: flex; flex-wrap: wrap; gap: 6px 28px; padding-block: 14px; border-block: 1px solid var(--line); margin: 20px 0 28px; }

/* blog nav */
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cats a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; color: var(--text); font-size: .92rem; }
.cats a:hover { border-color: var(--accent); color: var(--accent); }
.cats a[aria-current="page"] { background: var(--accent-fill); color: var(--on-accent); border-color: var(--accent-fill); font-weight: 700; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin-top: 40px; }
.pager a, .pager span { padding: 7px 13px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.pager .of { border: 0; color: var(--muted); margin-right: 8px; }
.pager .cur { background: var(--accent-fill); color: var(--on-accent); border-color: var(--accent-fill); font-weight: 700; }
.pager .off { opacity: .4; }
.pager .gap { border: 0; }
.pager a:hover { border-color: var(--accent); color: var(--accent); }

/* single */
.single { padding-block: 48px 24px; }
.single h1 { margin-bottom: .3em; }
.kicker { color: var(--muted); font-size: .95rem; margin: 0 0 10px; }
.kicker a { color: var(--accent); text-decoration: none; font-weight: 600; }
.lead { font-size: 1.25rem; color: var(--accent); margin: 0; font-weight: 600; }
.feature { width: 100%; border-radius: var(--radius); margin: 8px 0 36px; max-height: 620px; object-fit: cover; }
.single-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.facts-card { position: sticky; top: 96px; }
.facts-card .facts { gap: 14px; margin: 0; }
.facts-card .facts div { display: block; }
.facts-card dt::after { content: ""; }
.facts-card dt { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; color: var(--accent); }
.facts-card dd a { overflow-wrap: anywhere; }
.tags { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { background: var(--primary); border: 1px solid var(--line); border-radius: 99px; padding: 2px 11px; font-size: .88rem; font-weight: 500; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.prevnext a { text-decoration: none; color: var(--text); font-weight: 600; }
.prevnext a span { display: block; color: var(--accent); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.prevnext .next { text-align: right; }
.prevnext a:hover { color: var(--accent); }

/* showcase: projects & affiliates (image + title, description, fact tiles) */
.showcase { padding-block: 40px 8px; }
.sc-head { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 36px; align-items: center; margin-bottom: 40px; }
.sc-img img, .sc-img .img-ph { width: 100%; aspect-ratio: 3 / 2; max-width: 100%; object-fit: cover; border-radius: 6px; box-shadow: 0 18px 40px -22px rgba(0,0,0,.8); }
.sc-img .img-ph { font-size: 2.6rem; }
.sc-title h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; margin: 0; }
.sc-title .kicker { margin-bottom: 12px; }
.sc-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 56px; align-items: start; }
.sc-facts { position: sticky; top: 96px; display: grid; gap: 18px; }
.sc-facts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.fact { display: flex; align-items: center; gap: 16px; min-width: 0; }
.fact-ico { flex: 0 0 64px; height: 64px; display: grid; place-items: center; background: var(--secondary); border-radius: 4px; color: var(--accent); }
.fact-txt { display: grid; gap: 2px; min-width: 0; }
.fact-lbl { font-weight: 700; font-size: .95rem; }
.fact-val { color: color-mix(in srgb, var(--text) 88%, var(--primary)); overflow-wrap: anywhere; }
.fact-val a { color: var(--accent); text-decoration: none; font-weight: 600; }
.fact-val a:hover { text-decoration: underline; }
.nocode { font-weight: 700; letter-spacing: .04em; }
.promo { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.promo-code { font: 700 1rem ui-monospace, Menlo, Consolas, monospace; background: var(--secondary); border: 1px dashed var(--accent); color: var(--accent); padding: 3px 10px; border-radius: 4px; user-select: all; }
.copy-btn { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 4px; padding: 3px 10px; font: inherit; font-size: .85rem; cursor: pointer; }
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.sc-cta { justify-self: start; }
.sc-note { margin: 0; font-size: .85rem; color: var(--muted); }
.badge-kind { margin: 0; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.aff-code { font-size: .92rem; color: var(--muted); }
.aff-code .nocode { color: var(--text); font-size: .85rem; }
.aff-code .promo-code { font-size: .88rem; padding: 1px 8px; }

/* icons (library SVGs or built-in line icons) */
.ico { width: 26px; height: 26px; flex: 0 0 auto; }
.fact-ico .ico { width: 30px; height: 30px; }
.card .facts div { align-items: center; }
.card .facts .ico, .with-ico .ico { width: 18px; height: 18px; color: var(--accent); }
.with-ico { display: flex; align-items: center; gap: 8px; }
.card-ico .ico { width: 34px; height: 34px; color: var(--accent); margin-bottom: 4px; }
.prose a .ico { width: 44px; height: 44px; vertical-align: middle; margin-right: 10px; }
.prose a:has(.ico) { display: inline-flex; align-items: center; text-decoration: none; }

/* prose */
.prose { font-size: 1.08rem; min-width: 0; overflow-wrap: break-word; }
.prose > * { margin-block: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 1.8em; font-size: 1.6rem; }
.prose h3 { margin-top: 1.5em; font-size: 1.3rem; }
.prose img { border-radius: 8px; margin: 1.4em auto; }
.prose figure { margin: 1.6em 0; }
.prose figure img { margin: 0 auto; }
.prose figcaption { color: var(--muted); font-size: .9rem; text-align: center; margin-top: 8px; }
.prose blockquote { margin: 1.5em 0; padding: .4em 1.2em; border-left: 4px solid var(--accent); color: var(--muted); font-style: italic; }
.prose pre { background: var(--secondary); padding: 16px; border-radius: 8px; overflow-x: auto; font-size: .92rem; }
.prose code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; }
.prose :not(pre) > code { background: var(--secondary); padding: 1px 6px; border-radius: 4px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--accent); }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 8px; }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.page-body { padding-bottom: 48px; }

/* footer */
.site-footer { background: var(--secondary); color: var(--muted); padding-block: 48px 40px; margin-top: 64px; font-size: .95rem; border-top: 3px solid var(--accent); }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--accent); }
.site-footer ul { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-links { font-weight: 700; font-size: 1.05rem; }
.legal { font-size: .9rem; }
.copy { margin: 18px 0 6px; }
.note { font-size: .85rem; }
.note p { margin: 0; }

/* blog post: image + title header, content with a sticky sidebar (progress, share, category, date) */
.post-single { padding-top: 32px; }
.post-hero { display: grid; grid-template-columns: minmax(0, 37%) minmax(0, 1fr); gap: 20px; align-items: center; margin-bottom: 28px; }
.post-hero.no-image { grid-template-columns: minmax(0, 1fr); }
.post-hero-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px; display: block; }
.post-hero-txt h1 { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.1rem); line-height: 1.2; margin: 0 0 .35em; }
.post-hero-txt .kicker { margin: 0; }
.post-grid { display: grid; grid-template-columns: minmax(0, 1fr) 375px; gap: 24px; align-items: start; }
.post-body { min-width: 0; }
.post-side { position: sticky; top: 88px; display: grid; gap: 24px; }
.side-title { margin: 0 0 12px; font-weight: 700; font-size: 1.15rem; color: var(--text); }
.read-block progress { display: block; width: 100%; height: 10px; border: 0; border-radius: 99px; background: var(--secondary); overflow: hidden; -webkit-appearance: none; appearance: none; }
.read-block progress::-webkit-progress-bar { background: var(--secondary); border-radius: 99px; }
.read-block progress::-webkit-progress-value { background: var(--accent-fill); border-radius: 99px; }
.read-block progress::-moz-progress-bar { background: var(--accent-fill); border-radius: 99px; }
.read-txt { margin: 8px 0 0; font-size: .92rem; color: var(--muted); }
.read-txt span { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.share { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.share a { display: grid; place-items: center; width: 45px; height: 45px; color: #fff; border-radius: 2px; transition: filter .15s, transform .15s; }
.share a:hover { filter: brightness(1.15); transform: translateY(-1px); }
.share a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.share .ico { width: 20px; height: 20px; }
/* Brand colours, darkened where needed so the white mark keeps at least 3:1 contrast. */
.share-facebook { background: #3b5998; }
.share-x, .share-threads { background: #000; box-shadow: inset 0 0 0 1px #444; }
.share-linkedin { background: #0a66c2; }
.share-whatsapp { background: #128c7e; }
.share-telegram { background: #0077b5; }
.share-email { background: #c62828; }
.side-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.side-facts .fact-lbl { color: var(--accent); }
.side-facts .fact-val a { color: var(--text); font-weight: 400; }
.side-facts .fact-val a:hover { color: var(--accent); }
/* phones: thin reading bar under the header instead of the sidebar block */
.read-bar { display: none; position: fixed; left: 0; right: 0; top: 0; height: 4px; z-index: 55; background: transparent; pointer-events: none; }
.read-bar span { display: block; height: 100%; width: 100%; background: var(--accent-fill); transform-origin: 0 50%; transform: scaleX(0); }

/* 404 page */
.nf { padding-block: 56px 72px; text-align: center; }
.nf-code { margin: 0; font: 800 clamp(5rem, 3rem + 9vw, 9rem)/1 var(--font-head, var(--font)); color: var(--accent); letter-spacing: -.04em; }
.nf h1 { margin: .2em 0 .5em; }
.nf-lead { font-size: 1.15rem; }
.nf .btns { justify-content: center; margin: 28px 0 8px; }
.nf-browse { margin: 18px 0 0; color: var(--muted); }
.nf-browse a { color: var(--accent); }

/* content boxes from the editor: info (light blue), notice (blue), warning (red) */
.box { padding: 18px 22px; border-radius: 10px; margin: 1.6em 0; }
.box > :first-child { margin-top: 0; }
.box > :last-child { margin-bottom: 0; }
.box h2, .box h3, .box h4 { margin: 0 0 .5em; line-height: 1.25; }
.box a { color: inherit; text-decoration: underline; text-underline-offset: .18em; font-weight: 600; }
.box-info { background: var(--box-info-bg, #d9edf7); color: #1f2022; }
.box-info h2, .box-info h3, .box-info h4 { color: var(--box-info-head, #3771a7); }
.box-notice { background: var(--box-notice, #3771a7); color: #fff; }
.box-warning { background: var(--box-warning, #da232c); color: #fff; }
.box-notice h2, .box-notice h3, .box-notice h4, .box-warning h2, .box-warning h3, .box-warning h4 { color: #fff; }
.box ::selection { background: #1f2022; color: #fff; }
@media (forced-colors: active) { .box { border: 2px solid CanvasText; } }

/* contact page: links as a card grid (Admin → Contact links) */
.prose .contact-grid { list-style: none; margin: 28px 0 36px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.prose .contact-grid li { margin: 0; padding: 0; }
.prose .contact-grid li::before { content: none; }
.prose .contact-grid a.contact-card { display: flex; align-items: center; gap: 14px; height: 100%; padding: 14px 16px; background: var(--secondary); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.prose .contact-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.prose .contact-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.contact-ico { flex: 0 0 52px; height: 52px; display: grid; place-items: center; background: var(--primary); border-radius: 4px; color: var(--accent); }
.prose .contact-grid .contact-ico .ico { width: 30px; height: 30px; margin: 0; }
.contact-txt { display: grid; gap: 2px; min-width: 0; }
.contact-lbl { color: var(--accent); font-weight: 700; font-size: .95rem; line-height: 1.3; }
.contact-val { color: var(--text); overflow-wrap: anywhere; line-height: 1.35; }
.prose .contact-card:hover .contact-val { text-decoration: underline; text-underline-offset: .18em; }

/* cookie consent banner */
.consent { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 70; width: min(440px, calc(100% - 32px));
  background: var(--secondary); color: var(--text); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 10px;
  padding: 18px 20px; box-shadow: 0 16px 40px rgba(0,0,0,.55); display: grid; gap: 10px; max-height: calc(100vh - 32px); overflow-y: auto; }
.consent[hidden] { display: none; }
.consent-title { margin: 0; font-weight: 700; font-size: 1.05rem; }
.consent-text { margin: 0; font-size: .92rem; color: var(--muted); }
.consent-cats { display: grid; gap: 6px; }
.consent-cats[hidden] { display: none; }
.consent-cat { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; background: var(--primary); border-radius: 6px; cursor: pointer; }
.consent-cat span:first-child { display: grid; }
.consent-cat small { color: var(--muted); font-size: .8rem; }
.consent-cat input { accent-color: var(--accent); width: 18px; height: 18px; flex: 0 0 auto; }
.consent-cat .always { font-size: .75rem; color: var(--accent); font-weight: 700; white-space: nowrap; }
.consent-cat .always + input { display: none; }
.consent-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.consent-btns .btn { padding: 9px 16px; font-size: .92rem; flex: 1 1 auto; }
.consent-btns [hidden] { display: none; }
.consent-links { margin: 0; font-size: .82rem; }
.consent-links a { color: var(--muted); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--text); cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }
.linkbtn:hover { color: var(--accent); }
.consent-link { margin: 0 0 6px; font-size: .9rem; }
/* Floating "Manage consent" button, bottom left (the accessibility button sits bottom right). */
.consent-fab { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px 0 14px;
  background: var(--secondary); color: var(--text); border: 2px solid var(--accent); border-radius: 999px;
  font: 600 .95rem/1.2 var(--font); cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.45); }
.consent-fab[hidden] { display: none; }
.consent-fab svg { color: var(--accent); flex: 0 0 auto; }
.consent-fab:hover { background: var(--accent-fill); color: var(--on-accent); }
.consent-fab:hover svg { color: var(--on-accent); }
.consent-fab:focus-visible, .a11y-btn:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
/* Keep the last footer line clear of the two floating buttons. */
.site-footer { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
@media (forced-colors: active) { .consent-fab, .a11y-btn { border: 2px solid ButtonText; } }

/* accessibility widget */
.a11y { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60; }
.a11y-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--accent-fill); color: var(--on-accent); font: 700 1rem var(--font); cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.45); }
.a11y-btn:hover { filter: brightness(1.08); }
.a11y-panel { position: absolute; right: 0; bottom: 58px; background: var(--secondary); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; width: 220px; box-shadow: 0 10px 30px rgba(0,0,0,.5); display: grid; gap: 8px; font-size: .95rem; }
.a11y-panel[hidden] { display: none; }
.a11y-panel label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.a11y-panel input { accent-color: var(--accent); }
.a11y-title { margin: 0 0 2px; font-weight: 700; color: var(--accent); }
.a11y-reset { justify-self: start; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; cursor: pointer; font: inherit; color: var(--text); }

html.a11y-big { --step: 1.2rem; }
html.a11y-links a { text-decoration: underline !important; }
html.a11y-readable body { font-family: Verdana, Tahoma, sans-serif; letter-spacing: .02em; word-spacing: .08em; line-height: 1.8; }
html.a11y-still *, html.a11y-still *::before, html.a11y-still *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-contrast, html.a11y-contrast[data-theme] { color-scheme: dark; --primary: #000000; --secondary: #000000; --text: #FFFFFF; --accent: #FFE000; --accent-fill: #FFE000; --on-accent: #000000; --muted: #FFFFFF; --line: #FFFFFF; --raise: #000000; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 900px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .post-side { position: static; }
  .read-block { display: none; }
  .read-bar { display: block; }
  .hero-grid, .about-grid, .single-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero { padding-block: 48px; }
  .hero-img { order: -1; }
  .hero-img img, .hero-img .img-ph { max-width: 240px; margin: 0 auto; }
  .about-img img, .about-img .img-ph, .facts-card, .sc-facts { position: static; }
  .sc-head, .sc-body { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .sc-body { gap: 40px; }
  .about-img { max-width: 360px; }
}
@media (max-width: 760px) {
  .post-hero { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .wrap { padding-inline: 16px; }
  .bar { gap: 8px; min-height: 64px; flex-wrap: wrap; }
  .menu-btn { display: block; }
  .lang { order: 2; }
  .theme-btn { order: 2; }
  .lang-btn { padding: 0 10px; }
  .mainnav { display: none; width: 100%; order: 4; padding-bottom: 12px; }
  .mainnav.open { display: block; }
  .mainnav ul { flex-direction: column; }
  .mainnav a { padding: 12px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .mainnav a[aria-current="page"] { box-shadow: none; }
  .page-head { padding-top: 36px; }
  .prevnext { grid-template-columns: 1fr; }
  .prevnext .next { text-align: left; }
  .btns .btn { flex: 1 1 calc(50% - 12px); }
}

@media print {
  .site-header, .site-footer, .a11y, .consent, .consent-fab, .post-side, .read-bar, .prevnext, .skip { display: none !important; }
  body { color: #000; background: #fff; }
}
