/* //////////////////////////////////////////////////////////////////////////

   CSS Part IV

   //////////////////////////////////////////////////////////////////////////

   I. Ghost Cards
   |
   ├─ Customize
   └─ 1.Normalize

   //////////////////////////////////////////////////////////////////////////

   I. Ghost Cards

   ////////////////////////////////////////////////////////////////////////// */

/* Customize
   –––––––––––––––––––––––––––––––––––––––––––––––––––– */
[data-post-content] {
   /* Typography */
   --kg-font-family-body: var(--font-family-system);
   --kg-font-family-heading: var(--font-family-system);
   --kg-font-family-action: var(--font-family-button, var(--font-family-system));
   --kg-font-family-code: ui-monospace, monospace;
   --kg-font-size-heading-large: clamp(2.25rem, 1.293rem + 2.553vw, 3.75rem);
   --kg-font-size-heading: clamp(2rem, 1.362rem + 1.702vw, 3rem);
   --kg-font-size-subheading-large: clamp(1.5rem, 1.117rem + 1.021vw, 2.1rem);
   --kg-font-size-subheading: clamp(1.375rem, 1.215rem + .426vw, 1.625rem);
   --kg-font-size-action: clamp(1.25rem, 1.17rem + .213vw, 1.375rem);
   --kg-font-size-signup-control: clamp(1rem, .94rem + .2vw, 1.125rem);
   --kg-font-size-content: clamp(1.125rem, 1.045rem + .213vw, 1.25rem);
   --kg-font-size-status: 1rem;
   --kg-font-size-caption: var(--font-size-caption);
   --kg-font-weight-heading: var(--font-weight-regular);
   --kg-font-weight-action: var(--font-weight-regular);
   --kg-line-height-heading: 1.18;

   /* Color */
   --kg-color-text: var(--color-font);
   --kg-color-text-black: var(--color-font-black);
   --kg-color-background: transparent;
   --kg-background-hover-weight: 94%;
   --kg-color-background-hover: color-mix(in srgb, var(--kg-color-background) var(--kg-background-hover-weight), var(--kg-color-text));
   --kg-color-input-text: var(--color-font);
   --kg-color-input-background: var(--color-body);
   --kg-color-on-accent: var(--ghost-accent-contrast, var(--color-font-white));
   --kg-color-track: var(--color-border);
   --kg-color-toggle-icon: var(--v-color-border-content, var(--color-border));

   /* Border */
   --kg-border-surface: var(--v-border-content, var(--border-thin) var(--color-border));
   --kg-border-sponsored: var(--border-thin) var(--color-border);
   --kg-color-border: color-mix(in srgb, var(--color-font) 15%, transparent);
   --kg-border-control: none;
   --kg-border-radius: 0;
   --kg-border-radius-full: var(--kg-border-radius);
   --kg-border-radius-media: var(--kg-border-radius);
   --kg-border-radius-control: 9999px;
   --kg-box-shadow: none;

   /* Size */
   --kg-height-control: 3.5rem;
   --kg-height-signup-control: 3rem;
   --kg-width-banner-text: var(--width-regular);
   --kg-width-banner-text-full: var(--v-width-wide, var(--kg-width-banner-text));
   --kg-width-signup-input: 9rem;
   --kg-ratio-video: 16/9;

   /* Transition */
   --kg-transition-background: background-color .3s ease;

   /* Link */
   --kg-text-decoration-line-action: none;
   --kg-text-decoration-line-link: underline;
   --kg-text-decoration-thickness-link: clamp(var(--width-underline), .03em, 2px);
   --kg-text-underline-offset-link: .1em;

   /* Alignment */
   --kg-alignment-content: var(--v-alignment-content, center);

   /* Spacing */
   --kg-margin-inline-content: var(--v-margin-inline-content, auto);
   --kg-margin-subheading-large: clamp(1.5rem, 1.25rem + 1vw, 2rem);
   --kg-padding-signup-fields: 5px;
   --kg-padding-wide: var(--gap-grid);
   --kg-padding-block-header-wide: min(10vmax, calc(var(--gap-grid) * 4));
   --kg-padding-block-full: min(12vmax, calc(var(--gap-grid) * 4.5));
   --kg-padding-block-split-content-wide: var(--kg-padding-block-header-wide);

   /* State */
   --kg-opacity-muted: .7;
   --kg-opacity-caption: var(--opacity-caption, .72);
   --kg-opacity-placeholder: var(--opacity-placeholder);
   --kg-opacity-hover: .8;
}

[data-color-scheme="dark"] [data-post-content] {
   --kg-color-border: transparent;
}

@media (prefers-color-scheme: dark) {
   [data-color-scheme="auto"] [data-post-content] {
      --kg-color-border: transparent;
   }
}

[data-color-scheme="colorful"] [data-post-content] {
   --kg-background-hover-weight: 98%;
   --kg-opacity-muted: 1;
}

@media (prefers-reduced-motion: reduce) {
   [data-post-content] {
      --kg-transition-background: none;
   }
}

/* --------------------------------------------------------------------------
   1.Normalize
   -------------------------------------------------------------------------- */

/* Typography
   –––––––––––––––––––––––––––––––––––––––––––––––––––– */
/* Fix: Use the system family on editor cards without changing embedded provider markup. */
[data-post-content] .kg-card:not(.kg-embed-card),
[data-post-content] .kg-bookmark-content,
[data-post-content] .kg-file-card a.kg-file-card-container,
[data-post-content] .kg-product-card-container,
[data-post-content] .kg-video-player {
   font-family: var(--kg-font-family-body);
}

/* Fix: Keep card code and standalone code blocks in the system monospace family. */
[data-post-content] > pre,
[data-post-content] .kg-card:not(.kg-embed-card) :is(pre, code, kbd, samp) {
   font-family: var(--kg-font-family-code);
}

/* Fix: Replace Ghost’s card title fonts and weights with the theme heading style. */
[data-post-content] .kg-audio-title,
[data-post-content] .kg-bookmark-title,
[data-post-content] .kg-file-card-title,
[data-post-content] .kg-product-card .kg-product-card-title,
[data-post-content] .kg-toggle-card .kg-toggle-heading-text,
[data-post-content] :is(.kg-header-card.kg-v2, .kg-signup-card) :is(.kg-header-card-heading, .kg-header-card-subheading, .kg-signup-card-heading, .kg-signup-card-subheading) {
   font-family: var(--kg-font-family-heading);
   font-weight: var(--kg-font-weight-heading);
}

/* Fix: Replace Ghost’s card-specific action fonts with the theme action style. */
[data-post-content] .kg-button-card .kg-btn,
[data-post-content] .kg-cta-card .kg-cta-button,
[data-post-content] .kg-header-card.kg-v2 .kg-header-card-button,
[data-post-content] .kg-product-card .kg-product-card-button,
[data-post-content] .kg-signup-card .kg-signup-card-button {
   font-family: var(--kg-font-family-action);
   font-size: var(--kg-font-size-action);
   font-weight: var(--kg-font-weight-action);
   text-decoration-line: var(--kg-text-decoration-line-action);
}

/* Fix: Match the CTA sponsor label to the action font without changing its compact scale. */
[data-post-content] .kg-cta-sponsor-label {
   font-family: var(--kg-font-family-action);
}

/* Fix: Keep Header V2 and Signup headings aligned with the theme’s responsive type scale. */
[data-post-content] :is(.kg-header-card.kg-v2, .kg-signup-card) h2:is(.kg-header-card-heading, .kg-signup-card-heading) {
   font-size: var(--kg-font-size-heading);
   line-height: var(--kg-line-height-heading);
   max-width: min(100%, var(--kg-width-banner-text));
}

/* Fix: Replace Ghost’s fixed Header V2 and Signup subheading scale. */
[data-post-content] :is(.kg-header-card.kg-v2, .kg-signup-card) :is(.kg-header-card-subheading, .kg-signup-card-subheading) {
   font-size: var(--kg-font-size-subheading);
   max-width: min(100%, var(--kg-width-banner-text));
}

/* Fix: Give only non-split wide cards the theme’s large heading scale. */
[data-post-content] :is(.kg-header-card.kg-v2, .kg-signup-card).kg-width-full.kg-content-wide:not(.kg-layout-split) h2:is(.kg-header-card-heading, .kg-signup-card-heading) {
   font-size: var(--kg-font-size-heading-large);
}

/* Fix: Give only non-split wide cards the theme’s large subheading scale. */
[data-post-content] :is(.kg-header-card.kg-v2, .kg-signup-card).kg-width-full.kg-content-wide:not(.kg-layout-split) :is(.kg-header-card-subheading, .kg-signup-card-subheading) {
   font-size: var(--kg-font-size-subheading-large);
}

/* Fix: Let unsplit full banners use the article’s wide measure. */
[data-post-content] :is(.kg-header-card.kg-v2, .kg-signup-card).kg-width-full:not(.kg-layout-split) :is(.kg-header-card-heading, .kg-header-card-subheading, .kg-signup-card-heading, .kg-signup-card-subheading) {
   max-width: min(100%, var(--kg-width-banner-text-full));
}

/* Fix: Keep the non-split wide subheading rhythm configurable. */
[data-post-content] :is(.kg-header-card.kg-v2, .kg-signup-card).kg-width-full.kg-content-wide:not(.kg-layout-split) h2 + :is(.kg-header-card-subheading, .kg-signup-card-subheading) {
   margin-block-start: var(--kg-margin-subheading-large);
}

/* Fix: Match the Toggle heading to the action scale. */
[data-post-content] .kg-toggle-card .kg-toggle-heading-text {
   font-size: var(--kg-font-size-action);
}

/* Fix: Replace Ghost’s fixed Toggle content scale with the theme scale. */
[data-post-content] .kg-toggle-content {
   font-size: var(--kg-font-size-content);
}

/* Fix: Reserve the Toggle control width beside long headings. */
[data-post-content] .kg-toggle-card-icon {
   flex-shrink: 0;
}

/* Fix: Match the Toggle chevron to the border and give its stroke more weight. */
[data-post-content] .kg-toggle-heading svg {
   overflow: visible;
   width: 18px;
   color: var(--kg-color-toggle-icon);
}

/* Fix: Keep the larger chevron readable in both color schemes. */
[data-post-content] .kg-toggle-heading path {
   stroke-width: 2.25;
}

/* Fix: Replace Ghost’s fixed Signup feedback typography. */
[data-post-content] .kg-signup-card .kg-signup-card-form :is(.kg-signup-card-success, .kg-signup-card-error) {
   font-size: var(--kg-font-size-status);
   font-weight: var(--kg-font-weight-action);
}

/* Fix: Replace Ghost’s fixed Signup disclaimer treatment. */
[data-post-content] .kg-signup-card-disclaimer {
   font-size: var(--kg-font-size-caption);
   opacity: var(--kg-opacity-caption);
}

/* Fix: Use one muted treatment for secondary card metadata. */
[data-post-content] .kg-audio-time,
[data-post-content] .kg-bookmark-description,
[data-post-content] .kg-bookmark-metadata > :not(img),
[data-post-content] .kg-file-card-caption,
[data-post-content] .kg-file-card-filesize,
[data-post-content] .kg-product-card .kg-product-card-description :is(p, ol, ul) {
   opacity: var(--kg-opacity-muted);
}

/* Links
   –––––––––––––––––––––––––––––––––––––––––––––––––––– */
/* Fix: Keep inline links inside cards consistent with the theme underline style. */
[data-post-content] :is(.kg-callout-text, .kg-cta-text, .kg-header-card-subheading, .kg-product-card-description, .kg-signup-card-disclaimer, .kg-signup-card-subheading, .kg-toggle-content) a {
   text-decoration-line: var(--kg-text-decoration-line-link);
   text-decoration-thickness: var(--kg-text-decoration-thickness-link);
   text-underline-offset: var(--kg-text-underline-offset-link);
}

/* Fix: Animate theme-aware background changes on linked card surfaces. */
[data-post-content] .kg-bookmark-card .kg-bookmark-container,
[data-post-content] .kg-file-card .kg-file-card-container {
   transition: var(--kg-transition-background);
}

/* Fix: Use the theme’s shared hover response for card actions. */
[data-post-content] .kg-button-card .kg-btn:hover,
[data-post-content] .kg-cta-card .kg-cta-button:hover,
[data-post-content] .kg-header-card.kg-v2 .kg-header-card-button:hover,
[data-post-content] .kg-product-card .kg-product-card-button:hover,
[data-post-content] .kg-signup-card .kg-signup-card-button:hover {
   text-decoration-line: var(--kg-text-decoration-line-action);
   opacity: var(--kg-opacity-hover);
}

/* Surface
   –––––––––––––––––––––––––––––––––––––––––––––––––––– */
/* Fix: Replace hard-coded Ghost card surfaces, borders, shadows, and text colors. */
[data-post-content] .kg-audio-card,
[data-post-content] .kg-bookmark-card a.kg-bookmark-container,
[data-post-content] .kg-file-card a.kg-file-card-container,
[data-post-content] .kg-product-card-container,
[data-post-content] .kg-toggle-card {
   box-shadow: var(--kg-box-shadow);
   color: var(--kg-color-text);
   border: var(--kg-border-surface);
   background-color: var(--kg-color-background);
}

/* Fix: Map Ghost’s white Callout and CTA variants to the theme surface. */
[data-post-content] :is(.kg-callout-card-white, .kg-cta-bg-white) {
   box-shadow: var(--kg-box-shadow);
   border: var(--kg-border-surface);
   background-color: var(--kg-color-background);
}

/* Fix: Keep the Sponsored card outline on its existing palette role. */
[data-post-content] .kg-cta-bg-white {
   border: var(--kg-border-sponsored);
}

/* Fix: Map the serialized neutral black to the theme’s fixed dark ink. */
[data-post-content] .kg-header-card.kg-v2 :is(.kg-header-card-heading, .kg-header-card-subheading)[data-text-color="#000000" i],
[data-post-content] .kg-header-card.kg-v2 .kg-header-card-button:not(.kg-style-accent)[data-button-text-color="#000000" i],
[data-post-content] .kg-signup-card :is(.kg-signup-card-heading, .kg-signup-card-subheading, .kg-signup-card-disclaimer, .kg-signup-card-success, .kg-signup-card-error)[style="color: #000000;" i] {
   color: var(--kg-color-text-black) !important;
}

/* Fix: Theme existing outer dividers without overriding the Sponsored label separator. */
[data-post-content] .kg-cta-bg-none .kg-cta-content,
[data-post-content] .kg-cta-bg-none:not(.kg-cta-no-dividers) .kg-cta-content:not(.kg-cta-sponsor-label-wrapper + .kg-cta-content) {
   border-color: var(--kg-color-border);
}

/* Fix: Give the theme-aware Transistor placeholder the same surface as other cards. */
[data-post-content] .kg-transistor-placeholder {
   border: var(--kg-border-surface);
   background-color: var(--kg-color-background);
}

/* Fix: Give linked cards a theme-aware hover surface. */
[data-post-content] .kg-bookmark-card a.kg-bookmark-container:hover,
[data-post-content] .kg-file-card a.kg-file-card-container:hover {
   color: var(--kg-color-text);
   border: var(--kg-border-surface);
   background-color: var(--kg-color-background-hover);
}

/* Fix: Replace Ghost’s fixed white Signup field surface. */
[data-post-content] .kg-signup-card .kg-signup-card-fields {
   background-color: var(--kg-color-input-background);
}

/* Fix: Use readable field ink while letting Ghost wrap the controls. */
[data-post-content] .kg-signup-card .kg-signup-card-input {
   line-height: 1.2;
   flex: 1 1 var(--kg-width-signup-input);
   min-width: 0;
   height: auto;
   margin: 0;
   padding-block: .4em;
   color: var(--kg-color-input-text);
   background-color: transparent;
}

/* Fix: Keep the Signup controls compact independently of the card's type scale. */
[data-post-content] .kg-signup-card :is(.kg-signup-card-input, .kg-signup-card-button) {
   font-size: var(--kg-font-size-signup-control);
   min-height: var(--kg-height-signup-control);
}

/* Fix: Use the field ink for the placeholder in the active theme scheme. */
[data-post-content] .kg-signup-card .kg-signup-card-input::placeholder {
   opacity: var(--kg-opacity-placeholder);
   color: var(--kg-color-input-text);
}

/* Border & radius
   –––––––––––––––––––––––––––––––––––––––––––––––––––– */
/* Fix: Replace inconsistent Ghost control borders and radii with theme controls. */
[data-post-content] .kg-button-card .kg-btn,
[data-post-content] .kg-cta-card .kg-cta-button,
[data-post-content] .kg-header-card.kg-v2 .kg-header-card-button,
[data-post-content] .kg-product-card .kg-product-card-button,
[data-post-content] .kg-signup-card .kg-signup-card-button {
   border: var(--kg-border-control);
   border-radius: var(--kg-border-radius-control);
}

/* Fix: Use the Signup fields background as the normal boundary. */
[data-post-content] .kg-signup-card-form:not(.error) .kg-signup-card-fields {
   border: none;
}

/* Fix: Keep the Signup field radius aligned with the shared control radius. */
[data-post-content] .kg-signup-card-fields,
[data-post-content] .kg-signup-card-input {
   border-radius: var(--kg-border-radius-control);
}

/* Fix: Replace inconsistent Ghost card and primary media radii with the theme radius. */
[data-post-content] :is(.kg-audio-card, .kg-callout-card, .kg-cta-card, .kg-toggle-card),
[data-post-content] :is(.kg-header-card, .kg-signup-card),
[data-post-content] .kg-bookmark-card a.kg-bookmark-container,
[data-post-content] .kg-file-card a.kg-file-card-container,
[data-post-content] .kg-product-card-container,
[data-post-content] .kg-transistor-placeholder,
[data-post-content] .kg-video-container,
[data-post-content] :is(.kg-image-card, .kg-gallery-card) img {
   border-radius: var(--kg-border-radius);
}

/* Fix: Give every full-width card root an independently configurable radius. */
[data-post-content] .kg-card.kg-width-full {
   border-radius: var(--kg-border-radius-full);
}

/* Fix: Apply the full-width radius to Image and Video media instead of only their figure wrappers. */
[data-post-content] .kg-image-card.kg-width-full img,
[data-post-content] .kg-video-card.kg-width-full .kg-video-container {
   border-radius: var(--kg-border-radius-full);
}

/* Fix: Remove the lower corners when a non-Video full-width card begins a connected stack. */
[data-post-content] > .kg-card.kg-width-full:not(.kg-card-hascaption, .kg-video-card):has(+ .kg-card.kg-width-full:not(.kg-video-card)),
[data-post-content] > .kg-image-card.kg-width-full:not(.kg-card-hascaption):has(+ .kg-card.kg-width-full:not(.kg-video-card)) img {
   border-end-start-radius: 0;
   border-end-end-radius: 0;
}

/* Fix: Remove the upper corners when a non-Video full-width card continues a connected stack. */
[data-post-content] > .kg-card.kg-width-full:not(.kg-card-hascaption, .kg-video-card) + .kg-card.kg-width-full:not(.kg-video-card),
[data-post-content] > .kg-card.kg-width-full:not(.kg-card-hascaption, .kg-video-card) + .kg-image-card.kg-width-full img {
   border-start-start-radius: 0;
   border-start-end-radius: 0;
}

/* Fix: Clip only cards whose media must follow the outer card radius. */
[data-post-content] :is(.kg-header-card, .kg-signup-card),
[data-post-content] .kg-bookmark-card .kg-bookmark-container,
[data-post-content] .kg-video-container {
   overflow: hidden;
}

/* Fix: Leave room for Ghost’s absolutely positioned Signup error message. */
[data-post-content] .kg-signup-card:has(.kg-signup-card-form.error) {
   overflow: visible;
}

/* Fix: Round the full background even while the Signup error is visible. */
[data-post-content] .kg-signup-card > picture,
[data-post-content] .kg-signup-card > picture > .kg-signup-card-image {
   border-radius: inherit;
}

/* Fix: Use the theme radius for compact card media. */
[data-post-content] .kg-audio-thumbnail,
[data-post-content] .kg-bookmark-thumbnail img,
[data-post-content] .kg-cta-image-container img,
[data-post-content] .kg-file-card-icon::before,
[data-post-content] .kg-product-card-image,
[data-post-content] .kg-transistor-icon {
   border-radius: var(--kg-border-radius-media);
}

/* Spacing
   –––––––––––––––––––––––––––––––––––––––––––––––––––– */
/* Fix: Allow banner text and media to shrink into their split tracks. */
[data-post-content] .kg-layout-split :is(.kg-header-card-content, .kg-signup-card-content) > * {
   min-width: 0;
}

/* Fix: Give the Signup controls room to wrap without clipping the label. */
[data-post-content] .kg-signup-card .kg-signup-card-fields {
   flex-wrap: wrap;
   gap: var(--kg-padding-signup-fields);
   padding: var(--kg-padding-signup-fields);
}

/* Fix: Let long Header and Signup labels wrap inside their available width. */
[data-post-content] .kg-header-card.kg-v2 .kg-header-card-button,
[data-post-content] .kg-signup-card .kg-signup-card-button {
   overflow-wrap: anywhere;
   justify-content: center;
   min-width: 0;
   max-width: 100%;
   height: auto;
   padding-block: .45em;
   white-space: normal;
}

/* Fix: Inset full-width banner text and contained split layouts. */
[data-post-content] :is(.kg-header-card.kg-v2, .kg-signup-card).kg-width-full:not(.kg-layout-split) :is(.kg-header-card-text, .kg-signup-card-text),
[data-post-content] :is(.kg-header-card.kg-v2, .kg-signup-card).kg-layout-split.kg-content-wide :is(.kg-header-card-text, .kg-signup-card-text) {
   padding-inline: var(--kg-padding-wide);
}

/* Accent
   –––––––––––––––––––––––––––––––––––––––––––––––––––– */
/* Fix: Use the computed accent contrast only where Ghost has no author text-color control. */
[data-post-content] .kg-button-card .kg-btn-accent,
[data-post-content] .kg-product-card .kg-product-card-btn-accent,
[data-post-content] .kg-callout-card.kg-callout-card-accent {
   color: var(--kg-color-on-accent);
}

/* Fix: Recompute the saved text color for buttons using the publication accent. */
[data-post-content] .kg-header-card.kg-v2 a.kg-header-card-button.kg-style-accent,
[data-post-content] .kg-cta-card a.kg-cta-button.kg-style-accent {
   color: var(--kg-color-on-accent) !important;
}

/* Fix: Use the theme contrast for the currently visible accent Signup button label. */
[data-post-content] .kg-signup-card .kg-signup-card-form:not(.loading) .kg-signup-card-button.kg-style-accent > .kg-signup-card-button-default,
[data-post-content] .kg-signup-card .kg-signup-card-form.loading .kg-signup-card-button.kg-style-accent > .kg-signup-card-button-loading {
   color: var(--kg-color-on-accent);
}

/* Fix: Keep links legible on the accent Callout without forcing a new color. */
[data-post-content] .kg-callout-card.kg-callout-card-accent a {
   color: inherit;
}

/* Fix: Keep the Audio placeholder icon legible on the Ghost accent surface. */
[data-post-content] .kg-audio-thumbnail.placeholder svg {
   fill: var(--kg-color-on-accent);
}

/* Focus
   –––––––––––––––––––––––––––––––––––––––––––––––––––– */
/* Fix: Use the browser focus ring on cards with editor-selected surfaces. */
[data-post-content] .kg-card:not(.kg-embed-card) :is(a, button, input, select, textarea):focus-visible {
   outline: revert;
}

/* Alignment
   –––––––––––––––––––––––––––––––––––––––––––––––––––– */
/* Fix: Follow the article layout for embeds without an author-controlled alignment. */
[data-post-content] .kg-embed-card {
   display: grid;
   justify-items: var(--kg-alignment-content);
}

/* Fix: Follow the article layout for Product cards with constrained inner surfaces. */
[data-post-content] .kg-product-card {
   align-items: var(--kg-alignment-content);
}

/* Fix: Follow the article layout for the Transistor player without changing its iframe contract. */
[data-post-content] .kg-transistor-card {
   justify-content: var(--kg-alignment-content);
}

/* Fix: Align intrinsic Image media and provider-generated Embed content with the article layout. */
[data-post-content] .kg-image-card img,
[data-post-content] .kg-embed-card > div > * {
   margin-inline: var(--kg-margin-inline-content);
}

/* Fix: Resize configured video embeds with their declared proportions. */
[data-post-content] iframe[data-fluid-video] {
   aspect-ratio: var(--kg-ratio-video);
   width: 100%;
   height: auto;
}

/* Audio
   –––––––––––––––––––––––––––––––––––––––––––––––––––– */
/* Fix: Replace Ghost’s hard-coded audio icon and control colors. */
[data-post-content] .kg-audio-card svg {
   fill: var(--kg-color-text);
}

/* Fix: Replace Ghost’s fixed Audio time and playback-rate text colors. */
[data-post-content] .kg-audio-time,
[data-post-content] .kg-audio-playback-rate {
   color: var(--kg-color-text);
}

/* Fix: Keep the unplayed Audio track visible on the theme surface. */
[data-post-content] .kg-audio-card input[type="range"]::-webkit-slider-runnable-track {
   background-color: var(--kg-color-track);
}

/* Fix: Use the same Audio track color in Firefox. */
[data-post-content] .kg-audio-card input[type="range"]::-moz-range-track {
   background-color: var(--kg-color-track);
}

/* Fix: Give the Audio controls room alongside the thumbnail on narrow layouts. */
[data-post-content] .kg-audio-card .kg-audio-thumbnail {
   align-self: center;
   flex-shrink: 0;
   width: min(80px, 20%);
   min-width: 0;
}

/* Fix: Let the player column shrink instead of widening the card. */
[data-post-content] .kg-audio-card .kg-audio-player-container {
   min-width: 0;
}

/* RWD — Normalize
   –––––––––––––––––––––––––––––––––––––––––––––––––––– */
@media (min-width:769px) {
   /* Fix: Decouple Header control height from Ghost’s inconsistent local em sizing. */
   [data-post-content] .kg-header-card.kg-v2 .kg-header-card-button {
      min-height: var(--kg-height-control);
   }

   /* Fix: Scale Ghost’s oversized wide Header block inset with the selected site width. */
   [data-post-content] .kg-header-card.kg-v2.kg-width-wide .kg-header-card-text {
      padding-block: var(--kg-padding-block-header-wide);
   }

   /* Fix: Scale Ghost’s oversized full and split card block inset with the selected site width. */
   [data-post-content] :is(.kg-header-card.kg-v2, .kg-signup-card).kg-width-full :is(.kg-header-card-text, .kg-signup-card-text) {
      padding-block: var(--kg-padding-block-full);
   }

   /* Fix: Keep content-wide split cards proportional to their text column. */
   [data-post-content] :is(.kg-header-card.kg-v2, .kg-signup-card).kg-layout-split.kg-content-wide :is(.kg-header-card-text, .kg-signup-card-text) {
      padding-block: var(--kg-padding-block-split-content-wide);
   }
}
