@font-face {
  font-family: "Literata";
  src: url("/fonts/Literata.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("/fonts/Literata-Italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

/* Themes. Green is the default; a new one is a new [data-theme] block
   with the same names, plus a button in base.html. */
:root {
  --bg: #111c18;
  --fg: #d3ddd7;
  --strong: #eef4f0;
  --muted: #81b8a8;
  --rule: #23372b;
  --accent: #549e6a;
  --sel: #32473b;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #fcfcfa;
  --fg: #23262a;
  --strong: #111315;
  --muted: #6c7177;
  --rule: #e2e3e0;
  --accent: #2e6b52;
  --sel: #cfe5d9;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #161718;
  --fg: #d9dad6;
  --strong: #f1f1ec;
  --muted: #8e938f;
  --rule: #2b2d2e;
  --accent: #7db99b;
  --sel: #2d4639;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.62 "Literata", Georgia, serif;
  font-optical-sizing: auto;
  -webkit-text-size-adjust: 100%;
}
@media (min-width: 40rem) { html { font-size: 1.125rem; } }

body {
  margin: 0 auto;
  padding: 0 1rem;
  max-width: 35rem;
}
body.home { max-width: 44rem; }

::selection { background: var(--sel); }

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

h1, h2, h3 {
  color: var(--strong);
  font-weight: 560;
  line-height: 1.2;
  text-wrap: balance;
}
h1 { font-size: 2.1rem; margin: 0 0 0.3rem; letter-spacing: -0.01em; }
h2 { font-size: 1.3rem; margin: 2.2rem 0 0.6rem; }
h3 { font-size: 1.05rem; margin: 1.8rem 0 0.4rem; }
p, li { text-wrap: pretty; }

.meta, .top, .bottom { color: var(--muted); font-size: 0.85rem; }

.top { padding: 2.5rem 0 3rem; }
.top a { text-decoration: none; }
main { padding-bottom: 3rem; }

.bottom {
  border-top: 1px solid var(--rule);
  padding: 1.2rem 0 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}
.bottom p { margin: 0; }
.motiv button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0 0.15rem;
  cursor: pointer;
}
.motiv button:hover { color: var(--accent); }
.motiv button[aria-pressed="true"] { color: var(--fg); font-style: italic; }

/* Home: section labels hang in the left margin when there's room. */
/* The name is the one loud thing; Literata's display cut takes over at this size. */
.intro { padding: 16vh 0 4.5rem; }
.intro h1 {
  font-size: clamp(2.9rem, 9vw, 4.6rem);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 0 0 0.9rem;
}
.intro p { margin: 0; font-style: italic; color: var(--muted); font-size: 1.15rem; }

.row h2 { font-size: 1rem; font-style: italic; font-weight: 400; color: var(--muted); }
@media (min-width: 46rem) {
  .row { display: grid; grid-template-columns: 8rem 1fr; gap: 1.5rem; margin-top: 2.5rem; }
  .row h2 { margin: 0.12rem 0 0; text-align: right; }
  .row > ul, .row > p { margin: 0; }
  .intro { padding-left: 9.5rem; }
}

.posts, .things { list-style: none; padding: 0; margin: 0 0 0.5rem; }
.posts li, .things li { margin: 0 0 0.55rem; }
.posts .meta { display: block; line-height: 1.3; }
.posts a, .things a { color: var(--strong); text-decoration-color: var(--rule); }
.posts a:hover, .things a:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* Posts */
article h1 { margin-top: 0; }
article .meta { margin: 0 0 2.2rem; }
article h2 { font-size: 1.25rem; }
article h3 { font-size: 1.05rem; font-style: italic; font-weight: 500; }
blockquote {
  margin: 1.2rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
}
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: var(--rule);
  padding: 0.1em 0.3em;
  border-radius: 3px;
  overflow-wrap: anywhere;
}
img, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }

sup { line-height: 0; font-size: 0.7em; }
.footnote-reference a { text-decoration: none; color: var(--accent); }
.footnotes {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--muted);
}
.footnotes li { margin-bottom: 0.4rem; }
.footnotes p { display: inline; }
.footnotes a[href*="#fr-"] { text-decoration: none; margin-left: 0.2em; }

/* Mundo */
.mundo-nadpis {
  text-align: center;
  font-size: clamp(4rem, 19vw, 7.5rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  margin: 3.5rem 0 2rem;
}
.mundo video { width: 100%; border-radius: 2px; }
.obsah { list-style: none; padding: 0; margin: 2rem 0; }
.obsah li { margin-bottom: 0.5rem; }

.rejstrik { list-style: none; padding: 0; margin: 2.5rem 0 0; }
.rejstrik li { border-top: 1px solid var(--rule); padding: 1rem 0 0.4rem; }
.rejstrik h2 { font-size: 1.05rem; margin: 0 0 0.4rem; }
.rejstrik h2 span { font-weight: 400; font-style: italic; color: var(--muted); margin-left: 0.4rem; }
.rejstrik p { margin: 0 0 0.5rem; }

.plain h1 { margin-top: 0; }

.heslo { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; margin-top: 1.5rem; }
.heslo input, .heslo button {
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.3rem 0.6rem;
}
.heslo input { min-width: 0; flex: 1 1 12rem; }
.heslo button { cursor: pointer; border-color: var(--accent); }
.heslo button:hover { color: var(--accent); }
.chyba { color: var(--muted); font-style: italic; }
