@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --ink:      #0B1F3A;
  --ink-soft: #4A5568;
  --ink-mute: #8896A4;
  --teal:     #1A6B5C;
  --teal-l:   #E6F4F1;
  --red:      #C0392B;
  --red-l:    #FDECEA;
  --bg:       #F7F6F2;
  --surface:  #FFFFFF;
  --line:     #DDE3E9;
  --radius:   6px;
  --f-ui:     'Inter', system-ui, sans-serif;
  --f-text:   'Lora', Georgia, serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--f-ui);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navigace ─────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 0 2rem;
  display: flex; align-items: center; gap: 2rem;
  height: 52px;
}
.site-nav .logo {
  font-size: 13px; font-weight: 600; color: #fff;
  letter-spacing: .02em; white-space: nowrap;
}
.site-nav .logo span { color: #5FC3B0; }
.nav-links { display: flex; gap: 0; margin-left: auto; }
.nav-links a {
  font-size: 12px; color: rgba(255,255,255,.6);
  padding: 0 14px; height: 52px;
  display: flex; align-items: center;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav-links a:hover, .nav-links a.active {
  color: #fff; text-decoration: none;
  border-bottom-color: #5FC3B0;
}

/* ── Kontejner ────────────────────────────────────────── */
.container { max-width: 820px; margin: 0 auto; padding: 0 1.5rem; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Hero (index) ─────────────────────────────────────── */
.hero {
  background: var(--ink);
  padding: 4rem 1.5rem 3.5rem;
  border-bottom: 3px solid var(--teal);
}
.hero-inner { max-width: 680px; margin: 0 auto; }
.hero-kicker {
  font-size: 11px; font-weight: 600; letter-spacing: .12em;
  color: #5FC3B0; text-transform: uppercase; margin-bottom: 1rem;
}
.hero h1 {
  font-family: var(--f-text);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 600; line-height: 1.2;
  color: #fff; margin-bottom: 1.25rem;
}
.hero-lead {
  font-family: var(--f-text);
  font-size: 1.05rem; line-height: 1.75;
  color: rgba(255,255,255,.72);
  max-width: 560px;
}

/* ── Statistiky (hero) ────────────────────────────────── */
.stat-row {
  display: flex; gap: 0;
  margin-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,.12);
  border-left: 1px solid rgba(255,255,255,.12);
}
.stat { flex: 1; padding: 1.25rem 1.5rem; border-right: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12); }
.stat-val { font-size: 2rem; font-weight: 600; color: #5FC3B0; line-height: 1; margin-bottom: .3rem; }
.stat-lbl { font-size: 13px; color: rgba(255,255,255,.5); line-height: 1.4; }

/* ── Graf-karty (index) ───────────────────────────────── */
.section-heading {
  font-size: 11px; font-weight: 600; letter-spacing: .1em;
  color: var(--ink-mute); text-transform: uppercase;
  padding: 2.5rem 0 1.25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
}

.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 3rem; }
@media (max-width: 600px) { .chart-grid { grid-template-columns: 1fr; } }

.chart-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .15s;
}
.chart-card:hover { box-shadow: 0 4px 20px rgba(11,31,58,.08); }

.chart-card-stripe { height: 3px; }
.chart-card-stripe.teal { background: var(--teal); }
.chart-card-stripe.red  { background: var(--red);  }

.chart-card-body { padding: 1.25rem; flex: 1; }
.chart-card-num {
  font-size: 11px; font-weight: 600; color: var(--ink-mute);
  letter-spacing: .06em; margin-bottom: .5rem;
}
.chart-card-title {
  font-family: var(--f-text);
  font-size: 1.05rem; font-weight: 600;
  color: var(--ink); line-height: 1.3;
  margin-bottom: .6rem;
}
.chart-card-desc {
  font-size: .85rem; color: var(--ink-soft);
  line-height: 1.6; margin-bottom: 1rem;
}
.chart-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1rem; }
.tag {
  font-size: 11px; padding: 3px 9px; border-radius: 99px;
  font-weight: 500;
}
.tag-red   { background: var(--red-l);  color: var(--red);  }
.tag-teal  { background: var(--teal-l); color: var(--teal); }

.chart-card-footer {
  padding: .875rem 1.25rem;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.chart-card-source { font-size: 11px; color: var(--ink-mute); }
.btn-chart {
  font-size: 12px; font-weight: 500;
  color: var(--teal); background: var(--teal-l);
  padding: 5px 14px; border-radius: 99px;
  border: none; cursor: pointer;
  text-decoration: none; display: inline-block;
  transition: background .15s;
}
.btn-chart:hover { background: #c8e8e3; text-decoration: none; }

/* ── Stránka grafu (chart-page) ───────────────────────── */
.chart-page-header {
  background: var(--ink);
  padding: 2rem 1.5rem 1.75rem;
  border-bottom: 3px solid var(--teal);
}
.chart-page-header-inner { max-width: 1100px; margin: 0 auto; }
.chart-page-back {
  font-size: 12px; color: rgba(255,255,255,.5);
  display: inline-flex; align-items: center; gap: 5px;
  margin-bottom: .75rem; transition: color .15s;
}
.chart-page-back:hover { color: #fff; text-decoration: none; }
.chart-page-kicker { font-size: 11px; font-weight: 600; letter-spacing: .1em; color: #5FC3B0; text-transform: uppercase; margin-bottom: .5rem; }
.chart-page-header h1 {
  font-family: var(--f-text);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600; color: #fff; line-height: 1.25;
}

/* ── Split layout (chart + info) ──────────────────────── */
.chart-split {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  min-height: calc(100vh - 160px);
}
@media (max-width: 860px) {
  .chart-split { grid-template-columns: 1fr; }
  .chart-sidebar { border-left: none !important; border-top: 1px solid var(--line); }
}

.chart-main { padding: 1.75rem 1.5rem; }
.chart-sidebar {
  border-left: 1px solid var(--line);
  padding: 1.75rem 1.5rem;
  background: var(--surface);
}

/* ── Přepínač (manipulace / správná) ─────────────────── */
.switcher {
  display: inline-flex; border: 1px solid var(--line);
  border-radius: 99px; overflow: hidden; margin-bottom: 1rem;
}
.sw-btn {
  font-size: 12px; font-weight: 500;
  padding: 6px 18px; border: none; cursor: pointer;
  background: transparent; color: var(--ink-soft);
  transition: all .15s; font-family: var(--f-ui);
}
.sw-btn.bad.active  { background: var(--red);  color: #fff; }
.sw-btn.good.active { background: var(--teal); color: #fff; }
.sw-btn:hover:not(.active) { background: var(--bg); }

/* ── Verdict banner ───────────────────────────────────── */
.verdict {
  font-size: 13px; font-weight: 500;
  padding: 7px 12px; border-radius: var(--radius);
  margin-bottom: .875rem; display: flex; align-items: center; gap: 8px;
}
.verdict.bad  { background: var(--red-l);  color: var(--red);  }
.verdict.good { background: var(--teal-l); color: var(--teal); }

/* ── Legenda ──────────────────────────────────────────── */
.legend-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: .75rem; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); }
.legend-swatch { width: 12px; height: 12px; border-radius: 2px; flex-shrink: 0; }

/* ── Canvas obal ──────────────────────────────────────── */
.canvas-wrap { position: relative; width: 100%; height: 340px; }
.canvas-caption { font-size: 11px; color: var(--ink-mute); margin-top: .5rem; text-align: center; line-height: 1.5; }

/* ── Sidebar sekce ────────────────────────────────────── */
.sidebar-section { margin-bottom: 1.75rem; }
.sidebar-label {
  font-size: 10px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-mute);
  margin-bottom: .5rem;
}
.sidebar-text {
  font-family: var(--f-text);
  font-size: .9rem; line-height: 1.75;
  color: var(--ink-soft);
}
.sidebar-text strong { font-weight: 600; color: var(--ink); }

.info-box {
  background: var(--bg); border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: .875rem 1rem; margin-top: 1rem;
}
.info-box.warn { border-left-color: var(--red); }
.info-box p { font-size: .85rem; line-height: 1.65; color: var(--ink-soft); }
.info-box strong { color: var(--ink); font-weight: 600; }

/* ── Patička ──────────────────────────────────────────── */
.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  padding: 1.5rem;
  text-align: center;
}
.site-footer p { font-size: 12px; color: var(--ink-mute); line-height: 1.7; }
.site-footer a { color: var(--teal); }

/* ── Responzivita ─────────────────────────────────────── */
@media (max-width: 520px) {
  .stat-row { flex-direction: column; }
  .site-nav { padding: 0 1rem; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 0 8px; font-size: 11px; }
}
