:root {
  --bg: #fafaf7;
  --fg: #1a1a1a;
  --muted: #666;
  --accent: #003399;     /* EU blue */
  --swiss: #d52b1e;      /* Swiss red */
  --border: #e5e5e0;
  --highlight-bg: #fff8f8;
  --highlight-border: #f0d8d6;
  --code-bg: #ececec;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --fg: #e8e8e3;
    --muted: #999;
    --accent: #6b8aff;
    --swiss: #ff7a70;
    --border: #2a2a2a;
    --highlight-bg: #2a1d1d;
    --highlight-border: #4a2a2a;
    --code-bg: #2a2a2a;
  }
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}
header h1 {
  font-size: 1.45rem;
  margin: 0 0 .5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.meta {
  color: var(--muted);
  font-size: .85rem;
  margin-top: .15rem;
}
nav { margin-top: .75rem; font-size: .9rem; }
nav a { color: var(--accent); text-decoration: none; }
nav a:hover { text-decoration: underline; }

main { padding: 0; }

h2 {
  font-size: 1.15rem;
  margin: 2.25rem 0 .75rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  letter-spacing: -0.005em;
}
h3 {
  font-size: 1rem;
  margin: 1.5rem 0 .5rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: .8rem;
}

section.headline {
  margin: 1rem 0 2rem;
  padding: 1rem 1.25rem;
  background: var(--code-bg);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
}
section.headline h2 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
section.headline .lede {
  margin: .5rem 0 0;
  font-size: 1.05rem;
  line-height: 1.55;
}

.importance {
  color: var(--swiss);
  font-size: .75rem;
  letter-spacing: .05em;
  margin-left: .35rem;
}

article {
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
}
article:last-child { border-bottom: none; }

article h4 {
  margin: 0 0 .35rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}
article a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}
article a:hover {
  background: var(--accent);
  color: var(--bg);
  border-bottom-color: var(--accent);
}

.src {
  color: var(--muted);
  font-size: .82rem;
  margin-bottom: .25rem;
}
.src time { font-variant-numeric: tabular-nums; }

.summary {
  margin: .5rem 0 .35rem;
  color: var(--fg);
  font-size: .93rem;
  border-left: 2px solid var(--border);
  padding-left: .75rem;
}

.tags {
  color: var(--muted);
  font-size: .78rem;
  margin-top: .35rem;
  font-variant-numeric: tabular-nums;
}
.tag-seco { color: var(--swiss); font-weight: 500; }
.topic {
  display: inline-block;
  font-size: .72rem;
  color: var(--muted);
  background: var(--highlight-bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0 .35rem;
  margin-right: .15rem;
}

.also-covered {
  color: var(--muted);
  font-size: .76rem;
  margin-top: .35rem;
  font-style: italic;
}
.also-covered a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted var(--border);
}
.also-covered a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.collapsed {
  color: var(--muted);
  font-size: .8rem;
  font-style: italic;
}

.badge {
  display: inline-block;
  font-size: .68rem;
  padding: .05rem .35rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: 3px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: 1px;
  margin-left: .15rem;
}
.lang {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: .72rem;
  padding: .05rem .3rem;
  background: var(--code-bg);
  color: var(--muted);
  border-radius: 3px;
  margin-left: .25rem;
}

.empty, .more {
  color: var(--muted);
  font-style: italic;
  margin: 1rem 0;
}

footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.5;
}
footer a { color: var(--muted); }
.made {
  margin-top: .6rem;
  color: var(--swiss);
  letter-spacing: .02em;
}

.forum-aside {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}
.forum-aside h2 {
  font-size: 1rem;
  color: var(--muted);
  border-bottom: none;
}
.forum-note {
  color: var(--muted);
  font-size: .82rem;
  margin: .25rem 0 .6rem;
}
.forum-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.forum-list li {
  padding: .15rem 0;
  font-size: .85rem;
}
.forum-list a { color: var(--muted); }

ul.archive-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
ul.archive-list li {
  padding: .65rem 0;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
ul.archive-list a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  margin-right: .5rem;
}
ul.archive-list a:hover { text-decoration: underline; }

ul.archive-list .kind {
  display: inline-block;
  font-size: .65rem;
  padding: .05rem .35rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-right: .5rem;
  vertical-align: 1px;
}
ul.archive-list .kind-weekly {
  background: var(--code-bg);
  color: var(--muted);
}

aside.simulated {
  background: var(--code-bg);
  border-left: 3px solid var(--muted);
  border-radius: 4px;
  padding: .5rem .85rem;
  margin: 0 0 1.5rem;
  font-size: .8rem;
  color: var(--muted);
  font-style: italic;
}

[hidden] { display: none !important; }

/* Topic / region / Swiss filter bar (shown only when JS runs). */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0 0 1rem;
}
.filters button {
  font: inherit;
  font-size: .8rem;
  padding: .3rem .75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
}
.filters button:hover { border-color: var(--accent); }
.filters button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

/* Long URLs and region lists must not push the page sideways. */
body { overflow-wrap: break-word; }
.tags, .also-covered, .src { overflow-wrap: anywhere; }

/* Phones. */
@media (max-width: 600px) {
  body { padding: 1rem 1rem 4rem; font-size: 15px; }
  header { padding-bottom: 1rem; margin-bottom: 1rem; }
  header h1 { font-size: 1.2rem; }
  nav a { display: inline-block; padding: .65rem 0; }
  h2 { font-size: 1.05rem; margin-top: 1.75rem; }
  section.headline { margin: .75rem 0 1.5rem; padding: .85rem 1rem; }
  section.headline .lede { font-size: 1rem; }
  .filters button { min-height: 44px; padding: .4rem .9rem; }
  article h4 { font-size: .98rem; }
  .summary { padding-left: .6rem; }
  ul.archive-list a { display: inline-block; padding: .5rem 0; }
}

/* Print / save as PDF. */
@page { size: A4; margin: 15mm; }
@media print {
  :root {
    --bg: #fff; --fg: #000; --muted: #444; --border: #ccc;
    --accent: #000; --code-bg: #fff; --highlight-bg: #fff;
  }
  body { max-width: none; padding: 0; font-size: 10.5pt; }
  nav, .filters, .made { display: none !important; }
  [hidden] { display: block !important; }
  .filters[hidden] { display: none !important; }
  section.headline { border-left: 2px solid #000; padding: .5rem .75rem; }
  h2 { break-after: avoid; }
  article { break-inside: avoid; }
  article a { border-bottom: none; color: #000; }
  article h4 a::after {
    content: " — " attr(href);
    font-weight: 400;
    font-size: 8pt;
    color: #444;
    overflow-wrap: anywhere;
  }
}

/* Upcoming Council meetings, parsed from Council media advisories. */
section.coming-up {
  margin: 0 0 1.5rem;
  font-size: .9rem;
}
section.coming-up h2 {
  font-size: .85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: none;
  margin: 0 0 .4rem;
}
section.coming-up ul { list-style: none; padding: 0; margin: 0; }
section.coming-up li { padding: .2rem 0; }
section.coming-up time {
  display: inline-block;
  min-width: 6.5rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
section.coming-up a { color: var(--accent); text-decoration: none; }
section.coming-up a:hover { text-decoration: underline; }

/* Archive search. */
input.search {
  width: 100%;
  font: inherit;
  padding: .6rem .8rem;
  margin: .5rem 0 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
}
input.search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
ul.search-results { list-style: none; padding: 0; margin: .5rem 0; }
ul.search-results li { padding: .6rem 0; border-bottom: 1px solid var(--border); }
ul.search-results a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--accent); }
ul.search-results a.day {
  color: var(--muted);
  border-bottom: none;
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
  margin-right: .4rem;
}
ul.search-results .summary { margin: .3rem 0 0; font-size: .88rem; }

/* Sanctions tracker table. */
.note { color: var(--muted); font-size: .85rem; }
.table-wrap { overflow-x: auto; }
table.sanctions {
  width: 100%;
  border-collapse: collapse;
  font-size: .86rem;
}
table.sanctions th, table.sanctions td {
  text-align: left;
  vertical-align: top;
  padding: .5rem .5rem .5rem 0;
  border-bottom: 1px solid var(--border);
}
table.sanctions th {
  color: var(--muted);
  font-weight: 500;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
table.sanctions td:first-child, table.sanctions td:nth-child(4) {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
table.sanctions a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--accent); }
@media (max-width: 600px) {
  table.sanctions thead { display: none; }
  table.sanctions tr { display: block; padding: .6rem 0; border-bottom: 1px solid var(--border); }
  table.sanctions td { display: inline; border: none; padding: 0 .4rem 0 0; }
  table.sanctions td:not(:first-child):not(:last-child)::before { content: "· "; color: var(--muted); }
  table.sanctions td.none { display: none; }
  table.sanctions td:last-child { display: block; margin-top: .3rem; }
}
