/* ==========================================================================
   Heirloom: a Hugo theme for hand embroidery.
   Idea: the whole site is a piece of linen. Every border is a running stitch,
   every rule is thread, and the home page opens with a hoop being sewn.
   ========================================================================== */

:root {
  /* Fabric and paper */
  --ground: #d6dccb;          /* washed celadon linen */
  --ground-deep: #c3cbb4;
  --paper: #f5f0e2;           /* pattern-leaflet paper */
  --linen: #efe9d6;
  /* Ink and thread */
  --ink: #2a1d2e;             /* aubergine ink */
  --ink-soft: #5b4b5f;
  --red: #b0262f;             /* Turkey red, as in redwork */
  --red-deep: #8c1c24;
  --pink: #d4799a;            /* madder pink */
  --mustard: #d49a1a;
  --teal: #2a6b72;
  --teal-deep: #1c4a50;
  --wood: #9b6b3f;
  --wood-deep: #6e4624;
  --wood-hi: #cfa46c;
  --kraft: #e9cf92;

  --f-display: "IM Fell English", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-body: "Alegreya Sans", "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  --f-hand: "La Belle Aurore", "Segoe Script", "Bradley Hand", cursive;

  --measure: 40rem;
  --wide: 70rem;
  --gutter: clamp(1.1rem, 4vw, 2rem);
  --gap: clamp(1rem, 2.6vw, 1.75rem);

  --ricrac: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12'%3E%3Cpath d='M0 6L6 1.5L18 10.5L24 6' fill='none' stroke='%23b0262f' stroke-width='3.4'/%3E%3Cpath d='M0 6L6 10.5L18 1.5L24 6' fill='none' stroke='%232a6b72' stroke-width='3.4'/%3E%3C/svg%3E");
  --weave: repeating-linear-gradient(0deg, rgba(42, 29, 46, .018) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, rgba(42, 29, 46, .014) 0 1px, transparent 1px 8px);
  --weave-light: repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .014) 0 1px, transparent 1px 8px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--ground);
  /* A soft, low-frequency weave avoids scroll-time moiré and banding. */
  background-image: var(--weave);
  font-family: var(--f-body);
  font-size: 1.2rem;
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: clip;
}
main { flex: 1 0 auto; }

img, svg, video { max-width: 100%; height: auto; }
a { color: var(--red-deep); text-decoration-thickness: 2px; text-underline-offset: .22em; }
a:hover { color: var(--red); text-decoration-style: solid; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 99; }
.skip:focus { left: 0; }

.container { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; }
.container--prose { width: min(100% - 2 * var(--gutter), var(--measure)); }

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 400; line-height: 1.12; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); font-style: italic; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.35rem); font-style: italic; }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }

.hand { font-family: var(--f-hand); color: var(--red); font-size: 1.15rem; line-height: 1.2; }

/* --------------------------------------------------------------------------
   Trims
   -------------------------------------------------------------------------- */
.ricrac { height: 12px; background: var(--ricrac) repeat-x center; }

/* A running stitch used as a divider or a heading rule */
.stitchrule { border: 0; border-top: 3px dashed rgba(176, 38, 47, .75); margin: 2.5rem 0; }

/* A patch of paper with a running stitch sewn just inside the edge */
.patch {
  position: relative;
  background: var(--paper);
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(42, 29, 46, .12), 0 14px 22px -16px rgba(42, 29, 46, .6);
}
.patch::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px dashed var(--red);
  border-radius: 2px;
  opacity: .7;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */
.masthead { padding-top: 1rem; }
.masthead__in {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: .75rem 2rem;
  padding-bottom: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__icon { width: 2.8rem; height: 2.8rem; flex: none; }
.brand__name { font-family: var(--f-display); font-style: italic; font-size: 1.9rem; line-height: 1; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.7rem; }
.nav a { color: var(--ink); text-decoration: underline dashed var(--red) 2px; text-underline-offset: .3em; font-size: 1.2rem; }
.nav a:hover { text-decoration-style: solid; color: var(--red-deep); }
.nav a[aria-current="page"] { text-decoration-style: solid; font-weight: 700; }
.nav .nav__shop {
  position: relative;
  background: var(--kraft);
  padding: .1rem .9rem .1rem 1.55rem;
  text-decoration: none;
  font-weight: 700;
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%);
  transform: rotate(-2deg);
}
.nav .nav__shop::before {
  content: ""; position: absolute; left: 9px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px;
  border-radius: 50%; background: var(--ground); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .4);
}
.nav .nav__shop:hover { background: #f1dca6; }

/* --------------------------------------------------------------------------
   Hero and the hoop
   -------------------------------------------------------------------------- */
.hero {
  display: grid; gap: 1.5rem 3rem; align-items: center;
  padding-block: clamp(1.5rem, 5vw, 3.5rem) clamp(2rem, 6vw, 4rem);
}
@media (min-width: 52rem) { .hero { grid-template-columns: 1.1fr .9fr; } }
.hero__title { font-size: clamp(3rem, 9vw, 6.4rem); line-height: .95; margin-bottom: .25em; color: var(--red-deep); letter-spacing: -.01em; }
.hero__tagline { color: var(--red); font-size: 1.7rem; margin-bottom: 1rem; display: block; transform: rotate(-1.5deg); transform-origin: left; }
.hero__intro { max-width: 32rem; font-size: 1.3rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem 1.6rem; align-items: center; margin-top: 1.5rem; }
.hero__art { justify-self: center; width: min(100%, 27rem); filter: drop-shadow(0 18px 18px rgba(42, 29, 46, .28)); }

.hoop { display: block; width: 100%; height: auto; overflow: visible; }
.hoop-fabric { fill: var(--linen); }
.hoop-guide line { stroke: #7f95a8; stroke-width: 1; stroke-dasharray: 2 5; opacity: .5; }
.hoop-text { font-family: var(--f-hand); font-size: 21px; fill: var(--teal-deep); }
.wreath { fill: none; stroke: var(--red); stroke-width: 3.6; stroke-dasharray: 8 5; stroke-linecap: round; }
.leaf-body { fill: rgba(42, 107, 114, .2); stroke: var(--teal); stroke-width: 2.2; stroke-dasharray: 5 3; stroke-linecap: round; }
.leaf-vein { fill: none; stroke: var(--teal); stroke-width: 2; stroke-dasharray: 3 3; stroke-linecap: round; }
.berry { fill: var(--pink); }
.knot { fill: var(--mustard); }
.petal { stroke: var(--pink); stroke-width: 11; stroke-linecap: round; stroke-dasharray: 11 5; }
.petal--b { stroke: var(--mustard); stroke-width: 7; stroke-dasharray: none; }
.heart { fill: var(--red); }
.heart-ring { fill: none; stroke: var(--red-deep); stroke-width: 2; stroke-dasharray: 2 3; }
.hoop-shade { fill: none; stroke: rgba(42, 29, 46, .2); stroke-width: 6; }
.hoop-ring { fill: none; stroke: var(--wood); stroke-width: 18; }
.hoop-ring-hi { fill: none; stroke: var(--wood-hi); stroke-width: 3; opacity: .9; }
.hoop-ring-lo { fill: none; stroke: var(--wood-deep); stroke-width: 2; opacity: .55; }
.hoop-clamp rect { fill: var(--wood-deep); }
.hoop-clamp circle { fill: #c8a24f; stroke: #7d6020; stroke-width: 1.5; }
.hoop-clamp line { stroke: #7d6020; stroke-width: 2; }
.needle-body { fill: #dfe3e5; stroke: #8b959b; stroke-width: 1; }
.needle-eye { fill: var(--linen); stroke: #8b959b; stroke-width: .8; }
.needle { opacity: 0; }

/* Header icon */
.brand__icon .hoop-fabric { fill: var(--linen); }
.brand__icon .icon-petals line { stroke: var(--pink); stroke-width: 4; stroke-linecap: round; }
.brand__icon .hoop-ring { stroke: var(--wood); }
.brand__icon .icon-clamp { fill: var(--wood-deep); }

/* The one orchestrated moment: the wreath is sewn when the page opens. */
@media (prefers-reduced-motion: no-preference) {
  .hoop.is-animated .reveal { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sew-draw 3s cubic-bezier(.45, .1, .4, 1) .4s forwards; }
  .hoop.is-animated .leaf, .hoop.is-animated .berry, .hoop.is-animated .knot, .hoop.is-animated .petal {
    opacity: 0; animation: sew-pop .5s ease-out forwards; animation-delay: calc(.9s + var(--i) * .16s);
  }
  .hoop.is-animated .petal { animation-delay: calc(3.2s + var(--i) * .1s); }
  .hoop.is-animated .knot { animation-delay: calc(3.6s + var(--i) * .08s); }
  .hoop.is-animated .heart, .hoop.is-animated .heart-ring { opacity: 0; animation: sew-pop .5s ease-out 4.6s forwards; }
  .hoop.is-animated .needle {
    offset-path: path("M 100 200 A 100 100 0 0 1 300 200 A 100 100 0 0 1 100 200");
    offset-rotate: auto; offset-distance: 0%;
    animation: needle-run 3s cubic-bezier(.45, .1, .4, 1) .4s forwards;
  }
}
@keyframes sew-draw { to { stroke-dashoffset: 0; } }
@keyframes sew-pop { from { opacity: 0; } to { opacity: 1; } }
@keyframes needle-run {
  0% { opacity: 1; offset-distance: 0%; }
  96% { opacity: 1; }
  100% { opacity: 0; offset-distance: 100%; }
}

/* --------------------------------------------------------------------------
   Buttons and links
   -------------------------------------------------------------------------- */
.btn {
  position: relative; display: inline-block;
  padding: .55rem 1.5rem; background: var(--red); color: var(--paper);
  font-weight: 700; font-size: 1.15rem; text-decoration: none; border-radius: 3px;
  box-shadow: 0 6px 12px -8px rgba(42, 29, 46, .8);
}
.btn::before { content: ""; position: absolute; inset: 4px; border: 2px dashed rgba(245, 240, 226, .7); border-radius: 2px; pointer-events: none; }
.btn:hover { background: var(--red-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: none; }
.btn--ghost::before { border-color: var(--red); }
.btn--ghost:hover { background: rgba(176, 38, 47, .08); color: var(--ink); }

.textlink { font-family: var(--f-display); font-style: italic; font-size: 1.3rem; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding-block: clamp(2rem, 5vw, 3.5rem); }
.sec-head { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.1rem; margin-bottom: 1.6rem; }
.sec-head h2 { margin: 0; }
@media (max-width: 36rem) { .sec-head .rule { display: none; } .sec-head { justify-content: space-between; } }
.sec-head .rule { flex: 1; border-top: 3px dashed rgba(176, 38, 47, .7); min-width: 2rem; }
.sec-head a { white-space: nowrap; }

.cards { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
@media (min-width: 52rem) {
  .cards--lead { grid-template-columns: repeat(3, 1fr); }
  .cards--lead > :first-child { grid-column: span 3; display: grid; grid-template-columns: 17rem 1fr; align-items: center; }
  .cards--lead > :first-child .card__title { font-size: 2.2rem; }
}
@media (min-width: 52rem) and (max-width: 66rem) {
  .cards--lead > :first-child { grid-template-columns: 13rem 1fr; }
}

/* --------------------------------------------------------------------------
   Cards: journal
   -------------------------------------------------------------------------- */
.card { padding: 1.9rem 1.7rem 1.7rem; display: flex; flex-direction: column; gap: 1rem; }
.card__thumb {
  display: block; width: min(100%, 11rem); aspect-ratio: 1; margin-inline: auto;
  border-radius: 50%; overflow: hidden; background: var(--fabric, var(--linen));
  border: 8px solid var(--wood);
  box-shadow: inset 0 0 0 2px var(--wood-deep), 0 0 0 2px var(--wood-hi), inset 0 6px 14px rgba(42, 29, 46, .3);
}
.card__thumb img, .card__thumb svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__body { display: flex; flex-direction: column; flex: 1; }
.card__date { display: block; margin-bottom: .2rem; transform: rotate(-1.5deg); transform-origin: left; }
.card__title { font-size: 1.65rem; margin-bottom: .35rem; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card:hover .card__title a { color: var(--red-deep); text-decoration: underline dashed var(--red) 2px; text-underline-offset: .2em; }
.card:focus-within { outline: 3px solid var(--teal); outline-offset: 3px; }
.card__title a:focus-visible { outline: none; }
.card__summary { margin: 0; color: var(--ink-soft); font-size: 1.1rem; line-height: 1.5; }

/* Fabrics and threads for generated motifs */
.fabric-0 { --fabric: #f1ede0; --th1: var(--pink); --th2: var(--mustard); --th3: var(--red); }
.fabric-1 { --fabric: #f2d6dc; --th1: var(--red); --th2: var(--teal); --th3: var(--mustard); }
.fabric-2 { --fabric: #d4e3e5; --th1: var(--teal-deep); --th2: var(--pink); --th3: var(--red); }
.fabric-3 { --fabric: #f3e3b1; --th1: var(--red-deep); --th2: var(--teal); --th3: var(--pink); }
.motif { display: block; width: 100%; height: 100%; }
.motif .th1 { stroke: var(--th1); fill: none; }
.motif .th2 { stroke: var(--th2); fill: none; }
.motif .th3 { stroke: var(--th3); fill: none; }
.motif .thick { stroke-width: 11; stroke-linecap: round; stroke-dasharray: 14 6; }
.motif .thin { stroke-width: 6; stroke-dasharray: none; }
.motif .run { stroke-width: 3.4; stroke-dasharray: 7 5; stroke-linecap: round; }
.motif .leafy { fill: var(--th1); fill-opacity: .22; stroke-width: 3; stroke-dasharray: 6 4; stroke-linecap: round; }
.motif .xs { stroke-width: 4; stroke-linecap: round; }
.motif .fill-th2 { fill: var(--th2); }
.motif .fill-th3 { fill: var(--th3); }

/* --------------------------------------------------------------------------
   Video: a darker length of cloth
   -------------------------------------------------------------------------- */
.band {
  background-color: var(--teal-deep); color: var(--paper);
  background-image: var(--weave-light);
  position: relative;
}
.band::before, .band::after { content: ""; display: block; height: 12px; background: var(--ricrac) repeat-x center; }
.band .sec-head .rule { border-top-color: rgba(245, 240, 226, .55); }
.band h2 { color: var(--paper); }
.band a:not(.btn):not(.vcard__link) { color: var(--kraft); }

.vcards { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); }
.vcard { padding: 1rem 1rem 1.3rem; color: var(--ink); }
.vcard__thumb {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 2px;
  background: var(--fabric, var(--linen)); margin-bottom: .9rem;
}
.vcard__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vcard__thumb .motif { width: 100%; height: 100%; }
.vcard__thumb .motif { transform: scale(1.5); }
.spool {
  position: absolute; left: 50%; top: 50%; width: 4.2rem; height: 4.2rem; margin: -2.1rem 0 0 -2.1rem;
  border-radius: 50%; border: 5px solid var(--wood);
  background: repeating-linear-gradient(0deg, var(--red) 0 4px, var(--red-deep) 4px 8px);
  box-shadow: 0 8px 14px -6px rgba(0, 0, 0, .6), inset 0 0 0 2px var(--wood-deep);
  display: grid; place-items: center;
}
.spool::before {
  content: ""; margin-left: .3rem;
  border-style: solid; border-width: .72rem 0 .72rem 1.15rem; border-color: transparent transparent transparent var(--paper);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5));
}
.vcard__title { font-size: 1.5rem; margin: 0 0 .25rem; }
.vcard__link { color: var(--ink); text-decoration: none; }
.vcard__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.vcard:hover .vcard__link { color: var(--red-deep); text-decoration: underline dashed var(--red) 2px; text-underline-offset: .2em; }
.vcard:focus-within { outline: 3px solid var(--kraft); outline-offset: 3px; }
.vcard__link:focus-visible { outline: none; }
.vcard__meta { margin: 0; color: var(--ink-soft); font-size: 1.05rem; }
.vcard__meta .hand { margin-right: .6rem; }

/* --------------------------------------------------------------------------
   Shop tag: a haberdashery label hanging from a thread
   -------------------------------------------------------------------------- */
.shop { display: grid; gap: 2rem 4rem; align-items: center; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
@media (min-width: 46rem) { .shop { grid-template-columns: auto 1fr; } }
.shoptag { position: relative; justify-self: center; padding-top: 4.2rem; transform: rotate(-3deg); transform-origin: 50% 0; }
.shoptag__string { position: absolute; left: 50%; top: -1.2rem; width: 6rem; margin-left: -3rem; height: 5.6rem; overflow: visible; }
.shoptag__string path { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; }
.shoptag__card {
  position: relative; width: 15rem; padding: 2.6rem 1.4rem 1.6rem; text-align: center;
  background: var(--kraft);
  background-image: var(--weave);
  clip-path: polygon(22px 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%, 0 22px);
  filter: drop-shadow(0 14px 12px rgba(42, 29, 46, .3));
}
.shoptag__card::before {
  content: ""; position: absolute; left: 50%; top: 14px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%;
  background: var(--ground); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .45), 0 0 0 3px rgba(176, 38, 47, .35);
}
.shoptag__card::after { content: ""; position: absolute; inset: 8px; border: 2px dashed rgba(176, 38, 47, .6); pointer-events: none; clip-path: inherit; }
.shoptag__name { font-family: var(--f-display); font-style: italic; font-size: 2.3rem; line-height: 1; display: block; color: var(--red-deep); }
.shoptag__price { display: block; margin-top: .5rem; font-size: 1.05rem; line-height: 1.3; }
.shop__copy h2 { margin-bottom: .4em; }
.shop__copy p { max-width: 30rem; font-size: 1.25rem; }

/* Inline version used at the end of posts and by the shortcode */
.shopnote { display: grid; gap: .9rem 1.6rem; align-items: center; padding: 1.6rem 1.8rem; margin-block: 2.5rem; }
@media (min-width: 38rem) { .shopnote { grid-template-columns: 1fr auto; } }
.shopnote__title { font-family: var(--f-display); font-style: italic; font-size: 1.6rem; margin: 0 0 .15rem; line-height: 1.15; }
.shopnote p { margin: 0; }

/* --------------------------------------------------------------------------
   Pages: list, single, prose
   -------------------------------------------------------------------------- */
.pagehead { padding-block: clamp(1.5rem, 5vw, 3rem) 1.5rem; }
.pagehead h1 { margin-bottom: .2em; color: var(--red-deep); }
.pagehead .lede { font-size: 1.35rem; max-width: 36rem; color: var(--ink-soft); }
.pagehead__rule { border: 0; border-top: 3px dashed rgba(176, 38, 47, .7); margin: 1.2rem 0 0; }
.listing { padding-bottom: 3rem; }
.listing .pagehead { padding-bottom: 0; }
.listing .cards, .listing .vcards { margin-top: 2rem; }

.post { padding-block: clamp(1.5rem, 5vw, 3rem) 3rem; }
@media (min-width: 46rem) {
  .post.container--prose { width: min(60vw, var(--wide)); }
}
.posthead { margin-bottom: 2rem; }
.posthead h1 { color: var(--red-deep); margin-bottom: .3em; }
.posthead__cover { margin: 0 0 1.5rem; }
.posthead__cover img { width: 100%; border-radius: 3px; display: block; }
.postmeta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1.2rem; margin: 0 0 .8rem; color: var(--ink-soft); font-size: 1.05rem; }
.postmeta .hand { font-size: 1.3rem; }

.tags { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tag {
  display: inline-block; padding: .05rem .8rem; border: 2px dashed var(--mustard); border-radius: 99px;
  color: var(--ink); text-decoration: none; font-size: 1rem; background: rgba(245, 240, 226, .6);
}
.tag:hover { background: var(--paper); border-color: var(--red); color: var(--ink); }
.tag small { color: var(--ink-soft); margin-left: .35rem; }

.prose { font-size: 1.25rem; line-height: 1.65; }
.prose > * + * { margin-top: 1.1em; margin-bottom: 0; }
.prose h2 { margin-top: 2em; color: var(--red-deep); }
.prose h3 { margin-top: 1.7em; font-style: italic; }
.prose a { text-decoration-style: dashed; }
.prose a:hover { text-decoration-style: solid; }
.prose ul, .prose ol { padding-left: 1.6rem; }
.prose li { margin-bottom: .35em; padding-left: .3rem; }
.prose ul li::marker { content: "\00D7\00A0"; color: var(--red); font-weight: 700; }
.prose ol li::marker { color: var(--red); font-family: var(--f-display); font-size: 1.15em; }
.post .prose > p:first-of-type::first-letter {
  font-family: var(--f-display); float: left; font-size: 4.9em; line-height: .78; padding: .07em .1em 0 0; color: var(--red);
}
.prose blockquote {
  margin-inline: 0; padding: 1.4rem 1.6rem; background: var(--paper); border: 2px dashed var(--mustard); border-radius: 3px;
  font-family: var(--f-display); font-style: italic; font-size: 1.45rem; line-height: 1.4;
}
.prose blockquote p { margin: 0; }
.prose blockquote p + p { margin-top: .8em; }
.prose hr { border: 0; border-top: 3px dashed rgba(176, 38, 47, .7); margin: 2.4rem 0; }
.prose code { font-size: .9em; background: rgba(245, 240, 226, .8); padding: .05em .35em; border-radius: 3px; }
.prose pre { background: var(--paper); padding: 1rem; overflow-x: auto; border-radius: 3px; border: 2px dashed var(--ground-deep); }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 1.1rem; }
.prose th, .prose td { text-align: left; padding: .5rem .6rem; border-bottom: 2px dashed var(--ground-deep); }
.prose th { font-family: var(--f-display); font-weight: 400; font-size: 1.2rem; }

/* Images become a patch of cloth with a hand-written caption */
.figure { display: block; margin-block: 1.8rem; padding: 1rem 1rem .8rem; background: var(--paper); border-radius: 3px; position: relative; box-shadow: 0 14px 22px -16px rgba(42, 29, 46, .6); }
.figure::before { content: ""; position: absolute; inset: 6px; border: 2px dashed var(--red); opacity: .55; pointer-events: none; border-radius: 2px; }
.figure img { display: block; width: 100%; border-radius: 2px; }
.figcaption { display: block; margin-top: .6rem; text-align: center; font-family: var(--f-hand); color: var(--red); font-size: 1.2rem; line-height: 1.3; }

/* Video embeds */
.embed { position: relative; background: var(--ink); border-radius: 3px; overflow: hidden; aspect-ratio: 16 / 9; box-shadow: 0 0 0 8px var(--paper), 0 0 0 10px var(--red), 0 18px 24px -14px rgba(42, 29, 46, .7); margin-block: 2.2rem; }
.embed iframe, .embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose .embed { margin-block: 2.4rem; }

.note { position: relative; margin-block: 1.8rem; padding: 1.1rem 1.4rem 1.1rem 3.6rem; background: var(--kraft); border-radius: 3px; font-size: 1.15rem; transform: rotate(-.6deg); box-shadow: 0 12px 18px -14px rgba(42, 29, 46, .7); }
.note::before { content: ""; position: absolute; left: 1.1rem; top: 1.3rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff 0 12%, #d4586a 13% 100%); box-shadow: 0 3px 4px rgba(0, 0, 0, .35); }
.note p { margin: 0; }
.note p + p { margin-top: .6em; }

.postnav { display: grid; gap: 1rem; margin-top: 3rem; }
@media (min-width: 38rem) { .postnav { grid-template-columns: 1fr 1fr; } }
.postnav a { display: block; padding: 1rem 1.2rem; text-decoration: none; color: var(--ink); }
.postnav a:hover { color: var(--red-deep); }
.postnav small { display: block; font-family: var(--f-hand); font-size: 1.15rem; color: var(--red); }
.postnav span { font-family: var(--f-display); font-style: italic; font-size: 1.3rem; line-height: 1.2; }
.postnav .next { text-align: right; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2.5rem; }
.pager .hand { font-size: 1.25rem; }

.termcloud { list-style: none; margin: 2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .8rem; }
.termcloud .tag { font-size: 1.25rem; padding: .2rem 1rem; }

.empty { padding: 2rem; text-align: center; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer { margin-top: 3rem; background: var(--ground-deep); }
.footer::before { content: ""; display: block; height: 12px; background: var(--ricrac) repeat-x center; }
.footer__in { display: grid; gap: 1.5rem 3rem; padding-block: 2.2rem 2.6rem; }
@media (min-width: 46rem) { .footer__in { grid-template-columns: 1.3fr 1fr; align-items: start; } }
.footer__brand { font-family: var(--f-display); font-style: italic; font-size: 1.6rem; margin: 0 0 .2rem; }
.footer p { margin: 0 0 .5rem; font-size: 1.1rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem 1.4rem; }
.footer a { color: var(--ink); text-decoration: underline dashed var(--red) 2px; text-underline-offset: .25em; }
.footer a:hover { text-decoration-style: solid; }
.footer .fine { color: var(--ink-soft); font-size: 1rem; }
.consent-settings { border: 0; padding: 0; background: none; color: var(--ink); font: inherit; font-size: inherit; text-decoration: underline dashed var(--red) 2px; text-underline-offset: .25em; cursor: pointer; }
.consent-settings:hover { text-decoration-style: solid; }

.consent {
  position: fixed;
  z-index: 100;
  inset: auto var(--gutter) var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  max-width: 60rem;
  margin-inline: auto;
  padding: 1.25rem 1.5rem;
  background: var(--paper);
  border: 2px dashed var(--red);
  border-radius: 3px;
  box-shadow: 0 8px 28px rgba(42, 29, 46, .25);
}
.consent[hidden] { display: none; }
.consent__copy { flex: 1 1 24rem; }
.consent h2 { margin: 0 0 .3rem; font-size: 1.5rem; }
.consent p { margin: 0; font-size: 1.05rem; }
.consent .consent__status:not(:empty) { margin-top: .5rem; color: var(--red-deep); }
.consent__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.consent__button { min-height: 2.75rem; padding: .45rem 1rem; border: 2px solid var(--red-deep); border-radius: 3px; background: var(--paper); color: var(--ink); font: inherit; font-size: 1rem; cursor: pointer; }
.consent__button--accept { background: var(--red-deep); color: var(--paper); }
.consent__button:hover { box-shadow: inset 0 0 0 2px currentColor; }
@media (max-width: 38rem) { .consent { padding: 1rem; } .consent__actions { width: 100%; } .consent__button { flex: 1; } }

.notfound { text-align: center; padding-block: 4rem; }
.notfound .hoop { width: min(100%, 14rem); margin: 0 auto 1.5rem; }

/* --------------------------------------------------------------------------
   Reduced motion / print
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .needle { display: none; }
}
@media print {
  body { background: #fff; }
  .masthead, .footer, .shopnote, .postnav, .band { display: none; }
  .patch::before, .figure::before { display: none; }
}
