/* ==========================================================
   The blog: black ink on paper. (2026-10-05)
   Used only by layouts/blog/*. The main site's navy theme
   doesn't load here. System fonts only, same rule as the main site.
   ========================================================== */

:root {
  --paper: #f5f3ed;        /* off-white; was #f5f1e8, made a touch less yellow 2026-10-05 */
  --ink: #161514;          /* near-black text */
  --ink-soft: #3a3733;
  --grey: #75706a;         /* links, dates, the menu */
  --rule: #d9d2c5;         /* the faintest lines, used sparingly */
  /* Hover color. The main site's cyan is #65f4f4, but on paper it's nearly
     invisible (contrast about 1.3:1), so this is the same hue, darkened
     enough to read. Swap in #65f4f4 if you want the exact color. */
  --hover: #17a9a9;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.paper {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "liga", "onum";
}
::selection { background: #e4e0d6; }

a {
  color: var(--grey);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover, a:focus-visible { color: var(--hover); }
.paper-article a {
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 0.18em;
}
.paper-article a:hover { text-decoration-color: currentColor; }

/* Layout: one column of text, the menu to its right. */
.paper-wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding: 7rem 2rem 6rem;
  display: grid;
  grid-template-columns: minmax(0, 36rem) 9rem;
  justify-content: center;
  gap: 6rem;
}

/* The menu: a vertical stack of words. Nothing else. */
.paper-menu {
  position: sticky;
  top: 7rem;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

/* A little air between the fixed menu items and the three latest posts. */
.paper-menu-gap { height: 1.1rem; }

/* Headings and page furniture */
.paper-head { margin-bottom: 3rem; }
h1, h2, h3 { font-weight: 400; line-height: 1.25; color: var(--ink); }
h1 { font-size: 2.4rem; margin: 0 0 0.6rem; letter-spacing: -0.005em; }
h2 { font-size: 1.45rem; margin: 2.8rem 0 0.8rem; }
h3 { font-size: 1.15rem; font-style: italic; margin: 2.2rem 0 0.6rem; }
.paper-dek, .paper-meta, time { color: var(--grey); font-style: italic; }
.paper-dek { font-size: 1.05rem; margin: 0; }
.paper-meta { margin: 0; font-size: 0.95rem; }

/* Post text */
.paper-article p { margin: 0 0 1.25em; hyphens: auto; }
.paper-article blockquote {
  margin: 1.8em 0;
  padding: 0 0 0 1.6em;
  font-style: italic;
  color: var(--ink-soft);
}
.paper-article hr {
  border: 0;
  margin: 2.8em 0;
  text-align: center;
}
.paper-article hr::after { content: "*\00a0\00a0*\00a0\00a0*"; color: var(--grey); font-size: 1rem; letter-spacing: 0.3em; } /* section break */
.paper-article img { max-width: 100%; height: auto; display: block; margin: 2em auto; }
.paper-article figcaption { font-size: 0.85rem; color: var(--grey); font-style: italic; text-align: center; }
.paper-article ul, .paper-article ol { padding-left: 1.3em; margin: 0 0 1.25em; }
.paper-article li { margin-bottom: 0.35em; }
.paper-article code { font-family: "Courier New", Courier, monospace; font-size: 0.9em; }
.paper-article sup, .footnotes { font-size: 0.8rem; }
.footnotes { color: var(--ink-soft); margin-top: 3rem; }
.footnotes hr { display: none; }

/* Index of posts */
.paper-index { list-style: none; margin: 0; padding: 0; }
.paper-index li { margin: 0 0 2.4rem; }
.paper-index-title { display: block; color: var(--ink); font-size: 1.35rem; line-height: 1.3; }
.paper-index time { display: block; font-size: 0.9rem; margin-top: 0.2rem; }
.paper-index p { margin: 0.4rem 0 0; color: var(--ink-soft); }
.paper-empty { color: var(--grey); font-style: italic; }

/* Earlier / later links at the foot of a post */
.paper-foot {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.95rem;
}

/* Narrow screens: the menu becomes a row of words above the text. */
/* "write to me" form: lines on paper, no boxes. */
.paper-form { display: flex; flex-direction: column; max-width: 32rem; }
.paper-form label { font-size: 0.9rem; color: var(--grey); font-style: italic; margin-top: 1.4rem; }
.paper-form input, .paper-form textarea {
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.35rem 0;
  outline: none;
}
.paper-form textarea { resize: vertical; line-height: 1.6; }
.paper-form input:focus, .paper-form textarea:focus { border-bottom-color: var(--hover); }
.paper-honeypot { position: absolute; left: -9999px; }
.paper-send {
  align-self: flex-start;
  margin-top: 2rem;
  font: inherit;
  font-size: 1rem;
  color: var(--grey);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  letter-spacing: 0.04em;
}
.paper-send:hover, .paper-send:focus-visible { color: var(--hover); }
.paper-send:disabled { opacity: 0.5; cursor: wait; }
.paper-status { margin-top: 1.25rem; font-style: italic; color: var(--ink-soft); }

@media (max-width: 760px) {
  .paper-menu-gap { display: none; }
  body.paper { font-size: 18px; }
  .paper-wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    padding: 2.5rem 1.4rem 4rem;
  }
  .paper-menu {
    position: static;
    order: -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem 1.1rem;
  }
  h1 { font-size: 2rem; }
}

@media print {
  .paper-menu, .paper-foot { display: none; }
  body.paper { background: #fff; }
}

/* ==========================================================
   The private editor at /write (layouts/blog/writer.html).
   ========================================================== */
.writer-wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  display: grid;
  grid-template-columns: 11rem minmax(0, 40rem);
  gap: 4rem;
  justify-content: center;
}
.writer-list { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.95rem; position: sticky; top: 4rem; align-self: start; }
.writer-link {
  font: inherit; text-align: left; color: var(--grey); background: none; border: 0; padding: 0; cursor: pointer;
}
.writer-link:hover, .writer-link:focus-visible { color: var(--hover); }
.writer-link.is-current { color: var(--ink); }
.writer-link small { display: block; font-size: 0.75rem; font-style: italic; color: var(--grey); opacity: 0.8; }
.writer-dim { color: var(--grey); font-style: italic; font-size: 0.9rem; }
.writer-title {
  width: 100%; font: inherit; font-size: 2.2rem; color: var(--ink); background: transparent;
  border: 0; outline: none; padding: 0; margin-bottom: 0.6rem;
}
.writer-meta { display: flex; gap: 1rem; margin-bottom: 1.4rem; }
.writer-meta select, .writer-meta input {
  font: inherit; font-size: 0.9rem; font-style: italic; color: var(--grey); background: transparent;
  border: 0; border-bottom: 1px solid var(--rule); padding: 0.2rem 0; outline: none;
}
.writer-meta input { flex: 1; }
.writer-tools { display: flex; gap: 0.9rem; margin-bottom: 1rem; }
.writer-tools button {
  font: inherit; font-size: 0.9rem; color: var(--grey); background: none; border: 0; padding: 0; cursor: pointer;
}
.writer-tools button:hover { color: var(--hover); }
.writer-body {
  min-height: 55vh; outline: none; padding: 0.25rem 0 2rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
}
.writer-body:empty::before { content: attr(data-placeholder); color: var(--grey); font-style: italic; }
.writer-body p { hyphens: manual; } /* no auto-hyphenation while writing */
.writer-actions { display: flex; align-items: center; gap: 1.25rem; margin-top: 1.5rem; }
.writer-split { position: relative; display: inline-flex; border: 1px solid var(--rule); }
.writer-go, .writer-arrow {
  font: inherit; font-size: 0.95rem; color: var(--ink); background: transparent; border: 0;
  padding: 0.45rem 0.9rem; cursor: pointer;
}
.writer-arrow { border-left: 1px solid var(--rule); padding: 0.45rem 0.6rem; color: var(--grey); }
.writer-go:hover, .writer-arrow:hover { color: var(--hover); }
.writer-menu {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 5; min-width: 100%;
  display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--rule);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.writer-menu[hidden] { display: none; }
.writer-menu button {
  font: inherit; font-size: 0.95rem; text-align: left; color: var(--ink); background: none; border: 0;
  padding: 0.45rem 0.9rem; cursor: pointer; white-space: nowrap;
}
.writer-menu button:hover { color: var(--hover); }
.writer-menu button[data-action="delete"] { color: #8a3b30; }
.writer-status { font-size: 0.9rem; font-style: italic; color: var(--grey); }
@media (max-width: 760px) {
  .writer-wrap { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 1.2rem 4rem; }
  .writer-list { position: static; flex-direction: row; flex-wrap: wrap; gap: 0.3rem 1rem; }
  .writer-meta { flex-direction: column; gap: 0.6rem; }
}
