* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(217, 155, 43, 0.2), transparent 28rem),
    linear-gradient(160deg, #fff9eb 0%, #f8f1df 58%, #f1dfb9 100%);
  color: #2f211b;
  line-height: 1.6;
}

a {
  color: #a33d2d;
}

a:visited {
  color: #a33d2d;
}

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

/* Tmave chilli a safran odkazuji na kari, bez obrazkoveho pozadi. */
.site-header {
  background: linear-gradient(110deg, #6e251e, #9b3b28);
  border-bottom: 3px solid #d99b2b;
}

.site-header-inner {
  max-width: 760px;
  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: #ffffff;
  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: #fff1d1;
  text-decoration: none;
}

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

.site-menu a.menuactive {
  background: #f8f1df;
  color: #4f1d18;
}

.site-main {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(3rem, 10vw, 7rem) 1.5rem;
}

.content-shell {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e5c98f;
  border-radius: 18px;
  padding: clamp(2rem, 7vw, 4.5rem);
  box-shadow: 0 24px 70px rgba(79, 29, 24, 0.12);
}

.content-shell::after {
  content: "";
  position: absolute;
  width: 13rem;
  height: 13rem;
  right: -5rem;
  bottom: -7rem;
  border-radius: 50%;
  background: rgba(217, 155, 43, 0.18);
}

.landing-hero {
  position: relative;
  z-index: 1;
  min-height: clamp(15rem, 42vh, 24rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.landing-hero h1 {
  margin-bottom: 0.65rem;
  color: #6e251e;
  font-size: clamp(2.7rem, 10vw, 5.2rem);
  letter-spacing: -0.045em;
}

.landing-hero .home-intro {
  color: #66503f;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
}

.landing-hero .home-intro p {
  margin: 0;
}

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: #7b6250;
  font-size: 0.95rem;
}

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

.related h2 {
  font-size: 1.1rem;
  color: #66503f;
}

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

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

.home-intro {
  max-width: 44rem;
  color: #66503f;
}

.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: #7b6250;
  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: 1fr;
}

.home-section-card {
  max-width: 46rem;
  border: 1px solid #e5c98f;
  border-radius: 10px;
  background: #fff9eb;
  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: #66503f;
  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 #e5c98f;
  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: #7b6250;
  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: #66503f;
}

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

.taxonomy-count {
  color: #7b6250;
  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: #7b6250;
  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: #7b6250;
  border-bottom: 0;
  padding-bottom: 0;
}

.search-intro {
  max-width: 42rem;
  color: #66503f;
}

#search {
  margin-top: 1.5rem;
}

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

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

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

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

article details > summary.title {
  cursor: pointer;
  padding: 0.5rem 0.9rem;
  background: #f8f1df;
  color: #a33d2d;
  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: #7b6250;
}

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

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

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,
  .content-shell {
    padding: 1.25rem;
  }

  .site-main {
    padding-top: 2.5rem;
  }

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

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