/*
 * itolma.ch — one stylesheet, no web fonts, no external requests.
 *
 * System serif stacks only: Charter on Apple devices, Sitka/Cambria on
 * Windows, a generic serif elsewhere. A web font would be one more request to
 * one more company for a site that exists partly to keep a low profile, and
 * reading text set in the reader's own system serif is a fine thing anyway.
 *
 * "More" is Russian for sea, which is where the accent comes from.
 */
:root {
  --paper: #f7f8f6;
  --ink: #1d2427;
  --muted: #5f6b6e;
  --rule: #d9dedc;
  --sea: #1e5e5a;
  --sea-soft: #e3eeec;
  --measure: 36rem;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, "Iowan Old Style", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12171a;
    --ink: #e4e8e7;
    --muted: #93a09f;
    --rule: #2a3336;
    --sea: #7cbcb4;
    --sea-soft: #1b2b2b;
  }
}

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

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.125rem/1.65 var(--serif);
  padding-inline: 1.25rem;
  text-rendering: optimizeLegibility;
}

a { color: var(--sea); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; }

.masthead,
main,
.colophon {
  max-width: var(--measure);
  margin-inline: auto;
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 2.25rem 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.masthead__name {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.masthead__nav { display: flex; gap: 1.25rem; font-family: var(--sans); font-size: 0.85rem; }
.masthead__nav a { color: var(--muted); text-decoration: none; letter-spacing: 0.04em; text-transform: uppercase; }
.masthead__nav a:hover { color: var(--sea); }

main { padding-block: 2.5rem 3rem; }

.intro { margin-bottom: 2.5rem; }
.intro h1 { font-size: clamp(2rem, 6vw, 2.6rem); line-height: 1.1; margin: 0 0 0.4rem; text-wrap: balance; }
.intro p { margin: 0; color: var(--muted); font-style: italic; }

.meta {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.35rem;
}
.meta .stream { color: var(--sea); text-decoration: none; font-weight: 600; }

.index { list-style: none; padding: 0; margin: 0; }
.index li { padding-block: 1.5rem; border-top: 1px solid var(--rule); }
.index li:last-child { border-bottom: 1px solid var(--rule); }
.index h2 { font-size: 1.35rem; line-height: 1.25; margin: 0 0 0.3rem; text-wrap: balance; }
.index h2 a { color: var(--ink); text-decoration: none; }
.index h2 a:hover { color: var(--sea); }
.index .dek { margin: 0; color: var(--muted); }

.empty {
  padding: 1.25rem 1.5rem;
  background: var(--sea-soft);
  border-left: 3px solid var(--sea);
  color: var(--muted);
  font-style: italic;
}

.post h1 { font-size: clamp(1.9rem, 5.5vw, 2.5rem); line-height: 1.12; margin: 0.2rem 0 0.75rem; text-wrap: balance; }
.post .dek { font-size: 1.2rem; font-style: italic; color: var(--muted); margin: 0 0 2rem; }

.prose { hyphens: auto; overflow-wrap: break-word; }
.prose p { margin: 0 0 1.15em; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose h2 { font-size: 1.3rem; margin: 2.2em 0 0.6em; }
.prose h3 { font-size: 1.1rem; margin: 1.8em 0 0.5em; }
.prose blockquote {
  margin: 1.6em 0;
  padding: 0.2em 0 0.2em 1.2em;
  border-left: 3px solid var(--sea);
  color: var(--muted);
  font-style: italic;
}
.prose img { max-width: 100%; height: auto; display: block; margin: 1.8em auto; }
.prose hr { border: 0; text-align: center; margin: 2.5em 0; }
.prose hr::after { content: "~ ~ ~"; color: var(--muted); }
.prose code { font-size: 0.9em; }
.prose ul, .prose ol { padding-left: 1.3em; }

.tags { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); margin-top: 2.5rem; }
.back { margin-top: 3rem; font-family: var(--sans); font-size: 0.85rem; }

.colophon {
  padding-block: 1.5rem 3rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.8rem;
}
.colophon a { color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  a { transition: color 0.15s, text-decoration-thickness 0.15s; }
}
