/* Small interface marks use vectors and shapes, independent of emoji fonts. */
.ui-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  vertical-align: -.15em;
  overflow: visible;
}
.ui-icon-diagonal { transform: rotate(-45deg); }
.ui-icon-down { transform: rotate(90deg); }
.ui-icon-up { transform: rotate(-90deg); }
.website-example-links a,
.experience-proof > .proof-more,
.site-footer > a[href^="mailto:"],
.site-footer .back-top { gap: 8px; }
.site-footer > a[href^="mailto:"],
.site-footer .back-top { display: inline-flex; align-items: center; }
.document-review-note > .ui-icon {
  width: 14px;
  height: 14px;
  margin-top: 3px;
  color: #c5d4dc;
}
.example-browser-dots { display: inline-flex; align-items: center; gap: 4px; }
.example-browser-dots > span {
  display: block;
  width: 4px;
  height: 4px;
  flex: 0 0 4px;
  border-radius: 50%;
  background: currentColor;
}
.key-spin-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  line-height: 0;
}
.key-spin-icon > .ui-icon { display: block; width: 100%; height: 100%; }
#key-replay[aria-pressed="true"] .key-icon-rotate,
#key-replay[aria-pressed="false"] .key-icon-pause { display: none; }

/* An opaque compact header keeps the existing sky without backdrop repaint. */
@media (max-width: 1000px) {
  .site-header {
    background: #050707;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Phone composition keeps the card, invitation and actions in one short sequence. */
@media (max-width: 580px) {
  :root { --header-height: 64px; --page-gutter: 20px; }
  .site-header .brand { min-height: 44px; }
  .site-header .brand > img.nvl-wordmark { width: 138px; }
  .site-header .header-cta { height: 36px; min-height: 36px; margin-right: 0; padding: 8px 11px 8px 27px; font-size: 12px; line-height: 1; }
  .site-header .header-cta > svg { display: none; }
  /* Keep a 44px touch area around the quieter 36px silver control. */
  .site-header .header-cta::after { content: ''; position: absolute; inset: -5px 0; }
  .site-header .menu-toggle { width: 44px; min-width: 44px; height: 44px; align-items: center; padding: 10px; }
  .mobile-nav { background: #080b0c; box-shadow: 0 20px 35px #0008; }
  .mobile-nav a { min-height: 48px; padding-block: 12px; font-size: 15px; }
  .hero.hero-with-key { padding-block: 22px 22px; row-gap: 10px; }
  .hero.hero-with-key .eyebrow { font-size: 9.5px; letter-spacing: .12em; line-height: 1.5; }
  .hero.hero-with-key .eyebrow .line { width: 18px; }
  .hero.hero-with-key h1 { font-size: clamp(34px, 10.25vw, 44px); line-height: 1.06; margin-top: 16px; }
  .hero.hero-with-key .hero-description { font-size: 15px; line-height: 1.6; margin-top: 18px; }
  .hero.hero-with-key .hero-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 18px; margin-top: 20px; }
  .hero.hero-with-key .hero-actions .button,
  .contact-start .button.button-light,
  #contact-form .button.button-light { width: fit-content; min-width: 0; min-height: 44px; padding: 10px 12px 10px 31px; gap: 14px; font-size: 13px; line-height: 1.35; white-space: nowrap; --metal-star-inset: 11px; --metal-star-size: 9px; }
  .hero.hero-with-key .hero-actions .button { flex: 0 1 auto; }
  .hero.hero-with-key .hero-actions .button > svg,
  .contact-start .button.button-light > svg,
  #contact-form .button.button-light > svg { width: 17px; height: 17px; }
  .hero.hero-with-key .hero-actions .text-link { flex: 0 0 auto; min-height: 44px; font-size: 13px; gap: 7px; padding-block: 10px; }
  .hero.hero-with-key .hero-actions .text-link > svg { width: 16px; height: 16px; }
  .hero.hero-with-key .nai-introduction { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 0; width: 100%; margin-top: 16px; border: 1px solid var(--nai-line); border-radius: 4px; background: linear-gradient(120deg, #15223299, #080e1694); }
  .hero.hero-with-key .nai-introduction:focus-within { border-color: #9ed0ff8c; }
  body.nai-reactor-flare .hero.hero-with-key .nai-introduction { border-color: rgb(var(--reactor-light-rgb, 173 213 251) / calc(.25 + var(--reactor-flare-opacity, .5) * .45)); box-shadow: 0 0 18px rgb(var(--reactor-light-rgb, 173 213 251) / calc(var(--reactor-flare-opacity, .5) * .08)); }
  .hero.hero-with-key .nai-entry { width: 100%; min-height: 68px; padding: 8px 10px 8px 6px; gap: 10px; border: 0; border-radius: 3px 0 0 3px; background: transparent; box-shadow: none; }
  .hero.hero-with-key .nai-entry .nai-mark { flex-basis: 46px; width: 46px; height: 46px; }
  .hero.hero-with-key .nai-entry .nai-star { width: 31px; height: 31px; }
  .hero.hero-with-key .nai-invitation { flex: 1; gap: 2px; }
  .hero.hero-with-key .nai-invitation small { font-size: 8px; letter-spacing: .12em; }
  .hero.hero-with-key .nai-invitation > span { max-width: none; font-size: 10px; line-height: 1.4; }
  .hero.hero-with-key .nai-invitation strong { font-size: 12px; line-height: 1.4; gap: 8px; }
  .hero.hero-with-key .nai-invitation strong > svg { width: 15px; height: 15px; }
  .hero.hero-with-key .nai-replay { position: relative; width: 44px; min-height: 44px; padding: 10px; }
  .hero.hero-with-key .nai-replay::before { content: ''; position: absolute; inset: 10px auto 10px 0; width: 1px; background: var(--nai-line); }
  .hero.hero-with-key .key-card-caption { align-items: center; gap: 8px; margin-top: 4px; font-size: 11px; }
  .hero.hero-with-key .key-motion-button,
  .hero.hero-with-key .key-turn { min-height: 44px; font-size: 11px; }

  /* One type scale and action rhythm continues below the hero. */
  .website-services .section-heading,
  .real-example .section-heading,
  .integrations .section-heading { gap: 14px; margin-bottom: 24px; }
  .section-shell .section-heading h2,
  .contact-start h2 { font-size: clamp(34px, 9.4vw, 40px); line-height: 1.12; }
  .section-shell .section-heading > p,
  .contact-start p:not(.eyebrow) { font-size: 15px; line-height: 1.65; }
  .website-examples-grid { gap: 22px; }
  .website-example-body { padding: 20px 18px 14px; }
  .website-example-body .eyebrow { margin-bottom: 10px; font-size: 9px; }
  .website-example-body h3 { font-size: 28px; margin-bottom: 10px; }
  .website-example-body > p:not(.eyebrow) { font-size: 14px; line-height: 1.65; margin-bottom: 12px; }
  .website-example-links { gap: 0 16px; padding-top: 0; }
  .website-example-links a { font-size: 12px; }
  .enquiry-layout { gap: 26px; }
  .enquiry-story > .eyebrow { margin-bottom: 20px; font-size: 9px; }
  .enquiry-story .example-steps { gap: 20px; }
  .enquiry-story .example-steps li { gap: 14px; }
  .enquiry-story .example-steps h3 { font-size: 23px; margin-bottom: 6px; }
  .enquiry-story .example-steps p { font-size: 14px; line-height: 1.6; }
  .enquiry-story > .product-link,
  .integrations .integration-story .product-link,
  .integrations .ecosystem-next > .product-link { min-height: 44px; min-width: 0; padding-block: 10px; font-size: 13px; line-height: 1.5; }
  .enquiry-story > .product-link { margin-top: 18px; }
  .integrations .integration-feature { gap: 26px; }
  .integrations .integration-story h3 { font-size: 29px; line-height: 1.16; margin-block: 18px 14px; }
  .integrations .integration-story > p { font-size: 14px; line-height: 1.65; margin-bottom: 16px; }
  .integrations .document-workspace-header { padding: 16px 18px; }
  .integrations .document-tabs { padding-inline: 12px; }
  .integrations .document-tabs button { min-height: 44px; padding: 10px 3px; font-size: 12px; gap: 6px; }
  .integrations .document-sheet { padding: 20px 18px; }
  .integrations .document-sheet h4 { font-size: 28px; }
  .integrations .document-intro { font-size: 14px; line-height: 1.6; }
  .integrations .document-enquiry { font-size: 19px; }
  .integrations .document-workspace-footer { padding: 12px 18px; }
  .integrations .tools-disclosure { margin-top: 28px; }
  .integrations .tools-disclosure > summary { padding-block: 16px; gap: 6px; }
  .integrations .tools-disclosure > summary > span:first-child { font-size: 23px; }
  .integrations .tools-disclosure > summary > span:last-child { font-size: 12px; gap: 12px; }
  .integrations .ecosystem-filters { gap: 6px; }
  .integrations .ecosystem-filters button { min-height: 44px; padding: 9px 10px; font-size: 12px; }
  .integrations .ecosystem-tool.nvl-metal-surface { padding: 20px 18px; }
  .integrations .ecosystem-next { padding: 20px 18px; gap: 16px; }
  .contact-start { gap: 20px; }
  .contact-start h2 { margin-top: 16px; }
  .contact-start .button.button-light { margin-top: 18px; }
  .getting-started { margin-top: 28px; padding-top: 24px; gap: 20px; }
  .getting-started li { gap: 14px; }
  .getting-started h3 { font-size: 23px; }
  .getting-started p { margin-top: 6px; font-size: 13px; }
  .questions-disclosure { margin-top: 28px; }
  .questions-disclosure > summary { min-height: 56px; padding-block: 12px; gap: 14px; font-size: 13px; }
  .faq-inline summary { padding-block: 16px; font-size: 14px; }
  .faq-inline details p { font-size: 14px; line-height: 1.65; }
  .site-footer { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px 20px; padding-top: 24px; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .site-footer .brand { grid-column: 1 / -1; }
  .site-footer .brand > img.nvl-wordmark { width: 150px; }
  .site-footer > span { grid-column: 1 / -1; font-size: 12px; }
  .site-footer > a[href^="mailto:"],
  .site-footer .back-top { min-height: 44px; font-size: 12px; }
}

@media (max-width: 360px) {
  :root { --page-gutter: 16px; }
  .site-header .brand > img.nvl-wordmark { width: 122px; }
  .site-header .header-cta { font-size: 11px; padding-left: 25px; padding-right: 8px; }
  .hero.hero-with-key .hero-actions { gap: 12px; }
  .hero.hero-with-key .hero-actions .button { padding-right: 11px; padding-left: 30px; gap: 9px; --metal-star-inset: 10px; }
  .hero.hero-with-key .hero-actions .text-link { font-size: 12px; gap: 5px; }
  .hero.hero-with-key .hero-actions .text-link > svg { width: 16px; height: 16px; }
  .hero.hero-with-key .key-card-caption { font-size: 11px; }
  .hero.hero-with-key .key-motion-controls { gap: 2px; }
  .website-example-body h3 { font-size: 27px; }
}

/* A bottom-corner invitation does not cover headings below the sticky header. */
@media (max-width: 820px) {
  body > #nai-dock {
    top: auto;
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(12px + env(safe-area-inset-bottom));
    height: 50px;
    min-height: 50px;
    max-width: calc(100vw - 24px);
    padding: 5px 12px 5px 7px;
    gap: 8px;
    background: #091017;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 5px 20px #0006;
  }
  body > #nai-dock > span:last-child { font-size: 12px; text-align: left; }
  body > #nai-dock > span:last-child > small { font-size: 8px; letter-spacing: .07em; }
}

/* Preserve a useful conversation area on a phone, including Safari's keyboard. */
@media (max-width: 760px) {
  body > #nai-dialog { width: calc(100vw - 16px); max-width: none; max-height: calc(100dvh - 16px); height: min(820px, calc(100dvh - 16px)); }
  body > #nai-dialog::backdrop { background: #000b; -webkit-backdrop-filter: none; backdrop-filter: none; }
  #nai-dialog .nai-presence { grid-template-columns: 52px minmax(0, 1fr); column-gap: 12px; min-height: 108px; padding: 12px 16px; }
  #nai-dialog .nai-universe { width: 52px; height: 52px; }
  #nai-dialog .nai-universe > .nai-presence-star { width: 44px; height: 44px; }
  #nai-dialog .nai-presence > .nai-kicker { padding-right: 38px; margin-bottom: 4px; }
  #nai-dialog .nai-presence h2 { font-size: 24px; line-height: 1.05; padding-right: 46px; }
  #nai-dialog .nai-status { min-height: 14px; margin-top: 5px; padding-right: 44px; }
  #nai-dialog .nai-mic { position: absolute; right: 12px; bottom: 12px; width: 44px; min-height: 44px; margin: 0; padding: 12px; }
  #nai-dialog .nai-conversation { padding: 14px 16px 8px; overflow: hidden; }
  #nai-dialog .nai-conversation > header { padding-bottom: 12px; }
  #nai-dialog .nai-conversation h3 { font-size: 22px; }
  #nai-dialog .nai-messages { min-height: 0; padding-top: 16px; padding-bottom: 16px; -webkit-overflow-scrolling: touch; }
  #nai-dialog .nai-message { max-width: 100%; font-size: 14px; line-height: 1.65; }
  #nai-dialog .nai-message[data-role="notice"] { font-size: 12px; }
  #nai-dialog .nai-prompts { display: flex; gap: 6px; margin-bottom: 4px; }
  #nai-dialog .nai-prompts button { font-size: 11px; min-height: 44px; }
  #nai-dialog .nai-compose textarea { font-size: 16px; line-height: 1.5; resize: none; }
  #nai-dialog .nai-bottom { justify-content: space-between; column-gap: 8px; }
  #nai-dialog .nai-bottom button { min-height: 44px; font-size: 9px; }
  #contact-dialog { max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; }
  #contact-dialog > h2 { font-size: 36px; line-height: 1.1; margin-top: 20px; }
  #contact-dialog .dialog-intro { margin: 16px 0 20px; font-size: 15px; line-height: 1.6; }
  #contact-dialog input,
  #contact-dialog select,
  #contact-dialog textarea { font-size: 16px; }
}

@media (max-width: 380px) {
  #nai-dialog .nai-presence { column-gap: 10px; padding-inline: 12px; }
  #nai-dialog .nai-presence h2 { font-size: 22px; }
  #nai-dialog .nai-conversation { padding-inline: 12px; }
}

@media (max-width: 760px) and (max-height: 550px) {
  body > #nai-dialog { width: calc(100vw - 12px); height: calc(100dvh - 12px); max-height: calc(100dvh - 12px); }
  #nai-dialog .nai-presence { min-height: 62px; padding: 8px 12px; grid-template-columns: 40px minmax(0, 1fr); column-gap: 10px; }
  #nai-dialog .nai-universe { width: 40px; height: 40px; }
  #nai-dialog .nai-universe > .nai-presence-star { width: 34px; height: 34px; }
  #nai-dialog .nai-presence h2 { font-size: 18px; padding-right: 76px; }
  #nai-dialog .nai-mic { right: 45px; bottom: 8px; }
  #nai-dialog .nai-conversation { padding-top: 8px; }
  #nai-dialog .nai-conversation > header { padding-bottom: 8px; }
  #nai-dialog .nai-conversation h3 { font-size: 20px; }
  #nai-dialog .nai-messages { padding-block: 10px; }
  #nai-dialog .nai-bottom button { min-height: 36px; }
}


/* Keyboard panning uses the visual viewport; the layout viewport may stay tall. */
@media (max-width: 760px) {
  body > #nai-dialog[data-visual-viewport] {
    top: calc(var(--nai-viewport-top) + max(8px, (var(--nai-viewport-height) - 820px) / 2));
    bottom: auto;
    margin: 0 auto;
    height: min(820px, calc(var(--nai-viewport-height) - 16px));
    max-height: calc(var(--nai-viewport-height) - 16px);
  }
  #nai-dialog.nai-viewport-short .nai-presence { min-height: 62px; padding: 8px 12px; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; }
  #nai-dialog.nai-viewport-short .nai-presence > .nai-kicker { display: none; }
  #nai-dialog.nai-viewport-short .nai-universe { width: 40px; height: 40px; grid-row: 1 / 3; }
  #nai-dialog.nai-viewport-short .nai-universe > .nai-presence-star { width: 34px; height: 34px; }
  #nai-dialog.nai-viewport-short .nai-presence h2 { grid-row: 1; font-size: 18px; padding-right: 76px; align-self: end; }
  #nai-dialog.nai-viewport-short .nai-presence h2 br { display: none; }
  #nai-dialog.nai-viewport-short .nai-status { display: block; grid-row: 2; min-height: 12px; margin-top: 3px; padding-right: 76px; font-size: 8px; align-self: start; }
  #nai-dialog.nai-viewport-short .nai-mic { right: 45px; bottom: 8px; }
  #nai-dialog.nai-viewport-short .nai-conversation { padding-top: 8px; }
  #nai-dialog.nai-viewport-short .nai-conversation > header { padding-bottom: 8px; }
  #nai-dialog.nai-viewport-short .nai-conversation h3 { font-size: 20px; }
  #nai-dialog.nai-viewport-short .nai-messages { padding-block: 10px; }
  #nai-dialog.nai-viewport-short .nai-note { display: block; }
  #nai-dialog.nai-viewport-short .nai-bottom button { min-height: 36px; }
}
