/* A single couplet, with its original animated scene and room to read. */
.nav-links a { white-space: nowrap; }
.mind-section {
  padding: 64px 0 96px;
  scroll-margin-top: 90px;
  background: var(--bg, #15161d);
  color: var(--text, #e9e3d6);
}
.mind-heading { padding-bottom: 32px; }
body.home-page .mind-heading h2 { margin-block: 0; }
.mind-poetry { min-width: 0; }
.mind-sher {
  --sher-ink: #e4e4ee;
  --sher-muted: #b8b8c5;
  --sher-bg: #10131d;
  color: var(--sher-ink);
  background: var(--sher-bg);
  overflow: hidden;
  position: relative;
  transition: background-color .45s, color .45s;
}
.mind-sher[data-sher-theme="petal"] { --sher-bg: #20191d; --sher-ink: #f0dce0; --sher-muted: #c4aeb4; }
.mind-sher[data-sher-theme="water"] { --sher-bg: #131d22; --sher-ink: #dee8e8; --sher-muted: #aebec2; }
.mind-sher[data-sher-theme="flame"] { --sher-bg: #171312; --sher-ink: #f0e1c8; --sher-muted: #c6b8a4; }
.mind-sher[data-sher-theme="night"] { --sher-bg: #0a0f18; --sher-ink: #dce3ef; --sher-muted: #aebbd0; }
.mind-sher[data-sher-theme="path"] { --sher-bg: #1b1715; --sher-ink: #eee0d6; --sher-muted: #bfb0a4; }
.mind-sher-content {
  min-height: 368px;
  padding: 18px 36px 36px;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
}
.mind-sher-canvas {
  position: absolute;
  inset: 0;
  /* SiteMotion sizes the backing bitmap; CSS controls the responsive box. */
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
  z-index: -1;
}
.mind-sher[data-sher-theme="night"] .mind-sher-canvas {
  mask-image: radial-gradient(ellipse, #000 55%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse, #000 55%, transparent 100%);
}
.mind-sher-topline a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--sher-muted);
  font: 400 10px/1.6 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
}
.mind-sher-topline a > span:last-child { color: var(--vermilion); font-size: 14px; }
.mind-sher-topline a:hover { color: var(--sher-ink); }
.mind-verse { text-align: center; margin: auto 0; padding-top: 22px; }
.mind-verse blockquote {
  font: italic 400 clamp(26px, 3.2vw, 40px)/1.55 var(--serif);
  letter-spacing: .005em;
  text-shadow: 0 2px 16px var(--sher-bg);
}
.mind-verse blockquote p { text-wrap: balance; }
.mind-verse blockquote p + p { margin-top: 5px; }
.mind-verse figcaption { margin-top: 24px; color: var(--sher-muted); font: 400 11px/1.8 var(--sans); letter-spacing: .035em; }
.mind-sher-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 20px; border-top: 1px solid #ffffff12; margin: 0 36px; padding: 10px 0; }
.mind-sher-translation { grid-column: 1 / -1; grid-row: 1; min-width: 0; color: var(--sher-muted); }
.mind-sher-translation summary { width: fit-content; max-width: calc(100% - 130px); padding: 12px 0; min-height: 44px; cursor: pointer; font: 400 11px/1.6 var(--sans); list-style: none; }
.mind-sher-translation summary::-webkit-details-marker { display: none; }
.mind-sher-translation summary span { display: inline-block; margin-left: 6px; color: var(--vermilion); transition: transform .2s; }
.mind-sher-translation[open] summary span { transform: rotate(45deg); }
.mind-sher-translation p { max-width: 520px; font: italic 400 19px/1.5 var(--serif); margin: 16px auto 24px; text-align: center; text-wrap: balance; }
.mind-sher-actions button { grid-column: 2; grid-row: 1; align-self: start; padding: 11px 0; min-height: 44px; border: 0; background: none; color: var(--sher-muted); font: 400 11px/1.6 var(--sans); cursor: pointer; }
.mind-sher-actions button[hidden] { display: none; }
.mind-sher-actions button span { color: var(--vermilion); font-size: 17px; vertical-align: -1px; margin-right: 6px; }
.mind-sher-actions button:hover, .mind-sher-translation summary:hover { color: var(--sher-ink); }
.mind-sher :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mind-sher-content.is-changing { animation: mind-ink-in .4s ease-out; }
@keyframes mind-ink-in { from { opacity: .3; } to { opacity: 1; } }
@media (min-width: 1000px) {
  .mind-section { padding: 96px 0; }
  .mind-section > .container { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 72px; align-items: center; }
  .mind-heading { padding: 0; }
  body.home-page .mind-heading h2 { font-size: 48px; line-height: 1.08; text-wrap: balance; }
  .mind-heading::after { content: ''; display: block; width: 28px; height: 1px; margin-top: 28px; background: var(--vermilion); }
  .mind-verse blockquote { font-size: 34px; }
  .mind-sher-content { padding-inline: 32px; }
  .mind-sher-actions { margin-inline: 32px; }
}
@media (max-width: 760px) {
  .mind-section { padding: 48px 0 64px; }
  .mind-sher-content { min-height: 320px; padding: 14px 24px 32px; }
  .mind-verse blockquote { font-size: clamp(23px, 4.8vw, 32px); }
  .mind-verse figcaption { margin-top: 20px; }
  .mind-sher-actions { margin-inline: 24px; }
}
@media (max-width: 390px) {
  .nav-links { gap: 10px; }
  .nav-links a::before { inset-inline: -5px; }
  .mind-sher-content { padding-inline: 18px; }
  .mind-sher-actions { margin-inline: 18px; }
  .mind-sher-translation summary { max-width: calc(100% - 110px); }
}
@media (max-width: 360px) {
  .nav { padding-inline: 16px; }
  .nav-links { gap: 6px; }
  .nav-links a::before { inset-inline: -3px; }
}
@media (prefers-reduced-motion: reduce) {
  .mind-sher, .mind-sher-translation summary span { transition: none; }
  .mind-sher-content.is-changing { animation: none; }
}
