/* Shared article media. Component-specific layout, type and state remain local. */
body.single-post .entry-content :is(.gk-rich-media, .gk-flow-lab, .gk-pressure-lab, .gk-bpm, .gk-kitchen, .gk-brewlab, .gk-run-comparison, #garmin-mcp-product, figure[role="group"]:has(.gk-flow-arrow)) {
  --wp--preset--color--brand-yellow: var(--wp--preset--color--brand-yellow-light);
  position: relative;
  box-sizing: border-box;
  background: var(--wp--preset--color--background) !important;
  border: 1px solid var(--wp--preset--color--border-light) !important;
  border-radius: 0 !important;
}

/* A second line sits inside the outer edge without changing layout or focus. */
body.single-post .entry-content :is(.gk-rich-media, .gk-flow-lab, .gk-pressure-lab, .gk-bpm, .gk-kitchen, .gk-brewlab, .gk-run-comparison, #garmin-mcp-product, figure[role="group"]:has(.gk-flow-arrow))::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--wp--preset--color--background);
  box-shadow: inset 0 0 0 1px var(--wp--preset--color--section-border-light);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wp--preset--color--section-border-light) 75%, var(--wp--preset--color--background));
  pointer-events: none;
}

/* The footer uses the same framed treatment while retaining the site's type. */
footer.wp-block-template-part .gk-footer-rich-media {
  position: relative;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(.5rem, 2vw, 1.5rem);
  min-width: 0;
  padding: clamp(.5rem, 2vw, 1rem);
  color: var(--wp--preset--color--text);
  background: var(--wp--preset--color--background);
  border: 1px solid var(--wp--preset--color--border-light);
  border-radius: 0;
  font-family: var(--wp--preset--font-family--ysabeau-office);
  font-size: clamp(.9375rem, .9rem + .15vw, 1rem);
  line-height: 1.3;
}

footer.wp-block-template-part .gk-footer-rich-media::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--wp--preset--color--background);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wp--preset--color--section-border-light) 75%, var(--wp--preset--color--background));
  pointer-events: none;
}

footer.wp-block-template-part .gk-footer-rich-media > nav.gk-footer-navigation {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  font: inherit;
}

footer.wp-block-template-part .gk-footer-rich-media .wp-block-navigation__container {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: .125rem .25rem;
  min-width: 0;
  width: 100%;
}

footer.wp-block-template-part .gk-footer-rich-media .wp-block-navigation-item {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
}

footer.wp-block-template-part .gk-footer-rich-media .wp-block-navigation-item__content {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: .375rem .4rem;
  color: var(--wp--preset--color--text);
  font: inherit;
  overflow-wrap: anywhere;
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

footer.wp-block-template-part .gk-footer-rich-media .wp-block-navigation-item__content:hover {
  color: var(--wp--preset--color--brand-yellow-light);
  text-decoration-line: underline;
}

footer.wp-block-template-part .gk-footer-rich-media .wp-block-navigation-item__content:focus-visible {
  outline: 2px solid var(--wp--preset--color--brand-yellow-light);
  outline-offset: 2px;
}

body.single.single-post .entry-content > :is(.gk-rich-media, .gk-flow-lab, .gk-pressure-lab, .gk-bpm, .gk-kitchen, .gk-brewlab, .gk-run-comparison, .gk-potato-steps, #garmin-mcp-product, figure[role="group"]:has(.gk-flow-arrow), figure.wp-block-image) {
  margin-block: clamp(4rem, 7vw, 5.5rem) !important;
}
body.single-post.postid-5164 .entry-content figure[role="group"]:has(.gk-flow-arrow) div[style*="border:1px"] {
  background: var(--wp--preset--color--background) !important;
  border-color: var(--wp--preset--color--section-border-light) !important;
}

body.single-post .entry-content #may-2026-running-records { padding: 12px !important; }
/* The recipe lab has its own compact scale; article prose remains unchanged. */
body.single-post .entry-content .gk-potato { font-size: 1rem; }
/* System-ui has a larger apparent size than the article face at the same px. */
body.single-post .entry-content .gk-potato-steps { font-size: 1.125rem; }
body.single-post .entry-content .gk-rich-media { padding: clamp(12px, 2vw, 20px); color: var(--wp--preset--color--text); }
body.single-post .entry-content .gk-rich-media__label { color: var(--wp--preset--color--brand-yellow-light); }
body.single-post .entry-content .gk-rich-media__stage { padding: 10px; border: 1px solid var(--wp--preset--color--section-border-light); background: var(--wp--preset--color--background); }
body.single-post .entry-content .gk-rich-media__flow { display: flex; align-items: stretch; gap: 8px; overflow-x: auto; padding-block: 4px; }
body.single-post .entry-content .gk-rich-media__flow > .gk-rich-media__stage { flex: 1 0 140px; }
body.single-post .entry-content .gk-rich-media__arrow { align-self: center; color: var(--wp--preset--color--brand-yellow-light); }
body.single-post .entry-content .gk-rich-media__flow:focus-visible { outline: 2px solid var(--wp--preset--color--brand-yellow-light); outline-offset: 2px; }
body.single-post .entry-content :is(.gk-flow-lab, .gk-pressure-lab, .gk-bpm, .gk-kitchen) :is(button, [class*="__stage"], [class*="__node"], [class*="__field"], [class*="__result"], [class*="__readout"], [class*="__recovery"]),
body.single-post .entry-content :is(.gk-run-comparison__row, .gk-run-comparison__recorded, .gk-brewlab__slider, .gk-brewlab__stat),
body.single-post.postid-5164 .entry-content > figure[role="group"] div,
body.single-post .entry-content #garmin-mcp-product a { border-radius: 0 !important; }

body.single-post .entry-content :is(.gk-flow-lab__stage, .gk-pressure-lab__readout, .gk-bpm__result, .gk-run-comparison__row, .gk-run-comparison__recorded, .gk-brewlab__slider, .gk-brewlab__stat) {
  background: var(--wp--preset--color--background);
  border-color: var(--wp--preset--color--section-border-light);
}
body.single-post .entry-content :is(.gk-kitchen__node, .gk-kitchen__recovery) {
  background: var(--wp--preset--color--background);
}

/* Preserve the Croffee meter's warning and alarm colours and glow. */
body.single-post .entry-content :is(#garmin-mcp-product, .gk-brewlab).is-warning { border-color: #9c7330 !important; }
body.single-post .entry-content :is(#garmin-mcp-product, .gk-brewlab).is-alarm { border-color: #df4e46 !important; }
body.single-post .entry-content :is(#garmin-mcp-product, .gk-brewlab).is-meltdown { border-color: #ff4138 !important; }

/* Apply one shared radial fade to site images, including header and sidebar images. */
body .wp-site-blocks img {
  -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 100%) !important;
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 100%) !important;
}
