/* adn-frn-server – 📰 portal page (news of the operators). Same look as the dashboard: N8 header, glass cards, full width. */
.tabs a.tab-link { background: transparent; border: 0; color: var(--text-dim); font-size: 14px; font-weight: 650; padding: 8px 18px; border-radius: 999px;
    white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
.tabs a.tab-link:hover { color: var(--text); }
.tabs a.tab-link.active { background: var(--theme-accent-soft, rgba(90, 200, 250, 0.18)); color: var(--text);
    box-shadow: inset 0 0 0 1px var(--theme-accent-border, rgba(90, 200, 250, 0.35)); }
.tabs a.tab-link.hidden { display: none; }
@media (max-width: 720px) { .tabs a.tab-link { flex: 1 1 0; min-width: 0; justify-content: center; padding: 8px 2px; font-size: 12.5px; gap: 3px; } }

.portal { margin-top: 16px; display: flex; flex-direction: column; gap: 16px; }
.portal .card { background: var(--glass-bg); border: 1px solid var(--glass-border); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow); }

/* hero */
.portal-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 26px 30px;
    background: linear-gradient(135deg, var(--theme-accent-soft, rgba(90, 200, 250, .18)), rgba(191, 90, 242, .10) 60%, transparent) , var(--glass-bg); }
.ph-kicker { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.portal-hero h2 { margin: 6px 0 8px; font-size: clamp(24px, 3.2vw, 38px); line-height: 1.12; letter-spacing: -.01em; }
.ph-intro { color: var(--text-dim); font-size: 15px; max-width: 880px; }
.ph-intro p { margin: 6px 0; }
.ph-facts { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 10px; }
.ph-fact { background: rgba(0, 0, 0, .18); border: 1px solid var(--glass-border); border-radius: var(--radius-md); padding: 12px 16px; min-width: 130px; }
.ph-fact .k { font-size: 11.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.ph-fact .v { font-size: 24px; font-weight: 750; font-family: var(--n8-mono, var(--mono)); margin-top: 2px; }
@media (max-width: 900px) { .portal-hero { grid-template-columns: 1fr; padding: 20px; } }

/* grid: news | side */
.portal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1050px) { .portal-grid { grid-template-columns: 1fr; } }
.pn-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.pn-head .section-header { margin: 6px 4px 8px; }
.pn-more { display: flex; justify-content: center; margin-top: 12px; }

/* news overview (2.50): lead story on top, then an even grid – every card has the same 2:1 picture frame */
.news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 18px; }
.news-card { position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden; border-radius: var(--radius-lg); cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.news-card:hover, .news-card:focus-visible { transform: translateY(-3px); border-color: var(--theme-accent-border, rgba(90, 200, 250, .38));
    box-shadow: 0 14px 34px rgba(0, 0, 0, .32), var(--glass-shadow); outline: none; }
.news-card.cat-important { box-shadow: inset 0 3px 0 #ff9f0a, var(--glass-shadow); }
.news-card .nc-txt { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 16px 18px 14px; }
.news-card h3 { margin: 0; font-size: 17.5px; line-height: 1.3; letter-spacing: -.005em; display: flex; gap: 8px; align-items: flex-start;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card h3 .ic { font-size: 18px; margin-right: 6px; }
.news-card .teaser { color: var(--text-dim); font-size: 14px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nc-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .07); display: flex; flex-wrap: wrap; gap: 4px 14px;
    font-size: 12px; color: var(--text-dim); }
.nc-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--text-dim); }
.nc-cat { border-radius: 999px; padding: 2px 10px; font-weight: 650; font-size: 11.5px; background: rgba(255, 255, 255, .08); border: 1px solid var(--glass-border); color: var(--text); }
.nc-cat.important { background: rgba(255, 159, 10, .2); border-color: rgba(255, 159, 10, .5); }
.nc-cat.tech { background: rgba(10, 132, 255, .2); border-color: rgba(10, 132, 255, .45); }
.nc-cat.event { background: rgba(191, 90, 242, .2); border-color: rgba(191, 90, 242, .45); }
.nc-cat.net { background: rgba(48, 209, 88, .18); border-color: rgba(48, 209, 88, .45); }
.nc-pin { color: var(--accent); font-weight: 700; }
.nc-new { border-radius: 999px; padding: 2px 9px; font-weight: 750; font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
    background: var(--accent); color: #06101f; }

/* picture frame of a card: photos fill it, banners and logos are shown whole on a blurred copy of themselves */
.nc-img { position: relative; aspect-ratio: 2 / 1; overflow: hidden; background: #0b1224; flex: none; }
.nc-img > img { position: relative; width: 100%; height: 100%; display: block; transition: transform .45s ease; }
.nc-img.fit-cover > img { object-fit: cover; }
.nc-img.fit-contain > img { object-fit: contain; }
.nc-img.fit-whole > img { object-fit: contain; height: 100%; }
.news-card:hover .nc-img.fit-cover > img { transform: scale(1.04); }
.news-card:hover .nc-img.fit-contain > img, .news-card:hover .nc-img.fit-whole > img { transform: scale(1.015); }
.nc-bg { position: absolute; inset: -24px; background: center / cover no-repeat; filter: blur(22px) saturate(1.2) brightness(.55); }
.nc-img::after { content: ""; position: absolute; inset: auto 0 0 0; height: 46px; background: linear-gradient(transparent, rgba(0, 0, 0, .28)); pointer-events: none; }
.nc-badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 1; }
.nc-badges > span { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.nc-badges .nc-cat { background: rgba(10, 16, 32, .72); border-color: rgba(255, 255, 255, .22); color: #fff; }
.nc-badges .nc-pin { border-radius: 999px; padding: 2px 10px; font-size: 11.5px; background: rgba(10, 16, 32, .72); border: 1px solid rgba(255, 255, 255, .22); }
/* cards without a picture: the icon on the colour of the category – the grid stays even */
.nc-ph { display: grid; place-items: center; background: radial-gradient(120% 120% at 20% 0%, rgba(90, 200, 250, .35), transparent 60%), linear-gradient(135deg, #14234a, #0b1224); }
.nc-ph > span { font-size: 54px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .45)); transition: transform .3s ease; }
.news-card:hover .nc-ph > span { transform: scale(1.08) rotate(-4deg); }
.nc-ph.ph-important { background: radial-gradient(120% 120% at 20% 0%, rgba(255, 159, 10, .45), transparent 60%), linear-gradient(135deg, #3a2410, #140d08); }
.nc-ph.ph-tech { background: radial-gradient(120% 120% at 20% 0%, rgba(10, 132, 255, .45), transparent 60%), linear-gradient(135deg, #0f2147, #08101f); }
.nc-ph.ph-event { background: radial-gradient(120% 120% at 20% 0%, rgba(191, 90, 242, .45), transparent 60%), linear-gradient(135deg, #2a1440, #100a1a); }
.nc-ph.ph-net { background: radial-gradient(120% 120% at 20% 0%, rgba(48, 209, 88, .4), transparent 60%), linear-gradient(135deg, #0f3020, #08140d); }

/* lead story: picture over the whole width – a banner logo in its own shape, a photo in 21:9 */
.news-lead { margin-bottom: 6px; }
.news-lead .nc-img.fit-cover { aspect-ratio: 21 / 9; }
.news-lead .nc-img.fit-whole { aspect-ratio: auto; max-height: 460px; }
.news-lead .nc-img.fit-whole > img { max-height: 460px; }
.news-lead .nc-badges { top: 14px; left: 14px; }
.news-lead .nc-txt { padding: 20px 26px 20px; gap: 10px; }
.news-lead.no-img { border-color: var(--theme-accent-border, rgba(90, 200, 250, .38));
    background: linear-gradient(135deg, var(--theme-accent-soft, rgba(90, 200, 250, .16)), transparent 70%), var(--glass-bg); }
.news-lead.no-img .nc-txt { padding: 26px 30px; }
.nl-kicker { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 750; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nl-kicker .nc-cat, .nl-kicker .nc-new { letter-spacing: normal; text-transform: none; }
.news-lead h2 { margin: 0; font-size: clamp(22px, 2.5vw, 32px); line-height: 1.16; letter-spacing: -.012em; display: flex; gap: 12px; align-items: flex-start; }
.news-lead .teaser { color: var(--text-dim); font-size: 16px; line-height: 1.55; max-width: 900px; }
.nl-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; margin-top: 4px; }
.nl-row .nc-foot { margin: 0; padding: 0; border: 0; font-size: 13px; }
.nl-go { flex: none; }
.pn-sub { display: flex; align-items: center; gap: 10px; margin: 18px 4px 10px; }
.pn-sub h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim); }
.pn-sub::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--glass-border), transparent); }
.pn-count { font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: var(--text-dim); }
@media (max-width: 640px) {
    .news-lead .nc-txt { padding: 16px 18px; }
    .news-lead .teaser { font-size: 15px; }
    .nl-go { width: 100%; text-align: center; }
    .nc-ph > span { font-size: 44px; }
}
@media (prefers-reduced-motion: reduce) { .news-card, .nc-img > img, .nc-ph > span { transition: none; } .news-card:hover { transform: none; } }

/* full article */
.news-full { padding: 26px 30px; border-radius: var(--radius-lg); }
.news-full h2 { margin: 8px 0 6px; font-size: clamp(22px, 2.6vw, 32px); display: flex; gap: 12px; align-items: flex-start; }
.news-full .teaser { font-size: 16px; color: var(--text-dim); margin-bottom: 8px; }
.news-full .back { margin-bottom: 6px; }
.md { line-height: 1.6; font-size: 15px; overflow-wrap: anywhere; }
.md h3, .md h4, .md h5 { margin: 18px 0 6px; }
.md p { margin: 10px 0; }
.md ul, .md ol { margin: 8px 0; padding-left: 22px; }
.md li { margin: 3px 0; }
.md a { color: var(--accent); }
.md code { font-family: var(--n8-mono, var(--mono)); background: rgba(0, 0, 0, .25); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.md blockquote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--accent); background: rgba(255, 255, 255, .04); border-radius: 0 10px 10px 0; color: var(--text-dim); }
.md hr { border: 0; border-top: 1px solid var(--glass-border); margin: 16px 0; }

/* side boxes */
.portal-side { display: flex; flex-direction: column; gap: 14px; }
.ps-box { padding: 16px 18px; }
.ps-box h3 { margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
.ps-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ps-stat { background: rgba(0, 0, 0, .16); border-radius: var(--radius-sm); padding: 9px 12px; }
.ps-stat .k { font-size: 11.5px; color: var(--text-dim); }
.ps-stat .v { font-size: 20px; font-weight: 750; font-family: var(--n8-mono, var(--mono)); }
.ps-room { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.ps-room:last-child { border-bottom: 0; }
.ps-room .nm { flex: 1; min-width: 0; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-room .air { color: #ff6bd6; font-size: 12px; font-weight: 700; display: block; }
.ps-room .n { font-family: var(--n8-mono, var(--mono)); font-weight: 700; min-width: 28px; text-align: right; }
.ps-room.talking .nm::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff2dd1; margin-right: 7px;
    box-shadow: 0 0 10px #ff2dd1; animation: ps-pulse 1s infinite; }
@keyframes ps-pulse { 50% { opacity: .35; } }
.ps-cta { display: block; text-align: center; margin-top: 12px; text-decoration: none; }
.ps-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13.5px; }
.ps-kv .k { color: var(--text-dim); }
.ps-kv code { font-family: var(--n8-mono, var(--mono)); }
.portal .empty { padding: 26px; text-align: center; color: var(--text-dim); }
.portal-page #userArea a.btn, .portal-page .ps-cta { text-decoration: none; }

/* 2.28: topic image on top of the article */
.nf-img { margin: -26px -30px 18px; aspect-ratio: 21 / 9; overflow: hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.nf-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 🧩 2.33: widgets at the side – live data of other N8 systems (HBlink4, N8 Crosslink, N8 Hotspot, N8 Gateway) */
.portal-grid.side-left { grid-template-columns: 340px minmax(0, 1fr); }
.portal-grid.side-left .portal-side { order: -1; }
@media (max-width: 1050px) { .portal-grid.side-left { grid-template-columns: 1fr; } .portal-grid.side-left .portal-side { order: 0; } }
.pw h3 > span[translate] { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-dot { width: 10px; height: 10px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px rgba(74,222,128,.7); flex: none; }
.pw-dot.warn { background: #fbbf24; box-shadow: 0 0 8px rgba(251,191,36,.6); }
.pw-dot.down { background: #f87171; box-shadow: 0 0 8px rgba(248,113,113,.6); }
.pw-dot.stale { background: #8b93a7; box-shadow: none; }
.pw-sub { font-size: 12.5px; color: var(--text-dim); margin: -4px 0 10px; }
.pw-sub.warn { color: #fbbf24; } .pw-sub.down { color: #f87171; }
.pw-air { margin-top: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: rgba(255, 45, 209, .12); border: 1px solid rgba(255, 45, 209, .35); font-size: 13px; }
.pw-air b { color: #ff6bd6; } .pw-air small { display: block; color: var(--text-dim); font-size: 11.5px; margin-top: 2px; }
.pw-lh { margin-top: 10px; }
.pw-lh-h { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-dim); margin-bottom: 4px; }
.pw-lh-r { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 13px; }
.pw-lh-r:last-child { border-bottom: 0; }
.pw-lh-r .c { font-weight: 700; font-family: var(--n8-mono, var(--mono)); }
.pw-lh-r .w { color: var(--text-dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-lh-r .a { color: var(--text-dim); font-size: 11.5px; white-space: nowrap; }
.pw.stale .ps-stat .v { opacity: .6; }

/* 2.36: header image – layout and size set by the author (Admin → 📰 Portal → 📝 News → 🖼️ Header image) */
.nf-img { aspect-ratio: auto; width: auto; --h: 340px; height: min(var(--h), 42vw); }
.nf-img.hs-s { --h: 220px; } .nf-img.hs-l { --h: 480px; } .nf-img.hs-xl { --h: 640px; }
.nf-img.hl-banner { height: min(var(--h), 25vw); --h: 200px; }
.nf-img.hl-banner.hs-s { --h: 140px; } .nf-img.hl-banner.hs-l { --h: 260px; } .nf-img.hl-banner.hs-xl { --h: 340px; }
.nf-img.hl-classic { height: min(var(--h), 56vw); --h: 380px; }
.nf-img.hl-classic.hs-s { --h: 260px; } .nf-img.hl-classic.hs-l { --h: 520px; } .nf-img.hl-classic.hs-xl { --h: 700px; }
.nf-img.hl-original { height: auto; background: rgba(0, 0, 0, .25); display: flex; justify-content: center; --h: 450px; }
.nf-img.hl-original.hs-s { --h: 300px; } .nf-img.hl-original.hs-l { --h: 650px; }
/* 2.50: a banner or logo in a cutting frame is shown whole, in its own shape */
.nf-img.is-whole { height: auto; background: #0b1224; }
.nf-img.is-whole img { object-fit: contain; }
.nf-img.hl-original img { width: auto; max-width: 100%; height: auto; max-height: var(--h); object-fit: contain; }
.nf-img.hl-original.hs-xl img { max-height: none; }
.nf-img.hl-left, .nf-img.hl-right { height: auto; margin: 4px 0 12px; border-radius: 14px; border: 1px solid var(--glass-border); width: 38%; }
.nf-img.hl-left { float: left; margin-right: 18px; } .nf-img.hl-right { float: right; margin-left: 18px; }
.nf-img.hl-left img, .nf-img.hl-right img { height: auto; }
.nf-img.hl-left.hs-s, .nf-img.hl-right.hs-s { width: 26%; } .nf-img.hl-left.hs-l, .nf-img.hl-right.hs-l { width: 50%; }
.nf-img.hl-left.hs-xl, .nf-img.hl-right.hs-xl { width: 62%; }
@media (max-width: 700px) { .nf-img.hl-left, .nf-img.hl-right { float: none; width: 100% !important; margin: 0 0 12px; } }
/* 2.38: news from the N8 Editor */
.md-html img { max-width: 100%; height: auto; border-radius: 10px; cursor: zoom-in; }
.md-html blockquote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--accent); background: rgba(255, 255, 255, .04); border-radius: 0 10px 10px 0; color: var(--text-dim); }
.md-html table { border-collapse: collapse; } .md-html td, .md-html th { border: 1px solid var(--glass-border); padding: 4px 8px; }
@media (max-width: 640px) { .md-html img[style*="float"] { float: none !important; width: 100% !important; margin: 10px 0 !important; } }

/* 2.41 – ⬇️ downloads */
.ps-dl { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; color: var(--text); text-decoration: none; border: 1px solid transparent; }
.ps-dl:hover { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .1); }
.ps-dl img, .ps-dl-ic { width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center; font-size: 20px; }
.ps-dl-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.ps-dl-tx .dim { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-dl-desc { font-size: 13px; color: var(--text-dim); white-space: pre-line; }
.ps-dl-sha { font-family: var(--n8-mono, monospace); font-size: 11px !important; white-space: normal !important; overflow-wrap: anywhere; }
.ps-dl-go { font-size: 18px; opacity: .7; }
.ps-dl-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.ps-dl-list .ps-dl { padding: 12px; background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .07); }
.ps-dl-list .ps-dl img { width: 44px; height: 44px; }
.ps-dl-ver { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: var(--text-dim); }
/* 2.41: one more menu item for admins (✍️ authoring system) – the menu stays in one line */
/* 2.50: the category filter never makes the page wider than the phone – it scrolls sideways */
.portal-news { min-width: 0; }
.pn-head .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.pn-head .seg::-webkit-scrollbar { display: none; }
.pn-head .seg button { flex: none; white-space: nowrap; }
