/* Editorial (shares) theme — warm paper, serif, centered narrow column.
   Standalone shared pages: no blog chrome, unhurried, letter-like. */

:root {
  --paper:    #faf7f0;
  --paper-2:  #f2ede2;
  --ink:      #2b2724;
  --ink-soft: #4a443d;
  --muted:    #8a8178;
  --line:     #e4dccd;
  --accent:   #8a5a2b;
  --accent-2: #6f4720;

  --font-serif: Charter, 'Iowan Old Style', 'Palatino Linotype', Palatino,
                Georgia, Cambria, 'Times New Roman', serif;
  --font-mono:  ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.site {
  max-width: 40rem;
  margin: 0 auto;
  padding: 56px 24px 112px;
}

/* Minimal, centered header — just a quiet wordmark linking home. */
.site-header {
  text-align: center;
  margin-bottom: 56px;
}
.site-header a.site-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: none;
}
.site-header a.site-title:hover { color: var(--accent); }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  line-height: 1.25;
}
h1 { font-size: 34px; letter-spacing: -0.01em; }
h2 { font-size: 25px; margin-top: 40px; }
h3 { font-size: 20px; margin-top: 30px; }

a { color: var(--accent); text-decoration: none; text-underline-offset: 2px; }
a:hover { color: var(--accent-2); text-decoration: underline; }

.num, time.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.86em;
}

.post-meta {
  color: var(--muted);
  font-size: 15px;
  font-style: italic;
  margin-top: 10px;
}

.post-body {
  margin-top: 36px;
  font-size: 19px;
  line-height: 1.75;
}
.post-body p { margin: 0 0 20px; }
.post-body img { max-width: 100%; height: auto; border-radius: 3px; display: block; margin: 24px auto; }
.post-body figure { margin: 28px 0; }
.post-body figcaption { color: var(--muted); font-size: 14px; font-style: italic; margin-top: 8px; text-align: center; }
.post-body pre {
  background: var(--paper-2);
  padding: 16px 18px;
  overflow-x: auto;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.55;
}
.post-body code {
  background: var(--paper-2);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.85em;
}
.post-body pre code { background: none; padding: 0; }
.post-body blockquote {
  border-left: 2px solid var(--accent);
  margin: 24px 0;
  padding-left: 20px;
  color: var(--ink-soft);
  font-style: italic;
}
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 40px auto; width: 40%; }
.post-body ul, .post-body ol { padding-left: 26px; }
.post-body li { margin: 6px 0; }

.post-body ul.task-list,
.post-body ul:has(.task-list-item) { list-style: none; padding-left: 2px; }
.post-body .task-list-item { position: relative; padding-left: 26px; margin: 8px 0; }
.post-body .task-list-item > input[type=checkbox] {
  position: absolute; left: 0; top: 6px;
  width: 15px; height: 15px; margin: 0;
  accent-color: var(--accent); cursor: default;
}
.post-body .task-list-item:has(input:checked) {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--line);
}

.wiki-ref { color: var(--accent); border-bottom: 1px solid var(--line); }
.wiki-ref:hover { border-bottom-color: var(--accent); text-decoration: none; }
.wiki-ref-unpublished { font-style: italic; color: var(--ink-soft); border-bottom: 1px dotted var(--muted); }

.memex-block { margin: 24px 0; }
.memex-table { border-collapse: collapse; width: 100%; font-size: 15px; }
.memex-table th, .memex-table td { border: 1px solid var(--line); padding: 7px 11px; text-align: left; }
.memex-table th { background: var(--paper-2); font-weight: 600; }
.memex-kv {
  display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 4px;
  padding: 12px 16px; font-size: 15px;
}
.memex-kv dt { font-weight: 600; color: var(--ink-soft); }
.memex-kv dd { margin: 0; }
.memex-url {
  display: grid; grid-template-columns: 20px 1fr; gap: 4px 10px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 4px; padding: 12px 16px;
}

.memex-gallery { display: grid; gap: 10px; margin: 24px 0; padding: 0; }
.memex-gallery-cols-1 { grid-template-columns: 1fr; }
.memex-gallery-cols-2 { grid-template-columns: repeat(2, 1fr); }
.memex-gallery-cols-3 { grid-template-columns: repeat(3, 1fr); }
.memex-gallery-cols-4 { grid-template-columns: repeat(4, 1fr); }
.memex-gallery-item { margin: 0; position: relative; overflow: hidden; border-radius: 4px; background: var(--paper-2); }
.memex-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4 / 3; }
.memex-gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px;
  background: linear-gradient(to top, rgba(43, 39, 36, 0.72), rgba(43, 39, 36, 0));
  color: #fff; font-size: 14px; line-height: 1.3; text-align: left; font-style: normal;
}
@media (max-width: 520px) {
  .memex-gallery-cols-2, .memex-gallery-cols-3, .memex-gallery-cols-4 { grid-template-columns: 1fr; }
}

/* Index: on a shares site the index is usually empty (everything is
   unlisted). Keep a quiet list style in case anything is listed. */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.post-list li:last-child { border-bottom: 0; }
.post-list a.post-title { font-family: var(--font-serif); font-weight: 600; font-size: 21px; color: var(--ink); display: block; }
.post-list a.post-title:hover { color: var(--accent); text-decoration: none; }
.post-list time { color: var(--muted); font-size: 13px; font-family: var(--font-mono); }
.post-meta { color: var(--muted); }

footer.site-footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
  text-align: center;
}
footer.site-footer a { color: var(--muted); }
footer.site-footer a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .site { padding: 32px 20px 72px; }
  html, body { font-size: 18px; }
  h1 { font-size: 29px; }
  .post-body { font-size: 18px; }
}
