/* "Write your own entry" tool on the reflection examples page. */
.examples-page [hidden] { display: none !important; }
.entry-writer ::selection, .writer-teaser ::selection { background: #cfe3d9; color: #263f35; }
.writer-hero-link { margin-top: 26px !important; }
.writer-hero-link a {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px;
  background: #fff; border-radius: 999px; font-weight: 600; text-decoration: none;
  box-shadow: 0 2px 10px rgba(38, 63, 53, .08);
}
.writer-hero-link a:hover { text-decoration: underline; }

.entry-writer {
  margin: 8px 0 28px; padding: 36px 32px 32px; background: #f4f1ea; border-radius: 18px;
  scroll-margin-top: 96px;
}
.entry-writer h2 { margin-bottom: 10px; }
.writer-intro { max-width: 62ch; color: var(--example-muted); line-height: 1.7; }
.writer-question { margin-top: 16px !important; padding: 12px 16px; background: #dcece3; border-radius: 10px; line-height: 1.55; }
.writer-question span { display: block; font-size: 13px; color: #3d5548; }
.writer-question q { font-weight: 600; color: #263f35; }

.writer-privacy { display: flex; align-items: flex-start; gap: 8px; max-width: 62ch; margin-top: 12px !important; color: #263f35; font-size: 15px; line-height: 1.6; }
.writer-privacy strong { font-weight: 600; }
.writer-privacy-icon { flex: none; margin-top: 2px; color: #326c63; }

/* One question at a time. An answered question stays on the page as plain
   text; the open one has the field. "Next question" is a quiet pill, not a
   button that looks like sending the form. */
.writer-progress { display: flex; gap: 6px; margin-top: 24px; }
.writer-progress span {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: #e4eff3; color: #263f35; font-weight: 700; font-size: 13px; line-height: 1;
}
.writer-progress span.is-current { background: #fff; box-shadow: inset 0 0 0 2px #326c63; }
.writer-progress span.is-done { background: #326c63; color: #fff; font-size: 0; }
/* Material Symbols Rounded "check", weight 700, as a mask so it takes the
   text colour; centred in the dot. */
.writer-progress span.is-done { position: relative; }
.writer-progress span.is-done::after {
  content: ''; position: absolute; inset: 0; width: 20px; height: 20px; margin: auto; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='m382-388 321-321q19-19 45-19t45 19q19 19 19 45t-19 45L427-253q-19 19-45 19t-45-19L167-423q-19-19-19-45t19-45q19-19 45-19t45 19l125 125Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='m382-388 321-321q19-19 45-19t45 19q19 19 19 45t-19 45L427-253q-19 19-45 19t-45-19L167-423q-19-19-19-45t19-45q19-19 45-19t45 19l125 125Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.writer-progress span.is-skipped { background: transparent; box-shadow: inset 0 0 0 1px #c8d6cf; color: #736d63; }
.writer-questions { list-style: none; padding: 0; margin: 18px 0 0; }
.writer-q + .writer-q { margin-top: 12px; }
.writer-q.is-current:not(:first-child) { margin-top: 26px; }
.writer-q { scroll-margin-top: 96px; scroll-margin-bottom: 80px; }
.writer-q-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.writer-q-text { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 21px; line-height: 1.3; letter-spacing: -.01em; }
.writer-q-tip { margin: 4px 0 12px !important; font-size: 15px; line-height: 1.55; color: var(--example-muted); }
.writer-q textarea {
  display: block; width: 100%; min-height: 80px; margin: 0; padding: 12px 14px; resize: none; overflow: hidden;
  border: 1px solid #ddd8cc; border-radius: 10px; background: #fcfbf8; color: var(--example-ink);
  font: inherit; font-size: 17px; line-height: 1.6; caret-color: #326c63;
}
.writer-q textarea:focus { outline: none; border-color: #326c63; background: #fff; box-shadow: 0 0 0 3px rgba(50, 108, 99, .15); }
.writer-q textarea::placeholder { color: #736d63; }
.writer-q.is-answered .writer-q-text { font-family: inherit; font-weight: 600; font-size: 15px; letter-spacing: 0; color: var(--example-muted); }
.writer-q.is-answered .writer-q-tip { display: none; }
.writer-q.is-answered textarea:not(:focus) { min-height: 0; margin-top: 2px; padding: 0; border-color: transparent; background: transparent; }
.writer-skip, .writer-link-btn {
  padding: 0; border: 0; background: none; font: inherit; font-size: 14px; color: #315b62;
  text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}
.writer-skip:hover, .writer-link-btn:hover { color: #263f35; }
.writer-skip { flex: none; }
.writer-next {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 9px 18px;
  border: 1px solid #c8d6cf; border-radius: 999px; background: #fff; color: #263f35;
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1.3; cursor: pointer;
}
.writer-next:hover { border-color: #8fb3a6; background: #f6faf8; }
.writer-next-arrow { color: #326c63; }

/* The finished entry: one card that sells the app first, then shows how to
   take the entry there. */
.writer-result {
  display: grid; gap: 18px; margin-top: 28px; padding: 26px 24px 24px; background: #fff; border-radius: 18px;
  box-shadow: 0 2px 10px rgba(38, 63, 53, .08); scroll-margin-top: 96px;
}
.writer-ready-title { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 24px; line-height: 1.25; letter-spacing: -.02em; color: #263f35; text-wrap: balance; }
.writer-ready-text { max-width: 62ch; margin-top: 8px !important; color: #3d5548; line-height: 1.65; }
.writer-ready-points { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.writer-ready-points li { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; line-height: 1.5; color: #263f35; }
.writer-ready-icon { flex: none; margin-top: 1px; color: #326c63; }
.writer-ready-free { margin-top: 14px !important; font-size: 14px; color: var(--example-muted); }
.writer-short { margin-top: 18px !important; padding: 10px 14px; border-radius: 10px; background: #fbf1dc; color: #6b4510; font-size: 15px; line-height: 1.55; scroll-margin-top: 96px; }
.writer-preview { padding: 20px 22px; background: #fff; border-radius: 14px; border: 1px dashed #c8d6cf; }
.writer-preview-label { font-size: 13px; color: var(--example-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.writer-preview-text { margin-top: 8px; font-size: 17px; line-height: 1.75; white-space: pre-line; overflow-wrap: break-word; }

.writer-send { padding: 22px; background: #dcece3; border-radius: 14px; }
.writer-open { display: block; text-align: center; font-size: 17px; padding: 15px 20px; }
.writer-secondary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 14px; }
.writer-send-phone .writer-secondary { justify-content: center; }
.writer-how-title { margin-top: 20px !important; font-weight: 700; font-size: 15px; }
.writer-how { list-style: none; counter-reset: how; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.writer-how li { counter-increment: how; display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 15px; line-height: 1.55; color: #3d5548; }
.writer-how li::before {
  content: counter(how); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; color: #263f35; font-weight: 700; font-size: 13px;
}
.writer-send-desktop { display: none; grid-template-columns: 148px 1fr; gap: 24px; align-items: center; }
.writer-send-desktop img { display: block; width: 148px; height: 148px; border-radius: 10px; background: #fff; padding: 6px; }
.writer-send-desktop .writer-how-title { margin-top: 0 !important; }
.writer-desktop-text { margin-top: 6px !important; font-size: 15px; line-height: 1.6; color: #3d5548; }
.btn.is-copied { background: #326c63; }
.writer-copy-status:empty { display: none; }
.writer-copy-status { margin-top: 10px !important; font-size: 14px; line-height: 1.55; color: #7a4f10; }
.writer-no-app { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(38, 63, 53, .14); }
.writer-no-app p { font-size: 15px; line-height: 1.55; color: #3d5548; }
.writer-no-app .store-badges { margin-top: 12px; }
.writer-send-phone .writer-how { margin-bottom: 18px; }
.writer-send-phone .writer-how-title { margin-top: 0 !important; }

/* Ways in on the way down the page. */
.example-write { margin-top: 18px !important; }
.example-write a { font-weight: 600; text-underline-offset: 4px; }
.contents-writer {
  display: block; margin-top: 14px; padding: 10px 14px !important; border-radius: 10px;
  background: #dcece3; color: #263f35; font-weight: 600;
}
.writer-teaser {
  margin: 0 0 8px; padding: 26px 28px 24px; background: #f4f1ea; border-radius: 18px;
  border-top: 1px solid transparent;
}
.writer-teaser-title { display: block; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 21px; letter-spacing: -.01em; }
.writer-teaser-text { margin-top: 6px !important; color: var(--example-muted); line-height: 1.6; }
.writer-teaser textarea {
  display: block; width: 100%; min-height: 72px; margin: 14px 0 14px; padding: 12px 14px; resize: vertical;
  border: 1px solid #ddd8cc; border-radius: 10px; background: #fff; color: var(--example-ink);
  font: inherit; font-size: 17px; line-height: 1.6; caret-color: #326c63;
}
.writer-teaser textarea:focus { outline: none; border-color: #326c63; box-shadow: 0 0 0 3px rgba(50, 108, 99, .15); }
.examples-page a.writer-sticky {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 50;
  padding: 13px 22px; border-radius: 999px; background: #263f35; color: #fff; font-weight: 600;
  text-decoration: none; box-shadow: 0 6px 20px rgba(38, 63, 53, .25); white-space: nowrap;
  transform: translate(-50%, 140%); opacity: 0; visibility: hidden;
  transition: transform .25s ease, opacity .25s ease, visibility 0s linear .25s;
}
.examples-page a.writer-sticky.is-visible { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .25s ease, opacity .25s ease; }
.examples-page a.writer-sticky:hover { color: #fff; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .writer-sticky { transition: none; } }
@media (min-width: 901px) { .writer-sticky { display: none; } }

/* Text buttons are small; give them a finger-sized target on touch screens. */
@media (pointer: coarse) {
  .writer-skip, .writer-link-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; margin: 0 -6px; }
  .writer-q-head { align-items: center; }
  .writer-q.is-current .writer-q-head { min-height: 44px; }
  .writer-next { min-height: 44px; }
}

/* entry-writer.js picks one hand-over: the app link on Android and iOS,
   QR code, copy and email elsewhere. */
.entry-writer.is-desktop .writer-send-phone { display: none; }
.entry-writer.is-desktop .writer-send-desktop { display: grid; }

@media (max-width: 540px) {
  .entry-writer { margin-left: -20px; margin-right: -20px; padding: 28px 20px 24px; border-radius: 0; }
  .writer-teaser { margin-left: -20px; margin-right: -20px; padding: 24px 20px 20px; border-radius: 0; }
  .writer-send-desktop { grid-template-columns: 1fr; }
  .writer-result { margin-left: -6px; margin-right: -6px; padding: 22px 18px 18px; }
}
