:root {
  --ui-header-height: 72px;
  --ui-space-1: 4px;
  --ui-space-2: 8px;
  --ui-space-3: 12px;
  --ui-space-4: 16px;
  --ui-space-5: 24px;
  --ui-space-6: 32px;
  --ui-space-7: 48px;
  --ui-space-8: 64px;
  --ui-space-9: 96px;
  --ui-button-height: 44px;
  --ui-button-height-large: 48px;
  --ui-button-radius: 2px;
  --ui-primary: #1769c2;
  --ui-primary-hover: #0e58a7;
  --ui-primary-active: #0a4789;
  --ui-focus: #0b6ed0;
  --ui-header-bg: rgba(255, 255, 255, 0.98);
  --ui-header-line: #cfd8e3;
  --ui-motion-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ui-motion-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

html {
  scroll-padding-top: calc(var(--ui-header-height) + var(--ui-space-4));
}

body {
  padding-top: var(--ui-header-height);
}

[id] {
  scroll-margin-top: calc(var(--ui-header-height) + var(--ui-space-4));
}

.site-header,
.product-header,
.topic-header {
  position: fixed !important;
  inset: 0 0 auto 0;
  z-index: 1000;
  min-height: var(--ui-header-height);
  background: var(--ui-header-bg) !important;
  border-bottom: 1px solid var(--ui-header-line) !important;
  box-shadow: none !important;
}

.header-inner,
.product-header__inner,
.topic-header .shell {
  display: flex;
  align-items: center;
  min-height: var(--ui-header-height) !important;
  height: var(--ui-header-height);
  box-sizing: border-box;
}

.header-inner .main-nav,
.product-header nav,
.topic-header nav,
.header-actions {
  align-items: center;
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-self: stretch;
}

/* Header CTA uses a fixed component height, rather than inline-link padding.
   This keeps its optical centre stable while the active navigation item changes. */
.site-header .header-actions .button,
.header-cta,
.product-header__cta {
  display: inline-flex;
  flex: 0 0 auto;
  align-self: center;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: var(--ui-button-height);
  min-height: var(--ui-button-height);
  margin-block: 0;
  line-height: 1.2;
  white-space: nowrap;
}

/* Header alignment: equal side tracks keep the navigation centred in the
   header itself, not merely in the space left after the logo. */
.header-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--ui-button-height);
  padding-inline: var(--ui-space-3);
  color: #253446;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: color 140ms ease, background-color 140ms ease;
}

.header-login:hover {
  color: var(--ui-primary-hover);
  background: #eef5fd;
}

.header-login:active {
  color: var(--ui-primary-active);
  background: #dceafa;
}

@media (min-width: 1100px) {
  .site-header .header-inner,
  .product-header .product-header__inner,
  .topic-header .shell {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
    column-gap: var(--ui-space-5);
  }

  .site-header .brand,
  .product-header .product-brand,
  .topic-header .topic-brand {
    grid-column: 1;
    justify-self: start;
    min-width: 0;
  }

  .site-header .main-nav,
  .product-header nav,
  .topic-header nav {
    grid-column: 2;
    justify-content: center;
    justify-self: center;
    flex: 0 0 auto;
    margin: 0;
  }

  .site-header .header-actions,
  .product-header .header-actions,
  .topic-header .header-actions {
    grid-column: 3;
    justify-self: end;
    align-self: center;
    min-height: var(--ui-header-height);
    gap: var(--ui-space-2);
  }
}

.skip-link {
  z-index: 1100;
}

.button,
.header-cta,
.product-header__cta,
.product-primary,
.product-callout a,
.upload-button {
  min-height: var(--ui-button-height);
  padding: 0 var(--ui-space-5);
  border: 1px solid var(--ui-primary);
  border-radius: var(--ui-button-radius) !important;
  background: var(--ui-primary);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none !important;
  transform: none !important;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    opacity 140ms ease;
}

.button-small {
  min-height: var(--ui-button-height);
  padding-inline: var(--ui-space-4);
  font-size: 13px;
}

.hero-actions .button,
.product-primary,
.topic-hero .button,
.topic-cta .button {
  min-height: var(--ui-button-height-large) !important;
  height: var(--ui-button-height-large);
  padding-inline: var(--ui-space-5) !important;
}

.button:hover,
.header-cta:hover,
.product-header__cta:hover,
.product-primary:hover,
.product-callout a:hover,
.upload-button:hover {
  border-color: var(--ui-primary-hover);
  background: var(--ui-primary-hover);
  color: #fff;
}

.button:active,
.header-cta:active,
.product-header__cta:active,
.product-primary:active,
.product-callout a:active,
.upload-button:active {
  border-color: var(--ui-primary-active);
  background: var(--ui-primary-active);
}

.button:focus-visible,
.header-cta:focus-visible,
.product-header__cta:focus-visible,
.product-primary:focus-visible,
.product-callout a:focus-visible,
.upload-button:focus-visible,
.site-header a:focus-visible,
.product-header a:focus-visible,
.topic-header a:focus-visible {
  outline: 3px solid var(--ui-focus);
  outline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--ui-focus);
  outline-offset: 3px;
}

.button-ghost,
.upload-button {
  border-color: #8794a3;
  background: #fff;
  color: #17212c;
}

.button-ghost:hover,
.upload-button:hover {
  border-color: var(--ui-primary);
  background: #eef5fd;
  color: #103f74;
}

.button-ghost:active,
.upload-button:active {
  border-color: var(--ui-primary-active);
  background: #dceafa;
  color: #0a3768;
}

.button-ghost[aria-busy="true"]::after,
.upload-button[aria-busy="true"]::after {
  border-color: rgba(23, 105, 194, 0.3);
  border-top-color: var(--ui-primary);
}

.topic-cta .button {
  border-color: #fff;
  background: #fff;
  color: #17212c;
}

.topic-cta .button:hover {
  border-color: #d7e5f5;
  background: #edf5fd;
  color: #103f74;
}

.topic-cta .button:active {
  border-color: #c2d7ee;
  background: #dceafa;
  color: #0a3768;
}

.button[disabled],
.button[aria-disabled="true"],
.header-cta[aria-disabled="true"],
.product-header__cta[aria-disabled="true"],
.product-primary[aria-disabled="true"],
.upload-button:disabled {
  border-color: #c5ccd5;
  background: #e5e9ee;
  color: #7a8490;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 1;
}

.button[aria-busy="true"],
.header-cta[aria-busy="true"],
.product-header__cta[aria-busy="true"],
.product-primary[aria-busy="true"] {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.button[aria-busy="true"]::after,
.header-cta[aria-busy="true"]::after,
.product-header__cta[aria-busy="true"]::after,
.product-primary[aria-busy="true"]::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ui-button-spin 700ms linear infinite;
}

/* One FAQ language across landing, product and document pages. */
.faq-list details {
  overflow: clip;
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ui-space-4);
  color: #17212c;
  transition:
    color 180ms ease,
    background-color 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .faq-list summary:hover {
    color: var(--ui-primary-hover);
  }
}

.faq-list summary:focus-visible {
  outline: 3px solid var(--ui-focus);
  outline-offset: -3px;
}

.faq-list .faq-toggle-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: auto;
  color: var(--ui-primary);
  transition: transform 200ms var(--ui-motion-ease-out);
}

.faq-list .faq-toggle-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.faq-list details[open] .faq-toggle-icon {
  transform: rotate(45deg);
}

.topic-page .faq-list.faq-enhanced summary::after {
  content: none;
}

@keyframes ui-button-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .button,
  .header-cta,
  .product-header__cta,
  .product-primary,
  .product-callout a,
  .upload-button {
    transition: none;
  }

  .faq-list .faq-toggle-icon {
    transition: none;
  }
}

@media (max-width: 1099px) {
  :root { --ui-header-height: 64px; }

  .site-header .main-nav,
  .product-header nav,
  .topic-header nav,
  .site-header .login,
  .site-header .menu-button,
  .site-header .mobile-menu {
    display: none !important;
  }

  .site-header .header-actions,
  .site-header .header-actions .button,
  .product-header__cta,
  .topic-header .header-cta {
    display: inline-flex !important;
  }

  .header-inner,
  .product-header__inner,
  .topic-header .shell {
    gap: var(--ui-space-3) !important;
  }

  .header-actions,
  .product-header__cta,
  .topic-header .header-cta {
    margin-left: auto;
  }
}

@media (min-width: 1280px) and (max-width: 1439px) {
  .shell,
  .product-shell {
    width: min(1200px, calc(100% - 96px)) !important;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .shell,
  .product-shell {
    width: min(1120px, calc(100% - 64px)) !important;
  }

  .header-inner,
  .product-header__inner,
  .topic-header .shell {
    gap: var(--ui-space-5) !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .shell,
  .product-shell {
    width: min(880px, calc(100% - 48px)) !important;
  }
}

@media (min-width: 430px) and (max-width: 767px) {
  .shell,
  .product-shell {
    width: calc(100% - 40px) !important;
  }
}

@media (min-width: 390px) and (max-width: 429px) {
  .shell,
  .product-shell {
    width: calc(100% - 36px) !important;
  }
}

@media (min-width: 360px) and (max-width: 389px) {
  .shell,
  .product-shell {
    width: calc(100% - 32px) !important;
  }
}

@media (max-width: 639px) {
  .site-header .shell,
  .product-header__inner,
  .topic-header .shell {
    width: calc(100% - 32px) !important;
  }

  .site-header .brand-copy small,
  .topic-brand small {
    display: none;
  }

  .site-header .brand-copy {
    display: block;
    font-size: 0;
  }

  .site-header .brand-copy strong,
  .topic-brand b,
  .product-brand span {
    font-size: 13px !important;
    white-space: nowrap;
  }

  .site-header .word-mark,
  .topic-brand img,
  .product-brand img {
    width: 36px !important;
    height: 36px !important;
    object-fit: contain;
  }

  .site-header .brand,
  .topic-brand,
  .product-brand {
    gap: var(--ui-space-2) !important;
    min-width: 0;
  }

  .site-header .header-actions .button,
  .product-header__cta,
  .topic-header .header-cta {
    height: 40px;
    min-height: 40px;
    padding-inline: var(--ui-space-3);
    font-size: 12px;
    white-space: nowrap;
  }
}

/* Shared reading scale and vertical rhythm. These rules intentionally avoid
   document-preview typography, which uses its own miniature editor scale. */
.hero h1,
.topic-hero h1,
.product-hero h1 {
  max-width: none;
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero h2,
.topic-page main h2,
.product-page main h2,
.product-main h2,
.home-page main h2 {
  font-size: clamp(26px, 2.8vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.home-page main h3,
.topic-page main h3,
.product-page main h3,
.product-main h3 {
  font-size: clamp(22px, 1.8vw, 26px);
  font-weight: 600;
  line-height: 1.25;
}

.home-page .hero {
  padding-block: clamp(56px, 6vw, 80px);
}

.home-page .start-work,
.home-page .editor-section,
.home-page .documents-section,
.home-page .features,
.home-page .word-online-copy,
.home-page .docx-guide,
.home-page .faq-section {
  padding-block: clamp(64px, 6vw, 80px);
}

.home-page .hero .lead {
  margin-block: var(--ui-space-5) var(--ui-space-6);
  font-size: clamp(16px, 1.35vw, 18px);
}

.home-page .hero h1 [data-hero-line] {
  display: block;
  white-space: normal;
}

@media (max-width: 1099px) {
  .site-header .header-actions,
  .product-header .header-actions,
  .topic-header .header-actions {
    display: flex !important;
    margin-left: auto;
    align-items: center;
  }

  .site-header .header-actions .button,
  .product-header .header-actions .product-header__cta,
  .topic-header .header-actions .header-cta {
    display: inline-flex !important;
  }

  .site-header .header-actions .header-login,
  .product-header .header-actions .header-login,
  .topic-header .header-actions .header-login {
    display: none !important;
  }
}

@media (max-width: 639px) {
  .hero h1,
  .topic-hero h1,
  .product-hero h1 {
    font-size: clamp(34px, 9.5vw, 40px);
    line-height: 1.1;
  }

  .home-page .hero {
    padding-block: var(--ui-space-7) var(--ui-space-6);
  }

  .home-page .start-work,
  .home-page .editor-section,
  .home-page .documents-section,
  .home-page .features,
  .home-page .word-online-copy,
  .home-page .docx-guide,
  .home-page .faq-section {
    padding-block: clamp(40px, 12vw, 56px);
  }

  .home-page .hero .lead {
    margin-block: var(--ui-space-4) var(--ui-space-5);
  }

  /* Topic pages use several desktop compositions. They all collapse to one
     content column on a phone, including layout-3 which previously kept its
     two-column desktop grid and squeezed the copy. */
  .topic-page .topic-hero .shell {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: var(--ui-space-5);
    min-height: 0;
  }

  .topic-page .hero-copy {
    min-width: 0;
  }

  .topic-page .topic-visual {
    order: initial;
    width: 100%;
    min-width: 0;
    margin: 0;
  }
}

/* The footer catalogue pages share a compact reading scale. Page-specific
   layouts remain intact; only oversized type and empty section height are
   normalised here. */
.topic-page .hero-copy h1,
.product-hero h1,
.hub-page main h1 {
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.topic-page .quick-answer h2,
.topic-page .context-heading h2,
.topic-page .section-heading h2,
.topic-page .quality-check h2,
.topic-page .example-content h2,
.topic-page .related-documents h2,
.topic-page .topic-cta h2,
.product-intro h2,
.product-split h2,
.product-faq h2,
.product-section--catalog h2,
.hub-page main h2 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.topic-page .topic-structure h3,
.product-step h2,
.hub-page main h3 {
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.25;
}

.topic-page .topic-hero .shell,
.topic-page.layout-1 .topic-hero .shell,
.topic-page.layout-2 .topic-hero .shell,
.topic-page.layout-3 .topic-hero .shell,
.topic-page.layout-4 .topic-hero .shell,
.topic-page.layout-5 .topic-hero .shell {
  min-height: 0;
  padding-block: clamp(56px, 6vw, 72px);
}

.topic-page .topic-context,
.topic-page .topic-structure,
.topic-page .working-example,
.topic-page .quality-check,
.topic-page .topic-faq,
.topic-page .related-documents,
.topic-page .topic-cta,
.product-section {
  padding-block: clamp(48px, 5vw, 64px);
}

.hub-page main > section {
  padding-block: clamp(48px, 5vw, 64px);
}

@media (max-width: 639px) {
  .topic-page .hero-copy h1,
  .product-hero h1,
  .hub-page main h1 {
    font-size: clamp(32px, 9vw, 40px);
  }

  .topic-page .topic-hero .shell,
  .topic-page.layout-1 .topic-hero .shell,
  .topic-page.layout-2 .topic-hero .shell,
  .topic-page.layout-3 .topic-hero .shell,
  .topic-page.layout-4 .topic-hero .shell,
  .topic-page.layout-5 .topic-hero .shell,
  .topic-page .topic-context,
  .topic-page .topic-structure,
  .topic-page .working-example,
  .topic-page .quality-check,
  .topic-page .topic-faq,
  .topic-page .related-documents,
  .topic-page .topic-cta,
  .product-section,
  .hub-page main > section {
    padding-block: clamp(32px, 10vw, 48px);
  }
}

/* Breadcrumbs generated for category hubs where a bespoke breadcrumb is absent. */
.seo-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 24px;
  color: #617087;
  font-size: 13px;
}

.seo-breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.seo-breadcrumbs a:hover,
.seo-breadcrumbs a:focus-visible {
  color: #185abd;
  text-decoration: underline;
}

/* Site-wide compactness pass.
   Earlier page generations each carried their own 70–112px section rhythm and
   some topic heroes reserved 600px+ before content. This final shared layer
   makes whitespace a single controlled token without flattening the layouts. */
:root {
  --ui-button-height: 40px;
  --ui-button-height-large: 40px;
  --ui-section-space: 28px;
  --ui-hero-space: 40px;
}

.shell,
.product-shell,
.container {
  width: min(calc(100% - 32px), 1200px) !important;
  margin-inline: auto;
}

main > section {
  min-height: 0 !important;
  margin-block: 0 !important;
  padding-block: var(--ui-section-space) !important;
}

main > .hero,
main > .topic-hero,
main > .product-hero,
main > .page-hero {
  min-height: 0 !important;
  padding-block: var(--ui-hero-space) !important;
}

/* The hero internals used to contribute a second large padding or min-height. */
.topic-page .topic-hero .shell,
.topic-page.layout-1 .topic-hero .shell,
.topic-page.layout-2 .topic-hero .shell,
.topic-page.layout-3 .topic-hero .shell,
.topic-page.layout-4 .topic-hero .shell,
.topic-page.layout-5 .topic-hero .shell,
.topic-page .quick-answer .shell,
.doc-page .page-hero,
.product-page .product-hero {
  min-height: 0 !important;
  padding-block: 0 !important;
}

.topic-page .hero-copy {
  padding-block: 0 !important;
}

.topic-page .topic-context .shell,
.topic-page .topic-structure .shell,
.topic-page .working-example .shell,
.topic-page .quality-check .shell,
.topic-page .topic-faq .shell,
.topic-page .related-documents .shell,
.product-page .product-intro,
.product-page .product-split,
.product-page .product-faq,
.home-page .start-layout,
.home-page .split-layout,
.home-page .documents-layout,
.home-page .workflow,
.home-page .reading-layout,
.home-page .guide-layout,
.home-page .faq-layout {
  gap: 20px !important;
}

.topic-page .section-heading,
.topic-page .context-heading,
.home-page .section-heading,
.product-page .section-heading {
  margin-bottom: 20px !important;
}

.topic-page .section-heading h2,
.topic-page .quality-check h2,
.topic-page .topic-cta h2,
.home-page main h2,
.product-page main h2,
.hub-page main h2 {
  margin-block: 0 10px !important;
}

.topic-page p,
.product-page p,
.hub-page p,
.home-page main > section p {
  font-size: 16px;
  line-height: 1.55;
}

.topic-page .hero-copy h1,
.product-page .product-hero h1,
.doc-page .page-hero h1,
.hub-page main h1,
.home-page .hero h1 {
  font-size: clamp(32px, 4vw, 50px) !important;
  line-height: 1.08 !important;
}

.topic-page main h2,
.product-page main h2,
.doc-page main h2,
.hub-page main h2,
.home-page main h2 {
  font-size: clamp(25px, 3vw, 36px) !important;
  line-height: 1.15 !important;
}

.topic-page main h3,
.product-page main h3,
.doc-page main h3,
.hub-page main h3,
.home-page main h3 {
  font-size: clamp(19px, 2vw, 24px) !important;
  line-height: 1.25 !important;
}

/* A breadcrumb is already present in structured data. It should not displace
   the first meaningful page element or compete with the H1 visually. */
.breadcrumbs,
.product-breadcrumbs,
.seo-breadcrumbs {
  display: none !important;
}

/* Page taxonomy remains in metadata and navigation, not in the first reading
   line. The first visible content on every page is therefore its H1. */
.topic-page .topic-hero .eyebrow,
.product-page .product-hero > .product-shell > p:first-child,
.doc-page .page-hero .eyebrow,
.hub-page main > .eyebrow {
  display: none !important;
}

.button,
.header-cta,
.product-header__cta,
.product-primary,
.product-callout a,
.upload-button,
.tryout-actions .button,
.tryout-secondary {
  width: auto !important;
  min-height: var(--ui-button-height) !important;
  height: var(--ui-button-height) !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  line-height: 1 !important;
  white-space: nowrap;
}

.hero-actions,
.tryout-actions {
  gap: 12px !important;
  margin-top: 20px !important;
}

.home-page .hero-actions .button,
.topic-page .hero-actions .button,
.home-page .tryout-actions .button,
.home-page .tryout-secondary {
  width: auto !important;
}

.home-page .hero .lead,
.topic-page .hero-answer,
.product-page .product-lead,
.doc-page .page-hero p:not(.eyebrow) {
  margin-block: 10px 20px !important;
}

.topic-page .hero-actions,
.topic-page .hero-facts,
.topic-page .hero-facts li {
  margin-top: 16px !important;
}

.topic-page .topic-structure li,
.topic-page .quality-check li,
.topic-page .related-documents nav a,
.product-page .product-step,
.product-page .product-document-links a {
  min-height: 0 !important;
  padding-block: 16px !important;
}

.topic-page .related-documents nav span {
  margin-bottom: 10px !important;
}

.topic-page .working-example .shell,
.topic-page .quality-check .shell,
.topic-page .topic-faq .shell,
.topic-page .related-documents .shell,
.product-page .product-intro,
.product-page .product-split,
.product-page .product-faq {
  gap: 20px !important;
}

.faq-list summary,
.topic-page .faq-list summary,
.product-page .product-faq summary {
  min-height: 0 !important;
  padding-block: 14px !important;
}

.topic-page .faq-list p,
.product-page .product-faq p {
  margin-block: 0 14px !important;
}

/* The home final panel remains a product proof, but no longer consumes a
   viewport-height-sized slab after the FAQ. */
.home-page .product-tryout {
  padding-block: 28px !important;
}

.home-page .tryout-layout {
  gap: 20px !important;
}

.home-page .tryout-copy h2 {
  margin-bottom: 10px !important;
  font-size: clamp(25px, 3vw, 36px) !important;
}

.home-page .tryout-preview {
  min-height: 280px !important;
  padding: 14px !important;
}

.home-page .tryout-editor-canvas {
  min-height: 190px !important;
  padding-block: 18px !important;
}

.home-page .tryout-sheet {
  min-height: 160px !important;
  padding: 24px 28px !important;
}

.home-page .tryout-status {
  bottom: 16px !important;
}

.final-cta {
  padding-block: 28px !important;
  background: #17212c;
  color: #fff;
}

.final-cta__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.final-cta h2,
.final-cta p {
  margin: 0;
}

.final-cta h2 {
  font-size: clamp(22px, 2.5vw, 30px) !important;
}

.final-cta p {
  margin-top: 8px;
  color: #d4e0ed;
}

.topic-page .topic-cta .shell,
.final-cta__content {
  align-items: center !important;
}

.topic-page .topic-cta .button,
.final-cta .button {
  align-self: center;
  width: auto !important;
}

main > section + section {
  margin-top: 0 !important;
}

main *,
main *::before,
main *::after {
  min-width: 0;
}

main p,
main h1,
main h2,
main h3,
main a,
main span {
  overflow-wrap: break-word;
}

main img,
main video,
main svg {
  display: block;
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  :root {
    --ui-section-space: 20px;
    --ui-hero-space: 28px;
  }

  .topic-page .topic-hero .shell,
  .topic-page.layout-1 .topic-hero .shell,
  .topic-page.layout-2 .topic-hero .shell,
  .topic-page.layout-3 .topic-hero .shell,
  .topic-page.layout-4 .topic-hero .shell,
  .topic-page.layout-5 .topic-hero .shell {
    gap: 16px !important;
  }

  .topic-page .topic-context .shell,
  .topic-page .topic-structure .shell,
  .topic-page .working-example .shell,
  .topic-page .quality-check .shell,
  .topic-page .topic-faq .shell,
  .topic-page .related-documents .shell,
  .product-page .product-intro,
  .product-page .product-split,
  .product-page .product-faq,
  .home-page .start-layout,
  .home-page .split-layout,
  .home-page .documents-layout,
  .home-page .workflow,
  .home-page .reading-layout,
  .home-page .guide-layout,
  .home-page .faq-layout,
  .home-page .tryout-layout {
    gap: 16px !important;
  }

  .final-cta__content {
    align-items: flex-start !important;
    flex-direction: column;
  }

  .topic-page .topic-cta .shell {
    align-items: flex-start !important;
  }

  .topic-page .hero-actions,
  .home-page .hero-actions,
  .home-page .tryout-actions {
    align-items: center;
    flex-direction: row !important;
    flex-wrap: wrap;
  }

  .home-page .tryout-preview {
    min-height: 230px !important;
  }

  .home-page .tryout-editor-tabs span:nth-last-child(-n + 3) {
    display: none;
  }
}

@media (max-width: 1099px) {
  /* The status card previously used a negative right offset and was the
     sole source of a 2px horizontal overflow at tablet width. */
  .home-page .tryout-status {
    right: 12px !important;
  }
}

/* Layout-2 originally expanded its preview to a whole desktop row. Keep the
   document image as supporting evidence on the right, never as a full-width
   banner, across every topic page that uses this composition. */
@media (min-width: 981px) {
  .topic-page.layout-2 .topic-hero .shell {
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr) !important;
    align-items: center;
    gap: 20px !important;
  }

  .topic-page.layout-2 .topic-visual,
  .topic-page .topic-visual {
    width: min(100%, 620px);
    max-width: 620px;
    justify-self: end;
  }

  .topic-page.layout-2 .topic-visual {
    margin: 0 !important;
    padding: 16px !important;
  }

  .topic-page.layout-2 .topic-visual img {
    width: 100% !important;
  }
}

@media (max-width: 680px) {
  .seo-breadcrumbs {
    width: calc(100% - 36px) !important;
    padding-top: 16px;
    font-size: 12px;
  }
}

/* A single, low-frequency reading transition for non-home pages. */
body.motion-page-ready [data-motion-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 480ms var(--ui-motion-ease-out) var(--motion-delay, 0ms),
    transform 480ms var(--ui-motion-ease-out) var(--motion-delay, 0ms);
}

body.motion-page-ready [data-motion-reveal][data-motion-visible] {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  body.motion-page-ready [data-motion-reveal] {
    transform: none;
    transition: opacity 180ms ease;
  }
}

/* Shared footer — one reference implementation for every route. */
.site-footer {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 34px 0 68px !important;
  overflow: hidden;
  border: 0;
  background: #171717 !important;
  color: #fff;
}

.site-footer *,
.site-footer *::before,
.site-footer *::after {
  box-sizing: border-box;
}

.site-footer .shell {
  display: block;
  width: min(1740px, calc(100% - 72px)) !important;
  max-width: none;
  margin: 0 auto;
  padding: 0 !important;
}

.site-footer .footer-top--reference {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 44px;
}

.site-footer .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.site-footer .footer-brand .word-mark {
  display: block;
  flex: 0 0 40px;
  width: 40px !important;
  height: 40px !important;
  object-fit: contain;
}

.site-footer .footer-brand .brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.site-footer .footer-brand strong {
  color: #fff;
  font-size: 15px;
  line-height: 1.08;
  letter-spacing: 0;
}

.site-footer .footer-brand small {
  color: #888;
  font-size: 11px;
  line-height: 1.2;
}

.site-footer .footer-version {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #28384d;
  border-radius: 6px;
  background: #1c2532;
  color: #e5eaf0;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

.site-footer .footer-version b {
  padding-left: 10px;
  border-left: 1px solid #344960;
  color: #397fdf;
  font-size: 16px;
}

.site-footer .footer-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  align-items: start;
  gap: 44px !important;
  width: 100%;
  margin: 38px 0 0 !important;
  padding: 0 !important;
}

.site-footer .footer-grid details {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.site-footer .footer-grid summary {
  display: block;
  margin: 0 0 14px;
  padding: 0;
  color: #747474;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .01em;
  text-transform: uppercase;
  cursor: default;
  list-style: none;
}

.site-footer .footer-grid summary::-webkit-details-marker,
.site-footer .footer-grid summary::marker {
  display: none;
  content: "";
}

.site-footer .footer-grid summary span {
  display: none;
}

.site-footer .footer-grid a {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 9px;
  padding: 0;
  color: #f0f0f0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.42;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 160ms ease;
}

.site-footer .footer-grid a:hover {
  color: #6ea8ff;
}

.site-footer .footer-grid a:focus-visible,
.site-footer .footer-brand:focus-visible {
  outline: 2px solid #6ea8ff;
  outline-offset: 4px;
}

.site-footer .footer-bottom {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 50px 0 0;
  padding: 0;
  border: 0;
  color: #7e7e7e;
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 1100px) {
  .site-footer .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    column-gap: 48px !important;
    row-gap: 36px !important;
  }
}

@media (max-width: 680px) {
  .site-footer {
    padding: 28px 0 34px !important;
  }

  .site-footer .shell {
    width: calc(100% - 32px) !important;
  }

  .site-footer .footer-top--reference {
    align-items: flex-start;
    gap: 18px;
  }

  .site-footer .footer-brand .word-mark {
    flex-basis: 36px;
    width: 36px !important;
    height: 36px !important;
  }

  .site-footer .footer-brand strong {
    font-size: 13px;
  }

  .site-footer .footer-brand small {
    font-size: 10px;
  }

  .site-footer .footer-version {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 0;
  }

  .site-footer .footer-version::before {
    content: "Word";
    font-size: 12px;
  }

  .site-footer .footer-version b {
    padding-left: 8px;
    font-size: 13px;
  }

  .site-footer .footer-grid {
    display: block !important;
    margin-top: 26px !important;
  }

  .site-footer .footer-grid details {
    border-bottom: 1px solid #343434;
  }

  .site-footer .footer-grid details:first-child {
    border-top: 1px solid #343434;
  }

  .site-footer .footer-grid summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 52px;
    margin: 0;
    color: #a6a6a6;
    cursor: pointer;
    touch-action: manipulation;
  }

  .site-footer .footer-grid summary span {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #6ea8ff;
    font-size: 21px;
    font-weight: 300;
    line-height: 1;
    transition: transform 180ms ease;
  }

  .site-footer .footer-grid details[open] summary span {
    transform: rotate(45deg);
  }

  .site-footer .footer-grid details > a {
    margin: 0 0 12px;
    padding-left: 0;
    font-size: 15px;
  }

  .site-footer .footer-grid details > a:last-child {
    margin-bottom: 20px;
  }

  .site-footer .footer-bottom {
    margin-top: 28px;
    font-size: 12px;
  }
}
