/* Block editor options for notes. Loaded on notes and inside the post editor, so selectors don't rely on .note-prose. */

/* ---------- palette, gradients, sizes (match inc/note-blocks.php) ---------- */

.has-ink-color { color: #3c322c !important; }
.has-ink-soft-color { color: #544840 !important; }
.has-rose-color { color: #c24f68 !important; }
.has-pink-text-color { color: #d63c6f !important; }
.has-gold-text-color { color: #9a6c0c !important; }
.has-teal-text-color { color: #2a7f78 !important; }
.has-teal-ink-color { color: #246863 !important; }
.has-sage-text-color { color: #557040 !important; }
.has-pink-color { color: #f56f95 !important; }
.has-blush-color { color: #f8c5c2 !important; }
.has-blush-soft-color { color: #fdecea !important; }
.has-mustard-color { color: #e3b23c !important; }
.has-butter-color { color: #f8e7b4 !important; }
.has-teal-color { color: #5faea8 !important; }
.has-teal-soft-color { color: #e4f3f1 !important; }
.has-sage-color { color: #b8c9a3 !important; }
.has-sage-soft-color { color: #e6efe0 !important; }
.has-cream-color { color: #fbf7f1 !important; }
.has-paper-color { color: #fffdf9 !important; }

.has-ink-background-color { background-color: #3c322c !important; }
.has-ink-soft-background-color { background-color: #544840 !important; }
.has-rose-background-color { background-color: #c24f68 !important; }
.has-pink-text-background-color { background-color: #d63c6f !important; }
.has-gold-text-background-color { background-color: #9a6c0c !important; }
.has-teal-text-background-color { background-color: #2a7f78 !important; }
.has-teal-ink-background-color { background-color: #246863 !important; }
.has-sage-text-background-color { background-color: #557040 !important; }
.has-pink-background-color { background-color: #f56f95 !important; }
.has-blush-background-color { background-color: #f8c5c2 !important; }
.has-blush-soft-background-color { background-color: #fdecea !important; }
.has-mustard-background-color { background-color: #e3b23c !important; }
.has-butter-background-color { background-color: #f8e7b4 !important; }
.has-teal-background-color { background-color: #5faea8 !important; }
.has-teal-soft-background-color { background-color: #e4f3f1 !important; }
.has-sage-background-color { background-color: #b8c9a3 !important; }
.has-sage-soft-background-color { background-color: #e6efe0 !important; }
.has-cream-background-color { background-color: #fbf7f1 !important; }
.has-paper-background-color { background-color: #fffdf9 !important; }

.has-all-colors-gradient-background { background: linear-gradient(90deg, #f8c5c2 0%, #f56f95 28%, #e3b23c 55%, #5faea8 80%, #b8c9a3 100%) !important; }
.has-all-colors-deep-gradient-background { background: linear-gradient(90deg, #c24f68 0%, #d63c6f 28%, #9a6c0c 55%, #2a7f78 80%, #557040 100%) !important; }
.has-sunset-gradient-background { background: linear-gradient(118deg, #f8c5c2 0%, #f56f95 48%, #f6c7b4 100%) !important; }
.has-golden-gradient-background { background: linear-gradient(118deg, #f8e7b4 0%, #e3b23c 50%, #f8c5c2 100%) !important; }
.has-blush-wash-gradient-background { background: linear-gradient(165deg, #fff7f5 0%, #f8c5c2 78%) !important; }
.has-teal-wash-gradient-background { background: linear-gradient(165deg, #e4f3f1 0%, #b8c9a3 100%) !important; }

.has-small-font-size { font-size: 15px !important; }
.has-body-font-size { font-size: 18px !important; }
.has-large-font-size { font-size: 22px !important; }
.has-statement-font-size { font-size: 29px !important; line-height: 1.3; }
.has-huge-font-size { font-size: 38px !important; line-height: 1.15; }

.wp-block-image.aligncenter {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.wp-block-image.aligncenter > img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

p.has-background,
.wp-block-group.has-background {
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
}

/* ---------- paragraph: Subtitle ---------- */

p.is-style-subtitle {
  max-width: 34rem;
  margin-bottom: 2rem;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.3rem, 2.4vw, 1.55rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--teal-ink);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  p.is-style-subtitle > .note-subtitle__text {
    background: linear-gradient(90deg, #c24f68 0%, #d63c6f 28%, #9a6c0c 55%, #2a7f78 80%, #557040 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }

  p.is-style-subtitle > .note-subtitle__text::selection,
  p.is-style-subtitle > .note-subtitle__text *::selection {
    color: var(--ink);
    -webkit-text-fill-color: var(--ink);
    background: var(--blush);
  }
}

/* ---------- paragraph: Handwritten aside, Handwritten with arrow ---------- */

p.is-style-handwritten,
p.is-style-arrow-note {
  margin-top: 1.8rem;
  margin-bottom: 1.8rem;
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.7rem;
  line-height: 1.12;
  color: var(--ink);
  transform: rotate(-1.5deg);
  transform-origin: left center;
}

p.is-style-arrow-note {
  position: relative;
  max-width: 16rem;
  padding-left: 3.35rem;
  font-size: 1.6rem;
}

p.is-style-arrow-note::before {
  content: "";
  position: absolute;
  top: -0.15rem;
  left: 0;
  width: 3.1rem;
  height: 2.5rem;
  background: var(--pink-deep);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 86 70' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M74 58C50 62 32 34 16 12'/%3E%3Cpath d='M16 12l17 1.5M16 12l5.5 16'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 86 70' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M74 58C50 62 32 34 16 12'/%3E%3Cpath d='M16 12l17 1.5M16 12l5.5 16'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- paragraph: Big statement ---------- */

p.is-style-big-line {
  margin-top: 2.2rem;
  margin-bottom: 2.2rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.55rem, 3.4vw, 2.05rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink);
}

p.is-style-big-line strong {
  font-style: italic;
  font-weight: 600;
  padding: 0 0.12em;
  background: linear-gradient(transparent 58%, rgba(248, 197, 194, 0.85) 58%, rgba(248, 197, 194, 0.85) 92%, transparent 92%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- quote: Pull quote ---------- */

.wp-block-quote.is-style-pull-quote {
  max-width: none;
  margin: 2.6rem 0;
  padding: 1.5rem 0.5rem 1.3rem;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.6rem, 3.2vw, 2.15rem);
  line-height: 1.25;
  color: var(--ink);
}

.wp-block-quote.is-style-pull-quote::before {
  content: "“";
  display: block;
  margin-bottom: 0.1rem;
  color: var(--pink-deep);
  font-size: 3.4rem;
  line-height: 0.7;
}

.wp-block-quote.is-style-pull-quote p {
  margin: 0;
  color: var(--ink);
  font-size: inherit;
}

.wp-block-quote.is-style-pull-quote cite {
  display: block;
  margin-top: 0.9rem;
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-ink);
}

/* ---------- image: Polaroid, Paper-clipped ---------- */

.wp-block-image.is-style-polaroid {
  width: fit-content;
  max-width: min(20rem, 100%);
  margin-top: 2.4rem;
  margin-bottom: 2.4rem;
  padding: 0.6rem 0.6rem 2.3rem;
  background: #fff;
  border: 1px solid rgba(60, 50, 44, 0.08);
  border-radius: 0.15rem;
  box-shadow: 0 12px 26px rgba(60, 50, 44, 0.14), 0 2px 4px rgba(60, 50, 44, 0.06);
  transform: rotate(-2deg);
}

.wp-block-image.is-style-polaroid:has(figcaption) {
  padding-bottom: 0.55rem;
}

.wp-block-image.is-style-polaroid.aligncenter {
  margin-left: auto;
  margin-right: auto;
  transform: rotate(1.5deg);
}

.wp-block-image.is-style-polaroid img,
.wp-block-image.is-style-clipped img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}

.wp-block-image.is-style-polaroid figcaption,
.wp-block-image.is-style-clipped figcaption {
  margin: 0.55rem 0 0;
  text-align: center;
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.1;
  color: var(--ink);
}

.wp-block-image.is-style-clipped {
  position: relative;
  margin-top: 3rem;
  margin-bottom: 2.4rem;
  padding: 1.2rem 0.7rem 0.7rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.2rem;
  box-shadow: 0 14px 30px rgba(60, 50, 44, 0.12), 0 2px 4px rgba(60, 50, 44, 0.06);
  transform: rotate(0.8deg);
}

.wp-block-image.is-style-clipped::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -2.1rem;
  left: 2rem;
  width: 1.15rem;
  height: 3.6rem;
  background: var(--teal-ink);
  transform: rotate(-8deg);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 62'%3E%3Cpath d='M14 20v26a4 4 0 0 1-8 0V10a6 6 0 0 1 12 0v40a8 8 0 0 1-16 0V18' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 62'%3E%3Cpath d='M14 20v26a4 4 0 0 1-8 0V10a6 6 0 0 1 12 0v40a8 8 0 0 1-16 0V18' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Polaroid with handwritten arrow (pattern) */
.jac-snap {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  margin-top: 2.6rem;
  margin-bottom: 2.6rem;
}

.jac-snap > .wp-block-image.is-style-polaroid {
  flex: none;
  width: 12.5rem;
  margin: 0;
  transform: rotate(-3deg);
}

.jac-snap > p.is-style-arrow-note {
  margin: 0 0 3.6rem;
}

/* A loose row of small polaroids inside a note. The single polaroid, and the jac-snap pair, keep their own size and tilt. */
.wp-block-group.jac-polaroids {
  margin-top: 2.8rem;
  margin-bottom: 0.2rem;
}

.wp-block-group.jac-polaroids,
.wp-block-group.jac-polaroids > .wp-block-group__inner-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  column-gap: 0.85rem;
  row-gap: 1.35rem;
}

.wp-block-group.jac-polaroids > .wp-block-group__inner-container {
  width: 100%;
  margin: 0;
}

.jac-polaroids .wp-block-image.is-style-polaroid {
  flex: 0 0 auto;
  width: 8.35rem;
  max-width: calc(25% - 0.7rem);
  margin: 0;
  padding: 0.4rem 0.4rem 1.2rem;
}

.jac-polaroids .wp-block-image.is-style-polaroid:nth-child(4n+1) {
  transform: rotate(-2.2deg);
}

.jac-polaroids .wp-block-image.is-style-polaroid:nth-child(4n+2) {
  transform: rotate(1.7deg);
}

.jac-polaroids .wp-block-image.is-style-polaroid:nth-child(4n+3) {
  transform: rotate(-1.3deg);
}

.jac-polaroids .wp-block-image.is-style-polaroid:nth-child(4n) {
  transform: rotate(2.4deg);
}

/* ---------- group: Sticky note, Callout card ---------- */

.wp-block-group.is-style-sticky-note {
  position: relative;
  max-width: 22rem;
  margin-top: 2.6rem;
  margin-bottom: 2.6rem;
  padding: 1.5rem 1.4rem 1.25rem;
  background: #f8e7b4;
  box-shadow: 0 12px 24px rgba(60, 50, 44, 0.1);
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.18;
  color: var(--ink);
  transform: rotate(-1.5deg);
}

.wp-block-group.is-style-sticky-note p,
.wp-block-group.is-style-sticky-note li {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: var(--ink);
}

/* Classic themes wrap group contents in .wp-block-group__inner-container (front end and editor), so cover both. */
.wp-block-group:is(.is-style-sticky-note, .is-style-callout, .is-style-thought-bubble) > *,
.wp-block-group:is(.is-style-sticky-note, .is-style-callout, .is-style-thought-bubble) > .wp-block-group__inner-container > * {
  margin-top: 0;
  margin-bottom: 0;
}

.wp-block-group.is-style-sticky-note > * + *,
.wp-block-group.is-style-sticky-note > .wp-block-group__inner-container > * + * {
  margin-top: 0.45rem;
}

.wp-block-group.is-style-callout > * + *,
.wp-block-group.is-style-callout > .wp-block-group__inner-container > * + * {
  margin-top: 0.7rem;
}

.wp-block-group.is-style-thought-bubble > * + *,
.wp-block-group.is-style-thought-bubble > .wp-block-group__inner-container > * + * {
  margin-top: 0.9em;
}

.wp-block-group.is-style-callout > .wp-block-group__inner-container,
.wp-block-group.is-style-sticky-note > .wp-block-group__inner-container,
.wp-block-group.is-style-thought-bubble > .wp-block-group__inner-container {
  margin: 0;
}

/* Thought bubble: the Fairness note's speech bubbles, softened into a cloud with trailing dots. */
.wp-block-group.is-style-thought-bubble {
  position: relative;
  max-width: 36rem;
  margin-top: 2.6rem;
  margin-bottom: 3.6rem;
  padding: 1.35rem 1.6rem 1.4rem;
  background: var(--blush-soft);
  border: 1.5px solid rgba(60, 50, 44, 0.3);
  border-radius: 2.4rem 2.8rem 2.6rem 2.2rem / 2.1rem 2.4rem 2.8rem 2.5rem;
  box-shadow: 3px 3px 0 rgba(60, 50, 44, 0.05);
  font-size: 0.92em;
  line-height: 1.62;
  color: var(--ink-soft);
}

.wp-block-group.is-style-thought-bubble::before,
.wp-block-group.is-style-thought-bubble::after {
  content: "";
  position: absolute;
  background: var(--blush-soft);
  border: 1.5px solid rgba(60, 50, 44, 0.3);
  border-radius: 50%;
  box-shadow: 2px 2px 0 rgba(60, 50, 44, 0.05);
}

.wp-block-group.is-style-thought-bubble::before {
  left: 2.6rem;
  bottom: -1.25rem;
  width: 1.05rem;
  height: 0.95rem;
}

.wp-block-group.is-style-thought-bubble::after {
  left: 1.75rem;
  bottom: -2.15rem;
  width: 0.6rem;
  height: 0.55rem;
}

.wp-block-group.is-style-thought-bubble p,
.wp-block-group.is-style-thought-bubble li {
  font-size: inherit;
  line-height: inherit;
  color: var(--ink-soft);
}

.wp-block-group.is-style-thought-bubble :is(h2, h3, h4) {
  margin-top: 0;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.05;
  letter-spacing: 0;
  color: var(--pink-deep);
  transform: rotate(-1.5deg);
  transform-origin: left center;
}

.wp-block-group.is-style-callout {
  margin-top: 2.4rem;
  margin-bottom: 2.4rem;
  padding: 1.4rem 1.6rem;
  background: #e4f3f1;
  border-left: 4px solid #5faea8;
  border-radius: 0.2rem 0.9rem 0.9rem 0.2rem;
}

.wp-block-group.is-style-callout h2,
.wp-block-group.is-style-callout h3,
.wp-block-group.is-style-callout h4 {
  margin-top: 0;
  font-size: 1.3rem;
  color: var(--teal-ink);
}

/* ---------- list: Hearts, Checklist ---------- */

ul.is-style-hearts,
ul.is-style-checklist {
  list-style: none;
  padding-left: 0;
}

ul.is-style-hearts > li,
ul.is-style-checklist > li {
  position: relative;
  padding-left: 1.85rem;
}

ul.is-style-hearts > li::before {
  content: "♡";
  position: absolute;
  left: 0.1rem;
  top: 0;
  color: var(--pink-deep);
  font-size: 1.1em;
}

ul.is-style-hearts ul,
ul.is-style-checklist ul {
  margin-top: 0.45rem;
  padding-left: 1.1rem;
  list-style: disc;
}

ul.is-style-checklist > li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.32em;
  display: grid;
  place-items: center;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: #e4f3f1;
  color: var(--teal-ink);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

/* ---------- separator: ###, Sparkle ---------- */

hr.wp-block-separator.is-style-hashes,
hr.wp-block-separator.is-style-sparkle {
  width: 100%;
  max-width: none;
  height: auto;
  margin: 2.6rem auto;
  border: 0;
  background: none;
  opacity: 1;
  text-align: center;
  overflow: visible;
}

hr.wp-block-separator.is-style-hashes::before {
  content: "###";
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--ink);
}

hr.wp-block-separator.is-style-sparkle::before {
  content: "";
  display: block;
  width: 5.9rem;
  height: 1.15rem;
  margin: 0 auto;
  background: var(--mustard);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 26'%3E%3Cpath d='M20 0c1.2 8 4 11.5 12 13.2C24 14.8 21.2 18.2 20 26c-1.2-7.8-4-11.2-12-12.8C16 11.5 18.8 8 20 0z'/%3E%3C/svg%3E") 0 0 / 1.77rem 1.15rem space no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 26'%3E%3Cpath d='M20 0c1.2 8 4 11.5 12 13.2C24 14.8 21.2 18.2 20 26c-1.2-7.8-4-11.2-12-12.8C16 11.5 18.8 8 20 0z'/%3E%3C/svg%3E") 0 0 / 1.77rem 1.15rem space no-repeat;
}

@media (max-width: 719px) {
  .jac-snap {
    gap: 0.2rem;
  }

  .jac-snap > .wp-block-image.is-style-polaroid {
    width: 9.5rem;
    padding: 0.45rem 0.45rem 1.75rem;
  }

  .jac-snap > p.is-style-arrow-note {
    margin-bottom: 2.4rem;
    padding-left: 2.6rem;
    font-size: 1.35rem;
  }

  .jac-snap > p.is-style-arrow-note::before {
    width: 2.4rem;
    height: 2rem;
  }

  .wp-block-image.is-style-polaroid {
    max-width: min(16rem, 100%);
  }

  .wp-block-group.jac-polaroids,
  .wp-block-group.jac-polaroids > .wp-block-group__inner-container {
    column-gap: 0.6rem;
    row-gap: 1.15rem;
  }

  .jac-polaroids .wp-block-image.is-style-polaroid {
    width: min(9rem, calc(50% - 0.5rem));
    max-width: calc(50% - 0.5rem);
    padding: 0.32rem 0.32rem 1rem;
  }

  .wp-block-group.is-style-thought-bubble {
    padding: 1.15rem 1.2rem 1.2rem;
    border-radius: 1.9rem 2.2rem 2rem 1.7rem / 1.7rem 1.9rem 2.2rem 2rem;
  }

  .wp-block-group.is-style-thought-bubble :is(h2, h3, h4) {
    font-size: 1.4rem;
  }
}

/* ---------- Listen to this note (Substack-style, not downloadable) ---------- */
/*
  Convention: drop assets/audio/notes/<post-slug>.m4a in the theme,
  then paste the .note-listen HTML at the top of the note (or let the
  theme auto-prepend when the file exists for that slug).
*/

.note-listen {
  margin: 0 0 1.85rem;
  padding: 0.85rem 1rem 0.95rem;
  border: 1px solid rgba(60, 50, 44, 0.12);
  border-radius: 0.2rem;
  background:
    linear-gradient(180deg, rgba(253, 236, 234, 0.7) 0%, rgba(255, 253, 249, 0.35) 100%);
}

.note-listen__label {
  margin: 0 0 0.55rem;
  font-family: var(--font-sans, "Outfit", sans-serif);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pink-deep, #e45480);
}

.note-listen__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.note-listen__player {
  flex: 1 1 auto;
  min-width: 0;
}

.note-listen audio {
  display: block;
  width: 100%;
  height: 2.35rem;
  vertical-align: middle;
}

.note-listen__time {
  flex: none;
  font-family: var(--font-sans, "Outfit", sans-serif);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft, #544840);
  font-variant-numeric: tabular-nums;
}

/* Chrome / Edge: hide the overflow menu download control when supported. */
.note-listen audio::-webkit-media-controls-enclosure {
  overflow: hidden;
}

.note-listen audio::-webkit-media-controls-panel {
  background: transparent;
}

.note-listen audio::-internal-media-controls-download-button,
.note-listen audio::-webkit-media-controls-download-button {
  display: none !important;
}

@media (max-width: 519px) {
  .note-listen {
    padding: 0.75rem 0.8rem 0.85rem;
  }

  .note-listen__row {
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
  }

  .note-listen__time {
    margin-left: auto;
  }
}

@media print {
  .note-listen {
    display: none;
  }

  .wp-block-image.is-style-polaroid,
  .wp-block-image.is-style-clipped,
  .wp-block-group.is-style-sticky-note,
  p.is-style-handwritten,
  p.is-style-arrow-note {
    box-shadow: none;
    transform: none;
  }

  .jac-polaroids .wp-block-image.is-style-polaroid:nth-child(n) {
    transform: none;
  }

  p.is-style-subtitle > .note-subtitle__text {
    background: none;
    color: var(--teal-ink);
    -webkit-text-fill-color: var(--teal-ink);
  }
}
