/* Základ stránky */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #171717;
  background: #fff;
  font: 16px/1.7 system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Arial, sans-serif;
}


/* Hlavní obsah stránky */

.wrap {
  width: min(100% - 48px, 1050px);
  margin-left: clamp(24px, 10vw, 180px);
  margin-right: auto;
  padding: 56px 0 72px;
}


/* Odkazy */

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

a:hover {
  border-bottom-style: dashed;
}


/* Nadpisy */

h1 {
  margin: 12px 0 18px;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.3;
  font-weight: 650;
}


/* Pomocné texty */

.note {
  opacity: 0.72;
  font-size: 13px;
}

.meta {
  margin-top: 14px;
  font-size: 14px;
  opacity: 0.82;
}

.meta div {
  margin: 2px 0;
}


/* Oddělovací čára */

hr {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.18);
}


/* Přepis archiválie */

pre,
.transcript {
  max-width: 900px;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: normal;
  font: 15px/1.75 ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", monospace;
}


/* Poznámka archiváře */

.archivist-note {
  max-width: 900px;
  margin-top: 28px;
  padding: 16px 18px;
  border-left: 3px solid rgba(0, 0, 0, 0.55);
  background: rgba(0, 0, 0, 0.035);
  font-size: 14px;
}

.archivist-note strong {
  display: block;
  margin-bottom: 6px;
  font-weight: 650;
}


/* Související archiválie */

.related {
  max-width: 900px;
  margin-top: 22px;
  font-size: 14px;
}

.related strong {
  display: block;
  margin-bottom: 5px;
  font-weight: 650;
}


/* Menší obrazovky */

@media (max-width: 900px) {
  .wrap {
    width: min(100% - 40px, 760px);
    margin: 0 auto;
    padding-top: 44px;
  }
}


/* Mobilní zobrazení */

@media (max-width: 600px) {
  .wrap {
    width: calc(100% - 28px);
    margin: 0 auto;
    padding: 32px 0 48px;
  }

  h1 {
    font-size: 21px;
  }

  pre,
  .transcript {
    font-size: 14px;
    line-height: 1.65;
  }

  .archivist-note {
    padding: 14px;
  }
}

/* ===== Úvodní stránka ===== */

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 48px;
    align-items: start;
}

.item {
    margin: 18px 0;
}

.item .meta {
    display: block;
    margin-top: 6px;
}

.sidebar {
    font-size: 12px;
    line-height: 1.45;
    color: #666;
}

.sidebar h2 {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.revision {
    margin-bottom: 11px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,.08);
}

.revision:last-child {
    border-bottom: none;
}

.revision .date {
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 600;
    color: #444;
}

@media (max-width: 850px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        margin-top: 36px;
        padding-top: 28px;
        border-top: 1px solid rgba(0,0,0,.2);
    }
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 6px;
  opacity: 0.6;
  font-size: 13px;
}

.meta span {
  display: inline-block;
}

/* Cookie lišta */

#cookie-banner {
  position: fixed;
  right: 24px;
  bottom: 24px;
  left: 24px;
  z-index: 9999;

  max-width: 680px;
  margin: 0 auto;
  padding: 16px 18px;

  color: #111;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.22);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.cookie-content {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.cookie-text {
  font-size: 13px;
  line-height: 1.5;
}

.cookie-buttons {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.cookie-buttons button {
  padding: 7px 11px;

  font: inherit;
  font-size: 12px;
  color: #111;

  cursor: pointer;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.45);
}

.cookie-buttons button:hover {
  background: rgba(0, 0, 0, 0.06);
}

#cookie-accept {
  color: #fff;
  background: #111;
}

#cookie-accept:hover {
  background: #333;
}

@media (max-width: 600px) {
  #cookie-banner {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .cookie-content {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .cookie-buttons {
    width: 100%;
  }

  .cookie-buttons button {
    flex: 1;
  }
}

.archive-image img {
    width: min(50%, 350px);
    height: auto;
    display: block;
    margin: 0 auto;
}