/*
 * Single post styles — standard article and poem layouts.
 * Shared chrome (utility bar, masthead, nav, footer, .panel, .post-tag) lives in
 * homepage.css, which is enqueued ahead of this file.
 */

:root {
  --sheet: #fdfbf6;
  --hairline: rgba(36, 31, 26, 0.15);
}

/* Reader font scale, driven by single.js. */
[data-article] {
  --article-scale: 1;
}

/* ---------------------------------------------------------------- layout */

.single-layout {
  display: grid;
  gap: 36px;
  align-items: start;
  padding-top: 36px;
}

.single-layout-standard {
  grid-template-columns: 56px minmax(0, 1fr) 320px;
}

.single-layout-poem {
  grid-template-columns: minmax(0, 1fr) 320px;
  padding-top: 22px;
}

.single-article,
.poem-main {
  min-width: 0;
}

/* ------------------------------------------------------------ share rail */

.share-rail {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 6px;
}

.share-rail-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #8a8070;
  text-align: center;
}

.share-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(36, 31, 26, 0.18);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.share-btn:hover,
.share-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.share-btn.is-copied {
  border-color: var(--accent);
  color: var(--accent);
}

/* -------------------------------------------------------- article header */

.single-breadcrumb {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 18px;
}

.single-breadcrumb a {
  color: var(--muted);
}

.single-breadcrumb a:hover {
  color: var(--accent);
}

.single-breadcrumb-poem {
  padding-top: 14px;
  margin-bottom: 0;
}

.single-hero {
  aspect-ratio: 16 / 8;
  overflow: hidden;
  margin-bottom: 26px;
}

.single-hero img,
.single-hero .thumb-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.single-title {
  margin: 14px 0 18px;
  font-family: "Martel", serif;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.5;
  text-wrap: pretty;
}

.single-byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hairline);
}

.single-byline-author {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.single-byline-avatar {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
}

.single-byline-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.single-author-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
}

.single-author-name:hover {
  color: var(--accent);
}

.single-byline-meta {
  font-size: 13.5px;
  color: var(--muted);
}

/* --------------------------------------------------------- font controls */

.font-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.font-controls-label {
  font-size: 12.5px;
  color: #8a8070;
}

.font-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(36, 31, 26, 0.2);
  background: #fff;
  border-radius: 6px;
  font-family: inherit;
  cursor: pointer;
  color: var(--ink);
  line-height: 1;
  padding: 0;
}

.font-btn-down { font-size: 13px; }
.font-btn-up { font-size: 17px; }

.font-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.font-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* --------------------------------------------------------- audio player */

.audio-player {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--hairline);
  background: #fff;
  padding: 14px 18px;
  margin: 20px 0;
}

.audio-player-pill {
  margin: 32px auto 0;
  max-width: 420px;
  gap: 14px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--bg);
}

.audio-toggle {
  flex: none;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  padding: 0;
}

.audio-player-pill .audio-toggle {
  width: 36px;
  height: 36px;
  font-size: 12px;
}

.audio-main {
  flex: 1;
  min-width: 0;
}

.audio-label {
  font-weight: 600;
  font-size: 15px;
}

.audio-player-pill .audio-label {
  font-size: 13px;
}

.audio-track {
  margin-top: 6px;
  height: 4px;
  background: rgba(36, 31, 26, 0.12);
  border-radius: 2px;
  cursor: pointer;
}

.audio-progress {
  width: 0;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

.audio-time {
  font-size: 13.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex: none;
}

/* ------------------------------------------------------------ article body */

.single-body {
  font-size: calc(17.5px * var(--article-scale, 1));
  margin-top: 26px;
}

.single-body p {
  margin: 0 0 26px;
  line-height: 2;
  color: #332d25;
  text-wrap: pretty;
}

/* Drop cap on the opening paragraph only. */
.single-body > p:first-of-type::first-letter {
  font-family: "Martel", serif;
  font-weight: 800;
  font-size: 1.9em;
  line-height: 1;
  color: var(--accent);
  float: left;
  margin: 6px 12px 0 0;
}

.single-body h2,
.single-body h3,
.single-body h4 {
  font-family: "Martel", serif;
  line-height: 1.5;
  margin: 34px 0 14px;
}

.single-body h2 { font-size: 1.45em; }
.single-body h3 { font-size: 1.25em; }

.single-body img,
.single-body iframe,
.single-body video {
  max-width: 100%;
  height: auto;
  display: block;
}

.single-body figure {
  margin: 30px 0;
}

.single-body figcaption {
  font-size: 0.8em;
  color: var(--muted);
  margin-top: 8px;
}

.single-body blockquote {
  margin: 32px 0;
  padding: 6px 0 6px 26px;
  border-left: 3px solid var(--accent);
  font-family: "Martel", serif;
  font-size: 1.15em;
  line-height: 2;
  color: var(--ink);
}

.single-body ul,
.single-body ol {
  margin: 0 0 26px;
  padding-left: 1.4em;
  line-height: 2;
  color: #332d25;
}

.single-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 26px;
}

.single-body th,
.single-body td {
  border: 1px solid var(--hairline);
  padding: 10px 12px;
  text-align: start;
}

/* In-content ad slots. */
.ad-slot-post,
.ad-box.ad-slot-post {
  margin: 0 0 26px;
}

.single-body .ad-slot-post {
  margin: 32px 0;
}

.ad-box {
  min-height: 90px;
  border: 1px dashed rgba(36, 31, 26, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #f2ede2, #f2ede2 10px, #f7f3ea 10px, #f7f3ea 20px);
  color: #8a8070;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 8px;
}

/* ------------------------------------------------------------------ tags */

.single-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 0;
}

.single-tags a {
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 4px 14px;
}

.single-tags a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* -------------------------------------------------------------- author bio */

.author-bio {
  margin: 36px 0 0;
  border: 1px solid var(--hairline);
  background: #fff;
  padding: 28px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

.author-bio-photo {
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
}

.author-bio-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.author-bio-text {
  min-width: 0;
}

.author-bio-eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 6px;
}

.author-bio-name {
  font-family: "Martel", serif;
  font-weight: 800;
  font-size: 21px;
  line-height: 1.5;
}

.author-bio p {
  margin: 8px 0 12px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  text-wrap: pretty;
}

.author-bio a {
  font-weight: 600;
  font-size: 14.5px;
}

/* --------------------------------------------------------------- prev/next */

.single-prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 32px 0 0;
}

.single-prevnext-card {
  border: 1px solid var(--hairline);
  background: #fff;
  padding: 20px 22px;
  color: var(--ink);
}

.single-prevnext-next {
  text-align: right;
}

.single-prevnext-card:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.single-prevnext-label {
  font-size: 12px;
  color: #8a8070;
  margin-bottom: 6px;
}

.single-prevnext-title {
  font-family: "Martel", serif;
  font-weight: 800;
  font-size: 17px;
  line-height: 1.6;
}

/* ---------------------------------------------------------------- related */

.single-related {
  margin: 44px 0 0;
}

.single-section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
}

.single-section-head h2 {
  margin: 0;
  font-family: "Martel", serif;
  font-weight: 800;
  font-size: 22px;
}

.single-rule {
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

.single-section-more {
  font-size: 14px;
  font-weight: 600;
  flex: none;
}

.single-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.single-related-card {
  color: var(--ink);
  min-width: 0;
}

.single-related-card:hover {
  color: var(--accent);
}

.single-related-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  margin-bottom: 10px;
}

.single-related-thumb img,
.single-related-thumb .thumb-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.single-related-cat {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 4px;
}

.single-related-title {
  font-family: "Martel", serif;
  font-weight: 800;
  font-size: 16.5px;
  line-height: 1.6;
}

/* ============================================================ poem layout */

.poem-sheet {
  background: var(--sheet);
  border: 1px solid rgba(36, 31, 26, 0.18);
  box-shadow: 0 2px 24px rgba(36, 31, 26, 0.08);
  padding: 14px;
}

.poem-frame {
  border: 1px solid rgba(157, 44, 44, 0.35);
  padding: 56px 64px;
  position: relative;
}

.poem-corner {
  position: absolute;
  width: 22px;
  height: 22px;
}

.poem-corner-tl { top: 8px; left: 8px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.poem-corner-tr { top: 8px; right: 8px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.poem-corner-bl { bottom: 8px; left: 8px; border-bottom: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.poem-corner-br { bottom: 8px; right: 8px; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); }

.poem-head {
  text-align: center;
}

.poem-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent);
}

.poem-title {
  margin: 16px 0 10px;
  font-family: "Martel", serif;
  font-weight: 800;
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.5;
  text-wrap: pretty;
}

.poem-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 0 8px;
}

.poem-divider-end {
  margin: 40px 0 0;
}

.poem-divider-line {
  width: 40px;
  height: 1px;
  background: rgba(36, 31, 26, 0.25);
}

.poem-divider-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  transform: rotate(45deg);
}

.poem-byline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.poem-byline-avatar {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
}

.poem-byline-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.poem-byline-text {
  text-align: left;
}

.poem-byline-text .single-author-name {
  font-size: 15.5px;
}

.poem-byline-text .single-byline-meta {
  font-size: 12.5px;
  color: #8a8070;
}

/* Verse. Centred serif with generous leading; stanzas are paragraphs, lines are <br>.
   The core Verse block is styled to match so either authoring path renders the same. */
.poem-verse {
  font-family: "Martel", serif;
  font-size: calc(19px * var(--article-scale, 1));
  line-height: 2.3;
  text-align: center;
  color: #332d25;
  margin-top: 40px;
}

.poem-verse p,
.poem-verse .wp-block-verse {
  margin: 0 0 34px;
  text-wrap: pretty;
}

.poem-verse > :last-child {
  margin-bottom: 0;
}

/* wp-block-verse is a <pre>: inherit the sheet's typography rather than monospace,
   and allow long lines to wrap instead of overflowing on narrow screens. */
.poem-verse .wp-block-verse {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.poem-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(36, 31, 26, 0.12);
}

.poem-share {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.poem-share-label {
  font-size: 12px;
  color: #8a8070;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.poem-share .share-btn {
  width: 38px;
  height: 38px;
}

.poem-main .author-bio {
  margin-top: 32px;
  background: var(--sheet);
  padding: 26px;
  gap: 20px;
}

.poem-main .author-bio-photo {
  width: 76px;
  height: 76px;
}

.poem-main .author-bio-name {
  font-size: 20px;
}

.poem-main .single-prevnext {
  gap: 20px;
  margin-top: 24px;
}

.poem-main .single-prevnext-card {
  background: var(--sheet);
  padding: 18px 20px;
}

.poem-main .single-prevnext-title {
  font-size: 16.5px;
}

.poem-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.poem-related-card {
  border: 1px solid var(--hairline);
  background: var(--sheet);
  padding: 20px;
  color: var(--ink);
  min-width: 0;
}

.poem-related-card:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.poem-related-quote {
  font-family: "Martel", serif;
  font-size: 24px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.poem-related-title {
  font-family: "Martel", serif;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.6;
}

.poem-related-author {
  font-size: 13px;
  color: #8a8070;
  margin-top: 4px;
}

/* ---------------------------------------------------------------- sidebar */

.single-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.single-panel-topline {
  border-top: 2px solid var(--ink);
  padding-top: 16px;
}

.single-panel-center {
  border: 1px solid var(--hairline);
  background: #fff;
  padding: 24px;
  text-align: center;
}

.single-panel-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 14px;
}

.single-linklist {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.single-linklist a {
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.6;
}

.single-linklist a:hover {
  color: var(--accent);
}

.single-linklist span {
  display: block;
  font-weight: 400;
  font-size: 12.5px;
  color: #8a8070;
}

.single-pill-link {
  display: inline-block;
  margin-top: 10px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  font-size: 13.5px;
  padding: 6px 18px;
  border-radius: 999px;
}

.single-pill-link:hover {
  background: var(--accent);
  color: #fff;
}

/* --------------------------------------------------------------- comments */

.single-comments {
  margin: 44px 0 0;
  border-top: 2px solid var(--ink);
  padding-top: 28px;
}

.single-comments-title {
  margin: 0 0 22px;
  font-family: "Martel", serif;
  font-weight: 800;
  font-size: 22px;
}

.comment-list,
.comment-list .children {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 32px;
}

.comment-list .children {
  margin-top: 22px;
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.comment-item {
  display: flex;
  gap: 16px;
}

.comment-avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.comment-body {
  flex: 1;
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(36, 31, 26, 0.12);
  padding: 16px 18px;
}

.comment-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.comment-author {
  font-weight: 600;
  font-size: 15px;
}

.comment-date {
  font-size: 12.5px;
  color: #8a8070;
}

.comment-text p {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.75;
  color: #4d463c;
}

.comment-text > :last-child {
  margin-bottom: 0;
}

.comment-pending {
  margin: 0 0 8px;
  font-size: 13.5px;
  color: var(--accent);
}

.comment-reply a {
  font-size: 13px;
  font-weight: 600;
  display: inline-block;
  margin-top: 8px;
}

.comments-closed {
  font-size: 14px;
  color: var(--muted);
}

/* Comment form. */
.comment-form-wrap,
.comment-respond {
  background: #fff;
  border: 1px solid var(--hairline);
  padding: 26px;
}

.comment-form-title,
.comment-reply-title {
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 16px;
  font-family: inherit;
}

.comment-reply-title small {
  font-weight: 400;
  font-size: 13.5px;
  margin-left: 10px;
}

.comment-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(36, 31, 26, 0.2);
  background: var(--bg);
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
}

.comment-form textarea {
  min-height: 110px;
  resize: vertical;
  display: block;
}

.comment-form .comment-submit,
.comment-form input[type="submit"] {
  margin-top: 14px;
  padding: 11px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.comment-form .comment-submit:hover,
.comment-form input[type="submit"]:hover {
  background: #7c1f1f;
}

.comment-form .comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 12px;
}

.comment-form .comment-form-cookies-consent input {
  width: auto;
  margin-top: 3px;
}

.comment-pagination {
  margin-bottom: 28px;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1100px) {
  /* Too narrow for a sticky gutter, so the rail becomes a horizontal bar above the
     article. Hiding it would leave the standard layout with no way to share at all —
     the poem layout keeps its own share row inside the sheet, this one does not. */
  .single-layout-standard {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 30px;
  }

  .single-layout-standard > .share-rail {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .single-layout-standard > .single-article {
    grid-column: 1;
    grid-row: 2;
  }

  .single-layout-standard > .single-sidebar {
    grid-column: 2;
    grid-row: 2;
  }

  .share-rail {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 0 0 4px;
  }

  .share-rail-label {
    text-align: start;
  }

  .share-btn {
    width: 38px;
    height: 38px;
  }

  .single-layout-poem {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 30px;
  }

  .poem-frame {
    padding: 44px 40px;
  }
}

@media (max-width: 980px) {
  /* Back to source order once everything is a single column. */
  .single-layout-standard > .share-rail,
  .single-layout-standard > .single-article,
  .single-layout-standard > .single-sidebar {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 980px) {
  .single-layout-standard,
  .single-layout-poem {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .single-sidebar {
    max-width: none;
    width: 100%;
  }

  .single-related-grid,
  .poem-related-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .single-layout {
    padding-top: 24px;
  }

  .single-byline {
    align-items: flex-start;
  }

  .poem-frame {
    padding: 32px 20px;
  }

  .poem-sheet {
    padding: 8px;
  }

  .single-related-grid,
  .poem-related-grid,
  .single-prevnext,
  .comment-form-row {
    grid-template-columns: 1fr;
  }

  .single-prevnext-next {
    text-align: left;
  }

  .author-bio {
    flex-direction: column;
    gap: 16px;
    padding: 22px;
  }

  .poem-actions {
    justify-content: flex-start;
  }

  .audio-player {
    flex-wrap: wrap;
  }

  .audio-player-pill {
    border-radius: 16px;
  }

  .comment-list .children {
    padding-left: 14px;
  }

  .single-comments {
    margin-top: 34px;
  }
}

@media (max-width: 560px) {
  .single-body {
    font-size: calc(16.5px * var(--article-scale, 1));
  }

  .poem-verse {
    font-size: calc(17.5px * var(--article-scale, 1));
    line-height: 2.1;
  }

  .comment-item {
    gap: 10px;
  }

  .comment-body {
    padding: 14px;
  }
}

/* ======================================================== static pages */

.single-layout-page {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.page-title {
  margin-top: 0;
}

.page-title-center {
  text-align: center;
}

/* Narrow measure for the full-width template: no sidebar, but prose should not
   run the full 1200px container either. */
.page-narrow {
  max-width: 760px;
  padding-top: 36px;
}

.page-body > :first-child {
  margin-top: 0;
}

/* Pages are prose, not reportage — no drop cap. */
.page-body > p:first-of-type::first-letter {
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  float: none;
  margin: 0;
}

.page-links {
  margin: 26px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.page-links a {
  padding: 0 4px;
}

/* ============================================================== search */

.sahitya-searchform {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 460px;
  border: 1px solid rgba(36, 31, 26, 0.2);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}

.sahitya-searchform-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 11px 6px 11px 18px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
}

.sahitya-searchform-input:focus {
  outline: none;
}

.sahitya-searchform:focus-within {
  border-color: var(--accent);
}

.sahitya-searchform-btn {
  flex: none;
  width: 38px;
  height: 38px;
  margin: 3px 3px 3px 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.sahitya-searchform-btn:hover {
  background: #7c1f1f;
}

.search-head-form {
  margin-top: 18px;
}

.search-empty {
  border: 1px solid var(--hairline);
  background: #fff;
  padding: 32px;
}

.search-empty-lead {
  margin: 0 0 8px;
  font-family: "Martel", serif;
  font-size: 19px;
  line-height: 1.6;
}

.search-empty-hint {
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--muted);
}

.genre-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.genre-links a {
  font-size: 14px;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 6px 16px;
}

.genre-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ================================================================= 404 */

.error-page {
  text-align: center;
  padding-top: 64px;
  padding-bottom: 72px;
  max-width: 620px;
}

.error-page .poem-divider {
  margin-bottom: 22px;
}

.error-code {
  font-family: "Martel", serif;
  font-weight: 800;
  font-size: clamp(56px, 12vw, 88px);
  line-height: 1;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.error-title {
  margin: 14px 0 0;
  font-family: "Martel", serif;
  font-weight: 800;
  font-size: clamp(22px, 4vw, 28px);
  line-height: 1.5;
}

.error-verse {
  margin: 16px 0 0;
  font-family: "Martel", serif;
  font-size: 18px;
  line-height: 2;
  color: var(--muted);
}

.error-search {
  margin: 32px 0 0;
  display: flex;
  justify-content: center;
}

.error-search .sahitya-searchform {
  width: 100%;
}

.error-genres {
  margin: 36px 0 0;
}

.error-genres-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #8a8070;
  margin-bottom: 14px;
}

.error-page .genre-links {
  justify-content: center;
}

.error-home {
  display: inline-block;
  margin-top: 32px;
  font-weight: 600;
  font-size: 15px;
}

@media (max-width: 1100px) {
  .single-layout-page {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

@media (max-width: 980px) {
  .single-layout-page {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .error-page {
    padding-top: 44px;
    padding-bottom: 52px;
  }

  .search-empty {
    padding: 22px;
  }

  .page-narrow {
    padding-top: 24px;
  }
}

/* Search surfaces pages alongside posts; their badge is neutral rather than a
   genre colour, so it does not read as a category. */
.archive-tag-muted {
  background: rgba(36, 31, 26, 0.45);
}

/* ========================================================= front-end forms */

.sahitya-form-wrap {
  margin: 28px 0 0;
}

.sahitya-form {
  border: 1px solid var(--hairline);
  background: #fff;
  padding: 28px;
}

.sahitya-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.sahitya-field {
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sahitya-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.sahitya-field label span[aria-hidden] {
  color: var(--accent);
}

.sahitya-field input[type="text"],
.sahitya-field input[type="email"],
.sahitya-field input[type="tel"],
.sahitya-field input[type="url"],
.sahitya-field select,
.sahitya-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(36, 31, 26, 0.2);
  background: var(--bg);
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  border-radius: 0;
}

.sahitya-field textarea {
  resize: vertical;
  line-height: 1.7;
}

.sahitya-field input:focus,
.sahitya-field select:focus,
.sahitya-field textarea:focus {
  outline: 2px solid #b07a1e;
  outline-offset: 1px;
}

.sahitya-field input[type="file"] {
  font-family: inherit;
  font-size: 14px;
  padding: 9px 0;
}

.sahitya-field-hint {
  font-size: 13px;
  color: var(--muted);
}

.sahitya-field-check label {
  flex-direction: row;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
}

.sahitya-field-check input {
  margin-top: 4px;
  flex: none;
}

/* Off-screen rather than display:none — a bot that skips hidden fields still
   fills this one, which is the point of the trap. */
.sahitya-form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.sahitya-form-actions {
  margin: 4px 0 0;
}

.sahitya-form-submit {
  padding: 12px 30px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.sahitya-form-submit:hover {
  background: #7c1f1f;
}

.sahitya-form-notice {
  margin: 0 0 20px;
  padding: 14px 18px;
  border: 1px solid var(--hairline);
  border-left-width: 4px;
  background: #fff;
  font-size: 15px;
  line-height: 1.6;
}

.sahitya-form-notice-success {
  border-left-color: #1f5c4d;
}

.sahitya-form-notice-error {
  border-left-color: var(--accent);
}

@media (max-width: 820px) {
  .sahitya-form {
    padding: 20px;
  }

  .sahitya-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Text-or-link chooser on the submission form. */
.sahitya-mode-choice {
  border: 1px solid var(--hairline);
  background: var(--bg);
  padding: 10px 16px 14px;
  margin: 0 0 18px;
  display: block;
}

.sahitya-mode-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
}

.sahitya-mode-choice legend {
  padding: 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.sahitya-mode-choice label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 15px;
  cursor: pointer;
}

.sahitya-mode-choice input[type="radio"] {
  margin: 0;
  flex: none;
}

/* [hidden] would otherwise lose to .sahitya-field's display:flex. */
.sahitya-field[hidden] {
  display: none;
}
