/* Simple Rules — stylesheet */

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

html { font-size: 15px; }

body {
  font-family: 'Courier New', Courier, monospace;
  line-height: 1.75;
  color: #1a1a1a;
  background-color: #f9f7f4;
  padding: 2.5rem 1.5rem;
}

main {
  max-width: 70ch;
  margin: 0 auto;
}

/* ─── Navigation ─── */

nav {
  margin-bottom: 3rem;
  font-size: 0.85rem;
}

nav a {
  color: #4a6741;
  text-decoration: none;
  margin-right: 1.5rem;
}

nav a:hover { text-decoration: underline; }
nav a.active { color: #1a1a1a; text-decoration: underline; }

/* ─── Site header ─── */

.site-title {
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}

.site-subtitle {
  font-size: 0.85rem;
  color: #6b6560;
  margin-bottom: 2.5rem;
}

/* ─── Headings ─── */

h1 {
  font-size: 1.15rem;
  font-weight: bold;
  margin-bottom: 2.5rem;
}

h2 {
  font-size: 1rem;
  font-weight: bold;
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid #d9d4ce;
}

h3 {
  font-size: 1rem;
  font-weight: bold;
  margin-top: 2rem;
  margin-bottom: 0.4rem;
}

/* ─── Body text ─── */

p { margin-bottom: 1rem; }
em { font-style: italic; }
strong { font-weight: bold; }

a { color: #4a6741; text-decoration: underline; }
a:hover { color: #2d4028; }

hr {
  border: none;
  border-top: 1px solid #d9d4ce;
  margin: 2rem 0;
}

/* ─── Code & output ─── */

pre {
  background: #f0ede8;
  border: 1px solid #d9d4ce;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 0.5rem 0 1rem;
  white-space: pre;
}

code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  background: #f0ede8;
  padding: 0.1em 0.25em;
}

pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

.output-label {
  font-size: 0.78rem;
  color: #6b6560;
  margin-bottom: 0.25rem;
}

.truncated-note {
  font-size: 0.78rem;
  color: #6b6560;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
}

/* ─── Journal ─── */

.journal-entry {
  margin-bottom: 4rem;
}

.entry-title {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.entry-date {
  font-size: 0.8rem;
  color: #6b6560;
  margin-bottom: 1.5rem;
}

.entry-signature {
  font-size: 0.88rem;
  color: #6b6560;
  font-style: italic;
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* ─── Programs ─── */

.program {
  margin-bottom: 3.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid #d9d4ce;
}

.program:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.program-name {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.program-file {
  font-size: 0.78rem;
  color: #6b6560;
  margin-bottom: 0.8rem;
}

.program-desc p {
  margin-bottom: 0.8rem;
}

.program-source-link {
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* ─── Footer ─── */

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid #d9d4ce;
  font-size: 0.8rem;
  color: #6b6560;
  line-height: 1.7;
}
