/* Realms of Salt & Iron — journal/essay layout
   Shares the parchment palette defined in styles.css (:root), but lays
   pages out as a single scrolling column instead of the fixed-viewport
   globe screen. */

body.blog {
  overflow: auto;
  align-items: center;
}

body.blog .masthead {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  border-bottom: 1px solid var(--rule);
  flex: none;
}

/* ============ home / journal index ============ */
main.blog-main {
  display: block;
  flex: none;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 40px 90px;
}

.blog-intro { margin-bottom: 46px; }

.blog-intro p {
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 1.6;
  text-wrap: pretty;
}

.blog-intro p:last-child { margin-bottom: 0; }

.blog-intro a { color: var(--accent); }

.embed-placeholder {
  margin: 0;
  padding: 64px 24px;
  border: 1px dashed var(--rule);
  border-radius: 4px;
  text-align: center;
  font-size: 16px;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink-soft);
}

.post-section { margin-bottom: 48px; }

.post-section:last-child { margin-bottom: 0; }

.post-section > .pane-kicker { margin: 0 0 18px; }

.post-section-note {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  font-style: italic;
  color: var(--ink-soft);
}

.post-section-note a { color: var(--accent); font-style: normal; }

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

.post-item { border-bottom: 1px solid var(--rule); }

.post-item:last-child { border-bottom: 0; }

.post-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 2px;
  text-decoration: none;
  color: inherit;
}

.post-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.22;
  text-wrap: pretty;
  transition: color 0.18s;
}

.post-link:hover .post-title {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.post-excerpt {
  font-size: 16px;
  line-height: 1.5;
  font-style: italic;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.post-meta {
  margin-top: 2px;
  font-size: 13px;
  font-variant: small-caps;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

/* ============ essay page ============ */
main.essay-main {
  display: block;
  flex: none;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 40px 100px;
}

.essay-header {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}

.essay-kicker {
  margin: 0 0 14px;
  font-size: 13px;
  font-variant: small-caps;
  letter-spacing: 0.22em;
  color: var(--accent);
}

.essay-header h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: pretty;
}

.essay-meta {
  margin: 0;
  font-size: 14.5px;
  font-variant: small-caps;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

.essay-body { font-size: 18px; line-height: 1.68; }

.essay-body p { margin: 0 0 22px; text-wrap: pretty; }

.essay-body h2 {
  margin: 46px 0 20px;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
}

.essay-body hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.essay-body em { font-style: italic; }

.essay-body a { color: var(--accent); }

.essay-body pre {
  margin: 0 0 26px;
  padding: 20px 22px;
  overflow-x: auto;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper-deep);
  border: 1px solid var(--rule);
}

.essay-body sup { font-size: 0.68em; margin-left: 1px; }

.essay-body sup a { color: var(--accent); text-decoration: none; }

.essay-references {
  margin-top: 50px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

.essay-references h2 {
  margin: 0 0 20px;
  font-size: 19px;
  font-weight: 600;
  font-variant: small-caps;
  letter-spacing: 0.08em;
}

.essay-references ol { margin: 0; padding-left: 22px; }

.essay-references li {
  margin-bottom: 14px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.essay-references li a { color: var(--accent); word-break: break-word; }

.essay-back {
  display: inline-block;
  margin-top: 44px;
  padding-bottom: 2px;
  font-size: 14px;
  font-variant: small-caps;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.essay-back:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 640px) {
  main.blog-main, main.essay-main { padding: 34px 22px 70px; }
  .essay-header h1 { font-size: 28px; }
  .essay-body { font-size: 17px; }
}
