:root {
  color-scheme: light;
  --ink: #203b34;
  --muted: #60736b;
  --canvas: #f7f6f0;
  --paper: #fffef9;
  --sage: #e7efe8;
  --green: #2e6254;
  --green-hover: #244f45;
  --line: #cad8cf;
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, system-ui, sans-serif; line-height: 1.7; }
a { color: inherit; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px max(22px, calc((100% - 1080px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgb(255 254 249 / 96%);
}
.brand { font-family: Georgia, serif; font-size: 1.35rem; font-weight: 700; text-decoration: none; }
nav { display: flex; align-items: center; gap: 22px; font-size: .86rem; }
nav a { text-decoration: none; }
nav a:not(.signin):hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.signin { padding: 8px 14px; color: #fff; background: var(--green); border-radius: 5px; }
.signin:hover { background: var(--green-hover); }

main { min-height: calc(100vh - 150px); }
.journal-intro {
  padding: clamp(52px, 8vw, 88px) max(24px, calc((100% - 900px) / 2)) clamp(48px, 7vw, 72px);
  color: var(--ink);
  background: var(--sage);
  border-bottom: 1px solid var(--line);
}
.journal-intro h1, .post h1 {
  max-width: 780px;
  margin: 12px 0 18px;
  font-family: Georgia, serif;
  font-size: clamp(1.45rem, 2.5vw, 1.625rem);
  font-weight: 400;
  line-height: 1.08;
  overflow-wrap: anywhere;
}
.journal-intro > p:last-child { max-width: 650px; margin-bottom: 0; color: var(--muted); font-size: 1.04rem; }
.eyebrow { margin: 0; color: var(--green); font-size: .72rem; font-weight: 700; letter-spacing: .12em; }

.post-list { width: min(900px, calc(100% - 48px)); margin: 0 auto; padding: 42px 0 76px; }
.post-list h2 { margin: 0 0 18px; font-family: Georgia, serif; font-size: 1.7rem; font-weight: 400; }
.post-list article { padding: 26px 28px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid #8daf9c; border-radius: 6px; box-shadow: 0 12px 28px rgb(39 72 61 / 7%); }
.post-list time, .post-list p { color: var(--muted); font-size: .82rem; }
.post-list p { max-width: 68ch; }
.post-list h3 { max-width: 760px; margin: 7px 0; font-family: Georgia, serif; font-size: clamp(1.25rem, 3vw, 1.6rem); line-height: 1.28; overflow-wrap: anywhere; }
.post-list h3 a { text-decoration: none; }
.post-list h3 a:hover { color: var(--green); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.read-more { color: var(--green); font-weight: 700; text-decoration: none; }
.read-more:hover { text-decoration: underline; text-underline-offset: 4px; }

.post { width: min(740px, calc(100% - 42px)); margin: 0 auto; padding: 48px 0 84px; font-size: 1.04rem; }
.post-byline { width: min(740px, calc(100% - 42px)); margin: 42px auto -28px; color: var(--muted); font-size: .78rem; }
.post-byline span::before { content: " · "; }
.post .back { display: inline-block; margin-bottom: 38px; color: var(--muted); font-size: .82rem; text-decoration: none; }
.post .back:hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.post h1 { max-width: 720px; margin-bottom: 30px; font-size: clamp(1.45rem, 2.5vw, 1.625rem); }
.post > p:not(.eyebrow) { margin: 1.5em 0; }
.post strong { color: #245a4b; }
.post .post-cta { padding: 18px 20px; color: var(--ink); background: #e7f1ec; border-left: 4px solid #6f9d89; }
.post .post-cta a { color: var(--green); font-weight: 700; }
.post .post-source { margin-top: 2.5em; padding-top: 18px; color: var(--muted); border-top: 1px solid var(--line); font-size: .82rem; line-height: 1.6; }
.post .post-source a { color: var(--green); text-underline-offset: 3px; }

.poem {
  position: relative;
  margin: 8px 0 52px;
  padding: 34px clamp(22px, 6vw, 52px) 34px clamp(26px, 6vw, 56px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid #8daf9c;
  border-radius: 6px;
  box-shadow: 0 12px 28px rgb(39 72 61 / 7%);
}
.poem-motif { display: block; margin: 0 0 18px; color: #6f9d89; }
.poem .stanza { margin: 0; font-family: Georgia, serif; font-size: clamp(1.08rem, 2.4vw, 1.24rem); line-height: 1.8; }
.poem .stanza + .stanza { margin-top: 1.35em; }
.poem .line { display: block; padding-left: 1.2em; text-indent: -1.2em; }
.poem .line + .line { margin-left: 1.4em; color: var(--green); font-style: italic; }

footer { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px 28px; padding: 26px 24px; color: var(--muted); background: var(--sage); border-top: 1px solid var(--line); font-size: .78rem; }
footer a { color: var(--green); font-weight: 700; text-decoration: none; }

@media (max-width: 560px) {
  .site-header { align-items: center; gap: 12px; min-height: 64px; padding-inline: 16px; }
  .brand { font-size: 1.15rem; }
  nav { gap: 10px; font-size: .72rem; }
  .signin { padding: 7px 10px; }
  .journal-intro { padding-inline: 20px; }
  .journal-intro h1 { font-size: clamp(1.45rem, 5.5vw, 1.625rem); }
  .journal-intro > p:last-child { font-size: .96rem; }
  .post-list { width: min(100% - 32px, 900px); padding-top: 32px; }
  .post-list article { padding: 22px 20px; }
  .post { width: min(100% - 36px, 740px); padding-top: 36px; font-size: 1rem; }
  .post .back { margin-bottom: 30px; }
  .post h1 { font-size: clamp(1.45rem, 5.5vw, 1.625rem); }
  .poem { margin-bottom: 40px; padding: 26px 18px 26px 20px; }
  .poem .stanza { font-size: 1.04rem; }
  .poem .line { padding-left: .9em; text-indent: -.9em; }
  .poem .line + .line { margin-left: .7em; }
}

@media (max-width: 380px) {
  .journal-intro h1, .post h1 { overflow-wrap: break-word; }
}

/* Phones: the brand on its own row and the links (with Your Haven at the end) on the next, so nothing is hidden or
   runs off a 390px screen. */
@media (max-width: 560px) {
  .site-header { flex-wrap: wrap; gap: 4px 12px; padding-block: 10px 8px; }
  .site-header nav { width: 100%; flex-wrap: wrap; gap: 0 2px; margin-left: -8px; }
  nav a:not(.signin) { padding-inline: 8px; }
  .signin { margin-left: auto; }
}

/* Touch screens: links that stand on their own are full 44px targets (WCAG 2.5.5). Mouse layouts keep them compact. */
@media (pointer: coarse) {
  .brand, nav a, footer a, .read-more, .post .back { display: inline-flex; align-items: center; gap: .3em; min-height: 44px; }
  nav a:not(.signin) { min-width: 44px; justify-content: center; }
  .signin { padding-block: 0; }
  footer { gap: 0 20px; padding-block: 12px; }
  .post .back { margin-bottom: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
