/* Shared controls; family metrics and state exceptions remain scoped. */
@layer base, components, utilities;
@layer components {
:where(.site-menu-link, .site-menu-toggle, .site-menu-close, .customer-logos-toggle, [data-testimonial-action]) { --button-radius: var(--radius-control); }

.static-search-results:not(:empty) { padding: var(--site-space-16); margin: var(--site-space-12) 0; background: var(--header-panel); color: var(--header-ink); border: 1px solid var(--header-line); border-radius: var(--radius-control); max-height: 420px; overflow: auto; }

.static-search-results a { color: inherit; text-decoration: underline; }

/* SITE-TABS-01: one tab row for the Blog categories and the Docs sections; screens add only the row's place and outer line.
   The hidden copy of the label reserves the current (600) width so tabs never shift. */
.site-tabs { display: flex; align-items: stretch; gap: var(--site-space-24); overflow-x: auto; }
.site-tab { display: inline-flex; flex: none; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; color: var(--header-idle); font: var(--type-weight-regular) var(--type-body-sm-size)/var(--type-line-body) var(--type-font-text); text-decoration: none; text-transform: none; white-space: nowrap; }
.site-tab::after { content: attr(data-label); content: attr(data-label) / ""; height: 0; overflow: hidden; visibility: hidden; font-weight: var(--type-weight-semibold); pointer-events: none; user-select: none; }
.site-tab[aria-current] { color: var(--header-ink); font-weight: var(--type-weight-semibold); box-shadow: inset 0 -2px 0 var(--header-ink); text-decoration: none; }
@media (hover: hover) { .site-tab:hover { color: var(--header-ink); text-decoration: none; } }

/* SITE-SIDE-NAV-01: the side list for links that change the page (the Docs documents). In-page contents lists use .site-page-toc below. */
.site-side-nav :is(ul, ol) { display: grid; gap: var(--site-space-4); margin: 0; padding: 0; list-style: none; }
.site-side-nav li { margin: 0; padding: 0; }
.site-side-nav a { display: flex; align-items: center; min-height: 44px; padding: var(--site-space-10) var(--site-space-12); border: 0; border-radius: var(--radius-control); color: var(--header-muted); font: var(--type-weight-regular) var(--type-body-sm-size)/var(--type-line-body) var(--type-font-text); text-decoration: none; overflow-wrap: anywhere; }
.site-side-nav a[aria-current] { background: var(--header-hover); color: var(--header-ink); text-decoration: none; }
@media (hover: hover) { .site-side-nav a:hover { background: var(--header-hover); color: var(--header-ink); text-decoration: none; } }

/* SITE-TOC-01: the in-page contents list, drawn like the Docs "On this page" panel. A line marks the place being read;
   the filled row of .site-side-nav is kept for lists that change the page. Screens add only position. */
.site-page-toc { padding-inline-start: var(--site-space-8); }
.site-page-toc-title { display: flex; align-items: center; margin: 0 0 var(--site-space-12); padding: 0 0 0 calc(var(--site-space-16) + 1px); color: var(--header-ink); font: var(--type-weight-semibold) var(--type-body-sm-size)/var(--type-line-body) var(--type-font-text); }
.site-page-toc-label { position: relative; display: inline-flex; align-items: center; }
.site-page-toc-icon { position: absolute; inset-inline-start: -24px; top: 50%; display: block; width: 16px; height: 16px; transform: translateY(-50%); }
.site-page-toc-list { margin: 0; padding: 0; border-left: 1px solid var(--header-line); list-style: none; }
.site-page-toc-list li { margin: 0; padding: 0; }
.site-page-toc-list a { display: flex; align-items: center; min-height: 36px; margin-left: -1px; padding: var(--site-space-6) 0 var(--site-space-6) 15px; border-left: 2px solid transparent; color: var(--header-muted); font: var(--type-weight-regular) var(--type-body-sm-size)/var(--type-line-body) var(--type-font-text); text-decoration: none; overflow-wrap: anywhere; }
.site-page-toc-list a[aria-current] { border-left-color: var(--header-accent); color: var(--header-ink); text-decoration: none; }
@media (hover: hover) { .site-page-toc-list a:hover { color: var(--header-ink); text-decoration: none; } }
@media (pointer: coarse) { .site-page-toc-list a { min-height: 44px; } }

.product-page .product-button,
.pricing-action {
  min-height: var(--site-control-action-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-button);
}

/* SITE-BUTTON-01: one page action component; screens add only width and outer spacing. */
.site-button {
  --site-button-bg: transparent; --site-button-ink: var(--site-color-ink); --site-button-line: transparent;
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--site-control-action-height); margin: 0; padding: 0 var(--site-space-24);
  border: 1px solid var(--site-button-line); border-radius: var(--radius-button); box-shadow: none;
  background-color: var(--site-button-bg); color: var(--site-button-ink);
  font: var(--type-weight-medium) var(--type-body-size)/var(--type-line-body) var(--type-font-text);
  text-decoration: none; white-space: nowrap; cursor: pointer; opacity: 1;
}
.site-button:focus-visible { outline: var(--site-focus-ring); outline-offset: var(--site-space-2); }
/* SITE-CTA-01: the border appears first, then the Stego fill sweeps in. */
.site-button-primary {
  --site-button-bg: var(--site-color-accent);
  background-image: var(--cta-fill); background-origin: border-box; background-repeat: no-repeat; background-size: 0 100%;
  transition: border-color var(--cta-border-time) ease-out, background-size var(--cta-fill-time) ease-out var(--cta-fill-delay), color var(--cta-fill-time) ease-out var(--cta-fill-delay);
}
.site-button-primary:is(:active, :focus-visible):not(:disabled) { background-size: 100% 100%; border-color: var(--site-color-stego); color: var(--site-color-paper); }
@media (hover: hover) {
  .site-button-primary:hover:not(:disabled) { background-size: 100% 100%; border-color: var(--site-color-stego); color: var(--site-color-paper); }
}
.site-button-secondary { --site-button-line: var(--site-color-control-line); }
.site-button-secondary:is(:hover, :active):not(:disabled) { border-color: var(--site-color-ink); }
.site-button:disabled { background: var(--site-color-ink-16); border-color: transparent; color: var(--site-color-muted); cursor: not-allowed; }

/* SITE-TYPE-01: the HTML sitemap list follows the body role with item spacing. */
.sitemap-list { margin: 0; padding-left: 1.25em; columns: 20rem; line-height: var(--type-line-body); }
.sitemap-list li { margin-bottom: var(--site-space-8); break-inside: avoid; }
}
@layer utilities {
  /* SITE-SEARCH-FIELD-01: one search field for the Blog/Videos lists, the Docs home banner and the Docs subbar. Screens set only its width and place.
     It sits in this layer because the shared button utility, which also lives here, would otherwise reshape its submit button. */
  .site-search { position: relative; display: flex; align-items: center; width: 100%; min-height: 44px; margin: 0; padding: 0; }
  .site-search label:has(input[type="search"]) { display: flex; align-items: center; width: 100%; margin: 0; }
  .site-search input[type="search"] { box-sizing: border-box; display: block; width: 100%; min-width: 0; height: var(--site-control-search-height); margin: 0; padding: 0 var(--site-space-44) 0 var(--site-space-16); font: var(--type-weight-regular) var(--type-search-size)/var(--type-line-body) var(--type-font-text); letter-spacing: 0; }
  .site-search input[type="search"]::placeholder { color: var(--header-muted); opacity: 1; }
  /* Focus is the field's own darker border; the form-wide focus ring would draw a second line outside it. */
  form.site-search input[type="search"]:is(:focus, :focus-visible) { border-color: var(--site-focus-color); outline: none; box-shadow: inset 0 0 0 .5px var(--site-focus-color); }
  .site-search button[type="submit"] { position: absolute; top: calc(50% - var(--site-space-16)); right: var(--site-space-4); display: inline-flex; align-items: center; justify-content: center; width: var(--site-space-32); height: var(--site-space-32); min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: var(--site-radius-circle); background: transparent; color: var(--header-ink); box-shadow: none; cursor: pointer; }
  .site-search button[type="submit"]::before { content: none; }
  /* The 32px face keeps a 44px touch area. */
  .site-search button[type="submit"]::after { content: ""; display: block; position: absolute; inset: calc(-1 * var(--site-space-6)); }
  .site-search button[type="submit"] :is(svg, img) { width: 20px; height: 20px; }
  @media (hover: hover) { .site-search button[type="submit"]:hover { background: var(--header-hover); color: var(--header-ink); } }
  /* SITE-SEARCH-FIELD-01: the native cancel button hides itself, so ours replaces it. */
  form[role="search"] input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
  form[role="search"].has-clear input[type="search"] { padding-right: var(--site-space-80); }
  form[role="search"] > button.search-clear { position: absolute; z-index: 1; top: 50%; right: var(--site-space-44); display: inline-flex; align-items: center; justify-content: center; width: var(--site-space-32); height: var(--site-space-32); min-width: 0; min-height: 0; margin: 0; padding: 0; transform: translateY(-50%); border: 0; border-radius: var(--site-radius-circle); background: transparent; color: var(--site-color-muted); box-shadow: none; cursor: pointer; }
  form[role="search"] > button.search-clear[hidden] { display: none; }
  form[role="search"] > button.search-clear:hover { background: var(--site-color-control-hover); color: var(--site-color-ink); }
  /* SITE-SEARCH-02: one result design for Blog, Videos and Docs searches. */
  .static-search-results:has(a.search-item) > p:first-child { margin: 0 0 var(--site-space-8); padding-bottom: var(--site-space-8); border-bottom: 1px solid var(--site-color-line); color: var(--site-color-caption); font-size: var(--type-caption-size); line-height: var(--type-line-body); }
  .static-search-results p:has(> a.search-item) { margin: 0; }
  /* The negative margin keeps the text in line with the result count while the surface extends past it. */
  .static-search-results p > a.search-item { display: block; margin-inline: calc(-1 * var(--site-space-12)); padding: var(--site-space-8) var(--site-space-12); border-radius: var(--site-radius-control); color: var(--site-color-ink); text-decoration: none; }
  .static-search-results p > a.search-item:is(:hover, :focus-visible) { background: var(--site-color-control-hover); color: var(--site-color-ink); text-decoration: none; }
  .search-item-title { display: block; font-size: var(--type-body-size); font-weight: var(--type-weight-regular); line-height: var(--type-line-body); }
  .static-search-results a.search-item:is(:hover, :focus-visible) .search-item-title { text-decoration: underline; }
  .search-item-section { display: block; margin-top: var(--site-space-2); color: var(--site-color-muted); font-size: var(--type-caption-size); line-height: var(--type-line-body); }
form[role="search"] :is(input[type="search"], button, input[type="submit"]) { transition: none; }
  form[role="search"] input[type="search"] {
    border: 1px solid var(--header-button-line);
    border-radius: var(--site-radius-pill);
    background: var(--header-panel);
    color: var(--header-ink);
    font-weight: var(--type-weight-regular);
    outline: none;
    box-shadow: none;
  }
  form[role="search"] input[type="search"]:is(:focus, :focus-visible) {
    border-color: var(--site-focus-color);
    outline: none;
    box-shadow: inset 0 0 0 .5px var(--site-focus-color);
  }
  form[role="search"] :is(button, input[type="submit"]):focus:not(:focus-visible) { outline: none; }
  form[role="search"] :is(button, input[type="submit"]):focus-visible {
    outline: var(--site-focus-ring);
    outline-offset: calc(-1 * var(--site-space-4));
  }

:where(button, input[type="submit"], input[type="button"], .content-button-control) { border-radius: var(--button-radius, var(--radius-button)); }

body form[data-static-form] :is(input, textarea):is(:focus, :focus-visible) {
    outline: var(--site-focus-ring); outline-offset: var(--site-space-2); box-shadow: none; transition: none;
  }

body :is(a, button, summary, [role="button"]):focus:not(:focus-visible) { outline: none; }

:focus-visible,
[data-page-layout] :focus-visible { outline: var(--site-focus-ring); outline-offset: var(--site-space-2); }

.page-container {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--page-max);
    margin-inline: auto;
    padding-inline: var(--page-side);
  }
}

/* SITE-LINK-01: prose and text actions share the Docs underline; navigation and button/media roles opt out. */
@layer utilities {
  :is(.docs-content, .article-single .entry-content, .faq-answer, .home-faq-answer, .contact-offices, .static-form-note, .static-form-consent) a[href]:not(.video-link, .content-button__link, .content-builder-button, .content-button-control, .product-button, .pricing-action, [role="button"]):not(:has(img, video, iframe)),
  .home-faq-more a,
  .product-page .product-text-link {
    color: var(--site-link-color);
    text-decoration-line: underline;
    text-decoration-color: var(--site-link-underline);
    text-decoration-thickness: var(--site-link-thickness);
    text-underline-offset: var(--site-link-offset);
    text-decoration-skip-ink: auto;
  }
  /* Prose links inside grey body text keep that grey; the underline marks them. */
  .product-page .product-entry-note a { color: inherit; }
  /* Titles keep their resting hierarchy and use the same line when hovered.
     Back to Blog/Videos and the previous/next post links show no underline. */
  .resource-card .post-title a:hover,
  body[data-blog-archive]:not([data-blog-layout]) #main .post-title a:hover,
  .docs-home-grid a:hover {
    color: var(--site-link-color);
    text-decoration-line: underline;
    text-decoration-color: var(--site-link-underline);
    text-decoration-thickness: var(--site-link-thickness);
    text-underline-offset: var(--site-link-offset);
    text-decoration-skip-ink: auto;
  }
}
