/* Clean UI – bílé téma
   Uprav barvy hlavně v :root
*/

:root{
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --soft2: #f1f5f9;
  --accent: #2563eb;
  --radius: 16px;
  --max: 1000px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
}

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

.container{
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.skip-link{
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--text);
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  z-index: 10;
}
.skip-link:focus{ top: 16px; }

/* Topbar */
.topbar{
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 5;
}
.topbar-inner{
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}
.brand{
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.dot{
  width: 12px;
  height: 12px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--accent);
}
.brand h1{
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.2px;
}
.sub{
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.meta{ display: flex; gap: 10px; align-items: center; }
.chip{
  font-size: 13px;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Search */
.search-wrap{
  padding: 18px 0 10px;
}
.search{
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
}
.search input{
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  outline: none;
  font-size: 15px;
}
.search input:focus{
  border-color: rgba(37,99,235,0.5);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.10);
}
.search button{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}
.search button:hover{ filter: brightness(0.98); }
.search button.ghost{
  background: #fff;
  color: var(--text);
}
.search button.ghost:hover{ background: var(--soft2); }

.count{
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

/* List */
.list-wrap{
  padding: 10px 0 24px;
}
.topics{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.topic{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px 14px 12px;
}
.topic:hover{
  background: var(--soft);
}
.topic-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.topic h2{
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}
.tag{
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--soft2);
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.desc{
  margin: 8px 0 10px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}
.answer{
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
}
.answer p{
  margin: 0;
  line-height: 1.6;
  font-size: 14px;
}
.links{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.links a{
  font-size: 14px;
}

/* Empty */
.empty{
  margin-top: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--soft);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Footer */
.footer{
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 16px 0 28px;
}
.footer-inner{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.footer p{ margin: 0; font-size: 14px; }
.muted{ color: var(--muted); }

/* A11y */
.sr-only{
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Responsive */
@media (max-width: 720px){
  .topbar-inner{ flex-direction: column; align-items: flex-start; }
  .meta{ width: 100%; }
  .search{ grid-template-columns: 1fr; }
  .search button{ width: 100%; }
  .topic-head{ flex-direction: column; align-items: flex-start; }
}

/**/
.detail-hero{
  padding:28px 0 18px;
}

.back-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:14px;
  color:var(--muted);
}

.detail-card{
  border:1px solid var(--line);
  border-radius:20px;
  background:#fff;
  padding:22px;
}

.detail-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:16px;
  margin-top:16px;
}
