/* Címlapok: shared site parts for every page: <site-header> (top bar), <site-footer>, consent banner. */
site-header{
  position:sticky; top:0; z-index:5; background:var(--bg);
  display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px;
  /* Background runs edge to edge (past the page gutters); contents stay where they were. */
  margin:0 calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter-l));
  padding:14px var(--gutter-r) 12px var(--gutter-l);
  transition:box-shadow .2s ease;
}
/* Desktop, where the bar stays pinned: a soft shadow once the page is scrolled. */
@media (min-width:561px){
  site-header.scrolled{box-shadow:0 6px 18px -10px rgba(0,0,0,.35)}
  @media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) site-header.scrolled{box-shadow:0 6px 18px -8px rgba(0,0,0,.8)} }
  :root[data-theme="dark"] site-header.scrolled{box-shadow:0 6px 18px -8px rgba(0,0,0,.8)}
}
@media (prefers-reduced-motion: reduce){ site-header{transition:none} }
.brand{display:flex; align-items:baseline; gap:12px; min-width:0}
.brand-title{font:600 26px/1 var(--serif); letter-spacing:-.01em; margin:0}
.brand-title a{color:inherit; text-decoration:none}
.brand-title a:hover{color:var(--accent)}
.brand time{font:400 12px var(--mono); color:var(--muted)}
/* Light/dark switch, top right. */
.theme-switch{
  position:relative; flex:none; width:54px; height:30px; padding:0; cursor:pointer;
  border:1px solid var(--line); border-radius:999px; background:var(--surface);
}
.theme-switch .knob{
  position:absolute; top:3px; left:3px; width:22px; height:22px; border-radius:50%;
  display:grid; place-items:center; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.25);
  transition:transform .2s ease;
}
.theme-switch .knob svg{width:15px; height:15px; grid-area:1/1}
/* Light mode: a light, yellow sun. Dark mode: a dark moon (the knob stays light so it reads on the dark track). */
.theme-switch .i-sun{fill:#f6b400; stroke:#f6b400}
.theme-switch .i-moon{fill:#1f2a44; display:none}
.theme-switch[aria-checked="true"]{background:#2b3138}
.theme-switch[aria-checked="true"] .knob{transform:translateX(24px); background:#e9ecef}
.theme-switch[aria-checked="true"] .i-sun{display:none}
.theme-switch[aria-checked="true"] .i-moon{display:block}
@media (prefers-reduced-motion: reduce){ .theme-switch .knob{transition:none} }
site-header.bare .theme-switch{margin-left:auto}   /* no page controls: keep the switch in the top-right corner */
.site-foot{margin-top:28px; padding-top:14px; border-top:1px solid var(--line); text-align:center; font-size:13px}
.site-foot a{color:var(--muted)}
.consent p a{color:var(--accent)}
.consent{
  position:fixed; z-index:30; left:50%; transform:translateX(-50%); bottom:16px;
  width:min(720px, calc(100vw - 32px)); max-height:calc(100vh - 32px); overflow:auto;
  background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:12px;
  box-shadow:0 10px 40px rgba(0,0,0,.18); padding:16px 18px;
}
.consent[hidden]{display:none}
.consent h2{font:600 18px var(--serif); margin:0 0 6px}
.consent p{margin:0 0 10px; font-size:13px; color:var(--muted)}
.consent .opts{display:grid; gap:8px; margin:4px 0 12px; padding:10px 12px; background:var(--bg); border-radius:8px}
.consent .opts[hidden]{display:none}
.consent label{display:flex; gap:10px; align-items:flex-start; font-size:13px; cursor:pointer}
.consent label input{width:17px; height:17px; margin-top:1px; accent-color:var(--accent); flex:none}
.consent label small{display:block; color:var(--muted)}
.consent .row-btns{display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end}
.consent .btn{min-width:150px; text-align:center}
.consent .btn.dark{background:var(--ink); color:var(--bg); border-color:var(--ink); font-weight:500}
@media (max-width:560px){ .consent .btn{flex:1 1 100%} }
site-footer{display:block}
.site-foot .linklike{border:0; background:none; padding:0; cursor:pointer; color:var(--muted); text-decoration:underline; font-size:inherit}
@media (max-width:560px){
  site-header{position:static}
  /* Phone: title and theme switch on the first line, page controls below. */
  .brand{flex:1 1 auto}
  .theme-switch{order:2}
}

/* Notifications (assets/js/push.js): the bell icon on notification buttons, and the short messages */
.push-bell{width:16px; height:16px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round}
.push-bell.on .push-bell-body{fill:currentColor}
button:hover > .push-bell:not(.on){transform:rotate(-12deg); transition:transform .15s}
.push-toast{position:fixed; left:50%; bottom:20px; z-index:50; transform:translate(-50%, 20px); max-width:min(560px, calc(100vw - 32px));
  padding:12px 16px; border-radius:10px; background:var(--ink); color:var(--bg); font-size:14px; line-height:1.4; box-shadow:0 10px 30px rgba(0,0,0,.25);
  opacity:0; pointer-events:none; transition:opacity .2s, transform .2s}
.push-toast.on{opacity:1; transform:translate(-50%, 0)}
@media (prefers-reduced-motion: reduce){ .push-toast{transition:none} button:hover > .push-bell:not(.on){transform:none} }
