:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --ink: #1a1d21;
  --muted: #5c6570;
  --line: #e6e9ee;
  --accent: #1d4ed8;       /* EU-ish blue */
  --accent-soft: #eef2ff;
  --gold: #b8860b;
}
/* Dark applies when the system asks for it and the reader hasn't chosen
   otherwise, or when they pick it with the toggle (which sets data-theme). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1116;
    --surface: #161a20;
    --ink: #e8eaed;
    --muted: #9aa4b0;
    --line: #262c34;
    --accent: #7c9eff;
    --accent-soft: #1f2740;
    --gold: #e2b13c;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1116;
  --surface: #161a20;
  --ink: #e8eaed;
  --muted: #9aa4b0;
  --line: #262c34;
  --accent: #7c9eff;
  --accent-soft: #1f2740;
  --gold: #e2b13c;
}

/* theme toggle button (shared pattern across all fedecuci.com pages) */
.theme-toggle {
  position: fixed; top: 1rem; right: 1rem; z-index: 99;
  width: 36px; height: 36px; display: grid; place-items: center; padding: 0;
  cursor: pointer; border-radius: 999px;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line);
  transition: color .12s ease, border-color .12s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--muted); }
.theme-toggle svg { width: 18px; height: 18px; }
/* show the icon for the theme you would switch TO */
.theme-toggle .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Hero ---------- */
header { padding: 3.2rem 0 3rem; border-bottom: 1px solid var(--line); }
.langs {
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: .78rem; font-weight: 600; letter-spacing: .1em;
  display: flex; gap: 1rem; margin-bottom: 2.4rem;
}
.langs a { color: var(--muted); text-decoration: none; }
.langs a:hover { color: var(--accent); }
.langs a.current { color: var(--accent); border-bottom: 2px solid var(--accent); }
.kicker {
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 1rem;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.12; font-weight: 700; max-width: 22ch; }
.lede { margin-top: 1.4rem; font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.lede strong { color: var(--ink); }

/* ---------- Support button ---------- */
.support { margin-top: 1.8rem; display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
#support-btn {
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: .95rem; font-weight: 600;
  background: var(--accent); color: #fff;
  border: none; border-radius: 8px;
  padding: .7rem 1.3rem; cursor: pointer;
}
#support-btn:hover { filter: brightness(1.08); }
#support-btn:disabled { background: var(--accent-soft); color: var(--accent); cursor: default; filter: none; }
.support__count { color: var(--muted); font-size: .95rem; font-style: italic; }

.why { margin-top: 2.4rem; }
.why h2 { margin-bottom: 1rem; }

/* ---------- Sections ---------- */
section { padding: 3rem 0; }
h2 {
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: .82rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: 1.6rem;
}
.why p { max-width: 68ch; margin-bottom: 1rem; font-size: 1.05rem; color: var(--muted); }
.actions-intro { max-width: 68ch; margin: -0.6rem 0 1.6rem; color: var(--muted); font-size: 1.05rem; }

/* ---------- Position cards ---------- */
.grid {
  columns: 300px;
  column-gap: 1.1rem;
}
/* Applied by masonry.js: fixed columns that don't rebalance on expand */
.grid.masonry { display: flex; align-items: flex-start; gap: 1.1rem; }
.masonry-col { flex: 1 1 0; min-width: 0; }
.grid--rows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.1rem;
}
.grid--rows article { margin-bottom: 0; }
article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem 1.4rem;
  display: flex; flex-direction: column; gap: .7rem;
  break-inside: avoid;
  margin-bottom: 1.1rem;
}
.tag {
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 600; color: var(--accent);
  background: var(--accent-soft);
  padding: .25rem .6rem; border-radius: 99px; align-self: flex-start;
}
article h3 { font-size: 1.25rem; line-height: 1.3; }
article .stance { font-style: italic; color: var(--ink); }
article p { color: var(--muted); font-size: .97rem; }
article a { color: var(--accent); }
.more {
  margin-top: auto; padding-top: .4rem;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: .85rem; font-weight: 600;
  color: var(--accent); text-decoration: none; align-self: flex-start;
}
.more:hover { text-decoration: underline; }
.counter {
  border-top: 1px dashed var(--line);
  padding-top: .65rem; margin-top: .3rem;
}
.counter summary {
  cursor: pointer;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 600; color: var(--gold);
}
.counter p { margin-top: .55rem; }

/* ---------- Reading list ---------- */
.reading li { margin-bottom: .9rem; max-width: 68ch; list-style: none; }
.reading a { color: var(--accent); font-weight: 600; text-decoration: none; }
.reading a:hover { text-decoration: underline; }
.reading span { color: var(--muted); }

/* ---------- Comments ---------- */
.comment-form {
  display: flex; flex-direction: column; gap: .7rem;
  max-width: 640px; margin-bottom: 2.4rem;
}
.comment-form input,
.comment-form textarea {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px;
  padding: .7rem .85rem; width: 100%;
}
.comment-form textarea { resize: vertical; min-height: 3.4rem; line-height: 1.5; }
.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-form .hp {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; opacity: 0;
}
.comment-form button {
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: .95rem; font-weight: 600;
  background: var(--accent); color: #fff;
  border: none; border-radius: 8px;
  padding: .7rem 1.3rem; cursor: pointer; align-self: flex-start;
}
.comment-form button:hover { filter: brightness(1.08); }
.comment-form button:disabled { background: var(--accent-soft); color: var(--accent); cursor: default; filter: none; }
.comments { list-style: none; max-width: 640px; }
.comment {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}
.comment--empty { color: var(--muted); font-style: italic; }
.comment__head {
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  display: flex; gap: .7rem; align-items: baseline; margin-bottom: .3rem;
}
.comment__name { font-weight: 600; font-size: .92rem; color: var(--ink); }
.comment__time { font-size: .78rem; color: var(--muted); }
.comment__body { color: var(--ink); font-size: 1rem; white-space: pre-wrap; word-wrap: break-word; }

footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3.5rem;
  color: var(--muted);
  font-size: .95rem;
}
footer a { color: var(--accent); }
