/* Komentáře — meta-analysis.cz/komentare/
   Self-contained. No external fonts, no frameworks: the section must render fully
   for SeznamBot, whose JavaScript rendering is experimental. */

:root {
  --bg:        #fbfaf8;
  --surface:   #ffffff;
  --text:      #1b1a18;
  --muted:     #6a6660;
  --faint:     #6e6960;
  --rule:      #d8d3cb;
  --accent:    #8c2f27;
  --accent-bg: #f6efee;
  --focus:     #2f6fb0;
  --control:   #8a847a;   /* borders of real controls: >=3:1 */
  --measure:   34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #161513;
    --surface:   #1e1d1a;
    --text:      #e9e6e1;
    --muted:     #a29d95;
    --faint:     #a09a91;
    --rule:      #423f3a;
    --accent:    #e2837a;
    --accent-bg: #2a1f1d;
    --focus:     #7fb3e8;
    --control:   #6f6a63;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Charter", "Iowan Old Style", "Palatino Linotype", "Book Antiqua",
               Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: 60rem; margin: 0 auto; padding: 0 1.5rem; }
.reading { max-width: var(--measure); }

/* ---------------------------------------------------------------- masthead */

.masthead { border-bottom: 1px solid var(--rule); background: var(--surface); }
.masthead .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.75rem;
                  padding-top: 1.4rem; padding-bottom: 1.4rem; }
.site-name {
  font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em;
  margin: 0; margin-right: auto;
}
.site-name a { color: var(--text); text-decoration: none; }
.site-name small {
  display: block; font-size: 0.8rem; font-weight: 400; color: var(--faint);
  letter-spacing: 0.02em; margin-top: 0.15rem;
}
.nav { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: 0.9rem; }
.nav a { color: var(--muted); text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--text); border-bottom-color: var(--rule); }
.nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

/* -------------------------------------------------------------------- page */

main { padding: 2.75rem 0 4rem; }

.lede { margin: 0 0 2.25rem; }
.lede h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.6rem; }
.lede p { color: var(--muted); margin: 0; max-width: var(--measure); }

/* ------------------------------------------------------------------ filter */

.filter { margin: 0 0 2rem; padding: 1rem 0 1.25rem; border-block: 1px solid var(--rule); }
.filter-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.filter input[type="search"] {
  flex: 1 1 15rem; min-width: 0;
  font: inherit; font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--control); border-radius: 4px;
}
.filter input[type="search"]::placeholder { color: var(--faint); }
.chip {
  font: inherit; font-size: 0.85rem; cursor: pointer;
  padding: 0.4rem 0.8rem; border-radius: 999px;
  color: var(--muted); background: transparent;
  border: 1px solid var(--control);
}
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { color: var(--accent); background: var(--accent-bg); border-color: currentColor; }
.count { font-size: 0.85rem; color: var(--faint); margin: 0.75rem 0 0; }

/* JS enhancement only — without JS every item stays visible. */
.js-only { display: none; }
.has-js .js-only { display: block; }
.has-js .filter-row { display: flex; }

/* ------------------------------------------------------------------- items */

.year { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
        color: var(--faint); margin: 2.25rem 0 0.75rem; font-weight: 600; }
.year:first-of-type { margin-top: 0; }

.items { list-style: none; margin: 0; padding: 0; }
.item { padding: 0.9rem 0; border-bottom: 1px solid var(--rule); }
.item h3 { margin: 0; font-size: 1.075rem; font-weight: 600; line-height: 1.35; }
/* the anchor fills the row: the padding that looks tappable actually is. Without this
   the hit area is only the text line — 23px on a phone, under the 24px WCAG 2.5.8 floor. */
.item h3 a { color: var(--text); text-decoration: none;
             display: block; padding: 0.15rem 0 0.4rem; }
.item h3 a:hover { color: var(--accent); text-decoration: underline; }
.item p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.95rem; max-width: var(--measure); }

.meta { font-size: 0.83rem; color: var(--faint);
        display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; align-items: baseline; }
.meta .outlet { color: var(--muted); }

.tag { font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase;
       padding: 0.1rem 0.45rem; border-radius: 3px; border: 1px solid var(--rule);
       color: var(--faint); white-space: nowrap; }
.tag-av { color: var(--accent); border-color: currentColor; }

/* ------------------------------------------------------------------ single */

.article-head { margin-bottom: 2rem; }
.article-head h1 { font-size: 1.9rem; line-height: 1.22; letter-spacing: -0.02em; margin: 0 0 0.7rem;
                   max-width: var(--measure); }
.byline { font-size: 0.9rem; color: var(--faint);
          display: flex; flex-wrap: wrap; gap: 0.35rem 0.7rem; margin: 0; }

.prose { font-size: 1.115rem; }
.prose > * { max-width: var(--measure); }
.prose p { margin: 0 0 1.15em; }
.prose h2 { font-size: 1.3rem; margin: 2em 0 0.5em; line-height: 1.3; }
.prose h3 { font-size: 1.1rem; margin: 1.8em 0 0.4em; }
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.3em; }
.prose li { margin-bottom: 0.35em; }
.prose blockquote {
  margin: 1.4em 0; padding: 0.1em 0 0.1em 1.1em;
  border-left: 2px solid var(--rule); color: var(--muted); font-style: italic;
}
.prose strong { font-weight: 600; }

.provenance {
  margin: 2.5rem 0 0; padding: 0.9rem 1.1rem;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 5px;
  font-size: 0.9rem; color: var(--muted); max-width: var(--measure);
}
.provenance p { margin: 0; }

.pager { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--rule);
         font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* ------------------------------------------------------------------ footer */

.foot { border-top: 1px solid var(--rule); background: var(--surface);
        padding: 1.75rem 0; font-size: 0.87rem; color: var(--faint); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: baseline; }
.foot a { color: var(--muted); }
.foot .sep { margin-left: auto; }

@media (max-width: 34rem) {
  .lede h1 { font-size: 1.65rem; }
  .article-head h1 { font-size: 1.5rem; }
  .prose { font-size: 1.06rem; }
}

@media print {
  .masthead, .filter, .foot, .pager { display: none; }
  body { background: #fff; color: #000; }
  .prose > * { max-width: none; }
}

/* ------------------------------------------------------------- about block */

.foot { padding: 2.25rem 0 2.5rem; }
.foot .about { display: block; }
.about-bio {
  margin: 0 0 1.1rem; max-width: 46rem;
  font-size: 0.92rem; line-height: 1.6; color: var(--muted);
}
.about-bio strong { color: var(--text); font-weight: 600; }
.about-links {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem;
  font-size: 0.87rem;
}
.about-links a { color: var(--muted); text-decoration: none;
                 border-bottom: 1px solid var(--rule); padding-bottom: 1px; }
.about-links a:hover { color: var(--accent); border-bottom-color: currentColor; }
.about-machine { margin: 1rem 0 0; font-size: 0.82rem; color: var(--faint); max-width: 46rem; }
.about-machine a { color: var(--muted); }
.about-rights { margin: 0.7rem 0 0; font-size: 0.82rem; color: var(--faint); max-width: 46rem; }
.meta .authors { color: var(--muted); }
.src-list li { padding: 0.3rem 0; border-bottom: 1px solid var(--rule); font-size: 0.9rem; }
.src-list a { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; }
.src-meta { color: var(--faint); }
.search-note { margin-top: 0.35rem; }
.search-note a { color: var(--muted); }

/* The outlet's standfirst — the editor's words, not the author's, so set apart. */
.perex {
  margin: 0 0 1.8rem; padding: 0 0 0 1rem;
  border-left: 3px solid var(--accent-bg);
  font-size: 1.05rem; line-height: 1.55; color: var(--muted);
  max-width: var(--measure);
}
