/* Plume — public theme
   Paper & ink editorial look. Signature: a highlighter-yellow swipe
   under post titles, echoed in text selection. No frameworks, no JS. */

:root {
  --paper:   #FAF8F2;
  --ink:     #1C2420;
  --muted:   #6B7268;
  --pine:    #176245;
  --mark:    #FFE34D;
  --hairline:#E5E0D2;
  --card:    #FFFFFF;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

::selection { background: var(--mark); color: var(--ink); }

.wrap { max-width: 44rem; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--pine); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

/* ----------------------------- header ----------------------------- */
.site-header {
  border-bottom: 1px solid var(--hairline);
  padding: 2.5rem 0 1.5rem;
  margin-bottom: 2.5rem;
}
.site-mark {
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.site-mark a { color: var(--ink); text-decoration: none; }
.site-mark a:hover { background: linear-gradient(transparent 62%, var(--mark) 62%); }
.site-tagline { margin: 0.25rem 0 0; color: var(--muted); font-style: italic; font-family: var(--serif); }

.search-form { margin-top: 1.25rem; display: flex; gap: 0.5rem; }
.search-form input {
  flex: 1;
  max-width: 18rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--card);
  font: inherit;
  font-size: 0.95rem;
}
.search-form button {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}
.search-form button:hover { background: var(--pine); border-color: var(--pine); }

/* --------------------------- post lists --------------------------- */
.post-card { padding: 1.75rem 0; border-bottom: 1px solid var(--hairline); }

.post-meta {
  margin: 0 0 0.3rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.post-card-title {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.post-card-title a { color: var(--ink); text-decoration: none; }
.post-card-title a:hover { background: linear-gradient(transparent 62%, var(--mark) 62%); }

.post-excerpt { margin: 0 0 0.6rem; color: var(--ink); }
.post-readmore { margin: 0; font-size: 0.95rem; }

.archive-heading { font-family: var(--serif); font-size: 1.6rem; margin: 0 0 0.25rem; }
.archive-count { color: var(--muted); margin: 0 0 1rem; font-size: 0.95rem; }

/* --------------------------- single post -------------------------- */
.single-post { padding-bottom: 2rem; }

.post-title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0.2rem 0 1.5rem;
  background: linear-gradient(transparent 70%, var(--mark) 70%);
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.post-body { margin-top: 1.5rem; }
.post-body h2, .post-body h3, .post-body h4 {
  font-family: var(--serif);
  line-height: 1.25;
  margin: 2rem 0 0.6rem;
}
.post-body h2 { font-size: 1.45rem; }
.post-body h3 { font-size: 1.2rem; }
.post-body p { margin: 0 0 1.1rem; }
.post-body img { max-width: 100%; height: auto; border-radius: 6px; }
.post-body blockquote {
  margin: 1.25rem 0;
  padding: 0.25rem 1.25rem;
  border-left: 3px solid var(--mark);
  color: #3d453f;
  font-family: var(--serif);
  font-style: italic;
}
.post-body blockquote p { margin: 0.5rem 0; }
.post-body pre {
  background: #20281f;
  color: #E8EEE4;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.55;
}
.post-body pre code { font-family: var(--mono); }
.post-body code { font-family: var(--mono); font-size: 0.9em; background: #EFEBDD; padding: 0.1em 0.35em; border-radius: 4px; }
.post-body pre code { background: none; padding: 0; }
.post-body ul, .post-body ol { padding-left: 1.4rem; margin: 0 0 1.1rem; }
.post-body li { margin-bottom: 0.35rem; }
.post-body hr { border: 0; border-top: 1px solid var(--hairline); margin: 2rem 0; }

.post-tags { margin-top: 2rem; }
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  margin: 0 0.35rem 0.35rem 0;
  background: var(--card);
}
.tag:hover { border-color: var(--pine); }

/* ---------------------------- comments ---------------------------- */
.comments { border-top: 1px solid var(--hairline); padding: 2rem 0 3rem; }

.section-label {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.comments-empty { color: var(--muted); }

.comment { padding: 1rem 0; border-bottom: 1px dashed var(--hairline); }
.comment-meta { margin: 0 0 0.25rem; font-size: 0.9rem; }
.comment-meta strong { font-family: var(--serif); }
.comment-body { margin: 0; }

.comment-form { margin-top: 2rem; }
.comment-form h3 { font-family: var(--serif); margin: 0 0 0.75rem; }
.comment-form label { display: block; margin-bottom: 0.9rem; font-size: 0.92rem; color: var(--muted); }
.comment-form input, .comment-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--card);
  font: inherit;
  color: var(--ink);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.comment-form button {
  padding: 0.6rem 1.3rem;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  cursor: pointer;
}
.comment-form button:hover { background: var(--pine); border-color: var(--pine); }
.form-hint { font-size: 0.85rem; color: var(--muted); margin-top: 0.6rem; }

/* Honeypot: visually removed, still in the DOM for bots. */
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 1px; overflow: hidden; }

.notice { padding: 0.7rem 1rem; border-radius: 6px; font-size: 0.95rem; }
.notice-ok  { background: #E4F2E8; border: 1px solid #BCDCC6; }
.notice-err { background: #F8E7E3; border: 1px solid #E8C3BA; }

/* ------------------------- pagination, misc ------------------------ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0;
  font-size: 0.95rem;
}
.pagination-status { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; }

.notfound { padding: 3rem 0 4rem; }
.notfound h1 { font-family: var(--serif); }
.notfound p { color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: 3rem;
  padding: 1.5rem 0 2.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .site-header { padding-top: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
