/*
  Translated-language layout corrections.
  Loaded after the main stylesheet so Google Translate/proxy pages get readability-first alignment
  without changing the source English design.
*/

html.is-translated,
body.is-translated {
  overflow-x: clip;
}

body.is-translated {
  --translated-shell-width: min(100% - 48px, 1164px);
  --translated-reading-width: min(100%, 1164px);
  --translated-card-gap: clamp(18px, 2vw, 28px);
  --translated-title-size: clamp(2.25rem, 4.2vw, 3.35rem);
  --translated-heading-size: clamp(1.55rem, 2.55vw, 2.2rem);
  --translated-body-size: clamp(1rem, 1.14vw, 1.13rem);
  --translated-lead-size: clamp(1.04rem, 1.34vw, 1.24rem);
  word-spacing: normal;
  letter-spacing: 0;
}

body.is-translated main,
body.is-translated section,
body.is-translated article,
body.is-translated form {
  direction: inherit;
}

body.is-translated main :where(.shared-page-header, .section-heading, .adaptation-hero, .book-illustrations-heading) {
  width: var(--translated-shell-width) !important;
  max-width: var(--translated-shell-width) !important;
  margin-inline: auto !important;
}

body.is-translated main :where(.page-title, h1, h2, h3, h4):not(.open-book-title):not(.book-select-card strong) {
  max-width: var(--translated-shell-width) !important;
  margin-inline: auto !important;
  overflow-wrap: anywhere;
  line-height: 1.05 !important;
  letter-spacing: 0 !important;
  word-spacing: normal !important;
  text-wrap: balance;
}

body.is-translated main :where(.page-title, h1):not(.open-book-title) {
  font-size: var(--translated-title-size) !important;
}

body.is-translated main :where(h2, h3, h4):not(.open-book-title):not(.book-select-card strong) {
  font-size: var(--translated-heading-size) !important;
}

body.is-translated main :where(
  p:not(.book-progress):not(.series-label):not(.word-count),
  li,
  .characters-subtitle,
  .page-disclaimer,
  .section-intro,
  .hero-subtitle,
  .tagline,
  .hero-hook,
  .season-format,
  .book-copy p:not(.series-label):not(.word-count),
  .pitch-card p,
  .saga-overview p,
  .season-structure-box p,
  .rights-positioning p,
  .author-final-bio p,
  .author-miniatures-copy,
  .direct-inquiries
) {
  max-width: var(--translated-reading-width) !important;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
  font-size: var(--translated-body-size) !important;
  line-height: 1.62 !important;
  letter-spacing: 0 !important;
  word-spacing: normal !important;
}

body.is-translated main :where(.characters-subtitle, .page-disclaimer, .section-intro, .hero-subtitle, .tagline, .hero-hook) {
  font-size: var(--translated-lead-size) !important;
  line-height: 1.58 !important;
}

body.is-translated.is-rtl {
  direction: rtl !important;
}

body.is-translated.is-rtl main :where(.page-title, h1, h2, h3, h4):not(.open-book-title):not(.book-select-card strong) {
  direction: rtl !important;
  text-align: right !important;
  text-align-last: right !important;
}

body.is-translated.is-rtl main :where(
  p:not(.book-progress):not(.series-label):not(.word-count),
  li,
  .characters-subtitle,
  .page-disclaimer,
  .section-intro,
  .hero-subtitle,
  .tagline,
  .hero-hook,
  .season-format,
  .book-copy p:not(.series-label):not(.word-count),
  .pitch-card p,
  .saga-overview p,
  .season-structure-box p,
  .rights-positioning p,
  .author-final-bio p,
  .author-miniatures-copy,
  .direct-inquiries
) {
  direction: rtl !important;
  text-align: justify !important;
  text-align-last: right !important;
  text-justify: auto !important;
}

body.is-translated.is-ltr {
  direction: ltr !important;
}

body.is-translated.is-ltr main :where(.page-title, h1, h2, h3, h4):not(.open-book-title):not(.book-select-card strong) {
  direction: ltr !important;
  text-align: left !important;
  text-align-last: left !important;
}

body.is-translated.is-ltr main :where(
  p:not(.book-progress):not(.series-label):not(.word-count),
  li,
  .characters-subtitle,
  .page-disclaimer,
  .section-intro,
  .hero-subtitle,
  .tagline,
  .hero-hook,
  .season-format,
  .book-copy p:not(.series-label):not(.word-count),
  .pitch-card p,
  .saga-overview p,
  .season-structure-box p,
  .rights-positioning p,
  .author-final-bio p,
  .author-miniatures-copy,
  .direct-inquiries
) {
  direction: ltr !important;
  text-align: justify !important;
  text-align-last: left !important;
  text-justify: auto !important;
}

body.is-translated .site-header,
body.is-translated .site-header *,
body.is-translated #persistent-language-switcher,
body.is-translated #persistent-language-switcher * {
  direction: ltr !important;
}

body.is-translated .site-header {
  max-width: min(100% - 32px, var(--max-page-width, 1160px)) !important;
  gap: clamp(12px, 2vw, 24px) !important;
  align-items: center !important;
}

body.is-translated .brand {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  text-align: left !important;
  text-align-last: auto !important;
}

body.is-translated .site-nav {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  justify-content: flex-end !important;
  gap: clamp(6px, 0.8vw, 10px) !important;
  overflow: visible !important;
}

body.is-translated .site-nav a {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  max-width: 11.5rem !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  line-height: 1.1 !important;
  text-align: center !important;
  text-align-last: center !important;
}

body.is-translated #persistent-language-switcher,
body.is-translated .translate-floating-control {
  inset-inline-start: auto !important;
  inset-inline-end: 24px !important;
  max-width: calc(100vw - 32px) !important;
}

body.is-translated .translate-floating-menu {
  inset-inline-start: auto !important;
  inset-inline-end: 0 !important;
}

body.is-translated .contact-form {
  width: var(--translated-shell-width) !important;
  max-width: var(--translated-shell-width) !important;
  margin-inline: auto !important;
  direction: inherit !important;
  text-align: start !important;
}

body.is-translated .contact-form label {
  direction: inherit !important;
  text-align: start !important;
  text-align-last: auto !important;
  justify-items: stretch;
  overflow-wrap: anywhere;
}

body.is-translated .contact-form :where(input, select, textarea) {
  width: 100% !important;
  direction: inherit !important;
  text-align: start !important;
}

body.is-translated.is-rtl .contact-form :where(input[type="email"], input[name="email"]) {
  direction: ltr !important;
  text-align: left !important;
}

body.is-translated :where(.book-grid, .character-grid, .screen-grid, .season-timeline, .book-selection-grid) {
  gap: var(--translated-card-gap) !important;
}

body.is-translated.is-rtl :where(.book-panel, .character-card, .pitch-card, .rights-positioning, .season-structure-box) {
  direction: rtl !important;
  text-align: right !important;
  text-align-last: auto !important;
}

body.is-translated.is-ltr :where(.book-panel, .character-card, .pitch-card, .rights-positioning, .season-structure-box) {
  direction: ltr !important;
  text-align: left !important;
  text-align-last: auto !important;
}

body.is-translated.illustrations-page [data-book-reader],
body.is-translated.illustrations-page .book-viewer,
body.is-translated.illustrations-page .open-book,
body.is-translated.illustrations-page .open-book-stage,
body.is-translated.illustrations-page .book-pages {
  direction: ltr !important;
}

body.is-translated.illustrations-page .book-selection-grid {
  width: var(--translated-shell-width) !important;
  max-width: var(--translated-shell-width) !important;
  margin-inline: auto !important;
  direction: ltr !important;
  align-items: stretch !important;
}

body.is-translated.illustrations-page .book-select-card {
  min-width: 0 !important;
  pointer-events: auto !important;
  overflow-wrap: anywhere;
}

body.is-translated.is-rtl.illustrations-page .book-select-card {
  direction: rtl !important;
  text-align: right !important;
  text-align-last: auto !important;
}

body.is-translated.is-ltr.illustrations-page .book-select-card {
  direction: ltr !important;
  text-align: left !important;
  text-align-last: auto !important;
}

body.is-translated.illustrations-page .book-select-card strong,
body.is-translated.illustrations-page .book-select-kicker {
  width: 100%;
  overflow-wrap: anywhere;
}

body.is-translated.illustrations-page .open-book-title,
body.is-translated.illustrations-page .book-progress,
body.is-translated.illustrations-page .book-control,
body.is-translated.illustrations-page .book-reader-controls,
body.is-translated.illustrations-page .book-illustration figcaption {
  text-align: center !important;
  text-align-last: center !important;
}

body.is-translated.illustrations-page .book-control,
body.is-translated.illustrations-page .book-edge,
body.is-translated.illustrations-page .book-select-card {
  touch-action: manipulation;
  user-select: none;
}

body.is-translated.illustrations-page .book-control-return {
  inset-inline-start: auto !important;
  inset-inline-end: 0 !important;
}

body.is-translated.is-rtl.illustrations-page .page-disclaimer {
  direction: rtl !important;
  text-align: right !important;
  text-align-last: right !important;
}

body.is-translated.is-ltr.illustrations-page .page-disclaimer {
  direction: ltr !important;
  text-align: left !important;
  text-align-last: left !important;
}

body.is-translated :where([data-protected-name], [data-author-name], .protected-inline-term, .notranslate, .skiptranslate) {
  unicode-bidi: isolate;
}

/* Final translated-page overrides for older page-specific rules with high specificity. */
body.is-translated.is-rtl.characters-page main .characters-subtitle,
body.is-translated.is-rtl.illustrations-page main .page-disclaimer,
body.is-translated.is-rtl.adaptation-page main .adaptation-hero > p,
body.is-translated.is-rtl.adaptation-page main .season-format,
body.is-translated.is-rtl.novels-page main .book-copy p:not(.series-label):not(.word-count),
body.is-translated.is-rtl.author-page main .author-final-bio p,
body.is-translated.is-rtl.rights-page main .rights-positioning p,
body.is-translated.is-rtl.rights-page main .direct-inquiries {
  max-width: var(--translated-reading-width) !important;
  margin-inline: auto !important;
  direction: rtl !important;
  text-align: justify !important;
  text-align-last: right !important;
  text-justify: auto !important;
}

body.is-translated.is-ltr.characters-page main .characters-subtitle,
body.is-translated.is-ltr.illustrations-page main .page-disclaimer,
body.is-translated.is-ltr.adaptation-page main .adaptation-hero > p,
body.is-translated.is-ltr.adaptation-page main .season-format,
body.is-translated.is-ltr.novels-page main .book-copy p:not(.series-label):not(.word-count),
body.is-translated.is-ltr.author-page main .author-final-bio p,
body.is-translated.is-ltr.rights-page main .rights-positioning p,
body.is-translated.is-ltr.rights-page main .direct-inquiries {
  max-width: var(--translated-reading-width) !important;
  margin-inline: auto !important;
  direction: ltr !important;
  text-align: justify !important;
  text-align-last: left !important;
  text-justify: auto !important;
}

body.is-translated.is-rtl.rights-page .contact-form label,
body.is-translated.is-rtl.rights-page .contact-form :where(input, select, textarea) {
  direction: rtl !important;
  text-align: right !important;
  text-align-last: auto !important;
}

body.is-translated.is-ltr.rights-page .contact-form label,
body.is-translated.is-ltr.rights-page .contact-form :where(input, select, textarea) {
  direction: ltr !important;
  text-align: left !important;
  text-align-last: auto !important;
}

html.is-translated.is-rtl body.author-page.author-page-final main .author-final-bio p,
html.is-translated.is-rtl body.author-page.author-page-final main .author-miniatures-copy,
body.is-translated.is-rtl.author-page.author-page-final main .author-final-bio p,
body.is-translated.is-rtl.author-page.author-page-final main .author-miniatures-copy {
  max-width: var(--translated-reading-width) !important;
  direction: rtl !important;
  text-align: justify !important;
  text-align-last: right !important;
  text-justify: auto !important;
}

html.is-translated.is-ltr body.author-page.author-page-final main .author-final-bio p,
html.is-translated.is-ltr body.author-page.author-page-final main .author-miniatures-copy,
body.is-translated.is-ltr.author-page.author-page-final main .author-final-bio p,
body.is-translated.is-ltr.author-page.author-page-final main .author-miniatures-copy {
  max-width: var(--translated-reading-width) !important;
  direction: ltr !important;
  text-align: justify !important;
  text-align-last: left !important;
  text-justify: auto !important;
}

html[dir="rtl"].is-translated.is-rtl.is-arabic-translation body.lang-ar.author-page.author-page-final main .author-final-row .author-final-bio p,
html[dir="rtl"].is-translated.is-rtl.is-arabic-translation body.lang-ar.author-page.author-page-final main .author-miniatures-copy,
body.is-translated.is-rtl.lang-ar.author-page.author-page-final main .author-final-row .author-final-bio p,
body.is-translated.is-rtl.lang-ar.author-page.author-page-final main .author-miniatures-copy {
  direction: rtl !important;
  text-align: justify !important;
  text-align-last: right !important;
  text-justify: auto !important;
}

body.is-translated:is(.novels-page, .characters-page, .illustrations-page, .adaptation-page, .author-page, .rights-page) main :is(.page-title, .author-final-title, h1):not(.open-book-title) {
  width: var(--translated-shell-width) !important;
  max-width: var(--translated-shell-width) !important;
  margin-inline: auto !important;
  font-size: var(--translated-title-size) !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
  word-spacing: normal !important;
}

body.is-translated.illustrations-page main #book-illustrations-title {
  font-size: var(--translated-title-size) !important;
}

body.is-translated:is(.novels-page, .characters-page, .illustrations-page, .adaptation-page, .author-page, .rights-page) main :is(.characters-subtitle, .page-disclaimer, .hero-subtitle, .section-intro, .tagline, .hero-hook, .author-miniatures-copy) {
  width: var(--translated-reading-width) !important;
  max-width: var(--translated-reading-width) !important;
  margin-inline: auto !important;
  font-size: var(--translated-lead-size) !important;
  line-height: 1.58 !important;
  letter-spacing: 0 !important;
  word-spacing: normal !important;
}

body.is-translated.is-rtl:is(.novels-page, .characters-page, .illustrations-page, .adaptation-page, .author-page, .rights-page) main :is(.page-title, .author-final-title, h1):not(.open-book-title),
body.is-translated.is-rtl:is(.novels-page, .characters-page, .illustrations-page, .adaptation-page, .author-page, .rights-page) main :is(.characters-subtitle, .page-disclaimer, .hero-subtitle, .section-intro, .tagline, .hero-hook, .author-miniatures-copy) {
  direction: rtl !important;
  text-align: right !important;
  text-align-last: right !important;
}

body.is-translated.is-ltr:is(.novels-page, .characters-page, .illustrations-page, .adaptation-page, .author-page, .rights-page) main :is(.page-title, .author-final-title, h1):not(.open-book-title),
body.is-translated.is-ltr:is(.novels-page, .characters-page, .illustrations-page, .adaptation-page, .author-page, .rights-page) main :is(.characters-subtitle, .page-disclaimer, .hero-subtitle, .section-intro, .tagline, .hero-hook, .author-miniatures-copy) {
  direction: ltr !important;
  text-align: left !important;
  text-align-last: left !important;
}

@media (max-width: 900px) {
  body.is-translated {
    --translated-shell-width: min(100% - 28px, 760px);
    --translated-reading-width: min(100% - 28px, 760px);
  }

  body.is-translated .site-header {
    max-width: calc(100% - 24px) !important;
  }

  body.is-translated .site-nav {
    justify-content: center !important;
  }

  body.is-translated .site-nav a {
    max-width: 10rem !important;
  }
}

@media (max-width: 640px) {
  body.is-translated {
    --translated-shell-width: min(100% - 22px, 420px);
    --translated-reading-width: min(100% - 22px, 420px);
  }

  body.is-translated #persistent-language-switcher,
  body.is-translated .translate-floating-control {
    inset-inline-end: 14px !important;
  }

  body.is-translated .contact-form {
    grid-template-columns: 1fr !important;
  }

  body.is-translated main :where(.page-title, h1) {
    font-size: clamp(2.1rem, 12vw, 3.4rem) !important;
  }
}

/* Phase 14: translated pages use readability-first body alignment. */
body.is-translated main :where(
  p:not(.book-progress):not(.series-label):not(.word-count),
  .page-disclaimer,
  .section-intro,
  .hero-hook,
  .season-format,
  .book-copy p:not(.series-label):not(.word-count),
  .saga-overview p,
  .rights-positioning p,
  .author-final-bio p,
  .author-miniatures-copy,
  .direct-inquiries
) {
  width: var(--translated-reading-width) !important;
  max-width: var(--translated-reading-width) !important;
  margin-inline: auto !important;
  overflow-wrap: break-word;
  word-break: normal;
  letter-spacing: 0 !important;
  word-spacing: normal !important;
  text-wrap: pretty;
}

body.is-translated.is-rtl main :where(
  p:not(.book-progress):not(.series-label):not(.word-count),
  .page-disclaimer,
  .section-intro,
  .hero-hook,
  .season-format,
  .book-copy p:not(.series-label):not(.word-count),
  .saga-overview p,
  .rights-positioning p,
  .author-final-bio p,
  .author-miniatures-copy,
  .direct-inquiries
) {
  direction: rtl !important;
  text-align: justify !important;
  text-align-last: right !important;
}

body.is-translated.is-ltr main :where(
  p:not(.book-progress):not(.series-label):not(.word-count),
  .page-disclaimer,
  .section-intro,
  .hero-hook,
  .season-format,
  .book-copy p:not(.series-label):not(.word-count),
  .saga-overview p,
  .rights-positioning p,
  .author-final-bio p,
  .author-miniatures-copy,
  .direct-inquiries
) {
  direction: ltr !important;
  text-align: justify !important;
  text-align-last: left !important;
}

body.is-translated.is-rtl main :where(
  .hero-subtitle,
  .tagline,
  .characters-subtitle,
  .book-panel .series-label,
  .book-panel .word-count,
  .character-card p,
  .pitch-card p,
  .season-structure-box p,
  .book-select-card,
  .book-select-card p,
  .book-select-card strong,
  .book-select-kicker,
  .book-control,
  .book-progress
) {
  direction: rtl !important;
  text-align: right !important;
  text-align-last: auto !important;
}

body.is-translated.is-ltr main :where(
  .hero-subtitle,
  .tagline,
  .characters-subtitle,
  .book-panel .series-label,
  .book-panel .word-count,
  .character-card p,
  .pitch-card p,
  .season-structure-box p,
  .book-select-card,
  .book-select-card p,
  .book-select-card strong,
  .book-select-kicker,
  .book-control,
  .book-progress
) {
  direction: ltr !important;
  text-align: left !important;
  text-align-last: auto !important;
}

body.is-translated main :where(
  .page-title,
  .author-final-title,
  h1,
  h2,
  h3,
  h4
):not(.open-book-title):not(.book-select-card strong) {
  width: var(--translated-shell-width) !important;
  max-width: var(--translated-shell-width) !important;
  margin-inline: auto !important;
  letter-spacing: 0 !important;
  word-spacing: normal !important;
  text-wrap: balance;
}

body.is-translated.illustrations-page main :where(
  .open-book-title,
  .book-progress,
  .book-control,
  .book-reader-controls,
  .book-illustration figcaption
) {
  text-align: center !important;
  text-align-last: center !important;
}

body.is-translated.is-rtl:is(.home-page, .novels-page, .characters-page, .illustrations-page, .adaptation-page, .author-page, .rights-page) main :is(
  .characters-subtitle,
  .page-disclaimer,
  .section-intro,
  .hero-subtitle,
  .tagline,
  .hero-hook,
  .season-format,
  .author-miniatures-copy
) {
  width: var(--translated-reading-width) !important;
  max-width: var(--translated-reading-width) !important;
  margin-inline: auto !important;
  direction: rtl !important;
  text-align: justify !important;
  text-align-last: right !important;
}

body.is-translated.is-ltr:is(.home-page, .novels-page, .characters-page, .illustrations-page, .adaptation-page, .author-page, .rights-page) main :is(
  .characters-subtitle,
  .page-disclaimer,
  .section-intro,
  .hero-subtitle,
  .tagline,
  .hero-hook,
  .season-format,
  .author-miniatures-copy
) {
  width: var(--translated-reading-width) !important;
  max-width: var(--translated-reading-width) !important;
  margin-inline: auto !important;
  direction: ltr !important;
  text-align: justify !important;
  text-align-last: left !important;
}

/* Phase 16: translated text flows inside the parent box, not inside separately centered child boxes. */
body.is-translated {
  --translated-flow-padding-inline: clamp(24px, 2.85vw, 39px);
}

body.is-translated:is(.novels-page, .characters-page, .illustrations-page, .adaptation-page, .author-page, .rights-page) main :is(
  .shared-page-header,
  .book-illustrations-heading,
  .adaptation-hero.shared-page-header,
  .author-final-heading
) {
  box-sizing: border-box !important;
  padding-inline: var(--translated-flow-padding-inline) !important;
}

body.is-translated main :where(
  .shared-page-header,
  .book-copy,
  .saga-overview,
  .season-structure-box,
  .rights-positioning,
  .author-final-bio,
  .author-miniatures-frame,
  .pitch-card,
  .character-card,
  .contact-form,
  .book-select-card
) {
  box-sizing: border-box !important;
}

body.is-translated main :where(
  .shared-page-header,
  .book-copy,
  .saga-overview,
  .season-structure-box,
  .rights-positioning,
  .author-final-bio,
  .author-miniatures-frame,
  .pitch-card,
  .character-card,
  .contact-form,
  .book-select-card
) :where(
  .page-title,
  .author-final-title,
  .author-final-name,
  .author-miniatures-heading,
  h1,
  h2,
  h3,
  h4,
  p,
  li,
  .characters-subtitle,
  .page-disclaimer,
  .section-intro,
  .hero-subtitle,
  .tagline,
  .hero-hook,
  .season-format,
  .author-miniatures-copy,
  .direct-inquiries
):not(.book-progress):not(.book-control):not(.series-label):not(.word-count):not(.open-book-title) {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-inline: 0 !important;
  letter-spacing: 0 !important;
  word-spacing: normal !important;
}

body.is-translated.is-rtl main :where(
  .shared-page-header,
  .book-copy,
  .saga-overview,
  .season-structure-box,
  .rights-positioning,
  .author-final-bio,
  .author-miniatures-frame,
  .pitch-card,
  .character-card,
  .contact-form,
  .book-select-card
) :where(.page-title, .author-final-title, .author-final-name, h1, h2, h3, h4):not(.open-book-title) {
  direction: rtl !important;
  text-align: right !important;
  text-align-last: right !important;
}

body.is-translated.is-ltr main :where(
  .shared-page-header,
  .book-copy,
  .saga-overview,
  .season-structure-box,
  .rights-positioning,
  .author-final-bio,
  .author-miniatures-frame,
  .pitch-card,
  .character-card,
  .contact-form,
  .book-select-card
) :where(.page-title, .author-final-title, .author-final-name, h1, h2, h3, h4):not(.open-book-title) {
  direction: ltr !important;
  text-align: left !important;
  text-align-last: left !important;
}

body.is-translated.is-rtl main :where(
  .shared-page-header,
  .book-copy,
  .saga-overview,
  .season-structure-box,
  .rights-positioning,
  .author-final-bio,
  .author-miniatures-frame,
  .contact-form
) :where(
  p:not(.series-label):not(.word-count):not(.book-progress),
  li,
  .characters-subtitle,
  .page-disclaimer,
  .section-intro,
  .hero-hook,
  .season-format,
  .author-miniatures-copy,
  .direct-inquiries
) {
  direction: rtl !important;
  text-align: justify !important;
  text-align-last: right !important;
}

body.is-translated.is-ltr main :where(
  .shared-page-header,
  .book-copy,
  .saga-overview,
  .season-structure-box,
  .rights-positioning,
  .author-final-bio,
  .author-miniatures-frame,
  .contact-form
) :where(
  p:not(.series-label):not(.word-count):not(.book-progress),
  li,
  .characters-subtitle,
  .page-disclaimer,
  .section-intro,
  .hero-hook,
  .season-format,
  .author-miniatures-copy,
  .direct-inquiries
) {
  direction: ltr !important;
  text-align: justify !important;
  text-align-last: left !important;
}

body.is-translated.is-rtl main :where(.character-card, .pitch-card, .book-select-card) :where(p, strong, span) {
  direction: rtl !important;
  text-align: right !important;
  text-align-last: auto !important;
}

body.is-translated.is-ltr main :where(.character-card, .pitch-card, .book-select-card) :where(p, strong, span) {
  direction: ltr !important;
  text-align: left !important;
  text-align-last: auto !important;
}

/* Phase 17: final translated boundary contract.
   Page headers are not framed boxes, so they must not receive an artificial inner inset.
   Framed panels keep their own padding; child text fills the panel's inner text area. */
body.is-translated {
  --translated-title-size: clamp(2rem, 3.35vw, 3rem);
  --translated-heading-size: clamp(1.35rem, 2vw, 1.85rem);
  --translated-lead-size: clamp(1rem, 1.22vw, 1.16rem);
  --translated-body-size: clamp(0.98rem, 1.04vw, 1.08rem);
}

body.is-translated:is(.novels-page, .characters-page, .illustrations-page, .adaptation-page, .author-page, .rights-page) main :is(
  .shared-page-header,
  .book-illustrations-heading,
  .adaptation-hero.shared-page-header,
  .author-final-heading
) {
  box-sizing: border-box !important;
  width: var(--page-header-width) !important;
  max-width: var(--page-header-width) !important;
  padding-inline: 0 !important;
  margin-inline: auto !important;
}

body.is-translated main :where(
  .shared-page-header,
  .book-illustrations-heading,
  .adaptation-hero.shared-page-header,
  .author-final-heading
) > :where(
  .page-title,
  .author-final-title,
  .author-final-name,
  h1,
  h2,
  p,
  .characters-subtitle,
  .page-disclaimer
) {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  padding-inline: 0 !important;
  margin-inline: 0 !important;
  letter-spacing: 0 !important;
  word-spacing: normal !important;
  text-wrap: wrap !important;
}

body.is-translated main :where(
  .book-copy,
  .saga-overview,
  .season-structure-box,
  .rights-positioning,
  .author-final-bio,
  .author-miniatures-frame,
  .contact-form
) :where(
  h1,
  h2,
  h3,
  h4,
  p:not(.series-label):not(.word-count):not(.book-progress),
  li,
  .direct-inquiries,
  .author-miniatures-copy
) {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  padding-inline: 0 !important;
  margin-inline: 0 !important;
  letter-spacing: 0 !important;
  word-spacing: normal !important;
}

body.is-translated.is-rtl main :where(
  .shared-page-header,
  .book-illustrations-heading,
  .adaptation-hero.shared-page-header,
  .author-final-heading,
  .book-copy,
  .saga-overview,
  .season-structure-box,
  .rights-positioning,
  .author-final-bio,
  .author-miniatures-frame,
  .contact-form
) {
  direction: rtl !important;
  text-align: right !important;
}

body.is-translated.is-ltr main :where(
  .shared-page-header,
  .book-illustrations-heading,
  .adaptation-hero.shared-page-header,
  .author-final-heading,
  .book-copy,
  .saga-overview,
  .season-structure-box,
  .rights-positioning,
  .author-final-bio,
  .author-miniatures-frame,
  .contact-form
) {
  direction: ltr !important;
  text-align: left !important;
}

body.is-translated.is-rtl main :where(
  .shared-page-header,
  .book-illustrations-heading,
  .adaptation-hero.shared-page-header,
  .author-final-heading,
  .book-copy,
  .saga-overview,
  .season-structure-box,
  .rights-positioning,
  .author-final-bio,
  .author-miniatures-frame,
  .contact-form
) :where(
  .page-title,
  .author-final-title,
  .author-final-name,
  h1,
  h2,
  h3,
  h4
):not(.open-book-title):not(.book-select-card strong) {
  direction: rtl !important;
  text-align: right !important;
  text-align-last: right !important;
}

body.is-translated.is-ltr main :where(
  .shared-page-header,
  .book-illustrations-heading,
  .adaptation-hero.shared-page-header,
  .author-final-heading,
  .book-copy,
  .saga-overview,
  .season-structure-box,
  .rights-positioning,
  .author-final-bio,
  .author-miniatures-frame,
  .contact-form
) :where(
  .page-title,
  .author-final-title,
  .author-final-name,
  h1,
  h2,
  h3,
  h4
):not(.open-book-title):not(.book-select-card strong) {
  direction: ltr !important;
  text-align: left !important;
  text-align-last: left !important;
}

body.is-translated.is-rtl main :where(
  .shared-page-header,
  .book-illustrations-heading,
  .adaptation-hero.shared-page-header,
  .book-copy,
  .saga-overview,
  .season-structure-box,
  .rights-positioning,
  .author-final-bio,
  .author-miniatures-frame,
  .contact-form
) :where(
  p:not(.series-label):not(.word-count):not(.book-progress):not(.form-status),
  li,
  .characters-subtitle,
  .page-disclaimer,
  .hero-hook,
  .season-format,
  .author-miniatures-copy,
  .direct-inquiries
) {
  direction: rtl !important;
  text-align: justify !important;
  text-align-last: right !important;
  text-justify: auto !important;
}

body.is-translated.is-ltr main :where(
  .shared-page-header,
  .book-illustrations-heading,
  .adaptation-hero.shared-page-header,
  .book-copy,
  .saga-overview,
  .season-structure-box,
  .rights-positioning,
  .author-final-bio,
  .author-miniatures-frame,
  .contact-form
) :where(
  p:not(.series-label):not(.word-count):not(.book-progress):not(.form-status),
  li,
  .characters-subtitle,
  .page-disclaimer,
  .hero-hook,
  .season-format,
  .author-miniatures-copy,
  .direct-inquiries
) {
  direction: ltr !important;
  text-align: justify !important;
  text-align-last: left !important;
  text-justify: auto !important;
}

body.is-translated main :where(
  .site-nav a,
  .button,
  .text-button,
  .book-control,
  .book-progress,
  .open-book-title,
  .book-select-card,
  .book-select-card strong,
  .book-select-kicker,
  .book-illustration figcaption,
  .series-label,
  .word-count,
  .form-status
) {
  text-align-last: auto !important;
}

/* Phase 18: the language selector belongs to the header controls, not the page body. */
.site-header > #persistent-language-switcher.translate-floating-control,
.site-header > .translate-floating-control {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  z-index: 3 !important;
  order: 3;
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex !important;
  margin: 0 !important;
  max-width: none !important;
  direction: ltr !important;
}

.site-header > .brand {
  order: 1;
}

.site-header > .site-nav {
  order: 2;
}

.site-header > .nav-toggle {
  order: 4;
}

.site-header > #persistent-language-switcher .translate-floating-button,
.site-header > .translate-floating-control .translate-floating-button {
  min-height: 36px !important;
  min-width: 0 !important;
  gap: 8px !important;
  padding: 8px 13px !important;
  font-size: 0.74rem !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 206, 0.22),
    0 10px 24px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(105, 72, 28, 0.52) !important;
}

.site-header > #persistent-language-switcher .translate-floating-globe,
.site-header > .translate-floating-control .translate-floating-globe {
  width: 20px !important;
  height: 20px !important;
  font-size: 0.78rem !important;
}

.site-header > #persistent-language-switcher .translate-floating-label,
.site-header > .translate-floating-control .translate-floating-label {
  font-size: 0.68rem !important;
  letter-spacing: 0.1em !important;
}

.site-header > #persistent-language-switcher .translate-floating-menu,
.site-header > .translate-floating-control .translate-floating-menu {
  position: absolute !important;
  top: calc(100% + 12px) !important;
  right: 0 !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 2147483300 !important;
  max-width: calc(100vw - 32px) !important;
}

body.is-rtl .site-header > #persistent-language-switcher,
body.is-rtl .site-header > .translate-floating-control,
body.is-ltr .site-header > #persistent-language-switcher,
body.is-ltr .site-header > .translate-floating-control,
body.translated-rtl .site-header > #persistent-language-switcher,
body.translated-rtl .site-header > .translate-floating-control,
body.translated-ltr .site-header > #persistent-language-switcher,
body.translated-ltr .site-header > .translate-floating-control {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
}

@media (max-width: 1180px) {
  .site-header {
    gap: clamp(8px, 1.2vw, 14px) !important;
  }

  .site-header > .site-nav {
    gap: clamp(6px, 0.8vw, 10px) !important;
  }

  .site-header > .site-nav a,
  .site-header > #persistent-language-switcher .translate-floating-button,
  .site-header > .translate-floating-control .translate-floating-button {
    padding-inline: clamp(9px, 1vw, 12px) !important;
  }
}

@media (max-width: 768px) {
  .site-header > .brand {
    max-width: calc(100vw - 184px) !important;
  }

  .site-header > #persistent-language-switcher.translate-floating-control,
  .site-header > .translate-floating-control {
    margin-inline-start: auto !important;
  }

  .site-header > #persistent-language-switcher .translate-floating-button,
  .site-header > .translate-floating-control .translate-floating-button {
    min-height: 38px !important;
    gap: 6px !important;
    padding: 7px 9px !important;
    font-size: 0.66rem !important;
  }

  .site-header > #persistent-language-switcher .translate-floating-globe,
  .site-header > .translate-floating-control .translate-floating-globe {
    width: 19px !important;
    height: 19px !important;
    font-size: 0.74rem !important;
  }

  .site-header > #persistent-language-switcher .translate-floating-label,
  .site-header > .translate-floating-control .translate-floating-label {
    font-size: 0.62rem !important;
    letter-spacing: 0.08em !important;
  }
}

/* Mobile page-header spacing and Arabic RTL reading alignment. */
@media (max-width: 768px) {
  :root {
    --page-header-top-gap: 34px;
  }

  body:is(.novels-page, .characters-page, .illustrations-page, .adaptation-page, .author-page, .rights-page, .world-page) main > .section:first-child:not(.hero),
  body.author-page-final main .author-final-section {
    padding-top: calc(var(--runtime-header-height) + var(--page-header-top-gap)) !important;
  }
}

@media (max-width: 430px) {
  :root {
    --page-header-top-gap: 32px;
  }
}

:where(html[dir="rtl"], html[lang^="ar"], html.translated-rtl, html.is-rtl, html.is-arabic-translation) body main :where(
  .page-title,
  .author-final-title,
  .author-final-name,
  h1,
  h2,
  h3,
  h4
):not(.open-book-title):not(.book-select-card strong),
body:is([dir="rtl"], .lang-ar, .translated-rtl, .rtl-lang, .is-rtl, .is-arabic-translation) main :where(
  .page-title,
  .author-final-title,
  .author-final-name,
  h1,
  h2,
  h3,
  h4
):not(.open-book-title):not(.book-select-card strong) {
  direction: rtl !important;
  text-align: right !important;
  text-align-last: right !important;
}

:where(html[dir="rtl"], html[lang^="ar"], html.translated-rtl, html.is-rtl, html.is-arabic-translation) body main :where(
  li,
  .section-intro,
  .shared-page-header > h2,
  .shared-page-header > p,
  .characters-subtitle,
  .page-disclaimer,
  .home-copy-frame p,
  .hero-hook,
  .book-copy p:not(.series-label):not(.word-count),
  .pitch-card p,
  .saga-overview p,
  .season-structure-box p,
  .rights-positioning p,
  .direct-inquiries,
  .author-final-bio p,
  .author-miniatures-copy
),
body:is([dir="rtl"], .lang-ar, .translated-rtl, .rtl-lang, .is-rtl, .is-arabic-translation) main :where(
  li,
  .section-intro,
  .shared-page-header > h2,
  .shared-page-header > p,
  .characters-subtitle,
  .page-disclaimer,
  .home-copy-frame p,
  .hero-hook,
  .book-copy p:not(.series-label):not(.word-count),
  .pitch-card p,
  .saga-overview p,
  .season-structure-box p,
  .rights-positioning p,
  .direct-inquiries,
  .author-final-bio p,
  .author-miniatures-copy
) {
  direction: rtl !important;
  text-align: justify !important;
  text-align-last: right !important;
  text-justify: auto !important;
}

:where(html[dir="rtl"], html[lang^="ar"], html.translated-rtl, html.is-rtl, html.is-arabic-translation) body :where(
  .site-header,
  .site-header *,
  .site-nav a,
  .button,
  .text-button,
  .book-control,
  .book-progress,
  .open-book-title,
  .book-select-card,
  .book-select-card *,
  .book-illustration figcaption,
  .footer-stat,
  .footer-stat *,
  .translate-floating-control,
  .translate-floating-control *
),
body:is([dir="rtl"], .lang-ar, .translated-rtl, .rtl-lang, .is-rtl, .is-arabic-translation) :where(
  .site-header,
  .site-header *,
  .site-nav a,
  .button,
  .text-button,
  .book-control,
  .book-progress,
  .open-book-title,
  .book-select-card,
  .book-select-card *,
  .book-illustration figcaption,
  .footer-stat,
  .footer-stat *,
  .translate-floating-control,
  .translate-floating-control *
) {
  text-align-last: auto !important;
  text-justify: auto !important;
}

/* Phase 2: non-home Arabic page subtitles are introductory prose. */
html[dir="rtl"] body.lang-ar:not(.home-page) main :where(.shared-page-header > h2, .characters-subtitle, .page-disclaimer, .adaptation-hero > h2, .season-format),
body.is-translated.is-rtl.lang-ar:not(.home-page) main :where(.shared-page-header > h2, .characters-subtitle, .page-disclaimer, .adaptation-hero > h2, .season-format),
body.lang-ar:not(.home-page) main :where(.shared-page-header > h2, .characters-subtitle, .page-disclaimer, .adaptation-hero > h2, .season-format) {
  direction: rtl !important;
  text-align: justify !important;
  text-align-last: right !important;
  text-justify: auto !important;
}

/* Phase 2: Arabic home landing copy is presentation text, not long-form prose. */
html[dir="rtl"] body.lang-ar.home-page main .home-hero,
body.is-translated.is-rtl.lang-ar.home-page main .home-hero,
body.lang-ar.home-page main .home-hero {
  text-align: center !important;
}

html[dir="rtl"] body.lang-ar.home-page main .home-hero :where(.hero-content, h1, .eyebrow, .hero-subtitle, .tagline, .hero-actions),
body.is-translated.is-rtl.lang-ar.home-page main .home-hero :where(.hero-content, h1, .eyebrow, .hero-subtitle, .tagline, .hero-actions),
body.lang-ar.home-page main .home-hero :where(.hero-content, h1, .eyebrow, .hero-subtitle, .tagline, .hero-actions) {
  margin-inline: auto !important;
  text-align: center !important;
  text-align-last: center !important;
}

html[dir="rtl"] body.lang-ar.home-page main .home-copy-frame,
body.is-translated.is-rtl.lang-ar.home-page main .home-copy-frame,
body.lang-ar.home-page main .home-copy-frame {
  text-align: center !important;
}

html[dir="rtl"] body.lang-ar.home-page main .home-copy-frame :where(p, .hero-hook),
body.is-translated.is-rtl.lang-ar.home-page main .home-copy-frame :where(p, .hero-hook),
body.lang-ar.home-page main .home-copy-frame :where(p, .hero-hook) {
  direction: rtl !important;
  text-align: center !important;
  text-align-last: center !important;
}

/* Phase 3: Arabic landing presentation stays centered while long-form Arabic copy stays literary and light. */
html[dir="rtl"] body.lang-ar.home-page main .home-hero :where(.home-frame-stack, .home-gold-frame, .hero-content, .home-copy-frame),
body.is-translated.is-rtl.lang-ar.home-page main .home-hero :where(.home-frame-stack, .home-gold-frame, .hero-content, .home-copy-frame),
body.lang-ar.home-page main .home-hero :where(.home-frame-stack, .home-gold-frame, .hero-content, .home-copy-frame) {
  margin-inline: auto !important;
  text-align: center !important;
  text-align-last: center !important;
  justify-items: center !important;
  align-items: center !important;
}

html[dir="rtl"] body.lang-ar.home-page main .home-hero .hero-content,
body.is-translated.is-rtl.lang-ar.home-page main .home-hero .hero-content,
body.lang-ar.home-page main .home-hero .hero-content {
  display: grid !important;
  justify-items: center !important;
}

html[dir="rtl"] body.lang-ar.home-page main .home-hero :where(.home-hero-actions-top, .hero-actions),
body.is-translated.is-rtl.lang-ar.home-page main .home-hero :where(.home-hero-actions-top, .hero-actions),
body.lang-ar.home-page main .home-hero :where(.home-hero-actions-top, .hero-actions) {
  justify-content: center !important;
}

html[dir="rtl"] body.lang-ar.home-page main .home-hero :where(.button, .eyebrow, h1, .hero-subtitle, .tagline, .home-copy-frame p, .hero-hook),
body.is-translated.is-rtl.lang-ar.home-page main .home-hero :where(.button, .eyebrow, h1, .hero-subtitle, .tagline, .home-copy-frame p, .hero-hook),
body.lang-ar.home-page main .home-hero :where(.button, .eyebrow, h1, .hero-subtitle, .tagline, .home-copy-frame p, .hero-hook) {
  margin-inline: auto !important;
  text-align: center !important;
  text-align-last: center !important;
  text-justify: auto !important;
}

html[dir="rtl"] body.lang-ar main :where(
  .shared-page-header > h2,
  .characters-subtitle,
  .page-disclaimer,
  .season-format,
  .adaptation-hero > p,
  .book-copy p:not(.series-label):not(.word-count),
  .character-card p,
  .pitch-card p,
  .saga-overview p,
  .season-structure-box p,
  .rights-positioning p,
  .direct-inquiries,
  .author-final-bio p,
  .author-miniatures-copy
),
body.is-translated.is-rtl.lang-ar main :where(
  .shared-page-header > h2,
  .characters-subtitle,
  .page-disclaimer,
  .season-format,
  .adaptation-hero > p,
  .book-copy p:not(.series-label):not(.word-count),
  .character-card p,
  .pitch-card p,
  .saga-overview p,
  .season-structure-box p,
  .rights-positioning p,
  .direct-inquiries,
  .author-final-bio p,
  .author-miniatures-copy
),
body.lang-ar main :where(
  .shared-page-header > h2,
  .characters-subtitle,
  .page-disclaimer,
  .season-format,
  .adaptation-hero > p,
  .book-copy p:not(.series-label):not(.word-count),
  .character-card p,
  .pitch-card p,
  .saga-overview p,
  .season-structure-box p,
  .rights-positioning p,
  .direct-inquiries,
  .author-final-bio p,
  .author-miniatures-copy
) {
  font-weight: 400 !important;
  direction: rtl !important;
  text-align: justify !important;
  text-align-last: right !important;
  text-justify: auto !important;
}

html[dir="rtl"] body.lang-ar.home-page main .home-hero :where(.home-copy-frame p, .hero-hook),
body.is-translated.is-rtl.lang-ar.home-page main .home-hero :where(.home-copy-frame p, .hero-hook),
body.lang-ar.home-page main .home-hero :where(.home-copy-frame p, .hero-hook) {
  font-weight: 400 !important;
  text-align: center !important;
  text-align-last: center !important;
}

html[dir="rtl"] body.lang-ar.characters-page main .character-card h3,
body.is-translated.is-rtl.lang-ar.characters-page main .character-card h3,
body.lang-ar.characters-page main .character-card h3 {
  direction: rtl !important;
  text-align: right !important;
  text-align-last: right !important;
}

html[dir="rtl"].is-arabic-translation body.lang-ar.author-page-final main .author-final-row .author-final-bio p,
html[dir="rtl"].translated-rtl body.lang-ar.author-page-final main .author-final-row .author-final-bio p,
body[dir="rtl"].lang-ar.author-page-final main .author-final-row .author-final-bio p,
body.is-translated.is-rtl.lang-ar.author-page-final main .author-final-row .author-final-bio p,
body.lang-ar.author-page-final main .author-final-row .author-final-bio p {
  font-weight: 400 !important;
  direction: rtl !important;
  text-align: justify !important;
  text-align-last: right !important;
}

body.lang-ar.novels-page main .shared-page-header > h2,
body.lang-ar.characters-page main .characters-subtitle,
body.lang-ar.illustrations-page main .page-disclaimer,
body.lang-ar.adaptation-page main :where(.adaptation-hero > p, .adaptation-hero h2, .season-format),
body.lang-ar.rights-page main .shared-page-header > h2,
body.lang-ar.characters-page main .character-card p {
  font-weight: 400 !important;
  direction: rtl !important;
  text-align: justify !important;
  text-align-last: right !important;
  text-justify: auto !important;
}

html[dir="rtl"] body.lang-ar main .shared-page-header > h2,
html.translated-rtl body.lang-ar main .shared-page-header > h2,
body.is-translated.is-rtl.lang-ar main .shared-page-header > h2,
body.lang-ar main .shared-page-header > h2 {
  direction: rtl !important;
  text-align: justify !important;
  text-align-last: right !important;
  text-justify: auto !important;
}

/* Phase 5: keep native language controls visible without shrinking translated pages. */
.site-header,
body.is-translated .site-header,
body.is-rtl .site-header,
body.is-ltr .site-header {
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  overflow: visible !important;
  transform: none !important;
  box-sizing: border-box !important;
}

.site-header > .brand {
  flex: 0 1 clamp(148px, 28vw, 520px) !important;
  min-width: 0 !important;
}

.site-header > .site-nav,
body.is-translated .site-header > .site-nav {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: none !important;
  overflow: visible !important;
  justify-content: flex-end !important;
}

.site-header > .site-nav a,
body.is-translated .site-header > .site-nav a {
  min-width: max-content !important;
  max-width: none !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.site-header > #persistent-language-switcher.translate-floating-control,
.site-header > .translate-floating-control,
body.is-translated .site-header > #persistent-language-switcher.translate-floating-control,
body.is-translated .site-header > .translate-floating-control {
  flex: 0 0 auto !important;
  min-width: max-content !important;
  width: auto !important;
  max-width: calc(100vw - 32px) !important;
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
  pointer-events: auto !important;
  z-index: 2147483400 !important;
}

.site-header > #persistent-language-switcher .translate-floating-button,
.site-header > .translate-floating-control .translate-floating-button,
body.is-translated .site-header > #persistent-language-switcher .translate-floating-button,
body.is-translated .site-header > .translate-floating-control .translate-floating-button {
  flex: 0 0 auto !important;
  min-width: max-content !important;
  width: auto !important;
  max-width: calc(100vw - 40px) !important;
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  white-space: nowrap !important;
}

.site-header > #persistent-language-switcher .translate-floating-label,
.site-header > .translate-floating-control .translate-floating-label {
  white-space: nowrap !important;
}

body.is-translated.home-page main .home-hero,
body.is-google-translated.home-page main .home-hero {
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

body.is-translated.home-page main .home-frame-stack,
body.is-translated.home-page main .home-gold-frame,
body.is-google-translated.home-page main .home-frame-stack,
body.is-google-translated.home-page main .home-gold-frame {
  width: var(--page-header-width) !important;
  max-width: var(--page-header-width) !important;
  transform: none !important;
}

@media (min-width: 769px) {
  html.is-translated body.is-translated.home-page main .home-hero h1,
  html.translated-ltr body.is-translated.home-page main .home-hero h1,
  html.translated-rtl body.is-translated.home-page main .home-hero h1,
  html.is-google-translated body.is-google-translated.home-page main .home-hero h1,
  body.is-translated.home-page main .home-hero h1,
  body.is-google-translated.home-page main .home-hero h1 {
    max-width: 100% !important;
    font-size: clamp(3.05rem, 6.75vw, 6.1rem) !important;
    line-height: 0.96 !important;
  }
}

@media (min-width: 769px) and (max-width: 900px) {
  .site-header {
    gap: 8px !important;
  }

  .site-header > .brand {
    flex-basis: clamp(118px, 22vw, 210px) !important;
    font-size: 1rem !important;
  }

  .site-header > .site-nav {
    gap: 4px !important;
  }

  .site-header > .site-nav a {
    padding-inline: 7px !important;
    font-size: 0.66rem !important;
  }

  .site-header > #persistent-language-switcher .translate-floating-button,
  .site-header > .translate-floating-control .translate-floating-button {
    padding-inline: 9px !important;
    font-size: 0.64rem !important;
  }
}

@media (max-width: 768px) {
  .site-header {
    overflow: visible !important;
  }

  .site-header > #persistent-language-switcher.translate-floating-control,
  .site-header > .translate-floating-control {
    min-width: max-content !important;
    max-width: calc(100vw - 88px) !important;
  }

  .site-header > #persistent-language-switcher .translate-floating-button,
  .site-header > .translate-floating-control .translate-floating-button {
    min-width: max-content !important;
    max-width: calc(100vw - 96px) !important;
  }

  html.is-translated body.is-translated.home-page main .home-hero h1,
  html.translated-ltr body.is-translated.home-page main .home-hero h1,
  html.translated-rtl body.is-translated.home-page main .home-hero h1,
  html.is-google-translated body.is-google-translated.home-page main .home-hero h1,
  body.is-translated.home-page main .home-hero h1,
  body.is-google-translated.home-page main .home-hero h1 {
    font-size: 2.2rem !important;
    line-height: 1.04 !important;
  }
}

@media (max-width: 430px) {
  html.is-translated body.is-translated.home-page main .home-hero h1,
  html.translated-ltr body.is-translated.home-page main .home-hero h1,
  html.translated-rtl body.is-translated.home-page main .home-hero h1,
  html.is-google-translated body.is-google-translated.home-page main .home-hero h1,
  body.is-translated.home-page main .home-hero h1,
  body.is-google-translated.home-page main .home-hero h1 {
    font-size: 1.82rem !important;
  }
}
