/* Nowa News — design tokens */
:root {
  --ink: #0E1116;
  --panel: #171B23;
  --panel-2: #1D222C;
  --border: #262B35;
  --text: #ECEEF1;
  --muted: #8D93A1;
  --amber: #FFB020;
  --amber-dim: #7A5A1E;
  --teal: #4FD1C5;
  --danger: #FF6B6B;
  --radius: 8px;
  --maxw: 1240px;
  --font-head: 'Archivo', Arial, sans-serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', monospace;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(14,17,22,0.92);
  backdrop-filter: blur(6px);
  z-index: 50;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { height: 48px; width: auto; }
.site-header { box-shadow: 0 8px 30px rgba(0,0,0,.16); }
.header-inner { position: relative; }

.main-nav { display: flex; gap: 26px; align-items: center; }
.main-nav a {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}
.main-nav a:hover { color: var(--amber); text-decoration: none; }
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  padding: 9px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  border-radius: 2px;
}


@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    left: 20px;
    right: 20px;
    top: 70px;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0,0,0,.35);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 12px 14px; border-radius: 7px; }
  .main-nav a:hover { background: var(--panel-2); }
  .brand img { height: 42px; }
}

/* ---------- Hero ---------- */
.hero {
  border-bottom: 1px solid var(--border);
  padding: 48px 0 40px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.dot-live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(255,176,32,0.6);
  animation: pulse-dot 2s infinite;
}
@media (prefers-reduced-motion: reduce) { .dot-live { animation: none; } }
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(255,176,32,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(255,176,32,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,176,32,0); }
}

.hero h1 { font-size: clamp(28px, 4vw, 42px); max-width: 18ch; }
.hero .dek { color: var(--muted); font-size: 17px; max-width: 60ch; margin-bottom: 20px; }
.hero-image {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/9;
  background: var(--panel);
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }

.btn {
  display: inline-block;
  background: var(--amber);
  color: #14100a;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 6px;
  font-size: 14px;
  border: none;
  cursor: pointer;
}
.btn:hover { background: #ffc352; text-decoration: none; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--amber); color: var(--amber); }

/* ---------- Signals ticker rail ---------- */
.signals {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 18px;
}
.signals h2 {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 12px;
}
.pulse-line { width: 100%; height: 20px; margin-bottom: 12px; display: block; }
.signal-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.signal-item:first-of-type { border-top: none; }
.signal-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 2px;
}
.signal-title {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}
.signal-title:hover { color: var(--amber); }

/* ---------- Post grid ---------- */
.section { padding: 44px 0; border-bottom: 1px solid var(--border); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
}
.section-head h2 { font-size: 22px; }
.section-head a { font-size: 14px; color: var(--muted); }

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 860px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .post-grid { grid-template-columns: 1fr; } }

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  display: flex;
  flex-direction: column;
}
.card-img { aspect-ratio: 16/10; background: var(--panel-2); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.card h3 { font-size: 17px; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--amber); text-decoration: none; }
.card .excerpt { color: var(--muted); font-size: 14px; flex: 1; }
.card .meta { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: auto; }

.card.featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.card.featured .card-img { aspect-ratio: auto; height: 100%; }
.card.featured h3 { font-size: 24px; }
@media (max-width: 860px) {
  .card.featured { grid-column: span 2; grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .card.featured { grid-column: span 1; }
}

/* ---------- Ad slots ---------- */
.ad-slot {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
  gap: 4px;
  padding: 16px;
}
.ad-slot .ad-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.ad-slot .ad-dims { font-size: 12px; color: var(--muted); }
.ad-728x90 { width: 100%; max-width: 728px; min-height: 90px; margin: 0 auto; }
.ad-300x250 { width: 300px; min-height: 250px; }
.ad-inline { margin: 36px 0; overflow: hidden; }
.ad-code { display: flex; justify-content: center; align-items: center; min-height: inherit; width: 100%; }
.ad-code-300 { min-height: 250px; }
.ad-code-728 { min-height: 90px; }


/* ---------- Article page ---------- */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 44px;
  padding: 40px 0 60px;
  align-items: start;
}
@media (max-width: 900px) { .article-layout { grid-template-columns: 1fr; } }

.article-head { margin-bottom: 20px; }
.article-head .card-tag { margin-bottom: 10px; display: block; }
.article-head h1 { font-size: clamp(26px, 3.6vw, 38px); max-width: 24ch; }
.byline {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.share-button {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  font: 500 13px var(--font-mono);
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, transform .18s ease;
}
.share-button svg { width: 16px; height: 16px; }
.share-button:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-1px); }
.share-button:disabled { opacity: .7; cursor: default; transform: none; }

.article-hero-img {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 24px 0;
}
.article-body { max-width: 68ch; font-size: 17px; color: #D9DEE5; }
.article-body p { margin: 0 0 1.3em; }
.article-body h2 { font-size: 22px; margin-top: 1.6em; }
.article-body a { color: var(--teal); }

.sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 88px; }
.sidebar h3 { font-size: 13px; font-family: var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.related-list { display: flex; flex-direction: column; gap: 14px; }
.related-item a { color: var(--text); font-size: 14px; font-weight: 500; }
.related-item a:hover { color: var(--amber); text-decoration: none; }
.related-item .meta { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

/* ---------- Static pages ---------- */
.page-content { padding: 48px 0 70px; max-width: 72ch; }
.page-content h1 { font-size: 34px; margin-bottom: 0.4em; }
.page-content h2 { font-size: 22px; margin-top: 1.6em; }
.page-content p { color: #D9DEE5; }
.spec-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.spec-table th, .spec-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.spec-table th { color: var(--muted); font-family: var(--font-mono); font-weight: 500; font-size: 12px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 20px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.footer-cols { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-col h4 { font-size: 12px; font-family: var(--font-mono); color: var(--muted); text-transform: uppercase; margin-bottom: 12px; }
.footer-col a { display: block; color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.footer-col a:hover { color: var(--amber); text-decoration: none; }
.disclaimer { max-width: 62ch; color: var(--muted); font-size: 12.5px; margin-top: 28px; line-height: 1.6; }
.copyright { font-size: 12.5px; color: var(--muted); margin-top: 20px; }

/* Pagination */
.pagination { display: flex; gap: 10px; margin-top: 32px; }
.pagination a, .pagination span {
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text);
}
.pagination a:hover { border-color: var(--amber); color: var(--amber); text-decoration: none; }
.pagination .current { background: var(--amber); color: #14100a; border-color: var(--amber); }

/* ---------- Publication polish ---------- */
.page-kicker {
  display: inline-block;
  margin-bottom: 10px;
  font: 600 11px/1 var(--font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber);
}
.page-content .lead {
  font-size: 19px;
  color: var(--muted);
  margin-bottom: 30px;
}
.legal-page {
  border-top: 3px solid var(--amber);
  margin-top: 36px;
}
.hero { background: linear-gradient(180deg, rgba(255,176,32,.035), transparent 60%); }
.section-head { border-left: 3px solid var(--amber); padding-left: 12px; }
.card { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.card:hover {
  transform: translateY(-3px);
  border-color: #3a414e;
  box-shadow: 0 16px 34px rgba(0,0,0,.18);
}
.article-body { line-height: 1.75; }
.article-body h2 { border-left: 3px solid var(--teal); padding-left: 10px; }

/* ---------- Empty feed / startup state ---------- */
.empty-hero {
  border-bottom: 1px solid var(--border);
  padding: 64px 0 52px;
  background: radial-gradient(circle at 20% 10%, rgba(79,209,197,.08), transparent 34%);
}
.empty-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
  align-items: center;
}
.empty-hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  max-width: 10ch;
  letter-spacing: -.04em;
}
.empty-hero .dek {
  color: var(--muted);
  font-size: 18px;
  max-width: 62ch;
}
.empty-status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}
.empty-status strong, .empty-status span { display: block; }
.empty-status > div span { color: var(--muted); font-size: 13px; }
.status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(79,209,197,.08);
}
.empty-content {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 44px;
  align-items: start;
}
.empty-content h2 { font-size: 28px; }
.empty-content p { max-width: 70ch; color: var(--muted); }
.empty-signals { min-height: 230px; }
@media (max-width: 860px) {
  .empty-grid, .empty-content { grid-template-columns: 1fr; }
  .empty-content .ad-slot { justify-self: center; }
}


/* Single native ad placement: intentionally kept below related stories. */
.native-ad-placement { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); min-height: 110px; }
.native-ad-placement .native-ad-code { width: 100%; overflow: hidden; display: flex; justify-content: center; }
.native-ad-placement .ad-label { display: block; margin-bottom: 8px; }
