/* Shared readability refinements layered over the exported redesign. */
.product-shortcuts,
.footer-bottom {
  font-size: 0.8rem;
}

.eyebrow,
.blog-flow,
.blog-breadcrumbs,
.blog-section-index span,
.blog-card-meta,
.blog-article-title > div:last-child span,
.footer-lead-eyebrow,
.footer-form-field > span,
.footer-form-note,
.footer-form-status,
.restime-footer-lead__copy > span,
.restime-footer-field > span,
.restime-footer-note,
.restime-footer-status {
  font-size: 0.75rem;
}

.skip-link {
  color: #13241e !important;
}

/* Opaque text remains readable across the contact panel's green gradient. */
.form-captcha-note {
  color: #c4d5cc;
}

/* Blog content has a dark surface, so its accent must use the light green. */
html[data-theme="dark"] .blog-page {
  --green: #45bb88;
}

html[data-theme="contrast"] .blog-page {
  --green: #ffe600;
  --mint: #ffe600;
}

html:is([data-theme="dark"], [data-theme="contrast"]) .blog-section-heading > div:last-child a:is(:hover, :focus-visible),
html:is([data-theme="dark"], [data-theme="contrast"]) .blog-article-card > a:is(:hover, :focus-visible) {
  color: var(--mint);
}

.blog-flow:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 4px;
}

html[data-theme="contrast"] .blog-flow:focus-visible {
  outline-color: #ffe600;
}

/* Product illustrations use many fixed colours. The shared contrast mode
   removes those surfaces while preserving their content and native controls. */
html[data-theme="contrast"] .reference-product {
  color: #fff !important;
  background: #000 !important;
  --ink: #fff;
  --forest: #000;
  --green: #ffe600;
  --green-bright: #ffe600;
  --mint: #ffe600;
  --paper: #000;
  --white: #fff;
  --muted: #fff;
  --line: #fff;
}

html[data-theme="contrast"] .reference-product *,
html[data-theme="contrast"] .reference-product *::before,
html[data-theme="contrast"] .reference-product *::after {
  color: inherit !important;
  background: transparent !important;
  border-color: #fff !important;
  box-shadow: none !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

html[data-theme="contrast"] .reference-product :is(a, button, [role="tab"]) {
  color: #ffe600 !important;
}

html[data-theme="contrast"] .reference-product :is(.button, .primary-button, .marketing-primary, .marketing-secondary, [role="tab"][aria-selected="true"]) {
  color: #000 !important;
  background: #ffe600 !important;
  border-color: #ffe600 !important;
}

html[data-theme="contrast"] .reference-product :is(a, button, summary, input, select, textarea):focus-visible {
  outline: 3px solid #ffe600 !important;
  outline-offset: 5px;
}

html[data-theme="contrast"] .reference-product .restime-round-arrow::before {
  background: currentColor !important;
}

/* Text zoom is independent from the light, dark and high-contrast themes. */
body {
  font-size: 1rem;
}

html[data-text-size="normal"] {
  font-size: 100%;
}

html[data-text-size="large"] {
  font-size: 112%;
}

html[data-text-size="x-large"] {
  font-size: 125%;
}

.theme-control-contrast,
.text-size-control {
  color: rgb(255 255 255 / 72%);
  width: 42px;
  height: 42px;
  font: inherit;
  background: transparent;
  border: 0;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 850;
  transition: background 0.18s, color 0.18s, opacity 0.18s;
  display: grid;
}

.theme-controls > button + button {
  border-left: 1px solid rgb(255 255 255 / 16%);
}

.text-size-control-decrease {
  border-left-color: rgb(255 255 255 / 36%) !important;
}

.text-size-control:hover:not(:disabled),
.text-size-control:focus-visible {
  color: #fff;
}

.text-size-control:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

html[data-theme="light"] .theme-control-contrast,
html[data-theme="light"] .text-size-control {
  color: rgb(19 36 30 / 72%);
}

html[data-theme="light"] .theme-controls > button + button {
  border-left-color: rgb(19 36 30 / 16%);
}

html[data-theme="light"] .text-size-control-decrease {
  border-left-color: rgb(19 36 30 / 34%) !important;
}

html[data-theme="light"] .text-size-control:hover:not(:disabled),
html[data-theme="light"] .text-size-control:focus-visible {
  color: #13241e;
}

html[data-theme="contrast"] .theme-controls {
  border-color: #fff;
}

html[data-theme="contrast"] .theme-control-contrast,
html[data-theme="contrast"] .text-size-control {
  color: #fff;
}

html[data-theme="contrast"] .theme-controls > button + button,
html[data-theme="contrast"] .text-size-control-decrease {
  border-left-color: #fff !important;
}

html[data-theme="contrast"] .theme-control[aria-pressed="true"] {
  color: #000;
  background: #ffe600;
}

/* The shared navigation stays visible on every routed page. */
html {
  scroll-padding-top: 152px;
}

.top-navigation {
  position: fixed;
  z-index: 90;
  top: 0;
  right: 0;
  left: 0;
  color: #fff;
  background: rgb(12 30 23 / 94%);
  box-shadow: 0 10px 32px rgb(0 0 0 / 18%);
  backdrop-filter: blur(16px);
}

.top-navigation-spacer {
  height: 136px;
}

html[data-theme="light"] .top-navigation {
  color: #13241e;
  background: rgb(244 247 244 / 94%);
  box-shadow: 0 10px 32px rgb(13 42 31 / 12%);
}

html[data-theme="contrast"] .top-navigation {
  color: #fff;
  background: #000;
  border-bottom: 2px solid #fff;
  box-shadow: none;
  backdrop-filter: none;
}

html[data-theme="light"] .hero > .product-shortcuts,
html[data-theme="light"] .shared-product-shortcuts,
html[data-theme="light"] .footer-shortcuts {
  color: #405249;
  border-color: #13241e29;
}

html[data-theme="light"] .hero > .product-shortcuts a + a::before,
html[data-theme="light"] .shared-product-shortcuts a + a::before,
html[data-theme="light"] .footer-shortcuts a + a::before {
  background: #13241e52;
}

html[data-theme="contrast"] .skip-link {
  color: #000 !important;
  background: #fff !important;
}

@media (max-width: 560px) {
  /* Give long words and final punctuation room on narrow screens. */
  :root:not([data-rd]) #home .hero-copy h1 {
    font-size: clamp(3rem, 15vw, 4.45rem);
  }

  html {
    scroll-padding-top: 92px;
  }

  .top-navigation-spacer {
    height: 78px;
  }

  .gateway-heading {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
    align-items: end;
    gap: 24px;
  }

  .gateway-heading h2 {
    max-width: 100%;
    min-width: 0;
  }

  .system-map .map-orbit-two {
    height: calc(100vw - 32px);
    width: calc(100vw - 32px);
  }
}

@media (min-width: 561px) and (max-width: 1080px) {
  html {
    scroll-padding-top: 106px;
  }

  .top-navigation-spacer {
    height: 92px;
  }
}
