/* Radar Cívico — civic-watchdog | forest-sage | IBM Plex Sans */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap");

:root {
  --rc-bg: #f2f5f0;
  --rc-surface: #ffffff;
  --rc-surface-muted: #e8ede4;
  --rc-forest: #1e3328;
  --rc-forest-soft: #2d4a38;
  --rc-sage: #4f7a5e;
  --rc-sage-light: #6b9478;
  --rc-sage-pale: #a8c4b0;
  --rc-text: #243528;
  --rc-text-muted: #5a6f60;
  --rc-text-light: #8a9d90;
  --rc-border: #c5d4c8;
  --rc-border-light: #dce5d9;
  --rc-highlight: #eef3ea;
  --rc-accent: #3d6b4f;
  --rc-radius: 6px;
  --rc-radius-img: 8px;
  --rc-container: 960px;
  --rc-font: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --rc-space-xs: 0.5rem;
  --rc-space-sm: 1rem;
  --rc-space-md: 1.5rem;
  --rc-space-lg: 2.5rem;
  --rc-space-xl: 3.5rem;
  --rc-line: 1.65;
  --rc-ease: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--rc-font);
  font-size: 1rem;
  line-height: var(--rc-line);
  color: var(--rc-text);
  background: var(--rc-bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }

a {
  color: var(--rc-accent);
  text-decoration: underline;
  text-decoration-color: var(--rc-sage-pale);
  text-underline-offset: 2px;
  transition: color var(--rc-ease);
}

a:hover {
  color: var(--rc-forest);
  text-decoration-color: var(--rc-sage);
}

h1, h2, h3, h4 {
  line-height: 1.28;
  font-weight: 600;
  margin-top: 0;
  color: var(--rc-forest);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.2rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); margin-bottom: var(--rc-space-sm); }
h3 { font-size: 1.1rem; margin-bottom: var(--rc-space-xs); }
h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--rc-text-muted); }

p { margin: 0 0 var(--rc-space-sm); }

ul, ol { margin: 0 0 var(--rc-space-sm); padding-left: 1.25rem; }

blockquote {
  margin: var(--rc-space-md) 0;
  padding: var(--rc-space-sm) var(--rc-space-md);
  border-left: 3px solid var(--rc-sage);
  background: var(--rc-highlight);
  color: var(--rc-forest-soft);
  font-style: italic;
}

.container {
  width: 100%;
  max-width: var(--rc-container);
  margin: 0 auto;
  padding: 0 var(--rc-space-md);
}

/* Header — logo left, nav right */
.site-header {
  background: var(--rc-surface);
  border-bottom: 1px solid var(--rc-border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--rc-space-sm) 0;
  gap: var(--rc-space-sm);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--rc-forest);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.logo:hover { color: var(--rc-sage); text-decoration: none; }

.logo img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius);
  padding: 8px 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--rc-forest-soft);
  transition: var(--rc-ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.main-nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--rc-space-md);
}

.main-nav > ul a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--rc-text-muted);
}

.main-nav > ul a:hover,
.main-nav > ul a[aria-current="page"] {
  color: var(--rc-forest);
  text-decoration: underline;
}

.nav-categories { display: none; }

.nav-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--rc-text-light);
  margin: 0 0 var(--rc-space-xs);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 51, 40, 0.4);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 767px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(280px, 85vw);
    height: 100vh;
    background: var(--rc-surface);
    border-left: 1px solid var(--rc-border-light);
    padding: 5rem var(--rc-space-md) var(--rc-space-md);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 200;
    box-shadow: -4px 0 24px rgba(30, 51, 40, 0.08);
    overflow-y: auto;
  }

  .main-nav.is-open { transform: translateX(0); }

  .main-nav > ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav > ul a {
    display: block;
    padding: var(--rc-space-xs) 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--rc-border-light);
  }

  .nav-categories {
    display: block;
    margin-top: var(--rc-space-md);
    padding-top: var(--rc-space-md);
    border-top: 1px solid var(--rc-border-light);
  }

  .nav-categories ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .nav-categories a {
    display: block;
    padding: 0.4rem 0;
    text-decoration: none;
    font-size: 0.9rem;
    color: var(--rc-text-muted);
  }

  .nav-categories a:hover { color: var(--rc-forest); }
}

@media (min-width: 768px) {
  .nav-toggle, .nav-overlay { display: none; }
}

/* Homepage — text-only hero lead */
.hero-lead {
  padding: var(--rc-space-lg) 0 var(--rc-space-md);
  border-bottom: 1px solid var(--rc-border-light);
  margin-bottom: var(--rc-space-lg);
}

.hero-lead .kicker {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rc-sage);
  margin-bottom: var(--rc-space-xs);
}

.hero-lead h1 { margin-bottom: var(--rc-space-sm); }

.hero-lead .lead-meta {
  font-size: 0.85rem;
  color: var(--rc-text-muted);
  margin-bottom: var(--rc-space-sm);
}

.hero-lead .lead-excerpt {
  font-size: 1.08rem;
  color: var(--rc-forest-soft);
  max-width: 42rem;
  line-height: 1.55;
}

.hero-lead .read-more {
  display: inline-block;
  margin-top: var(--rc-space-sm);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--rc-accent);
}

.hero-lead .read-more:hover { color: var(--rc-forest); }

/* Numbered feed */
.feed-section h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rc-text-muted);
  margin-bottom: var(--rc-space-md);
}

.numbered-feed {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: feed;
}

.numbered-feed li {
  counter-increment: feed;
  border-bottom: 1px solid var(--rc-border-light);
  padding: var(--rc-space-md) 0;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: var(--rc-space-sm);
  align-items: start;
}

.numbered-feed li::before {
  content: counter(feed, decimal-leading-zero);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--rc-sage-pale);
  line-height: 1;
  padding-top: 2px;
}

.numbered-feed a.title {
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--rc-forest);
  display: block;
  margin-bottom: 0.25rem;
}

.numbered-feed a.title:hover { color: var(--rc-sage); }

.numbered-feed .feed-meta {
  font-size: 0.8rem;
  color: var(--rc-text-muted);
}

.numbered-feed .feed-excerpt {
  font-size: 0.9rem;
  color: var(--rc-text-muted);
  margin-top: 0.35rem;
  grid-column: 2;
}

/* Article — split content rail */
.article-page { padding: var(--rc-space-lg) 0; }

.article-split {
  display: grid;
  gap: var(--rc-space-lg);
}

@media (min-width: 768px) {
  .article-split {
    grid-template-columns: 1fr 240px;
    align-items: start;
  }
}

.article-header { margin-bottom: var(--rc-space-md); }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rc-sage);
  margin-bottom: var(--rc-space-xs);
}

.article-meta {
  font-size: 0.85rem;
  color: var(--rc-text-muted);
}

.article-figure {
  margin: var(--rc-space-md) 0;
}

.article-figure img {
  border-radius: var(--rc-radius-img);
  width: 100%;
}

.article-figure figcaption {
  font-size: 0.8rem;
  color: var(--rc-text-muted);
  margin-top: var(--rc-space-xs);
}

.article-body h2 {
  margin-top: var(--rc-space-lg);
  font-size: 1.22rem;
}

.updated-note {
  font-size: 0.8rem;
  color: var(--rc-text-light);
  margin-top: var(--rc-space-lg);
  padding-top: var(--rc-space-md);
  border-top: 1px solid var(--rc-border-light);
}

.related-articles {
  margin-top: var(--rc-space-lg);
  padding-top: var(--rc-space-md);
  border-top: 1px solid var(--rc-border-light);
}

.related-articles h2 { font-size: 1rem; }

.related-articles ul {
  list-style: none;
  padding: 0;
}

.related-articles li { margin-bottom: 0.4rem; }

/* Sidebar — author widget only */
.author-widget {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border-light);
  border-radius: var(--rc-radius);
  padding: var(--rc-space-md);
  position: sticky;
  top: 5rem;
}

.author-widget h3 {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rc-text-muted);
  margin-bottom: var(--rc-space-sm);
}

.author-card {
  display: flex;
  gap: var(--rc-space-sm);
  align-items: flex-start;
}

.author-card img {
  width: 48px;
  height: 48px;
  border-radius: var(--rc-radius-img);
  flex-shrink: 0;
}

.author-card .name {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0 0 0.15rem;
}

.author-card .role {
  font-size: 0.75rem;
  color: var(--rc-sage);
  margin: 0 0 0.35rem;
}

.author-card .bio {
  font-size: 0.82rem;
  color: var(--rc-text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Page content */
.page-content {
  padding: var(--rc-space-lg) 0;
}

.page-content .container-narrow {
  max-width: 720px;
}

.text-muted { color: var(--rc-text-muted); }

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--rc-space-xs);
  margin-bottom: var(--rc-space-lg);
}

.category-nav a {
  font-size: 0.8rem;
  text-decoration: none;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius);
  color: var(--rc-text-muted);
}

.category-nav a:hover {
  border-color: var(--rc-sage);
  color: var(--rc-forest);
}

.archive-teaser {
  margin-top: var(--rc-space-xl);
  padding-top: var(--rc-space-lg);
  border-top: 1px solid var(--rc-border-light);
}

.archive-teaser h2 { font-size: 1.15rem; }

.archive-meta {
  font-size: 0.85rem;
  color: var(--rc-text-muted);
  margin-bottom: var(--rc-space-sm);
}

/* Contact */
.contact-grid {
  display: grid;
  gap: var(--rc-space-lg);
  margin-bottom: var(--rc-space-lg);
}

@media (min-width: 640px) {
  .contact-grid {
    grid-template-columns: 1fr 280px;
  }
}

.contact-card {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border-light);
  border-radius: var(--rc-radius);
  padding: var(--rc-space-md);
}

.contact-card h2 { font-size: 1rem; }

/* Footer — stacked links */
.site-footer {
  background: var(--rc-forest);
  color: var(--rc-sage-pale);
  padding: var(--rc-space-lg) 0 var(--rc-space-md);
  margin-top: var(--rc-space-xl);
}

.site-footer a {
  color: var(--rc-surface-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--rc-surface);
  text-decoration: underline;
}

.footer-brand {
  margin-bottom: var(--rc-space-lg);
}

.footer-brand .logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--rc-surface);
  margin: 0 0 var(--rc-space-xs);
}

.footer-brand p {
  font-size: 0.9rem;
  max-width: 32rem;
  margin: 0;
  color: var(--rc-sage-pale);
}

.footer-links {
  display: grid;
  gap: var(--rc-space-md);
  margin-bottom: var(--rc-space-lg);
}

@media (min-width: 640px) {
  .footer-links {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li { margin-bottom: 0.4rem; }

.footer-col h4 {
  color: var(--rc-surface);
  margin-bottom: var(--rc-space-xs);
}

.footer-bottom {
  padding-top: var(--rc-space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
}

.footer-bottom > p {
  margin: 0 0 var(--rc-space-sm);
  color: var(--rc-sage-pale);
}

.cookie-note {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--rc-sage-pale);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.cookie-note[hidden] { display: none; }

.cookie-dismiss {
  background: transparent;
  border: 1px solid var(--rc-sage-pale);
  color: var(--rc-surface);
  font-family: var(--rc-font);
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--rc-radius);
  cursor: pointer;
  white-space: nowrap;
}

.cookie-dismiss:hover {
  background: rgba(255, 255, 255, 0.1);
}
