:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --ink: #1b2733;
  --muted: #5b6b7b;
  --primary: #1f4e78;
  --primary-2: #2e6da4;
  --accent: #c8a24a;
  --border: #e1e7ee;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 35, 56, .08), 0 6px 18px rgba(16, 35, 56, .06);
  --maxw: 1080px;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
}

a { color: var(--primary-2); }

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

/* Header */
.site-header {
  background: linear-gradient(135deg, var(--primary) 0%, #163a5a 100%);
  color: #fff;
  padding: 28px 0;
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 16px; }
.site-header h1 { margin: 0; font-size: 1.55rem; letter-spacing: .2px; }
.tagline { margin: 2px 0 0; color: #cfe0f0; font-size: .95rem; }

/* Sections */
main { padding: 36px 0 60px; }
section { margin-bottom: 40px; }
section > h2 {
  font-size: 1.25rem;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.intro p { max-width: 70ch; color: #2a3a49; }
.disclaimer {
  background: #fff8e6;
  border: 1px solid #f0e0b0;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: .92rem;
  color: #6b5a2a;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(16,35,56,.12); }
.card-body { padding: 18px 18px 10px; flex: 1; }
.card .tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--primary);
  background: #eaf1f8;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: .94rem; }
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  font-size: .85rem;
}
.card-footer .date { color: var(--muted); }
.card-footer .go { font-weight: 600; }

.empty {
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 24px 0;
  font-size: .9rem;
  color: var(--muted);
}
.site-footer .muted { color: #8a98a6; margin-top: 4px; }

/* Analysis page (used by analysis templates) */
.analysis main { max-width: 880px; }
.analysis .back { display: inline-block; margin: 18px 0 6px; font-size: .9rem; }
.analysis h2 { font-size: 1.6rem; }
.analysis .meta { color: var(--muted); font-size: .88rem; margin-bottom: 20px; }
.chart-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin: 22px 0;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: .92rem;
}
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: right; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th { background: var(--primary); color: #fff; }
table.data tbody tr:nth-child(even) { background: #f7fafd; }
.badge { display:inline-block; padding:2px 8px; border-radius:999px; font-size:.78rem; }
.badge.fact { background:#e6f2e6; color:#256029; }
.badge.proj { background:#fff3da; color:#8a6400; }

@media (max-width: 640px) {
  .site-header h1 { font-size: 1.25rem; }
}

/* Navigácia (záložky) */
.main-nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(16,35,56,.04);
  position: sticky;
  top: 0;
  z-index: 10;
}
.main-nav .container { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  display: inline-block;
  padding: 12px 18px;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.main-nav a:hover { color: var(--primary); }
.main-nav a.active { color: var(--primary); border-bottom-color: var(--accent); }

/* Rozbalovacia sekcia (details.collapsible) - obsah sa ukaze az po kliknuti na nadpis */
details.collapsible { margin: 22px 0 8px; }
details.collapsible > summary {
  cursor: pointer;
  list-style: none;
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
details.collapsible > summary::-webkit-details-marker { display: none; }
details.collapsible > summary::before { content: "▸"; display: inline-block; width: 1.1em; text-decoration: none; }
details.collapsible[open] > summary::before { content: "▾"; }
details.collapsible > summary:hover { color: var(--primary); }
details.collapsible > summary .when-closed,
details.collapsible > summary .when-open { font-weight: 400; color: var(--muted); }
details.collapsible[open] > summary .when-closed,
details.collapsible:not([open]) > summary .when-open { display: none; }
details.collapsible[open] > summary { margin-bottom: 8px; }
