@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500&display=swap');

:root {
  --night: #172a3b;
  --deep: #112130;
  --ink: #243b4d;
  --muted: #5d7178;
  --sky: #c7e2e1;
  --cream: #f6efdD;
  --rose: #e8b4a8;
  --gold: #f0c889;
  --silver: #a9c6cc;
  --leaf: #bbcea7;
  --rule: #8ea7aa;
  --signal: #a06c33;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: Inter, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font-family: var(--sans); background-color: var(--night);
  background-image: radial-gradient(circle at 24px 42px, #d0e5dd55 1px, transparent 1.5px), radial-gradient(circle at 77px 101px, #d0e5dd26 1px, transparent 1.5px);
  background-size: 173px 191px, 227px 239px;
}
a { color: inherit; }
button { font: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #976533; outline-offset: 5px; }
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  max-width: 1340px; margin: auto; padding: 25px 28px 16px; color: var(--cream);
}
.wordmark { display: flex; align-items: center; gap: 12px; font: 500 19px var(--serif); text-decoration: none; white-space: nowrap; }
.wordmark::before { content: '✦'; color: var(--gold); font-size: 24px; }
.site-header nav { display: flex; align-items: center; gap: 8px; }
.site-header nav a { padding: 10px 15px; border: 1px solid transparent; border-radius: 24px; color: var(--silver); font: 500 12px var(--sans); text-decoration: none; }
.site-header nav a:hover { color: var(--cream); border-color: #a9c6cc66; }
.site-header nav a[aria-current] { background: var(--sky); border-color: var(--silver); color: var(--ink); }
body[data-page=poems] main { max-width: 1340px; margin: auto; padding: 20px 28px 0; }

/* The sunny, illustrated panels are held inside a celestial picture-book frame. */
.cover { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 0 0 28px; min-height: 680px; }
.cover-copy, .cover-art {
  position: relative; min-width: 0; border: 2px solid var(--ink);
  border-radius: 310px 310px 26px 26px; overflow: hidden;
  box-shadow: 0 0 0 4px var(--silver), 0 0 0 7px var(--deep);
}
.cover-copy {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 220px 30px 65px; text-align: center;
  background: linear-gradient(180deg, #b9d9e0 0%, #d6e8df 38%, #f8e5bf 84%, #efd0b1 100%);
}
.cover-copy::after { content: ''; position: absolute; bottom: -99px; left: -15%; width: 130%; height: 175px; border: 1px solid #607e7770; background: #b8caaa88; border-radius: 50%; pointer-events: none; }
.hope-orbit { position: absolute; top: 36px; left: 50%; transform: translateX(-50%); width: 250px; height: auto; }
.cover-kicker, .section-kicker, .poem-illustration figcaption, .others-art figcaption, .cover-art figcaption, .eyebrow, .panel-head {
  font: 500 10px/1.5 var(--sans); letter-spacing: .07em;
}
.cover-kicker { margin: 0; color: #476574; }
.cover h1 { font: 400 clamp(65px, 6.6vw, 96px)/1.03 var(--serif); letter-spacing: -.045em; margin: 25px 0 42px; }
.cover-continue, .button-link {
  display: inline-flex; align-items: center; gap: 28px; padding: 14px 23px;
  border: 1.5px solid var(--ink); border-radius: 30px; background: #f7d9a7;
  box-shadow: 0 3px 0 #304b6040; color: var(--ink); font: 500 13px var(--sans); text-decoration: none;
  position: relative; z-index: 1;
}
.cover-continue:hover, .button-link:hover { background: #ffe8bf; transform: translateY(-1px); }
.cover-art { margin: 0; background: #eae5d8; height: 680px; }
.cover-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 52% bottom; mix-blend-mode: multiply; }
.cover-art figcaption {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 20px; width: max-content; max-width: 92%;
  padding: 9px 15px; text-align: center; border: 1px solid var(--silver); border-radius: 22px; background: var(--night); color: var(--cream); font-size: 9px;
}
.poem-section {
  position: relative; padding: clamp(85px, 8vw, 120px) clamp(22px, 6vw, 85px) clamp(95px, 10vw, 145px);
  border: 2px solid var(--ink); border-radius: 90px 90px 25px 25px; margin: 34px 0;
  box-shadow: 0 0 0 4px var(--silver), 0 0 0 7px var(--deep);
}
.poem-light { background: linear-gradient(180deg, #d1e6e3 0, #eff0df 420px, var(--cream) 1100px); }
.poem-light::before, .poem-others::before {
  content: ''; position: absolute; top: 28px; left: 38px; width: 54px; height: 54px;
  background: url('./assets/celestial-flower.svg') center/contain no-repeat; pointer-events: none;
}
.poem-others {
  background-color: #203449; color: var(--cream);
  background-image: radial-gradient(#d8e8de40 1px, transparent 1.5px), radial-gradient(ellipse at 85% 5%, #52616a33, transparent 55%);
  background-size: 81px 111px, 100% 100%;
}
.poem-others::before { left: auto; right: 38px; }
.poem-side-label { display: none; }
.poem-frame { max-width: 690px; margin: 0 auto; position: relative; }
.section-kicker { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--rule); color: var(--muted); }
.section-kicker > span:first-child { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid currentColor; border-radius: 50%; letter-spacing: 0; }
.poem-others .section-kicker { border-color: #7a9ba677; color: var(--silver); }
.poem-frame h2 { font: 400 clamp(42px, 4.5vw, 60px)/1.1 var(--serif); letter-spacing: -.03em; margin: 36px 0 66px; }
.poem-body { font: 400 clamp(24px, 2.2vw, 29px)/1.5 var(--serif); letter-spacing: -.01em; }
.poem-stanza { margin: 0 0 1.5em; }
.poem-line { display: block; overflow-wrap: break-word; }
.poem-frame-later { padding-top: 20px; }
.poem-endmark { margin: 65px 0 0; color: #997747; font-size: 26px; }
.poem-others .poem-endmark { color: var(--gold); }
.poem-illustration { max-width: 1080px; margin: 100px auto 70px; }
.poem-illustration img, .others-art img {
  display: block; width: 100%; height: auto; border: 2px solid var(--ink); border-radius: 70px 70px 16px 16px;
  box-shadow: 0 0 0 3px #9eb8b8;
}
.poem-illustration figcaption { margin-top: 18px; text-align: center; color: var(--muted); }
.hinge {
  display: flex; align-items: center; gap: 24px; padding: 22px 28px; margin: 36px 0 28px;
  border: 1px solid var(--silver); border-radius: 40px; background: #e8cf9e; color: var(--ink);
  font: 500 10px/1.5 var(--sans); letter-spacing: .07em;
}
.hinge-line { height: 1px; flex: 1; background: #47657480; position: relative; }
.hinge-line::after { content: '✦'; position: absolute; left: 50%; top: -11px; font-size: 19px; background: #e8cf9e; padding: 0 10px; }
.others-art { margin: 28px 0 38px; padding: 0 5px; }
.others-art img { max-width: 1280px; margin: auto; border-radius: 90px 90px 18px 18px; }
.others-art figcaption { margin: 18px 0 0; color: var(--silver); text-align: center; }
.afterword {
  position: relative; background: linear-gradient(145deg, #d9e4dc, #ebc8b6);
  padding: clamp(80px, 8vw, 115px) clamp(22px, 6vw, 85px); margin: 38px 0 26px;
  border: 2px solid var(--ink); border-radius: 70px 70px 24px 24px; box-shadow: 0 0 0 4px var(--silver), 0 0 0 7px var(--deep);
}
.afterword-inner { max-width: 690px; margin: auto; }
.afterword .eyebrow { color: #566b6f; }
.afterword h2 { font: 400 clamp(46px, 5.8vw, 77px)/1.08 var(--serif); letter-spacing: -.035em; margin: 30px 0; }
.afterword-inner > p:not(.eyebrow) { max-width: 550px; font: 400 21px/1.55 var(--serif); margin: 0 0 32px; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; max-width: 1340px; margin: auto; color: var(--silver); padding: 26px 28px 38px; font: 400 12px/1.5 var(--sans); }
.site-footer a { text-underline-offset: 4px; }

/* Reading notes: light illustrated panels, with the same celestial frame. */
.notes-main { max-width: 1340px; margin: auto; padding: 20px 28px 0; }
.notes-intro {
  position: relative; margin: 0 0 48px; padding: clamp(52px, 6vw, 80px) clamp(28px, 7vw, 100px);
  background: linear-gradient(150deg, #bfdde1, #e3ebdc 55%, #f1d5b6);
  border: 2px solid var(--ink); border-radius: 90px 90px 26px 26px;
  box-shadow: 0 0 0 4px var(--silver), 0 0 0 7px var(--deep);
}
.notes-intro::after { content: ''; position: absolute; width: 190px; height: 145px; top: 35px; right: 65px; background: url('./assets/hope-orbit.svg') center/contain no-repeat; opacity: .75; pointer-events: none; }
.notes-intro .eyebrow { color: var(--muted); }
.notes-intro h1 { position: relative; font: 400 clamp(55px, 6vw, 88px)/1.03 var(--serif); letter-spacing: -.04em; margin: 24px 0 32px; }
.notes-intro > p:not(.eyebrow):not(.verbatim-label) { max-width: 760px; font: 400 19px/1.62 var(--serif); margin: 0 0 25px; }
.notes-intro .verbatim-label { max-width: 650px; font: 500 10px/1.55 var(--sans); letter-spacing: .035em; color: #506970; margin: 0 0 25px; }
.instruction { display: flex; align-items: center; gap: 13px; max-width: 700px; font: 400 13px/1.5 var(--sans); color: #48616b; }
.instruction-symbol { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border: 1px solid #718f92; border-radius: 50%; background: #fff1d777; }
.mobile-instruction, .mobile-note-index, .inline-notes { display: none; }
.reading-desk { position: relative; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.04fr); gap: clamp(34px, 5vw, 72px); margin: auto; }
.reading-desk > * { min-width: 0; }
.verse-panel, .annotation-panel { border: 1px solid #8ba7ac; border-radius: 34px 34px 20px 20px; box-shadow: 0 0 0 4px var(--deep), 0 0 0 5px #78959c; }
.verse-panel {
  position: sticky; top: 16px; align-self: start; height: calc(100dvh - 32px); max-height: 930px;
  display: flex; flex-direction: column; min-height: 0; padding: 0 25px; background: #e5eee4;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 76px; border-bottom: 1px solid #9cb2af; color: #566e73; letter-spacing: .05em; }
.verse-panel-head { min-height: 88px; }
.poem-switch { display: flex; gap: 8px; }
.poem-switch button { min-height: 46px; border: 1.5px solid #718f95; border-radius: 28px; background: #f0f4e9; color: var(--ink); padding: 12px 16px; font: 600 14px var(--sans); letter-spacing: 0; box-shadow: 0 2px 0 #304b602a; cursor: pointer; }
.poem-switch button:hover { background: #e1eddf; }
.poem-switch button.is-active { color: var(--ink); background: var(--gold); border-color: #7c6440; box-shadow: 0 3px 0 #665b4666; }
.poem-switch button.is-active:hover { background: #f8d9a3; }
.verse-scroll { min-height: 0; flex: 1; overflow: auto; scrollbar-width: thin; scrollbar-color: #8ca5a8 transparent; padding: 32px 4px 60px 0; }
.mini-poem h2 { font: 400 36px/1.15 var(--serif); letter-spacing: -.025em; margin: 0 0 34px; }
.mini-poem .poem-stanza { margin-bottom: 1.4em; }
.mini-poem .poem-line { font: 400 clamp(18px, 1.4vw, 21px)/1.5 var(--serif); letter-spacing: -.005em; }
.verse-row { min-width: 0; }
.verse-trigger { display: block; width: fit-content; max-width: 100%; border: 0; border-left: 2px solid transparent; padding: 2px 6px 3px 0; margin: 0; background: none; color: inherit; text-align: left; cursor: pointer; scroll-margin-top: 100px; }
.verse-trigger .verse-text { text-decoration: underline dotted #9e713d; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.verse-marker { display: inline-block; font: 600 9px/1 var(--sans); color: #89551f; vertical-align: super; margin-left: 7px; letter-spacing: .02em; white-space: nowrap; }
.verse-trigger:hover, .verse-trigger.is-linked { color: #764c26; background: #f5d49655; }
.verse-trigger.is-selected { border-left-color: #a37438; padding-left: 9px; background: #efd29e88; }
.annotation-panel { background: #f4edda; padding: 0 23px 25px; align-self: start; }
.annotation-panel > .panel-head { position: sticky; top: 0; z-index: 3; background: #f4edda; }
.note-card { border-bottom: 1px solid #b4bbab; }
.note-heading { display: block; position: relative; width: 100%; border: 0; padding: 24px 25px 26px 8px; text-align: left; background: none; color: inherit; cursor: pointer; border-radius: 14px; }
.note-heading:hover { background: #e1e8d677; }
.note-kicker { display: block; margin-bottom: 13px; color: #617379; font: 500 10px var(--sans); letter-spacing: .045em; }
.note-title { display: block; padding-right: 12px; font: 400 clamp(24px, 2vw, 30px)/1.25 var(--serif); letter-spacing: -.02em; }
.note-toggle { position: absolute; right: 8px; top: 20px; color: #93672f; font: 400 23px var(--sans); }
.note-card.is-active { background: #e7d3b478; border-radius: 18px; margin: 8px -8px; padding: 0 8px; border: 1px solid #b3a284; }
.note-card.is-active .note-kicker { color: #81572e; }
.note-content { padding: 0 9px 28px 8px; }
.note-prose { margin: 0; font: 400 17px/1.68 var(--serif); color: var(--ink); overflow-wrap: break-word; }
.note-prose + .note-prose { margin-top: 1em; }
.note-scope { margin: 20px 0 0; color: #687165; font: 500 10px/1.5 var(--sans); letter-spacing: .035em; text-transform: uppercase; }
.note-source-image { margin: 24px 0 0; }
.note-source-image a, .note-source-image img { display: block; width: 100%; height: auto; }
.note-source-image img { border: 1px solid #879da5; border-radius: 12px; }
.note-source-image figcaption { color: #6d573a; margin-top: 10px; font: 500 10px/1.5 var(--sans); }
.note-source-image figcaption a { width: auto; text-underline-offset: 3px; }
.related-note-options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 15px 5px; border-bottom: 1px solid #b4bbab; font: 400 11px var(--sans); color: #5d7178; }
.related-note-options > span { margin-right: 4px; }
.related-note-options button { border: 1px solid #ac9270; border-radius: 50%; width: 32px; height: 32px; color: #795327; background: #fbf0d9; font: 500 11px var(--sans); cursor: pointer; }
.related-note-options button[aria-pressed=true] { background: #e8bf82; color: var(--ink); }
.connection-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 4; }
.connection-layer path { fill: none; stroke: #d8a864; stroke-width: 1.5; }
.connection-layer circle { fill: #d8a864; stroke: #624e36; stroke-width: .6; }
.source-gallery { margin: 70px 0 45px; padding: 24px; border: 1px solid #7f9eab; border-radius: 45px 45px 22px 22px; background: #203449; color: var(--cream); }
.source-gallery figure { margin: 0; }
.source-gallery img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid #90adb5; }
.source-gallery figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-top: 16px; color: var(--silver); font: 400 12px/1.5 var(--sans); }
.source-gallery a { text-underline-offset: 4px; }
.universe-footer { margin: 70px 0 28px; overflow: hidden; border: 1px solid var(--silver); border-radius: 60px 60px 24px 24px; background: #203449; box-shadow: 0 0 0 4px var(--deep), 0 0 0 5px #78959c; }
.universe-footer img { display: block; width: 100%; height: auto; }

@media (max-width: 1100px) and (min-width: 901px) {
  .verse-panel { padding: 0 18px; }
  .verse-panel-head { flex-wrap: wrap; padding: 16px 0; }
  .poem-switch button { padding: 10px 12px; }
  .annotation-panel { padding: 0 18px 25px; }
  .notes-intro::after { width: 145px; right: 45px; }
}
@media (max-width: 900px) {
  .cover { min-height: 0; gap: 18px; }
  .cover-copy { padding: 200px 15px 50px; }
  .cover h1 { font-size: clamp(45px, 6.8vw, 65px); margin: 20px 0 30px; }
  .hope-orbit { width: 210px; top: 32px; }
  .cover-art { height: 570px; }
  .cover-kicker { font-size: 8px; }
  .cover-continue { gap: 15px; padding: 12px 16px; font-size: 12px; }
  .cover-art figcaption { font-size: 7px; padding: 8px; }
  .reading-desk { grid-template-columns: minmax(0,1fr); gap: 0; }
  .verse-panel { position: relative; top: auto; height: auto; max-height: none; min-height: 0; padding: 0 24px; }
  .verse-panel-head { position: sticky; top: 0; background: #e5eee4; z-index: 6; min-height: 88px; }
  .verse-panel-head > span { display: none; }
  .poem-switch { width: 100%; gap: 8px; }
  .poem-switch button { flex: 1; min-width: 0; padding: 14px 8px; font-size: clamp(12px, 3.3vw, 14px); }
  .verse-scroll { height: auto; max-height: none; overflow: visible; padding: 32px 0 20px; }
  .mini-poem .poem-line { font-size: 22px; }
  .verse-trigger { padding-top: 4px; padding-bottom: 4px; }
  .annotation-panel, .connection-layer, .desktop-instruction { display: none; }
  .mobile-instruction { display: inline; }
  .inline-notes { display: block; margin: 12px 0 24px; padding: 15px; border: 1px solid #9eb5b4; border-radius: 16px; background: #d2e3df; color: var(--ink); }
  .inline-note-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; font: 500 10px/1.4 var(--sans); letter-spacing: .04em; color: #596e73; }
  .inline-note-toolbar button { border: 0; padding: 5px 0 5px 10px; color: #5e543d; background: none; font: 500 12px var(--sans); cursor: pointer; letter-spacing: 0; }
  .inline-note { border-top: 1px solid #9db4b0; }
  .inline-note summary { position: relative; padding: 15px 24px 15px 0; cursor: pointer; list-style: none; font: 500 15px/1.45 var(--sans); }
  .inline-note summary::-webkit-details-marker { display: none; }
  .inline-note summary::after { content: '+'; position: absolute; right: 0; top: 14px; color: #8d642f; font-size: 21px; }
  .inline-note[open] > summary::after { content: '−'; }
  .inline-note-body { padding: 3px 0 22px; }
  .inline-note .note-prose { font-size: 17px; line-height: 1.62; }
  .mobile-note-index { display: block; margin: 28px 0 50px; border: 1px solid #93b0b7; border-radius: 23px; padding: 0 20px; background: #d6e3d8; }
  .mobile-note-index > summary { display: flex; justify-content: space-between; gap: 15px; padding: 20px 0; cursor: pointer; font: 500 14px/1.45 var(--sans); list-style: none; }
  .mobile-note-index > summary::-webkit-details-marker { display: none; }
  .mobile-note-index[open] > summary > span { transform: rotate(45deg); }
  .note-index-button { display: block; width: 100%; background: none; border: 0; border-top: 1px solid #a4b7ae; color: var(--ink); text-align: left; padding: 16px 0; font: 400 15px/1.5 var(--serif); cursor: pointer; }
  .source-gallery { margin-top: 0; }
  .notes-intro::after { width: 150px; right: 20px; top: 35px; opacity: .3; }
}
@media (max-width: 600px) {
  .site-header { padding: 18px 16px 10px; flex-wrap: wrap; gap: 12px; }
  .wordmark { font-size: 17px; gap: 8px; }
  .wordmark::before { font-size: 19px; }
  .site-header nav { gap: 4px; }
  .site-header nav a { font-size: 10px; padding: 9px 10px; }
  body[data-page=poems] main, .notes-main { padding: 18px 16px 0; }
  .cover { grid-template-columns: minmax(0,1fr); gap: 22px; }
  .cover-copy { border-radius: 180px 180px 24px 24px; padding: 195px 22px 60px; min-height: 470px; }
  .hope-orbit { width: 225px; top: 25px; }
  .cover-kicker { font-size: 9px; }
  .cover h1 { font-size: clamp(61px, 16vw, 82px); margin: 20px 0 30px; }
  .cover-art { border-radius: 190px 190px 22px 22px; height: 540px; }
  .cover-art figcaption { font-size: 8px; bottom: 16px; padding: 8px 10px; }
  .cover-continue { font-size: 12px; padding: 13px 20px; gap: 30px; }
  .poem-section { padding: 80px 22px 85px; border-radius: 65px 65px 22px 22px; margin: 30px 0; }
  .poem-light::before, .poem-others::before { width: 36px; height: 36px; left: 24px; top: 25px; }
  .poem-others::before { left: auto; right: 24px; }
  .poem-frame h2 { margin: 30px 0 48px; font-size: 39px; }
  .poem-body { font-size: 23px; }
  .poem-illustration { margin: 65px -8px 55px; }
  .poem-illustration img { border-radius: 35px 35px 12px 12px; }
  .poem-illustration figcaption, .others-art figcaption { font-size: 8px; }
  .hinge { gap: 14px; padding: 18px 20px; font-size: 8px; }
  .others-art { padding: 0 2px; }
  .others-art img { border-radius: 50px 50px 12px 12px; }
  .afterword { border-radius: 55px 55px 22px 22px; padding: 64px 24px; }
  .afterword h2 { font-size: 42px; }
  .afterword-inner > p:not(.eyebrow) { font-size: 19px; }
  .button-link { gap: 18px; padding: 13px 16px; font-size: 11px; }
  .notes-intro { border-radius: 55px 55px 22px 22px; padding: 50px 24px 35px; margin-bottom: 32px; }
  .notes-intro::after { width: 105px; right: 10px; top: 20px; opacity: .25; }
  .notes-intro h1 { font-size: clamp(43px, 12vw, 58px); }
  .notes-intro > p:not(.eyebrow):not(.verbatim-label) { font-size: 17px; }
  .notes-intro .verbatim-label { font-size: 9px; }
  .instruction { font-size: 12px; gap: 10px; }
  .verse-panel { padding: 0 16px; border-radius: 26px 26px 18px 18px; }
  .mini-poem h2 { font-size: 31px; }
  .mini-poem .poem-line { font-size: 20px; }
  .inline-notes { padding: 13px; }
  .inline-note summary { font-size: 14px; }
  .source-gallery { border-radius: 32px 32px 18px 18px; padding: 17px; margin-bottom: 25px; }
  .source-gallery figcaption { font-size: 11px; }
  .universe-footer { margin-top: 35px; border-radius: 35px 35px 20px 20px; }
  .site-footer { flex-direction: column; gap: 12px; padding: 24px 20px 32px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
