/*
 * The Survai wordmark's registered mark (M47; owner, 11 Oct 2026: "on all parts of the site, the
 * Survai wordmark logo is presented with the R for the registered trademark").
 *
 * survai_wordmark_html() (survai_wordmark_helpers.php) draws
 *   <span class="survai-wordmark-lockup"><img …><sup class="brand__mark" aria-hidden="true">&reg;</sup></span>
 * and these rules place the mark where the marketing header has it (marketing.css, .mk-brand
 * .brand__mark): at the word's height h, its left edge 0.03h past the word, its top 0.088h below the
 * word's top, 0.3235h tall (never under 10px), weight 600.
 *
 * The mark is positioned absolutely, so the word keeps its box exactly and every page's own rules
 * for the <img> (size, margin, filter) are untouched. Linked by pwa_head.php for every page, signed
 * in or out, and by Template Studio, which does not load pwa_head.php.
 *
 * A page sets two inherited properties on an ancestor of the lockup when its word is not the default:
 *   --survai-wordmark-height  the <img>'s rendered height (default 28px, the sidebars' size)
 *   --survai-wordmark-ink     the colour the word is drawn in (default black; white in Carbon dark).
 * The word is an <img> coloured by a filter, so currentColor (blue on a sidebar link) is not its colour.
 */

.survai-wordmark-lockup {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    line-height: 0;
}

.survai-wordmark-lockup > .brand__mark {
    position: absolute;
    left: calc(100% + var(--survai-wordmark-height, 28px) * 0.03);
    top: calc(var(--survai-wordmark-height, 28px) * 0.088);
    font-size: max(10px, calc(var(--survai-wordmark-height, 28px) * 0.3235));
    line-height: 1;
    font-weight: 600;
    /* The marketing header's own font (marketing.css --mk-font, not defined on app pages): the app's
       Arial draws a different ® that sits higher. One glyph everywhere. */
    font-family: "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--survai-wordmark-ink, #000);
    pointer-events: none;
}

/* Carbon dark draws the word white (brightness(0) invert(1)): the mark too, never blue. */
html[data-theme="dark"] {
    --survai-wordmark-ink: #fff;
}

/* The sign-in and set-password pages draw the SVG unfiltered, in its own #171717, in both themes;
   they set --survai-wordmark-height themselves, beside their responsive heights. */
.login-logo,
.setup-logo {
    --survai-wordmark-ink: #171717;
}

/* Template Studio's header is navy in both themes and draws the word white. */
.sai-studio-logo {
    --survai-wordmark-ink: #fff;
}

/* The report processing card draws the word 36px tall. */
.svrpm__brand {
    --survai-wordmark-height: 36px;
}
