* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: #1f2937;
  line-height: 1.6;
}

a {
  color: #0f4c81;
}

a:visited {
  color: #0f4c81;
}

a:hover,
a:focus {
  text-decoration: underline;
}

.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.site-header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-brand {
  color: #111827;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.site-brand:hover,
.site-brand:focus {
  text-decoration: none;
}

.site-nav {
  margin-left: auto;
}

.site-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.site-menu a {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  color: #374151;
  text-decoration: none;
}

.site-menu a:hover,
.site-menu a:focus {
  background: #f3f4f6;
  text-decoration: none;
}

.site-menu a.menuactive {
  background: #111827;
  color: #ffffff;
}

.site-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.content-shell {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.75rem;
}

h1 {
  margin: 0 0 1rem;
  font-size: 2rem;
  line-height: 1.2;
}

h2 {
  margin-top: 0;
}

.page-meta {
  margin: -0.3rem 0 1.2rem;
  color: #6b7280;
  font-size: 0.95rem;
}

.related {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.related h2 {
  font-size: 1.1rem;
  color: #4b5563;
}

.related ul {
  margin: 0.4rem 0 0;
}

.home-hero {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.home-intro {
  max-width: 44rem;
  color: #4b5563;
}

.home-intro p {
  margin-bottom: 0;
}

/* Plochy web (params.home.flat): jeden seznam clanku pres celou sirku,
   bez karty. Dvousloupcovy grid .home-sections je delany na weby s vice
   sekcemi a jedinou kartu by zuzil na polovinu. */
.home-list {
  margin: 0;
}

.home-list li + li {
  margin-top: 0.55rem;
}

.home-list .entry-line {
  gap: 0.9rem;
  align-items: baseline;
}

.home-list .date {
  min-width: 5.5rem;
  font-size: 0.85rem;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}

.home-list .entry-link {
  font-size: 1.02rem;
  line-height: 1.35;
}

@media (max-width: 560px) {
  .home-list .entry-line {
    flex-wrap: wrap;
    gap: 0.15rem 0.9rem;
  }
}

.home-sections {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-section-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
  padding: 1rem 1.1rem;
}

.home-section-card h2 {
  margin-bottom: 0.35rem;
  font-size: 1.1rem;
}

.home-section-card h2 a {
  text-decoration: none;
}

.home-section-summary {
  margin: 0 0 0.9rem;
  color: #4b5563;
  font-size: 0.92rem;
}

.list-block + .list-block {
  margin-top: 1.75rem;
}

.list-heading {
  margin: 1.5rem 0 0.85rem;
  font-size: 1.15rem;
}

.clean-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.clean-list li {
  margin-bottom: 0.7rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.45rem;
}

.clean-list li:last-child {
  margin-bottom: 0;
}

.compact-list li {
  margin-bottom: 0.55rem;
  padding-bottom: 0.4rem;
}

.entry-line {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.date {
  font-size: 0.9rem;
  color: #6b7280;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  min-width: 90px;
}

.entry-link {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.taxonomy-overview {
  margin-top: 1.8rem;
}

.taxonomy-description {
  margin-top: -0.35rem;
  color: #4b5563;
}

.taxonomy-line {
  justify-content: space-between;
}

.taxonomy-count {
  color: #6b7280;
  font-size: 0.9rem;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.section-inline-line {
  gap: 0.4rem;
  flex-wrap: nowrap;
}

.section-inline-summary {
  color: #6b7280;
  font-size: 0.92rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.section-entry .entry-link {
  flex: 0 0 auto;
}

.section-entry {
  min-width: 0;
}

@media (max-width: 700px) {
  .section-inline-line {
    flex-wrap: wrap;
  }

  .section-inline-summary {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}

.home-section-card .entry-line {
  gap: 0.5rem;
}

.home-section-card .date {
  min-width: 72px;
  font-size: 0.8rem;
}

.home-section-card .entry-link {
  font-size: 0.86rem;
  line-height: 1.3;
}

.entry-link:hover,
.entry-link:focus {
  text-decoration: underline;
}

.section-link {
  margin: 0.85rem 0 0;
}

.section-link a {
  font-size: 0.95rem;
  font-weight: 600;
}

.empty-state {
  color: #6b7280;
  border-bottom: 0;
  padding-bottom: 0;
}

.search-intro {
  max-width: 42rem;
  color: #4b5563;
}

#search {
  margin-top: 1.5rem;
}

@media (max-width: 820px) {
  .home-sections {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  max-width: 960px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
  text-align: center;
  color: #6b7280;
}

.site-footer a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

article pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 0.75rem 0.9rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Rozbalovaci bloky ([%collapsible] v AsciiDocu -> <details>) */
article details {
  margin: 1rem 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

article details > summary.title {
  cursor: pointer;
  padding: 0.5rem 0.9rem;
  background: #f3f4f6;
  color: #0f4c81;
  font-size: 0.9rem;
  font-weight: 600;
  list-style: none;
}

article details > summary.title::-webkit-details-marker {
  display: none;
}

article details > summary.title::before {
  content: "\25B8";
  display: inline-block;
  width: 1em;
  color: #6b7280;
}

article details[open] > summary.title::before {
  content: "\25BE";
}

article details > summary.title:hover {
  background: #e5e7eb;
}

article details > .content {
  padding: 0.75rem 0.9rem;
}

article details > .content > :last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .site-header-inner,
  .site-main,
  .site-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .content-shell {
    padding: 1.25rem;
  }

  .site-nav {
    width: 100%;
    margin-left: 0;
  }

  .site-menu {
    width: 100%;
    justify-content: flex-start;
  }
}
