:root {
  --paper: #c9a531;
  --paper-dark: #b8942a;
  --ink: #000000;
  --ink-soft: #000000;
  --rule: rgba(0, 0, 0, 0.35);
  --max-width: 720px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.05), transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(0,0,0,0.06), transparent 55%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/></svg>");
  color: var(--ink);
  font-family: 'Times New Roman', Times, serif;
  font-size: 19px;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--ink);
}

a:hover {
  color: var(--ink-soft);
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* ---------- Stylized masthead title ---------- */

.masthead {
  text-align: center;
  margin-bottom: 3rem;
  text-decoration: none;
  display: block;
}

.title {
  font-family: 'Times New Roman', Times, serif;
  color: var(--ink);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.title .word {
  display: inline-block;
}

.title .word + .word {
  margin-left: 0.3em;
}

.title span[class^="sz"] {
  display: inline-block;
  line-height: 1;
}

.title .sz1 { font-size: 0.62em; }
.title .sz2 { font-size: 0.85em; }
.title .sz3 { font-size: 1.05em; }
.title .sz4 { font-size: 1.55em; }
.title .sz5 { font-size: 1.9em; }

.title-row {
  display: block;
  font-size: clamp(2rem, 8vw, 3.4rem);
}

.title-row + .title-row {
  margin-top: 0.05em;
}

.masthead-small {
  margin-bottom: 2.5rem;
}

.masthead-small .title-row {
  font-size: clamp(1.1rem, 4.5vw, 1.6rem);
}

.tagline {
  font-family: 'Times New Roman', Times, serif;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 0.75rem;
  letter-spacing: 0.04em;
}

/* ---------- Table of contents (dots centered, not on baseline) ---------- */

.toc {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc li + li {
  margin-top: 0.35rem;
}

.toc a {
  display: flex;
  align-items: center;
  text-decoration: none;
  padding: 0.6rem 0.25rem;
  font-family: 'Times New Roman', Times, serif;
}

.toc a:hover .label,
.toc a:hover .count {
  color: var(--ink-soft);
}

.toc a:hover .leader {
  opacity: 0.6;
}

.toc .label {
  font-size: 1.15rem;
  white-space: nowrap;
}

.toc .leader {
  flex: 1 1 auto;
  height: 1em;
  margin: 0 0.6em;
  align-self: center;
  background-image: radial-gradient(circle, currentColor 1.6px, transparent 1.7px);
  background-repeat: repeat-x;
  background-position: center;
  background-size: 11px 11px;
  opacity: 1;
}

.toc .count {
  font-size: 1.15rem;
  min-width: 1.5em;
  text-align: right;
}

/* ---------- Category / listing pages ---------- */

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.category-title {
  font-family: 'Times New Roman', Times, serif;
  font-size: 2.4rem;
  margin: 0 0 2.5rem;
}

.entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entry-list li {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0;
}

.entry-list li:last-child {
  border-bottom: 1px solid var(--rule);
}

.entry-title {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.4rem;
  margin: 0 0 0.4rem;
}

.entry-title a {
  text-decoration: none;
}

.entry-meta {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
}

.entry-excerpt {
  margin: 0;
}

/* ---------- Individual post pages ---------- */

.post-title {
  font-family: 'Times New Roman', Times, serif;
  font-size: 2.2rem;
  margin: 0 0 0.3rem;
}

.post-meta {
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 2.5rem;
}

.post-body p {
  margin: 0 0 1.2rem;
}

.pictogram-frame {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 1rem;
  margin-bottom: 2rem;
  border: 1px solid var(--rule);
}

.pictogram-frame svg {
  width: 160px;
  height: 160px;
}

.pictogram-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.5rem;
}

.pictogram-card {
  text-decoration: none;
  text-align: center;
  border: 1px solid var(--rule);
  padding: 1.5rem 1rem;
}

.pictogram-card svg {
  width: 72px;
  height: 72px;
}

.pictogram-card .entry-title {
  font-size: 1rem;
  margin-top: 0.75rem;
}

footer.site-footer {
  text-align: center;
  margin-top: 4rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
