/* Címlapok: homepage styles (slider, source cards, videos, alerts, settings dialog). */
#refresh{height:38px}
/* View switch and the sources button, just above the feeds. */
.feed-tools{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin-top:14px}

/* Hero slider: picture left, headline right (stacked on phones); slides move sideways, by
   buttons, dots, keys, auto-rotation or a swipe/drag. Controls sit below the slider. */
.hero-slider{margin-top:18px; border-radius:12px; overflow:hidden}   /* no panel: the headline sits on the page background */
.hero-viewport{overflow:hidden; touch-action:pan-y}
@media (pointer:fine){ .hero-viewport{cursor:grab} .hero-viewport:active{cursor:grabbing} }
.hero-track{display:flex; transition:transform .45s cubic-bezier(.22,.61,.36,1); will-change:transform}
.hero-track.dragging{transition:none}
.hero-slide{
  flex:0 0 100%; min-width:0; display:grid; grid-template-columns:minmax(0,3fr) minmax(0,2fr);
  text-decoration:none; color:inherit; -webkit-user-select:none; user-select:none; -webkit-user-drag:none;
}
.hero-media{position:relative; aspect-ratio:16/9; background:var(--line); overflow:hidden}
.hero-media img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; -webkit-user-drag:none; pointer-events:none}
.hero-noimg{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center; padding:16px; text-align:center;
  font:600 26px var(--serif); color:var(--muted); background:linear-gradient(135deg, var(--fresh), var(--line));
}
.hero-text{display:flex; flex-direction:column; justify-content:center; gap:10px; padding:24px 28px; min-width:0}
.hero-meta-row{display:flex; align-items:center; gap:10px; flex-wrap:wrap; font:500 12px var(--mono); color:var(--muted)}
.hero-badge{
  background:var(--accent); color:var(--accent-ink); padding:3px 8px; border-radius:6px;
  font-weight:600; text-transform:uppercase; letter-spacing:.05em; font-size:10px;
}
.hero-title{font:600 clamp(20px, 2.2vw, 30px)/1.25 var(--serif); margin:0; text-wrap:pretty; overflow-wrap:anywhere}
/* The article's excerpt (desktop only): about 200 characters, never more than five lines. */
.hero-desc{margin:2px 0 0; font:400 15px/1.5 var(--sans); color:var(--muted); text-wrap:pretty;
  display:-webkit-box; -webkit-line-clamp:5; -webkit-box-orient:vertical; overflow:hidden}
.hero-slide:hover .hero-title{text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:4px}
.hero-slide:focus-visible{outline-offset:-3px}
.hero-controls{display:flex; align-items:center; justify-content:center; gap:6px; padding:10px 0 2px}
.hero-dots{display:flex; align-items:center}
.hero-dot{width:24px; height:24px; border:0; padding:0; background:none; cursor:pointer; display:grid; place-items:center}
.hero-dot::after{content:""; width:8px; height:8px; border-radius:50%; background:var(--line); transition:background .2s, transform .2s}
.hero-dot:hover::after{background:var(--muted)}
.hero-dot.active::after{background:var(--ink); transform:scale(1.3)}
.hero-btn{
  width:32px; height:32px; border-radius:50%; border:0; background:none; color:var(--muted);
  cursor:pointer; display:grid; place-items:center; font-size:13px; line-height:1; padding:0;
}
.hero-btn:hover{color:var(--ink); background:var(--line)}
.hero-pause{margin-right:6px}
@media (max-width:768px){
  /* Edge to edge on phones: the picture spans the screen, only the headline is padded. */
  #heroSliderContainer .hero-slider{
    margin-left:calc(-1 * var(--gutter-l));
    margin-right:calc(-1 * var(--gutter-r));
    border-radius:0;
  }
  .hero-slide{grid-template-columns:1fr}
  .hero-media{aspect-ratio:1/1}
  .hero-text{padding:6px 16px 12px; gap:6px; justify-content:flex-start}
  .hero-title{font-size:21px}
  .hero-desc{display:none}   /* phones: headline only */
}
@media (prefers-reduced-motion: reduce){ .hero-track, .hero-dot::after{transition:none} }

.jump-nav{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:6px;
  padding:10px 0; border-bottom:1px solid var(--line);
}
.jump-nav:empty{display:none}
.jump-link{
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 10px; border-radius:999px;
  background:var(--surface); border:1px solid var(--line);
  font-size:13px; font-weight:500; text-decoration:none; color:var(--ink);
  transition:border-color .15s, background-color .15s, color .15s;
}
.jump-link:hover{border-color:var(--accent); background:var(--fresh)}
.jump-link .dot{width:6px; height:6px}

.board{
  display:grid; gap:16px; margin-top:12px;
  grid-template-columns:repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  align-items:start;
}
.card{
  background:var(--surface); border:1px solid var(--line); border-radius:10px; min-width:0;
  scroll-margin-top:76px;
  transition:border-color .25s ease, box-shadow .25s ease;
}
.card.highlighted{
  border-color:var(--accent);
  box-shadow:0 0 0 2px var(--accent), 0 8px 24px rgba(11,95,255,.16);
}
.card header{
  /* Fixed height, so every card's content starts at the same line whatever the logo's size. */
  display:flex; align-items:center; gap:10px; height:48px; padding:0 14px; box-sizing:border-box;
  border-bottom:1px solid var(--line);
}
.card h2{font:600 15px/1.2 var(--sans); margin:0; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.src-logo{display:block; height:16px; width:auto; max-width:130px; object-fit:contain; object-position:left center}
.src-logo.sq{height:22px}     /* square logos (HVG, 24.hu) need more height to read at the same weight */
.src-logo.thin{height:22px}   /* 444's file has empty space around a thin wordmark; 22px matches the others' letters */
/* Logos are drawn for light backgrounds; in dark mode each sits on a small light badge. */
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .src-logo{background:#fff; padding:3px 6px; border-radius:5px; box-sizing:content-box} }
:root[data-theme="dark"] .src-logo{background:#fff; padding:3px 6px; border-radius:5px; box-sizing:content-box}
.dot{width:8px; height:8px; border-radius:50%; background:var(--muted); flex:none}
.dot.ok{background:var(--ok)} .dot.bad{background:var(--bad)}
.meta{font:400 11px var(--mono); color:var(--muted); white-space:nowrap}
.list{list-style:none; margin:0; padding:0}
.list li{border-bottom:1px solid var(--line)}
.list li:last-child{border-bottom:0}
.list a{display:block; padding:10px 14px; text-decoration:none}
.list a:hover{background:var(--fresh)}
.list .t{font:500 16px/1.3 var(--serif); display:block; text-wrap:pretty}
.list .w{font:400 11px var(--mono); color:var(--muted); margin-top:4px; display:flex; gap:8px; flex-wrap:wrap}
.list .w b{font-weight:500; color:var(--accent)}
.list a.has-thumb{display:flex; gap:12px; align-items:flex-start}
.list a.has-thumb .txt{flex:1; min-width:0}
.thumb{width:88px; height:66px; object-fit:cover; border-radius:6px; flex:none; background:var(--line)}
.list a.lead{padding:0 0 12px}
.list li.top > a{box-shadow:inset 3px 0 0 var(--accent)}
/* "Friss" (new since the last visit): a light green row. "Fontos" below takes precedence. */
.list li.fresh > a{background:var(--fresh-row)}
.list li.fresh > a:hover{background:var(--fresh-row-hover)}
.list li.fontos > a{box-shadow:inset 3px 0 0 var(--alert); background:var(--alert-bg)}
.list li.fontos .t{color:var(--alert)}
.badge-fontos-sm{
  font:700 10px/1.7 var(--mono); letter-spacing:.06em; text-transform:uppercase;
  background:var(--alert); color:#fff; padding:0 6px; border-radius:4px;
}
.yt-off{position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px;
  padding:16px; text-align:center; color:#fff; background:linear-gradient(135deg,#1e293b,#0f172a); font-size:13px}
.yt-off .btn{background:#fff; color:#111; border-color:#fff}
.yt-off a{color:#cbd5e1}
/* "Értesítés, ha fontos hír érkezik": in the top bar, right next to the search (the two stay together,
   centred); medium screens show the bell alone; phones give it its own full line above the menu. */
.alert-btn{display:inline-flex; align-items:center; justify-content:center; gap:7px; flex:none; height:38px; padding:0 12px;
  font-size:13px; color:var(--ink); white-space:nowrap; margin-right:auto}
.alert-btn[hidden]{display:none}
.searchbox:has(+ .alert-btn:not([hidden])){margin-right:0}
.alert-btn.on{background:#fdecee; border-color:#c8102e; color:#a00d25; font-weight:600}
:root[data-theme="dark"] .alert-btn.on{background:#3a1a1f; border-color:#ff7a8a; color:#ff9aa6}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .alert-btn.on{background:#3a1a1f; border-color:#ff7a8a; color:#ff9aa6} }
@media (min-width:561px) and (max-width:1199px){ .alert-btn{width:38px; padding:0} .alert-btn .alert-label{display:none} }
@media (max-width:560px){ .alert-btn{order:5; flex:1 1 100%; margin-right:0} }
.breaking{
  display:flex; align-items:center; gap:12px; margin-top:14px; padding:12px 12px 12px 16px;
  background:#c8102e; color:#fff; border-radius:10px; box-shadow:0 4px 18px rgba(200,16,46,.25);
}
.breaking:empty{display:none}
.breaking a{flex:1; min-width:0; display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; color:#fff; text-decoration:none}
.breaking a:hover .breaking-title{text-decoration:underline}
.badge-fontos{
  font:700 11px/1 var(--mono); letter-spacing:.1em; text-transform:uppercase;
  background:#fff; color:#c8102e; padding:5px 8px; border-radius:5px; flex:none;
}
.breaking-src{font:600 12px var(--mono); opacity:.9; flex:none}
.breaking-title{font:600 clamp(16px, 1.8vw, 20px)/1.3 var(--serif); flex:1 1 320px; min-width:0}
.breaking-meta{font:400 11px var(--mono); opacity:.85; flex:none}
.breaking button{
  flex:none; width:32px; height:32px; border-radius:50%; border:0; cursor:pointer;
  background:rgba(255,255,255,.18); color:#fff; font-size:16px; line-height:1;
}
.breaking button:hover{background:rgba(255,255,255,.32)}
.videos{border-top:1px solid var(--line); padding:12px 14px 14px}
.videos h3{display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin:0 0 10px;
  font:600 11px var(--mono); letter-spacing:.08em; text-transform:uppercase; color:var(--muted)}
.videos h3 a{font-weight:400; letter-spacing:0; text-transform:none; color:var(--accent); text-decoration:none}
.yt{position:relative; width:100%; aspect-ratio:16/9; border-radius:8px; overflow:hidden; background:#000}
.yt iframe{position:absolute; inset:0; width:100%; height:100%; border:0}
.yt-cap{margin:8px 0 0; font:500 15px/1.3 var(--serif)}
.yt-cap .w{font:400 11px var(--mono); color:var(--muted); display:block; margin-top:3px}
.vlist{list-style:none; margin:10px 0 0; padding:0; display:grid; gap:10px}
.vlist a{display:flex; gap:10px; align-items:flex-start; text-decoration:none}
.vlist a:hover .vt{text-decoration:underline}
.vthumb{width:120px; aspect-ratio:16/9; object-fit:cover; border-radius:6px; flex:none; background:var(--line)}
.vt{font:500 14px/1.3 var(--serif); display:block}
.vlist .w{font:400 11px var(--mono); color:var(--muted); display:block; margin-top:3px}
:root{--fresh-row:#e9f7ee; --fresh-row-hover:#d9f1e2}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]){--fresh-row:#16271d; --fresh-row-hover:#1c3326} }
:root[data-theme="dark"]{--fresh-row:#16271d; --fresh-row-hover:#1c3326}
.badge-fresh{
  font:600 10px/1.7 var(--mono); letter-spacing:.06em; text-transform:uppercase;
  background:var(--ok); color:#fff; padding:0 6px; border-radius:4px;
}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .badge-fresh{color:#0b1a12} }
:root[data-theme="dark"] .badge-fresh{color:#0b1a12}
.badge-top{
  font:600 10px/1.7 var(--mono); letter-spacing:.06em; text-transform:uppercase;
  background:var(--accent); color:var(--accent-ink); padding:0 6px; border-radius:4px;
}
.hero{display:block; width:100%; max-width:100%; aspect-ratio:16/9; object-fit:cover; background:var(--line)}
.lead .txt{display:block; padding:10px 14px 0}
.list .t.big{font-size:20px; line-height:1.25}
.note{padding:14px; color:var(--muted); font-size:13px}
.note.dim{font-size:11px; border-top:1px solid var(--line); overflow-wrap:anywhere}
.note button{margin-top:8px}
.skel{height:14px; margin:14px; border-radius:4px; background:linear-gradient(90deg,var(--line),transparent,var(--line)); background-size:200% 100%; animation:sh 1.4s linear infinite}
@keyframes sh{to{background-position:-200% 0}}
@media (prefers-reduced-motion: reduce){.skel{animation:none}}

.merged{max-width:820px; margin:12px auto 0}
.merged .card{overflow:hidden}

.empty{margin:60px auto; max-width:420px; text-align:center; color:var(--muted)}

dialog{
  border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--ink);
  padding:0; width:min(560px, calc(100vw - 24px)); max-height:min(86vh, 760px);
}
dialog::backdrop{background:rgba(0,0,0,.45)}
.dlg{display:flex; flex-direction:column; max-height:inherit}
.dlg h3{font:600 20px var(--serif); margin:0}
.dlg .hd,.dlg .ft{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 18px}
.dlg .hd{border-bottom:1px solid var(--line)}
.dlg .ft{border-top:1px solid var(--line)}
.dlg .bd{padding:6px 18px 16px; overflow:auto; min-height:0}
.dlg h4{font:600 11px var(--mono); letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin:18px 0 8px}
.src{display:flex; align-items:center; gap:10px; padding:7px 0; border-bottom:1px solid var(--line)}
.src.dragging{opacity:.45}
.src.drag-over{border-top:2px solid var(--accent)}
.src label{flex:1; min-width:0; display:flex; align-items:center; gap:10px; cursor:pointer}
.src span.n{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.src small{color:var(--muted); font:400 11px var(--mono)}
.src input[type=checkbox]{width:17px; height:17px; accent-color:var(--accent); flex:none}
.drag-handle{cursor:grab; color:var(--muted); font-size:15px; line-height:1; user-select:none; padding:2px 4px}
.drag-handle:active{cursor:grabbing}
.order-btns{display:inline-flex; gap:4px; flex:none}
.order-btn{
  border:1px solid var(--line); background:var(--bg); border-radius:6px;
  width:26px; height:26px; padding:0; cursor:pointer; color:var(--muted);
  display:inline-flex; align-items:center; justify-content:center; font-size:12px; line-height:1;
}
.order-btn:hover:not(:disabled){border-color:var(--muted); color:var(--ink)}
.order-btn:disabled{opacity:.35; cursor:default}
.row{display:grid; grid-template-columns:1fr 1fr; gap:10px}
.row.one{grid-template-columns:1fr}
.fld{display:flex; flex-direction:column; gap:4px; min-width:0}
.fld span{font-size:12px; color:var(--muted)}
.fld input,.fld select{background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:8px 10px; min-width:0; width:100%}
.hint{font-size:12px; color:var(--muted); margin:6px 0 0}
.hint code{font-family:var(--mono); font-size:11px}
@media (max-width:560px){
  .row{grid-template-columns:1fr}
  #refresh{order:4}
  /* View switch and Források stay on one line: the switch takes the room, the buttons get a bit tighter. */
  .feed-tools{flex-wrap:nowrap; gap:8px}
  .feed-tools .seg{flex:1 1 auto; min-width:0}
  .feed-tools .seg button{flex:1 1 auto; padding:7px 8px; font-size:14px; white-space:nowrap}
  #openSettings{flex:none; padding:7px 12px; font-size:14px}
}
