:root {
  --ink: #16232F;
  --ink-soft: #3A4854;
  --bg: #EDEFEA;
  --card-bg: #FFFFFF;
  --accent: #C98A2C;
  --rule: #D8D9D3;
  --max-width: 640px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  margin: 0;
}

/* ---- Masthead ---- */

.masthead {
  background: var(--ink);
  color: var(--bg);
  padding: 28px 20px 22px;
}

.masthead-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.masthead h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.masthead h1 span {
  color: var(--accent);
}

.masthead-tagline {
  margin: 6px 0 0;
  font-size: 14px;
  color: #B8C0C7;
}

/* ---- Filtri ---- */

.filters {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar { display: none; }

.filter-chip {
  flex-shrink: 0;
  border: 1px solid var(--rule);
  background: var(--card-bg);
  color: var(--ink-soft);
  padding: 7px 14px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.filter-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ---- Contenuto ---- */

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

.status-line {
  color: var(--ink-soft);
  font-size: 14px;
  text-align: center;
  padding: 40px 0;
}

.news-list {
  display: flex;
  flex-direction: column;
}

.news-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  display: block;
}

.news-item:first-child {
  padding-top: 0;
}

.news-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--ink-soft);
}

.source-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.news-item h2 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
}

.news-list .news-item:nth-child(1) h2 {
  font-size: 24px;
}

.news-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.news-item .tags {
  margin-top: 8px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
}

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8px 20px 32px;
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .news-item { transition: opacity 0.15s ease; }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
