:root {
  --bg: #f6f1e7;
  --bg-alt: #efe6d4;
  --ink: #26221d;
  --muted: #6b6257;
  --accent: #c2502e;
  --accent-soft: #f3d9cc;
  --card: #fffdf8;
  --line: #ddd2bf;
  --me: #e7dfcf;
  --you: #2f6f73;
  --you-ink: #f5fbfb;
  --heard: #2f6f73;
  --helped: #b07a1b;
  --hugged: #b24a6b;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1916;
    --bg-alt: #24211d;
    --ink: #ece5d8;
    --muted: #a99f90;
    --accent: #ec7d58;
    --accent-soft: #4a2a1f;
    --card: #2a2622;
    --line: #3d3730;
    --me: #39332c;
    --you: #2b6265;
    --you-ink: #eef8f8;
    --heard: #5fb0b4;
    --helped: #e0aa48;
    --hugged: #e07c9b;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.65;
}

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

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { line-height: 1.15; font-weight: 700; }
h2 { font-size: 1.9rem; margin: 0 0 0.75rem; letter-spacing: -0.01em; }
h3 { font-size: 1.3rem; margin: 0 0 0.5rem; }

q { quotes: "“" "”"; font-style: italic; }

section { padding: 3rem 0 0.5rem; }

/* Hero */
.hero { padding: 5rem 0 3rem; border-bottom: 1px solid var(--line); }
.kicker {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 1rem;
}
h1 {
  font-size: clamp(2.4rem, 7vw, 4rem);
  margin: 0 0 1.5rem;
  letter-spacing: -0.02em;
}
.strike {
  position: relative;
  color: var(--accent);
  white-space: nowrap;
}
.strike::after {
  content: "";
  position: absolute;
  left: -0.05em;
  right: -0.05em;
  top: 55%;
  height: 0.09em;
  background: currentColor;
  transform: rotate(-3deg);
  transform-origin: left center;
  animation: strike 0.6s 0.6s cubic-bezier(.6,.1,.3,1) both;
}
@keyframes strike { from { transform: rotate(-3deg) scaleX(0); } to { transform: rotate(-3deg) scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .strike::after { animation: none; } }
.lede { font-size: 1.3rem; color: var(--muted); margin: 0; max-width: 36rem; }
.wide-only { display: none; }
@media (min-width: 40rem) { .wide-only { display: inline; } }

/* Chat */
.chat {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.45;
}
.msg {
  max-width: 85%;
  padding: 0.6rem 0.9rem;
  border-radius: 1.1rem;
}
.msg .who {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.65;
  margin-bottom: 0.15rem;
}
.msg.them { align-self: flex-start; background: var(--me); border-bottom-left-radius: 0.3rem; }
.msg.you { align-self: flex-end; background: var(--you); color: var(--you-ink); border-bottom-right-radius: 0.3rem; }
.chat figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
}

/* Lists */
.landing { padding-left: 1.2rem; }
.landing li { margin-bottom: 0.75rem; }
.landing li::marker { color: var(--accent); }

/* Heard / helped / hugged */
.hhh {
  background: var(--bg-alt);
  margin-top: 3rem;
  padding: 3.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cards {
  max-width: 64rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin: 1.5rem auto;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 6px solid var(--c);
  border-radius: 0.9rem;
  padding: 1.25rem 1.25rem 0.5rem;
  font-size: 1.05rem;
}
.card.heard { --c: var(--heard); }
.card.helped { --c: var(--helped); }
.card.hugged { --c: var(--hugged); }
.card h3 { color: var(--c); font-size: 1.6rem; }
.card .icon { font-size: 2rem; line-height: 1; margin-bottom: 0.5rem; }
.card .try { font-size: 0.95rem; color: var(--muted); }
.punchline { font-size: 1.25rem; text-align: center; margin: 1rem 0 0; }

/* Do / don't */
.dodont {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.dodont .col {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 1.25rem;
  font-size: 1.05rem;
}
.dodont ul { list-style: none; padding: 0; margin: 0; }
.dodont li { padding-left: 1.6rem; position: relative; margin-bottom: 0.6rem; }
.dodont li::before { position: absolute; left: 0; font-family: var(--sans); font-weight: 700; }
.do h3 { color: var(--heard); }
.do li::before { content: "✓"; color: var(--heard); }
.dont h3 { color: var(--accent); }
.dont li::before { content: "✗"; color: var(--accent); }

/* Split notes */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 2rem;
  max-width: 64rem;
}
.note h2 { font-size: 1.5rem; }
.note { border-left: 4px solid var(--line); padding-left: 1.25rem; }
.note.received { border-color: var(--heard); }
.note.sending { border-color: var(--accent); }

/* Share */
.share { text-align: center; padding-bottom: 3rem; }
.share-row {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}
.share code {
  font-size: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.55rem 0.9rem;
  word-break: break-all;
}
.btn {
  font: 600 1rem var(--sans);
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 0.5rem;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--helped); outline-offset: 2px; }
.status { min-height: 1.5em; font-family: var(--sans); font-size: 0.9rem; color: var(--muted); }

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  text-align: center;
}
.sign { font-size: 1.4rem; font-style: italic; margin: 0 0 0.75rem; }
.small { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); margin: 0; }
