/*
Theme Name: Marginalia
Theme URI: https://themarginalnote.com/colophon/
Author: Iris Calloway
Author URI: https://themarginalnote.com/about/
Description: A quiet, single-column theme for long-form reading, built for The Marginal Note. System serif stack, no webfonts, no build step.
Version: 1.4.2
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: marginalia
Tags: blog, one-column, custom-menu, threaded-comments, translation-ready
*/

:root {
  --paper: #faf7f0;
  --ink: #22201c;
  --ink-soft: #6b655c;
  --rule: #e2dcd0;
  --accent: #7d3b34;
  --accent-soft: #a56158;
  --measure: 41rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

* { box-sizing: border-box; }

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.72;
  font-feature-settings: "liga" 1, "onum" 1;
}

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

.site-wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- masthead ---------- */
.site-header {
  padding: 3rem 0 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}

.wordmark {
  font-size: 1.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
}
.wordmark a { color: var(--ink); }
.wordmark a:hover { text-decoration: none; color: var(--accent); }

.site-tagline {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.95rem;
}

.site-nav { margin-top: 1.4rem; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
}
.site-nav a {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a { color: var(--accent); }

.subscribe-notice {
  background: #efe9db;
  border: 1px solid var(--rule);
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  margin: 0 0 2rem;
  text-align: center;
}

/* ---------- index / archives ---------- */
.entry-summary-item { margin-bottom: 3rem; }

.entry-summary-item h2 {
  font-size: 1.55rem;
  line-height: 1.25;
  margin: 0 0 0.35rem;
  font-weight: 500;
}
.entry-summary-item h2 a { color: var(--ink); }
.entry-summary-item h2 a:hover { color: var(--accent); text-decoration: none; }

.entry-meta {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.entry-meta a { color: var(--ink-soft); }
.entry-meta a:hover { color: var(--accent); }

.entry-summary-item .more-link {
  font-size: 0.9rem;
  font-style: italic;
}

.archive-page-title {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.75rem;
  margin: 0 0 2.5rem;
  font-weight: 400;
}
.archive-description { font-style: italic; color: var(--ink-soft); margin-top: -1.75rem; margin-bottom: 2.5rem; }

/* ---------- single ---------- */
.entry-title {
  font-size: 2.1rem;
  line-height: 1.2;
  font-weight: 500;
  margin: 0 0 0.5rem;
}

.entry-content { margin-top: 2rem; }
.entry-content p { margin: 0 0 1.4rem; }
.entry-content p + p { text-indent: 0; }
.entry-content blockquote {
  margin: 1.6rem 0 1.6rem 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--rule);
  color: #4d473e;
  font-style: italic;
}
.entry-content hr {
  border: 0;
  text-align: center;
  margin: 2.2rem 0;
}
.entry-content hr::after {
  content: "· · ·";
  color: var(--ink-soft);
  letter-spacing: 0.6em;
}
.entry-content h2, .entry-content h3 {
  font-weight: 500;
  margin: 2.2rem 0 0.8rem;
}
.entry-content img { max-width: 100%; height: auto; }

.entry-footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.tag-links a {
  display: inline-block;
  margin-right: 0.6rem;
  font-style: italic;
}

.author-note {
  margin-top: 2.5rem;
  padding: 1.25rem 1.4rem;
  background: #f3efe4;
  border: 1px solid var(--rule);
  font-size: 0.95rem;
  color: #4d473e;
}
.author-note strong { letter-spacing: 0.05em; }

.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin: 2.5rem 0;
  font-size: 0.95rem;
  font-style: italic;
}
.post-navigation .nav-next { text-align: right; }

/* ---------- pagination ---------- */
.pagination, .nav-links { margin: 3rem 0; text-align: center; }
.pagination .page-numbers {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  color: var(--ink-soft);
}
.pagination .page-numbers.current {
  color: var(--paper);
  background: var(--accent);
  border-radius: 2px;
}

/* ---------- comments ---------- */
.comments-area {
  margin-top: 3rem;
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
}
.comments-title { font-size: 1.15rem; font-weight: 500; margin: 0 0 1.5rem; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-left: 2rem; }
.comment-body {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dotted var(--rule);
  font-size: 1rem;
}
.comment-meta { margin-bottom: 0.5rem; }
.comment-author { font-weight: 600; font-size: 0.98rem; }
.comment-author .avatar {
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 0.6rem;
}
.comment-metadata { font-size: 0.8rem; color: var(--ink-soft); }
.comment-metadata a { color: var(--ink-soft); }
.bypostauthor > .comment-body { background: #f3efe4; padding: 1rem 1.1rem 1.25rem; border: 1px solid var(--rule); }
.reply { font-size: 0.85rem; font-style: italic; }

.comment-respond { margin-top: 2rem; }
.comment-respond label { display: block; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.2rem; }
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--rule);
  background: #fffdf8;
  font-family: var(--serif);
  font-size: 1rem;
  margin-bottom: 1rem;
}
.comment-respond input[type="submit"],
.subscribe-form button {
  background: var(--accent);
  color: var(--paper);
  border: 0;
  padding: 0.55rem 1.3rem;
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.comment-respond input[type="submit"]:hover,
.subscribe-form button:hover { background: var(--accent-soft); }

/* ---------- archive page template ---------- */
.year-group h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.4rem;
  font-weight: 400;
}
.year-group ul { list-style: none; margin: 0 0 2.25rem; padding: 0; }
.year-group li {
  display: flex;
  gap: 1.25rem;
  padding: 0.3rem 0;
  align-items: baseline;
}
.year-group time {
  flex: 0 0 5.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0 3rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.footer-cols h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 400;
  margin: 0 0 0.75rem;
  color: var(--ink);
}
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin-bottom: 0.35rem; }

.subscribe-form input[type="email"] {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--rule);
  background: #fffdf8;
  font-family: var(--serif);
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}
.subscribe-form p.hint { font-size: 0.8rem; font-style: italic; margin: 0.5rem 0 0; }

.colophon-line {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px dotted var(--rule);
  text-align: center;
  font-size: 0.85rem;
}
.colophon-line a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.colophon-line a:hover { color: var(--accent); }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .site-header { padding-top: 2rem; }
  .wordmark { font-size: 1.5rem; }
  .entry-title { font-size: 1.7rem; }
  .footer-cols { grid-template-columns: 1fr; }
  .comment-list .children { margin-left: 1rem; }
}

/* WordPress core alignment / caption classes */
.alignleft { float: left; margin: 0.4rem 1.4rem 1rem 0; }
.alignright { float: right; margin: 0.4rem 0 1rem 1.4rem; }
.aligncenter { display: block; margin: 1.4rem auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--ink-soft); text-align: center; }
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px; width: 1px; overflow: hidden;
}
